Obj Decal.h 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. /******************************************************************************/
  2. namespace Game{
  3. /******************************************************************************/
  4. STRUCT(ObjDecal , Obj) // Game Decal Object
  5. //{
  6. Decal decal;
  7. // manage
  8. virtual void create(Object &obj); // create from object
  9. // get / set
  10. virtual Vec pos ( ); // get position
  11. virtual void pos (C Vec &pos ); // set position
  12. virtual Matrix matrix( ); // get matrix
  13. virtual void matrix(C Matrix &matrix); // set matrix
  14. // update
  15. virtual Bool update(); // update, return false when object wants to be deleted, and true if wants to exist
  16. // draw
  17. virtual UInt drawPrepare(); // prepare for drawing, this will be called in RM_PREPARE mode, in this method you should add the meshes to the draw list (Mesh::draw), and return a combination of bits of which additional render modes will be required for custom drawing of the object (for example "return IndexToFlag(RM_BLEND)" requests blend mode rendering)
  18. virtual void drawOverlay(); // this will get called by the engine and draw the decal
  19. // io
  20. virtual Bool save(File &f); // save, false on fail
  21. virtual Bool load(File &f); // load, false on fail
  22. ~ObjDecal();
  23. ObjDecal();
  24. };
  25. /******************************************************************************/
  26. } // namespace
  27. /******************************************************************************/