OEFFECT.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Seven Kingdoms: Ancient Adversaries
  3. *
  4. * Copyright 1997,1998 Enlight Software Ltd.
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. */
  20. // Filename : OEFFECT.H
  21. // Description : header file of effect array
  22. #ifndef __OEFFECT_H
  23. #define __OEFFECT_H
  24. #include <OSPRITE.h>
  25. class Effect : public Sprite
  26. {
  27. public:
  28. char layer;
  29. int life;
  30. public:
  31. Effect();
  32. ~Effect();
  33. void init(short spriteId, short startX, short startY, char initAction, char initDir, char dispLayer, int effectLife);
  34. void pre_process();
  35. void process_idle();
  36. int process_die();
  37. static void create(short spriteId, short startX, short startY, char initAction, char initDir, char dispLayer, int effectLife);
  38. };
  39. // to add an effect to effect_array,
  40. // Effect *effectPtr = new Effect;
  41. // effectPtr->init(...)
  42. // effect_array.add(effectPtr);
  43. // or call Effect::create();
  44. extern SpriteArray effect_array;
  45. #endif