annotate Sprites.h @ 535:426682cf4a75

m
author Ritor1
date Sat, 02 Mar 2013 00:24:12 +0600
parents 9c0607679772
children 4f2837124c69
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)
Ritor1
parents:
diff changeset
6 struct Sprite
Ritor1
parents:
diff changeset
7 {
Ritor1
parents:
diff changeset
8 void Release();
Ritor1
parents:
diff changeset
9
Ritor1
parents:
diff changeset
10 const char *pName;
Ritor1
parents:
diff changeset
11 int uPaletteID;
Ritor1
parents:
diff changeset
12 struct IDirectDrawSurface4 *pTextureSurface;
Ritor1
parents:
diff changeset
13 struct IDirect3DTexture2 *pTexture;
Ritor1
parents:
diff changeset
14 int uAreaX;
Ritor1
parents:
diff changeset
15 int uAreaY;
Ritor1
parents:
diff changeset
16 int uBufferWidth;
Ritor1
parents:
diff changeset
17 int uBufferHeight;
Ritor1
parents:
diff changeset
18 int uAreaWidth;
Ritor1
parents:
diff changeset
19 int uAreaHeight;
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 {
Ritor1
parents:
diff changeset
28 char pIconName[12];
Ritor1
parents:
diff changeset
29 char pTextureName[12];
Ritor1
parents:
diff changeset
30 __int16 pHwSpriteIDs[8];
Ritor1
parents:
diff changeset
31 int scale;
Ritor1
parents:
diff changeset
32 int uFlags;
Ritor1
parents:
diff changeset
33 __int16 uGlowRadius;
Ritor1
parents:
diff changeset
34 __int16 uPaletteID;
Ritor1
parents:
diff changeset
35 __int16 uPaletteIndex;
Ritor1
parents:
diff changeset
36 __int16 uAnimTime;
Ritor1
parents:
diff changeset
37 __int16 uAnimLength;
Ritor1
parents:
diff changeset
38 __int16 _pad;
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 {
Ritor1
parents:
diff changeset
46 //----- (0044D4BA) --------------------------------------------------------
Ritor1
parents:
diff changeset
47 inline SpriteFrameTable()
Ritor1
parents:
diff changeset
48 {
Ritor1
parents:
diff changeset
49 uNumSpriteFrames = 0;
Ritor1
parents:
diff changeset
50 pSpriteSFrames = nullptr;
Ritor1
parents:
diff changeset
51 pSpritePFrames = nullptr;
Ritor1
parents:
diff changeset
52 pSpriteEFrames = nullptr;
Ritor1
parents:
diff changeset
53 }
Ritor1
parents:
diff changeset
54 void ToFile();
Ritor1
parents:
diff changeset
55 void FromFile(void *pSerialized);
Ritor1
parents:
diff changeset
56 bool FromFileTxt(const char *Args);
Ritor1
parents:
diff changeset
57 void ReleaseSFrames();
Ritor1
parents:
diff changeset
58 void ResetSomeSpriteFlags();
Ritor1
parents:
diff changeset
59 void InitializeSprite(unsigned int uSpriteID);
Ritor1
parents:
diff changeset
60 unsigned int FastFindSprite(char *pSpriteName);
Ritor1
parents:
diff changeset
61 void BinarySearch(int a2, int a3, const char *pSpriteName);
Ritor1
parents:
diff changeset
62 SpriteFrame *GetFrame(unsigned int uSpriteID, unsigned int uFrameID);
Ritor1
parents:
diff changeset
63 SpriteFrame *GetFrameBy_x(unsigned int uSpriteID, signed int a3);
Ritor1
parents:
diff changeset
64
Ritor1
parents:
diff changeset
65 unsigned int uNumSpriteFrames;
Ritor1
parents:
diff changeset
66 unsigned int uNumEFrames;//field_4;
Ritor1
parents:
diff changeset
67 int field_8;
Ritor1
parents:
diff changeset
68 struct SpriteFrame *pSpriteSFrames;
Ritor1
parents:
diff changeset
69 struct SpriteFrame **pSpritePFrames;
Ritor1
parents:
diff changeset
70 __int16 *pSpriteEFrames;
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;