summaryrefslogtreecommitdiff
path: root/src/resources/npcdb.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-05-02 14:43:40 -0600
committerJared Adams <jaxad0127@gmail.com>2010-05-06 22:21:57 -0600
commit9baedc27191c82bbf1fedee2a7e738bc5b267c0e (patch)
treef0986c6839d1e79b402d5d4ec36e4994741955ea /src/resources/npcdb.h
parent844e9a7a72faca6a212e788a3adc45e17f41dca6 (diff)
downloadmana-client-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.tar.gz
mana-client-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.tar.bz2
mana-client-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.tar.xz
mana-client-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.zip
Add support for floor item sprites
This commit adds a sprite hierarchy (Sprite->ImageSprite,AnimatedSprite,CompundSprite; CompoundSprite,Actor->ActorSprite;ActorSprite->Being,FloorItem) to collect common functionailty into new base classes which will make other Mantis tickets easier to do. Also allows monsters to use particle effects. Reviewed-by: Bertram
Diffstat (limited to 'src/resources/npcdb.h')
-rw-r--r--src/resources/npcdb.h20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/resources/npcdb.h b/src/resources/npcdb.h
index 9da873e4..84ae4e24 100644
--- a/src/resources/npcdb.h
+++ b/src/resources/npcdb.h
@@ -22,23 +22,11 @@
#ifndef NPC_DB_H
#define NPC_DB_H
-#include <list>
-#include <map>
-#include <string>
-
-struct NPCsprite
-{
- std::string sprite;
- int variant;
-};
+#include "resources/spritedef.h"
-struct NPCInfo
-{
- std::list<NPCsprite*> sprites;
- std::list<std::string> particles;
-};
+#include <map>
-typedef std::map<int, NPCInfo*> NPCInfos;
+typedef std::map<int, SpriteDisplay*> NPCInfos;
/**
* NPC information database.
@@ -49,7 +37,7 @@ namespace NPCDB
void unload();
- const NPCInfo& get(int id);
+ const SpriteDisplay& get(int id);
typedef NPCInfos::iterator NPCInfosIterator;
}