annotate Sprites.h @ 1055:010a844ef4a0

Слияние
author Ritor1
date Wed, 22 May 2013 22:23:04 +0600
parents af20650a052f
children db395ce89ede
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2
Ritor1
parents:
diff changeset
3
Ritor1
parents:
diff changeset
4 /* 18 */
Ritor1
parents:
diff changeset
5 #pragma pack(push, 1)
670
9824e2eeee30 fixed decorations animation
Gloval
parents: 639
diff changeset
6 struct Sprite //28h
0
Ritor1
parents:
diff changeset
7 {
1017
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
8 void Release();
0
Ritor1
parents:
diff changeset
9
1017
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
10 const char *pName; //0
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
11 int uPaletteID; //4
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
12 struct IDirectDrawSurface4 *pTextureSurface; //8
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
13 struct IDirect3DTexture2 *pTexture; //ch
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
14 int uAreaX; //10h
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
15 int uAreaY; //14h
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
16 int uBufferWidth; //18h
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
17 int uBufferHeight; //1ch
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
18 int uAreaWidth; //20h
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
19 int uAreaHeight; //24h
0
Ritor1
parents:
diff changeset
20 };
Ritor1
parents:
diff changeset
21 #pragma pack(pop)
Ritor1
parents:
diff changeset
22
Ritor1
parents:
diff changeset
23
Ritor1
parents:
diff changeset
24 /* 42 */
Ritor1
parents:
diff changeset
25 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
26 struct SpriteFrame
Ritor1
parents:
diff changeset
27 {
1017
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
28 char pIconName[12];
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
29 char pTextureName[12]; //c
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
30 __int16 pHwSpriteIDs[8]; //18h
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
31 int scale; //28h
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
32 int uFlags; //2c
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
33 __int16 uGlowRadius; //30
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
34 __int16 uPaletteID; //32
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
35 __int16 uPaletteIndex;
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
36 __int16 uAnimTime;
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
37 __int16 uAnimLength;
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
38 __int16 _pad;
0
Ritor1
parents:
diff changeset
39 };
Ritor1
parents:
diff changeset
40 #pragma pack(pop)
Ritor1
parents:
diff changeset
41
Ritor1
parents:
diff changeset
42 /* 43 */
Ritor1
parents:
diff changeset
43 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
44 struct SpriteFrameTable
Ritor1
parents:
diff changeset
45 {
1017
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
46 //----- (0044D4BA) --------------------------------------------------------
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
47 inline SpriteFrameTable()
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
48 {
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
49 uNumSpriteFrames = 0;
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
50 pSpriteSFrames = nullptr;
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
51 pSpritePFrames = nullptr;
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
52 pSpriteEFrames = nullptr;
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
53 }
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
54 void ToFile();
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
55 void FromFile(void *pSerialized);
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
56 bool FromFileTxt(const char *Args);
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
57 void ReleaseSFrames();
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
58 void ResetSomeSpriteFlags();
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
59 void InitializeSprite(signed int uSpriteID);
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
60 signed int FastFindSprite(char *pSpriteName);
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
61 int BinarySearch(const char *pSpriteName);
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
62 SpriteFrame *GetFrame(unsigned int uSpriteID, unsigned int uTime);
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
63 SpriteFrame *GetFrameBy_x(unsigned int uSpriteID, signed int a3);
0
Ritor1
parents:
diff changeset
64
1017
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
65 signed int uNumSpriteFrames;
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
66 unsigned int uNumEFrames;//field_4;
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
67 int unused_field; //field_8
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
68 struct SpriteFrame *pSpriteSFrames; //0c
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
69 struct SpriteFrame **pSpritePFrames; //10h
af20650a052f SpriteFrameTable search simplified
Grumpy7
parents: 670
diff changeset
70 __int16 *pSpriteEFrames; //14h
0
Ritor1
parents:
diff changeset
71 };
Ritor1
parents:
diff changeset
72 #pragma pack(pop)
Ritor1
parents:
diff changeset
73
Ritor1
parents:
diff changeset
74
Ritor1
parents:
diff changeset
75
Ritor1
parents:
diff changeset
76
Ritor1
parents:
diff changeset
77
Ritor1
parents:
diff changeset
78
Ritor1
parents:
diff changeset
79 extern struct SpriteFrameTable *pSpriteFrameTable;