26 #ifndef SAGA2_SPELSHOW_H 27 #define SAGA2_SPELSHOW_H 29 #include "saga2/dispnode.h" 30 #include "saga2/speldefs.h" 37 typedef DisplayNodeList EffectronList;
66 typedef EffectronFlags SpellStatusFunction(Effectron *);
68 #define SPELLSTATUSFUNCTION(fname) EffectronFlags fname( Effectron * effectron ) 73 typedef SpellPoseID SpellSpritationFunction(
const Effectron *
const);
75 #define SPELLSPRITATIONFUNCTION(fname) SpellPoseID fname( const Effectron * const effectron ) 80 typedef TilePoint SpellLocationFunction(
const Effectron *
const);
82 #define SPELLLOCATIONFUNCTION(fname) TilePoint fname( const Effectron * const effectron ) 87 typedef spellHeight SpellHeightFunction(
const Effectron *
const);
89 #define SPELLHEIGHTFUNCTION(fname) spellHeight fname( const Effectron * const effectron ) 94 typedef spellBreadth SpellBreadthFunction(
const Effectron *
const);
96 #define SPELLBREADTHFUNCTION(fname) spellBreadth fname( const Effectron * const effectron ) 101 typedef void SpellInitFunction(Effectron *);
103 #define SPELLINITFUNCTION(fname) void fname( Effectron * effectron ) 113 static SPELLLOCATIONFUNCTION(nullLocation) {
116 static SPELLSPRITATIONFUNCTION(nullSpritation) {
119 static SPELLSTATUSFUNCTION(nullStatus) {
120 return kEffectronDead;
122 static SPELLHEIGHTFUNCTION(nullHeight) {
125 static SPELLBREADTHFUNCTION(nullBreadth) {
128 static SPELLINITFUNCTION(nullInit) {
136 SpellLocationFunction *_location;
137 SpellSpritationFunction *_spriteno;
138 SpellStatusFunction *_status;
139 SpellHeightFunction *_height;
140 SpellBreadthFunction *_breadth;
141 SpellInitFunction *_init;
146 _location = &nullLocation;
147 _spriteno = &nullSpritation;
148 _status = &nullStatus;
149 _height = &nullHeight;
150 _breadth = &nullBreadth;
156 SpellLocationFunction *newLocation,
157 SpellSpritationFunction *newSpriteno,
158 SpellStatusFunction *newStatus,
159 SpellHeightFunction *newHeight,
160 SpellBreadthFunction *newBreadth,
161 SpellInitFunction *newInit);
163 if (_next)
delete _next;
166 void setID(EffectID i) {
184 pEffectDisplayPrototype *_effects;
207 enum effectCollisionCont {
214 enum effectDirectionInit {
238 effectDirectionInit _scatter;
239 effectCollisionCont _elasticity;
242 SpellAge _implementAge;
243 uint32 _primarySpriteID;
244 uint8 _primarySpriteNo;
245 uint32 _secondarySpriteID;
246 uint8 _secondarySpriteNo;
252 EffectID, int32, int32, int32, int32, effectDirectionInit,
253 effectCollisionCont, SpellAge, uint32, uint8, uint8);
257 void getColorTranslation(ColorTable mainColors,
Effectron *);
258 void setID(SpellID i) {
273 pSpellDisplayPrototype *_spells;
295 SpellAge _implementAge;
303 EffectronList _eList;
323 bool updateStates(int32 deltaTime);
337 pSpellInstance *_spells;
346 void tidyKill(uint16 spellNo);
349 void updateStates(int32 deltaTime);
365 inline GameWorld *Effectron::world()
const {
366 return _parent->_world;
368 inline int16 Effectron::getMapNum()
const {
369 return _parent->_world->_mapNum;
372 inline EffectID Effectron::spellID() {
373 return _parent->_spell;
376 return (*g_vm->_sdpList)[(SpellID)spellID()];
378 inline EffectID Effectron::effectID() {
379 return spell()->_effect;
382 return _parent->_effect;
384 inline EffectronFlags Effectron::staCall() {
385 return _parent->_effect->_status(
this);
388 return _parent->_effect->_location(
this);
390 inline SpellSpritationSeed Effectron::sprCall() {
391 return _parent->_effect->_spriteno(
this);
393 inline spellHeight Effectron::hgtCall() {
394 return _parent->_effect->_height(
this);
396 inline spellBreadth Effectron::brdCall() {
397 return _parent->_effect->_breadth(
this);
399 inline void Effectron::initCall(int16 eno) {
401 _parent->_effect->_init(
this);
408 int16 whichColorMap(EffectID eid,
const Effectron *
const effectron);
415 SPELLSTATUSFUNCTION(invisibleSpellSta);
416 SPELLSTATUSFUNCTION(auraSpellSta);
417 SPELLSTATUSFUNCTION(projectileSpellSta);
418 SPELLSTATUSFUNCTION(exchangeSpellSta);
419 SPELLSTATUSFUNCTION(boltSpellSta);
420 SPELLSTATUSFUNCTION(coneSpellSta);
421 SPELLSTATUSFUNCTION(ballSpellSta);
422 SPELLSTATUSFUNCTION(squareSpellSta);
423 SPELLSTATUSFUNCTION(waveSpellSta);
424 SPELLSTATUSFUNCTION(stormSpellSta);
425 SPELLSTATUSFUNCTION(beamSpellSta);
426 SPELLSTATUSFUNCTION(wallSpellSta);
428 SPELLLOCATIONFUNCTION(invisibleSpellPos);
429 SPELLLOCATIONFUNCTION(auraSpellPos);
430 SPELLLOCATIONFUNCTION(projectileSpellPos);
431 SPELLLOCATIONFUNCTION(exchangeSpellPos);
432 SPELLLOCATIONFUNCTION(boltSpellPos);
433 SPELLLOCATIONFUNCTION(coneSpellPos);
434 SPELLLOCATIONFUNCTION(ballSpellPos);
435 SPELLLOCATIONFUNCTION(squareSpellPos);
436 SPELLLOCATIONFUNCTION(waveSpellPos);
437 SPELLLOCATIONFUNCTION(stormSpellPos);
438 SPELLLOCATIONFUNCTION(beamSpellPos);
439 SPELLLOCATIONFUNCTION(wallSpellPos);
440 SPELLLOCATIONFUNCTION(glowSpellPos);
442 SPELLSPRITATIONFUNCTION(invisibleSprites);
443 SPELLSPRITATIONFUNCTION(auraSprites);
444 SPELLSPRITATIONFUNCTION(projectileSprites);
445 SPELLSPRITATIONFUNCTION(exchangeSprites);
446 SPELLSPRITATIONFUNCTION(boltSprites);
447 SPELLSPRITATIONFUNCTION(coneSprites);
448 SPELLSPRITATIONFUNCTION(ballSprites);
449 SPELLSPRITATIONFUNCTION(squareSprites);
450 SPELLSPRITATIONFUNCTION(waveSprites);
451 SPELLSPRITATIONFUNCTION(stormSprites);
452 SPELLSPRITATIONFUNCTION(beamSprites);
453 SPELLSPRITATIONFUNCTION(wallSprites);
455 SPELLHEIGHTFUNCTION(ShortTillThere);
456 SPELLHEIGHTFUNCTION(GrowLinear);
457 SPELLBREADTHFUNCTION(StaticHeight);
459 SPELLBREADTHFUNCTION(ThinTillThere);
460 SPELLBREADTHFUNCTION(BulkLinear);
461 SPELLBREADTHFUNCTION(StaticBreadth);
463 SPELLINITFUNCTION(invisibleSpellInit);
464 SPELLINITFUNCTION(auraSpellInit);
465 SPELLINITFUNCTION(projectileSpellInit);
466 SPELLINITFUNCTION(exchangeSpellInit);
467 SPELLINITFUNCTION(boltSpellInit);
468 SPELLINITFUNCTION(coneSpellInit);
469 SPELLINITFUNCTION(ballSpellInit);
470 SPELLINITFUNCTION(squareSpellInit);
471 SPELLINITFUNCTION(waveSpellInit);
472 SPELLINITFUNCTION(stormSpellInit);
473 SPELLINITFUNCTION(glowSpellInit);
474 SPELLINITFUNCTION(beamSpellInit);
475 SPELLINITFUNCTION(wallSpellInit);
Definition: speldefs.h:277
Definition: savefile.h:54
Definition: memstream.h:194
Definition: tcoords.h:127
Definition: spelshow.h:333
Definition: spelshow.h:183
Definition: spelshow.h:229
Definition: spelshow.h:292
Definition: objects.h:768
Definition: objects.h:118
Definition: spellio.h:132
Definition: speldefs.h:139
Definition: spelshow.h:112
Definition: spelshow.h:272