2004-05-29 17:46:58 -07:00
|
|
|
#ifndef _OBJECTENTRY_H
|
|
|
|
|
#define _OBJECTENTRY_H
|
|
|
|
|
|
|
|
|
|
class CModel;
|
|
|
|
|
class CSkeletonAnim;
|
2005-05-10 00:13:25 -07:00
|
|
|
struct SPropPoint;
|
2004-05-29 17:46:58 -07:00
|
|
|
|
2005-06-20 08:14:36 -07:00
|
|
|
#include <map>
|
2004-05-29 17:46:58 -07:00
|
|
|
#include <vector>
|
2005-06-01 13:12:45 -07:00
|
|
|
#include <map>
|
2004-05-29 17:46:58 -07:00
|
|
|
#include "CStr.h"
|
2005-03-22 09:09:36 -08:00
|
|
|
#include "ObjectBase.h"
|
2005-04-06 21:29:07 -07:00
|
|
|
#include "Overlay.h"
|
2004-05-29 17:46:58 -07:00
|
|
|
|
|
|
|
|
class CObjectEntry
|
|
|
|
|
{
|
|
|
|
|
public:
|
2005-03-22 09:09:36 -08:00
|
|
|
CObjectEntry(int type, CObjectBase* base);
|
2004-05-29 17:46:58 -07:00
|
|
|
~CObjectEntry();
|
|
|
|
|
|
2005-07-02 18:37:49 -07:00
|
|
|
bool BuildRandomVariant(const CObjectBase::variation_key& vars, CObjectBase::variation_key::const_iterator& vars_it);
|
2004-05-29 17:46:58 -07:00
|
|
|
|
2005-04-02 21:02:00 -08:00
|
|
|
// Base actor. Contains all the things that don't change between
|
2005-03-22 09:09:36 -08:00
|
|
|
// different variations of the actor.
|
|
|
|
|
CObjectBase* m_Base;
|
2005-03-19 03:55:27 -08:00
|
|
|
|
2004-05-29 17:46:58 -07:00
|
|
|
// texture name
|
|
|
|
|
CStr m_TextureName;
|
|
|
|
|
// model name
|
|
|
|
|
CStr m_ModelName;
|
2005-04-06 21:29:07 -07:00
|
|
|
// colour (used when doing alpha-channel colouring, but not doing player-colour)
|
|
|
|
|
CColor m_Color;
|
2005-05-20 18:40:32 -07:00
|
|
|
// (probable TODO: make colour a per-model thing, rather than per-objectEntry,
|
|
|
|
|
// so we can have lots of colour variations without wasting memory on
|
|
|
|
|
// lots of objectEntries)
|
2004-11-10 23:09:32 -08:00
|
|
|
|
2005-05-10 00:13:25 -07:00
|
|
|
CModel* m_ProjectileModel;
|
|
|
|
|
CModel* m_AmmunitionModel;
|
|
|
|
|
SPropPoint* m_AmmunitionPoint;
|
|
|
|
|
|
2005-05-20 18:40:32 -07:00
|
|
|
// Returns a randomly-chosen animation matching the given name.
|
|
|
|
|
// If none is found, returns NULL.
|
|
|
|
|
CSkeletonAnim* GetRandomAnimation(const CStr& animationName);
|
|
|
|
|
|
2004-05-29 17:46:58 -07:00
|
|
|
// corresponding model
|
|
|
|
|
CModel* m_Model;
|
|
|
|
|
// type of object; index into object managers types array
|
|
|
|
|
int m_Type;
|
2005-05-20 18:40:32 -07:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
typedef std::multimap<CStr, CSkeletonAnim*> SkeletonAnimMap;
|
|
|
|
|
SkeletonAnimMap m_Animations;
|
|
|
|
|
// TODO: something more memory-efficient than storing loads of similar strings for each unit?
|
2004-05-29 17:46:58 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|