2499
|
1 #pragma once
|
|
2 #include <array>
|
|
3
|
|
4
|
2575
|
5 class Icon
|
2499
|
6 {
|
2575
|
7 public:
|
|
8 inline void SetAnimationName(const char *name) { strcpy(this->anim_name, name); }
|
|
9 inline const char *GetAnimationName() const { return anim_name; }
|
|
10
|
|
11 inline void SetAnimLength(unsigned int anim_length) { this->anim_length = anim_length; }
|
|
12 inline unsigned int GetAnimLength() const { return this->anim_length; }
|
|
13
|
|
14 inline void SetAnimTime(unsigned int anim_time) { this->anim_time = anim_time; }
|
|
15 inline unsigned int GetAnimTime() const { return this->anim_time; }
|
|
16
|
|
17 ///* 000 */ char pAnimationName[12];
|
|
18 /* 00C */ char pTextureName[12];
|
|
19 ///* 018 */ __int16 uAnimTime;
|
|
20 ///* 01A */ __int16 uAnimLength;
|
|
21 /* 01C */ __int16 uFlags;
|
|
22 class Image *texture;///* 01E */ unsigned __int16 uTextureID;
|
|
23 int id;
|
|
24
|
|
25
|
|
26 protected:
|
|
27 char anim_name[64];
|
|
28 //char texture_name[64];
|
|
29 //unsigned int anim_time;
|
|
30 unsigned int anim_length;
|
|
31 unsigned int anim_time;
|
|
32 //unsigned int flags;
|
|
33 //unsigned int texture_id;
|
2499
|
34 };
|
|
35
|
|
36 /* 45 */
|
|
37 #pragma pack(push, 1)
|
|
38 struct IconFrameTable
|
|
39 {
|
|
40 inline IconFrameTable():
|
|
41 uNumIcons(0), pIcons(nullptr)
|
|
42 {}
|
|
43
|
2575
|
44 Icon *GetIcon(unsigned int idx);
|
|
45 Icon *GetIcon(const char *pIconName);
|
2499
|
46 unsigned int FindIcon(const char *pIconName);
|
2575
|
47 Icon *GetFrame(unsigned int uIconID, unsigned int frame_time);
|
2499
|
48 void InitializeAnimation(unsigned int uIconID);
|
|
49 void ToFile();
|
|
50 void FromFile(void *data_mm6, void *data_mm7, void *data_mm8);
|
|
51 int FromFileTxt(const char *Args);
|
2575
|
52 //int GetIconAnimLength(unsigned int uIconID);
|
2499
|
53
|
|
54 unsigned int uNumIcons;
|
2575
|
55 struct Icon *pIcons;
|
2499
|
56 };
|
|
57 #pragma pack(pop)
|
|
58
|
|
59
|
|
60
|
|
61
|
|
62
|
|
63
|
|
64
|
|
65
|
|
66
|
|
67
|
|
68
|
|
69
|
2575
|
70 class UIAnimation
|
2499
|
71 {
|
2575
|
72 public:
|
|
73 class Icon *icon;
|
|
74
|
|
75 /* 002 */ __int16 field_2;
|
|
76 /* 004 */ __int16 uAnimTime;
|
|
77 /* 006 */ __int16 uAnimLength;
|
|
78 /* 008 */ __int16 x;
|
|
79 /* 00A */ __int16 y;
|
|
80 /* 00C */ char field_C;
|
2499
|
81 };
|
|
82
|
|
83
|
|
84
|
|
85
|
|
86
|
|
87 extern struct IconFrameTable *pIconsFrameTable;
|
|
88
|
|
89
|
2575
|
90 extern class UIAnimation *pUIAnim_Food;
|
|
91 extern class UIAnimation *pUIAnim_Gold;
|
|
92 extern class UIAnimation *pUIAnum_Torchlight;
|
|
93 extern class UIAnimation *pUIAnim_WizardEye;
|
2499
|
94
|
2575
|
95 extern std::array<class UIAnimation *, 4> pUIAnims;
|