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 21 // Filename : OEFFECT.H 22 // Description : header file of effect array 23 24 #ifndef __OEFFECT_H 25 #define __OEFFECT_H 26 27 #include <OSPRITE.h> 28 29 class Effect : public Sprite 30 { 31 public: 32 char layer; 33 int life; 34 35 public: 36 Effect(); 37 ~Effect(); 38 39 void init(short spriteId, short startX, short startY, char initAction, char initDir, char dispLayer, int effectLife); 40 void pre_process(); 41 void process_idle(); 42 int process_die(); 43 44 static void create(short spriteId, short startX, short startY, char initAction, char initDir, char dispLayer, int effectLife); 45 }; 46 47 // to add an effect to effect_array, 48 // Effect *effectPtr = new Effect; 49 // effectPtr->init(...) 50 // effect_array.add(effectPtr); 51 // or call Effect::create(); 52 53 extern SpriteArray effect_array; 54 55 #endif