light.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. //***************************************************************************
  2. //
  3. // Light.h -- File contains the Explosion Object Definition
  4. //
  5. // MechCommander 2
  6. //
  7. //---------------------------------------------------------------------------//
  8. // Copyright (C) Microsoft Corporation. All rights reserved. //
  9. //===========================================================================//
  10. #ifndef LIGHT_H
  11. #define LIGHT_H
  12. //---------------------------------------------------------------------------
  13. #ifndef DCARNAGE_H
  14. #include "dcarnage.h"
  15. #endif
  16. #ifndef GAMEOBJ_H
  17. #include "gameobj.h"
  18. #endif
  19. #ifndef OBJMGR_H
  20. #include "objmgr.h"
  21. #endif
  22. #ifndef OBJTYPE_H
  23. #include "objtype.h"
  24. #endif
  25. //---------------------------------------------------------------------------
  26. /*
  27. #define NO_APPEARANCE_TYPE_FOR_EXPL 0xDCDC0003
  28. #define NO_APPEARANCE_FOR_EXPL 0xDCDC0004
  29. #define APPEARANCE_NOT_VFX_XPL 0xDCDC0005
  30. */
  31. //---------------------------------------------------------------------------
  32. class LightType : public ObjectType {
  33. public:
  34. bool oneShotFlag;
  35. float altitudeOffset;
  36. public:
  37. void init (void) {
  38. ObjectType::init();
  39. }
  40. LightType (void) {
  41. init();
  42. }
  43. virtual long init (FilePtr objFile, unsigned long fileSize);
  44. long init (FitIniFilePtr objFile);
  45. ~LightType (void) {
  46. destroy();
  47. }
  48. virtual void destroy (void);
  49. virtual GameObjectPtr createInstance (void);
  50. virtual bool handleCollision (GameObjectPtr collidee, GameObjectPtr collider);
  51. virtual bool handleDestruction (GameObjectPtr collidee, GameObjectPtr collider);
  52. };
  53. //---------------------------------------------------------------------------
  54. class Light : public GameObject {
  55. public:
  56. virtual void init (bool create);
  57. Light (void) : GameObject() {
  58. init(true);
  59. }
  60. ~Light (void) {
  61. destroy();
  62. }
  63. virtual void destroy (void);
  64. virtual long update (void);
  65. virtual void render (void);
  66. virtual void init (bool create, ObjectTypePtr _type);
  67. virtual long kill (void) {
  68. return(NO_ERR);
  69. }
  70. };
  71. //***************************************************************************
  72. #endif