26#ifndef SAGA2_SPELSHOW_H
27#define SAGA2_SPELSHOW_H
29#include "saga2/dispnode.h"
30#include "saga2/speldefs.h"
37typedef DisplayNodeList EffectronList;
66typedef EffectronFlags SpellStatusFunction(Effectron *);
68#define SPELLSTATUSFUNCTION(fname) EffectronFlags fname( Effectron * effectron )
73typedef SpellPoseID SpellSpritationFunction(
const Effectron *
const);
75#define SPELLSPRITATIONFUNCTION(fname) SpellPoseID fname( const Effectron * const effectron )
80typedef TilePoint SpellLocationFunction(
const Effectron *
const);
82#define SPELLLOCATIONFUNCTION(fname) TilePoint fname( const Effectron * const effectron )
87typedef spellHeight SpellHeightFunction(
const Effectron *
const);
89#define SPELLHEIGHTFUNCTION(fname) spellHeight fname( const Effectron * const effectron )
94typedef spellBreadth SpellBreadthFunction(
const Effectron *
const);
96#define SPELLBREADTHFUNCTION(fname) spellBreadth fname( const Effectron * const effectron )
101typedef 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) {
207enum effectCollisionCont {
214enum 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) {
295 SpellAge _implementAge;
323 bool updateStates(int32 deltaTime);
346 void tidyKill(uint16 spellNo);
349 void updateStates(int32 deltaTime);
365inline GameWorld *Effectron::world()
const {
366 return _parent->_world;
368inline int16 Effectron::getMapNum()
const {
369 return _parent->_world->_mapNum;
372inline EffectID Effectron::spellID() {
373 return _parent->_spell;
375inline SpellDisplayPrototype *Effectron::spell() {
376 return (*g_vm->_sdpList)[(SpellID)spellID()];
378inline EffectID Effectron::effectID() {
379 return spell()->_effect;
381inline EffectDisplayPrototype *Effectron::effect() {
382 return _parent->_effect;
384inline EffectronFlags Effectron::staCall() {
385 return _parent->_effect->_status(
this);
387inline TilePoint Effectron::posCall() {
388 return _parent->_effect->_location(
this);
390inline SpellSpritationSeed Effectron::sprCall() {
391 return _parent->_effect->_spriteno(
this);
393inline spellHeight Effectron::hgtCall() {
394 return _parent->_effect->_height(
this);
396inline spellBreadth Effectron::brdCall() {
397 return _parent->_effect->_breadth(
this);
399inline void Effectron::initCall(int16 eno) {
401 _parent->_effect->_init(
this);
408int16 whichColorMap(EffectID eid,
const Effectron *
const effectron);
415SPELLSTATUSFUNCTION(invisibleSpellSta);
416SPELLSTATUSFUNCTION(auraSpellSta);
417SPELLSTATUSFUNCTION(projectileSpellSta);
418SPELLSTATUSFUNCTION(exchangeSpellSta);
419SPELLSTATUSFUNCTION(boltSpellSta);
420SPELLSTATUSFUNCTION(coneSpellSta);
421SPELLSTATUSFUNCTION(ballSpellSta);
422SPELLSTATUSFUNCTION(squareSpellSta);
423SPELLSTATUSFUNCTION(waveSpellSta);
424SPELLSTATUSFUNCTION(stormSpellSta);
425SPELLSTATUSFUNCTION(beamSpellSta);
426SPELLSTATUSFUNCTION(wallSpellSta);
428SPELLLOCATIONFUNCTION(invisibleSpellPos);
429SPELLLOCATIONFUNCTION(auraSpellPos);
430SPELLLOCATIONFUNCTION(projectileSpellPos);
431SPELLLOCATIONFUNCTION(exchangeSpellPos);
432SPELLLOCATIONFUNCTION(boltSpellPos);
433SPELLLOCATIONFUNCTION(coneSpellPos);
434SPELLLOCATIONFUNCTION(ballSpellPos);
435SPELLLOCATIONFUNCTION(squareSpellPos);
436SPELLLOCATIONFUNCTION(waveSpellPos);
437SPELLLOCATIONFUNCTION(stormSpellPos);
438SPELLLOCATIONFUNCTION(beamSpellPos);
439SPELLLOCATIONFUNCTION(wallSpellPos);
440SPELLLOCATIONFUNCTION(glowSpellPos);
442SPELLSPRITATIONFUNCTION(invisibleSprites);
443SPELLSPRITATIONFUNCTION(auraSprites);
444SPELLSPRITATIONFUNCTION(projectileSprites);
445SPELLSPRITATIONFUNCTION(exchangeSprites);
446SPELLSPRITATIONFUNCTION(boltSprites);
447SPELLSPRITATIONFUNCTION(coneSprites);
448SPELLSPRITATIONFUNCTION(ballSprites);
449SPELLSPRITATIONFUNCTION(squareSprites);
450SPELLSPRITATIONFUNCTION(waveSprites);
451SPELLSPRITATIONFUNCTION(stormSprites);
452SPELLSPRITATIONFUNCTION(beamSprites);
453SPELLSPRITATIONFUNCTION(wallSprites);
455SPELLHEIGHTFUNCTION(ShortTillThere);
456SPELLHEIGHTFUNCTION(GrowLinear);
457SPELLBREADTHFUNCTION(StaticHeight);
459SPELLBREADTHFUNCTION(ThinTillThere);
460SPELLBREADTHFUNCTION(BulkLinear);
461SPELLBREADTHFUNCTION(StaticBreadth);
463SPELLINITFUNCTION(invisibleSpellInit);
464SPELLINITFUNCTION(auraSpellInit);
465SPELLINITFUNCTION(projectileSpellInit);
466SPELLINITFUNCTION(exchangeSpellInit);
467SPELLINITFUNCTION(boltSpellInit);
468SPELLINITFUNCTION(coneSpellInit);
469SPELLINITFUNCTION(ballSpellInit);
470SPELLINITFUNCTION(squareSpellInit);
471SPELLINITFUNCTION(waveSpellInit);
472SPELLINITFUNCTION(stormSpellInit);
473SPELLINITFUNCTION(glowSpellInit);
474SPELLINITFUNCTION(beamSpellInit);
475SPELLINITFUNCTION(wallSpellInit);
Definition: memstream.h:194
Definition: savefile.h:54
Definition: dispnode.h:86
Definition: spelshow.h:112
Definition: spelshow.h:183
Definition: speldefs.h:277
Definition: objects.h:118
Definition: objects.h:768
Definition: spelshow.h:333
Definition: spelshow.h:229
Definition: spelshow.h:272
Definition: spelshow.h:292
Definition: speldefs.h:139
Definition: spellio.h:132
Definition: tcoords.h:127