Mercurial > mm7
diff Engine/Tables/IconFrameTable.h @ 2575:a76d408c5132 tip
DrawTranslucent -> DrawTextureGrayShade
Removed old texture drawing stuff
author | a.parshin |
---|---|
date | Wed, 09 Mar 2016 01:39:52 +0200 |
parents | 68cdef6879a0 |
children |
line wrap: on
line diff
--- a/Engine/Tables/IconFrameTable.h Mon Mar 07 03:48:40 2016 +0200 +++ b/Engine/Tables/IconFrameTable.h Wed Mar 09 01:39:52 2016 +0200 @@ -2,20 +2,36 @@ #include <array> - - -/* 44 */ -#pragma pack(push, 1) -struct IconFrame +class Icon { - char pAnimationName[12]; - char pTextureName[12]; - __int16 uAnimTime; - __int16 uAnimLength; - __int16 uFlags; - unsigned __int16 uTextureID; + public: + inline void SetAnimationName(const char *name) { strcpy(this->anim_name, name); } + inline const char *GetAnimationName() const { return anim_name; } + + inline void SetAnimLength(unsigned int anim_length) { this->anim_length = anim_length; } + inline unsigned int GetAnimLength() const { return this->anim_length; } + + inline void SetAnimTime(unsigned int anim_time) { this->anim_time = anim_time; } + inline unsigned int GetAnimTime() const { return this->anim_time; } + + ///* 000 */ char pAnimationName[12]; + /* 00C */ char pTextureName[12]; + ///* 018 */ __int16 uAnimTime; + ///* 01A */ __int16 uAnimLength; + /* 01C */ __int16 uFlags; + class Image *texture;///* 01E */ unsigned __int16 uTextureID; + int id; + + + protected: + char anim_name[64]; + //char texture_name[64]; + //unsigned int anim_time; + unsigned int anim_length; + unsigned int anim_time; + //unsigned int flags; + //unsigned int texture_id; }; -#pragma pack(pop) /* 45 */ #pragma pack(push, 1) @@ -25,16 +41,18 @@ uNumIcons(0), pIcons(nullptr) {} + Icon *GetIcon(unsigned int idx); + Icon *GetIcon(const char *pIconName); unsigned int FindIcon(const char *pIconName); - IconFrame *GetFrame(unsigned int uIconID, unsigned int uFrameID); + Icon *GetFrame(unsigned int uIconID, unsigned int frame_time); void InitializeAnimation(unsigned int uIconID); void ToFile(); void FromFile(void *data_mm6, void *data_mm7, void *data_mm8); int FromFileTxt(const char *Args); - int GetIconAnimLength(unsigned int uIconID); + //int GetIconAnimLength(unsigned int uIconID); unsigned int uNumIcons; - struct IconFrame *pIcons; + struct Icon *pIcons; }; #pragma pack(pop) @@ -49,20 +67,18 @@ -/* 76 */ -#pragma pack(push, 1) -struct UIAnimation +class UIAnimation { - unsigned __int16 uIconID; - __int16 field_2; - __int16 uAnimTime; - __int16 uAnimLength; - __int16 x; - __int16 y; - char field_C; + public: + class Icon *icon; + + /* 002 */ __int16 field_2; + /* 004 */ __int16 uAnimTime; + /* 006 */ __int16 uAnimLength; + /* 008 */ __int16 x; + /* 00A */ __int16 y; + /* 00C */ char field_C; }; -#pragma pack(pop) - @@ -71,9 +87,9 @@ extern struct IconFrameTable *pIconsFrameTable; -extern struct UIAnimation *pUIAnim_Food; -extern struct UIAnimation *pUIAnim_Gold; -extern struct UIAnimation *pUIAnum_Torchlight; -extern struct UIAnimation *pUIAnim_WizardEye; +extern class UIAnimation *pUIAnim_Food; +extern class UIAnimation *pUIAnim_Gold; +extern class UIAnimation *pUIAnum_Torchlight; +extern class UIAnimation *pUIAnim_WizardEye; -extern std::array<struct UIAnimation *, 4> pUIAnims; +extern std::array<class UIAnimation *, 4> pUIAnims;