1 /* GemRB - Infinity Engine Emulator
2 * Copyright (C) 2006 The GemRB Project
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 #include "PluginMgr.h"
27 #include "Projectile.h"
31 //the number of resrefs in areapro.2da (before the flags field)
34 //this represents a line of projectl.ids
40 memset(this,0,sizeof(ProjectileEntry
));
49 Projectile
*projectile
;
57 memset(this,0,sizeof(ExplosionEntry
));
59 ieResRef resources
[AP_RESCNT
];
63 //this singleton object serves the projectile objects
64 class GEM_EXPORT ProjectileServer
70 Projectile
*GetProjectileByIndex(unsigned int idx
);
71 //it is highly unlikely we need this function
72 Projectile
*GetProjectileByName(const ieResRef resname
);
73 //returns the highest projectile id
74 unsigned int GetHighestProjectileNumber();
76 int GetExplosionFlags(unsigned int idx
);
77 ieResRef
const *GetExplosion(unsigned int idx
, int type
);
78 //creates an empty projectile on the fly
79 Projectile
*CreateDefaultProjectile(unsigned int idx
);
81 ProjectileEntry
*projectiles
; //this is the list of projectiles
83 ExplosionEntry
*explosions
; //this is the list of explosion resources
85 // internal function: what is max valid projectile id?
86 unsigned int PrepareSymbols(Holder
<SymbolMgr
> projlist
);
87 // internal function: read projectiles
88 void AddSymbols(Holder
<SymbolMgr
> projlist
);
89 //this method is used internally
90 Projectile
*GetProjectile(unsigned int idx
);
91 //creates a clone from the cached projectiles
92 Projectile
*ReturnCopy(unsigned int idx
);
93 //returns one of the resource names
96 #endif // PROJSERVER_H