World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
ObjectList.h
См. документацию.
1 #pragma once
2 
3 #include <cstdint>
4 
17 };
18 
19 #pragma pack(push, 1)
20 struct ObjectDesc {
21  inline bool NoSprite() const { return uFlags & OBJECT_DESC_NO_SPRITE; }
22 
23  char field_0[32];
38 };
39 #pragma pack(pop)
40 
41 class ObjectList {
42  public:
43  inline ObjectList() : uNumObjects(0), pObjects(nullptr) {}
44 
45  void FromFile(void *data_mm6, void *data_mm7, void *data_mm8);
46  void InitializeSprites();
47  void InitializeColors();
48  unsigned int ObjectIDByItemID(unsigned int uItemID);
49 
50  protected:
51  unsigned int uNumObjects;
52 
53  public:
55 };
56 
57 extern ObjectList *pObjectList;
uint16_t
unsigned __int16 uint16_t
Definition: SDL_config.h:37
OBJECT_DESC_NO_COLLISION
@ OBJECT_DESC_NO_COLLISION
Definition: ObjectList.h:7
OBJECT_DESC_BOUNCE
@ OBJECT_DESC_BOUNCE
Definition: ObjectList.h:13
ObjectDesc::uSpeed
int16_t uSpeed
Definition: ObjectList.h:31
ObjectDesc::field_0
char field_0[32]
Definition: ObjectList.h:23
int16_t
signed __int16 int16_t
Definition: SDL_config.h:36
ObjectDesc::field_36_clr
char field_36_clr
Definition: ObjectList.h:36
ObjectList::ObjectList
ObjectList()
Definition: ObjectList.h:43
OBJECT_DESC_FLAGS
OBJECT_DESC_FLAGS
Definition: ObjectList.h:5
ObjectList::InitializeColors
void InitializeColors()
Definition: ObjectList.cpp:26
ObjectDesc
Definition: ObjectList.h:20
ObjectDesc::field_35_clr
char field_35_clr
Definition: ObjectList.h:35
ObjectList::ObjectIDByItemID
unsigned int ObjectIDByItemID(unsigned int uItemID)
Definition: ObjectList.cpp:7
ObjectDesc::uRadius
int16_t uRadius
Definition: ObjectList.h:25
OBJECT_DESC_NO_GRAVITY
@ OBJECT_DESC_NO_GRAVITY
Definition: ObjectList.h:11
OBJECT_DESC_SFT_LIFETIME
@ OBJECT_DESC_SFT_LIFETIME
Definition: ObjectList.h:9
OBJECT_DESC_INTERACTABLE
@ OBJECT_DESC_INTERACTABLE
Definition: ObjectList.h:12
ObjectDesc::field_37_clr
char field_37_clr
Definition: ObjectList.h:37
pObjectList
ObjectList * pObjectList
Definition: ObjectList.cpp:5
ObjectDesc::uLifetime
int16_t uLifetime
Definition: ObjectList.h:29
ObjectDesc::uParticleTrailColor
uint32_t uParticleTrailColor
Definition: ObjectList.h:30
OBJECT_DESC_UNPICKABLE
@ OBJECT_DESC_UNPICKABLE
Definition: ObjectList.h:10
ObjectDesc::uSpriteID
uint16_t uSpriteID
Definition: ObjectList.h:28
OBJECT_DESC_TEMPORARY
@ OBJECT_DESC_TEMPORARY
Definition: ObjectList.h:8
ObjectDesc::uFlags
int16_t uFlags
Definition: ObjectList.h:27
ObjectDesc::uHeight
int16_t uHeight
Definition: ObjectList.h:26
OBJECT_DESC_TRIAL_LINE
@ OBJECT_DESC_TRIAL_LINE
Definition: ObjectList.h:16
ObjectDesc::NoSprite
bool NoSprite() const
Definition: ObjectList.h:21
OBJECT_DESC_NO_SPRITE
@ OBJECT_DESC_NO_SPRITE
Definition: ObjectList.h:6
ObjectList
Definition: ObjectList.h:41
ObjectList::InitializeSprites
void InitializeSprites()
Definition: ObjectList.cpp:20
OBJECT_DESC_TRIAL_PARTICLE
@ OBJECT_DESC_TRIAL_PARTICLE
Definition: ObjectList.h:14
ObjectDesc::uObjectID
int16_t uObjectID
Definition: ObjectList.h:24
uint8_t
unsigned __int8 uint8_t
Definition: SDL_config.h:35
ObjectDesc::uParticleTrailColorB
uint8_t uParticleTrailColorB
Definition: ObjectList.h:34
ObjectDesc::uParticleTrailColorG
uint8_t uParticleTrailColorG
Definition: ObjectList.h:33
ObjectList::uNumObjects
unsigned int uNumObjects
Definition: ObjectList.h:51
OBJECT_DESC_TRIAL_FIRE
@ OBJECT_DESC_TRIAL_FIRE
Definition: ObjectList.h:15
ObjectList::pObjects
struct ObjectDesc * pObjects
Definition: ObjectList.h:54
ObjectDesc::uParticleTrailColorR
uint8_t uParticleTrailColorR
Definition: ObjectList.h:32
uint32_t
unsigned __int32 uint32_t
Definition: SDL_config.h:39
ObjectList::FromFile
void FromFile(void *data_mm6, void *data_mm7, void *data_mm8)
Definition: ObjectList.cpp:55