World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
DecorationList.h
См. документацию.
1 #pragma once
2 
3 #include <cstdint>
4 #include <vector>
5 
6 #include "Engine/Strings.h"
7 
8 /* 321 */
21 };
22 
23 /* 54 */
24 #pragma pack(push, 1)
26  inline bool CanMoveThrough() {
27  return (uFlags & DECORATION_DESC_MOVE_THROUGH) != 0;
28  }
29  inline bool DontDraw() { return (uFlags & DECORATION_DESC_DONT_DRAW) != 0; }
30  inline bool SoundOnDawn() {
31  return (uFlags & DECORATION_DESC_SOUND_ON_DAWN) != 0;
32  }
33  inline bool SoundOnDusk() {
34  return (uFlags & DECORATION_DESC_SOUND_ON_DUSK) != 0;
35  }
36 
37  char pName[32];
38  char field_20[32];
47 };
48 
53  char __padding;
54 };
55 #pragma pack(pop)
56 
58  public:
59  inline DecorationList() {}
60 
61  void ToFile();
62  void FromFile(void *data_mm6, void *data_mm7, void *data_mm8);
63  void InitializeDecorationSprite(unsigned int uDecID);
64  uint16_t GetDecorIdByName(const char *pName);
66  return &pDecorations[index];
67  }
68 
69  protected:
70  std::vector<DecorationDesc> pDecorations;
71 };
72 
73 extern class DecorationList *pDecorationList;
74 
uint16_t
unsigned __int16 uint16_t
Definition: SDL_config.h:37
DecorationDesc_mm6::DontDraw
bool DontDraw()
Definition: DecorationList.h:29
DecorationDesc_mm6::uFlags
int16_t uFlags
Definition: DecorationList.h:44
RespawnGlobalDecorations
void RespawnGlobalDecorations()
Definition: DecorationList.cpp:70
int16_t
signed __int16 int16_t
Definition: SDL_config.h:36
DecorationDesc_mm6::uType
int16_t uType
Definition: DecorationList.h:39
DecorationList::GetDecoration
DecorationDesc * GetDecoration(unsigned int index)
Definition: DecorationList.h:65
DECORATION_DESC_FLAGS
DECORATION_DESC_FLAGS
Definition: DecorationList.h:9
DecorationList::FromFile
void FromFile(void *data_mm6, void *data_mm7, void *data_mm8)
Definition: DecorationList.cpp:14
DecorationDesc::uColoredLightRed
uint8_t uColoredLightRed
Definition: DecorationList.h:50
DECORATION_DESC_EMITS_SMOKE
@ DECORATION_DESC_EMITS_SMOKE
Definition: DecorationList.h:20
DecorationList::DecorationList
DecorationList()
Definition: DecorationList.h:59
DecorationDesc_mm6::_pad
int16_t _pad
Definition: DecorationList.h:46
DECORATION_DESC_DONT_DRAW
@ DECORATION_DESC_DONT_DRAW
Definition: DecorationList.h:11
DecorationDesc_mm6::pName
char pName[32]
Definition: DecorationList.h:37
DecorationList::pDecorations
std::vector< DecorationDesc > pDecorations
Definition: DecorationList.h:70
DecorationDesc_mm6::field_20
char field_20[32]
Definition: DecorationList.h:38
index
GLuint index
Definition: SDL_opengl_glext.h:663
DecorationDesc_mm6::uRadius
int16_t uRadius
Definition: DecorationList.h:41
DecorationList::GetDecorIdByName
uint16_t GetDecorIdByName(const char *pName)
Definition: DecorationList.cpp:60
DECORATION_DESC_MOVE_THROUGH
@ DECORATION_DESC_MOVE_THROUGH
Definition: DecorationList.h:10
DECORATION_DESC_FLICKER_SLOW
@ DECORATION_DESC_FLICKER_SLOW
Definition: DecorationList.h:12
DecorationDesc_mm6::uLightRadius
int16_t uLightRadius
Definition: DecorationList.h:42
DECORATION_DESC_SOUND_ON_DUSK
@ DECORATION_DESC_SOUND_ON_DUSK
Definition: DecorationList.h:19
DecorationDesc_mm6::CanMoveThrough
bool CanMoveThrough()
Definition: DecorationList.h:26
DecorationDesc_mm6::SoundOnDawn
bool SoundOnDawn()
Definition: DecorationList.h:30
DECORATION_DESC_MARKER
@ DECORATION_DESC_MARKER
Definition: DecorationList.h:15
DecorationList::ToFile
void ToFile()
Definition: DecorationList.cpp:49
DECORATION_DESC_EMITS_FIRE
@ DECORATION_DESC_EMITS_FIRE
Definition: DecorationList.h:17
DECORATION_DESC_SLOW_LOOP
@ DECORATION_DESC_SLOW_LOOP
Definition: DecorationList.h:16
DECORATION_DESC_SOUND_ON_DAWN
@ DECORATION_DESC_SOUND_ON_DAWN
Definition: DecorationList.h:18
DecorationList
Definition: DecorationList.h:57
DecorationDesc_mm6::SoundOnDusk
bool SoundOnDusk()
Definition: DecorationList.h:33
DECORATION_DESC_FICKER_AVERAGE
@ DECORATION_DESC_FICKER_AVERAGE
Definition: DecorationList.h:13
uint8_t
unsigned __int8 uint8_t
Definition: SDL_config.h:35
DecorationDesc_mm6::uSpriteID
uint16_t uSpriteID
Definition: DecorationList.h:43
DecorationDesc_mm6::uSoundID
int16_t uSoundID
Definition: DecorationList.h:45
DecorationDesc_mm6::uDecorationHeight
uint16_t uDecorationHeight
Definition: DecorationList.h:40
DecorationDesc_mm6
Definition: DecorationList.h:25
DecorationList::InitializeDecorationSprite
void InitializeDecorationSprite(unsigned int uDecID)
Definition: DecorationList.cpp:45
pDecorationList
class DecorationList * pDecorationList
Definition: DecorationList.cpp:11
DecorationDesc
Definition: DecorationList.h:49
DecorationDesc::__padding
char __padding
Definition: DecorationList.h:53
DECORATION_DESC_FICKER_FAST
@ DECORATION_DESC_FICKER_FAST
Definition: DecorationList.h:14
DecorationDesc::uColoredLightBlue
uint8_t uColoredLightBlue
Definition: DecorationList.h:52
DecorationDesc::uColoredLightGreen
uint8_t uColoredLightGreen
Definition: DecorationList.h:51
Strings.h