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.
25 #include "PluginMgr.h"
26 #include "Projectile.h"
28 //the number of resrefs in areapro.2da (before the flags field)
31 //this represents a line of projectl.ids
37 memset(this,0,sizeof(ProjectileEntry
));
46 Projectile
*projectile
;
54 memset(this,0,sizeof(ExplosionEntry
));
56 ieResRef resources
[AP_RESCNT
];
60 //this singleton object serves the projectile objects
61 class GEM_EXPORT ProjectileServer
67 Projectile
*GetProjectileByIndex(unsigned int idx
);
68 //it is highly unlikely we need this function
69 Projectile
*GetProjectileByName(const ieResRef resname
);
70 //returns the highest projectile id
71 unsigned int GetHighestProjectileNumber();
73 int GetExplosionFlags(unsigned int idx
);
74 ieResRef
const *GetExplosion(unsigned int idx
, int type
);
75 //creates an empty projectile on the fly
76 Projectile
*CreateDefaultProjectile(unsigned int idx
);
78 ProjectileEntry
*projectiles
; //this is the list of projectiles
80 ExplosionEntry
*explosions
; //this is the list of explosion resources
82 // internal function: what is max valid projectile id?
83 unsigned int PrepareSymbols(class SymbolMgr
*projlist
);
84 // internal function: read projectiles
85 void AddSymbols(class SymbolMgr
*projlist
);
86 //this method is used internally
87 Projectile
*GetProjectile(unsigned int idx
);
88 //creates a clone from the cached projectiles
89 Projectile
*ReturnCopy(unsigned int idx
);
90 //returns one of the resource names
93 #endif // PROJSERVER_H