comparison Sprites.h @ 0:9c0607679772

init
author Ritor1
date Sat, 12 Jan 2013 09:45:18 +0600
parents
children 4f2837124c69
comparison
equal deleted inserted replaced
-1:000000000000 0:9c0607679772
1 #pragma once
2
3
4 /* 18 */
5 #pragma pack(push, 1)
6 struct Sprite
7 {
8 void Release();
9
10 const char *pName;
11 int uPaletteID;
12 struct IDirectDrawSurface4 *pTextureSurface;
13 struct IDirect3DTexture2 *pTexture;
14 int uAreaX;
15 int uAreaY;
16 int uBufferWidth;
17 int uBufferHeight;
18 int uAreaWidth;
19 int uAreaHeight;
20 };
21 #pragma pack(pop)
22
23
24 /* 42 */
25 #pragma pack(push, 1)
26 struct SpriteFrame
27 {
28 char pIconName[12];
29 char pTextureName[12];
30 __int16 pHwSpriteIDs[8];
31 int scale;
32 int uFlags;
33 __int16 uGlowRadius;
34 __int16 uPaletteID;
35 __int16 uPaletteIndex;
36 __int16 uAnimTime;
37 __int16 uAnimLength;
38 __int16 _pad;
39 };
40 #pragma pack(pop)
41
42 /* 43 */
43 #pragma pack(push, 1)
44 struct SpriteFrameTable
45 {
46 //----- (0044D4BA) --------------------------------------------------------
47 inline SpriteFrameTable()
48 {
49 uNumSpriteFrames = 0;
50 pSpriteSFrames = nullptr;
51 pSpritePFrames = nullptr;
52 pSpriteEFrames = nullptr;
53 }
54 void ToFile();
55 void FromFile(void *pSerialized);
56 bool FromFileTxt(const char *Args);
57 void ReleaseSFrames();
58 void ResetSomeSpriteFlags();
59 void InitializeSprite(unsigned int uSpriteID);
60 unsigned int FastFindSprite(char *pSpriteName);
61 void BinarySearch(int a2, int a3, const char *pSpriteName);
62 SpriteFrame *GetFrame(unsigned int uSpriteID, unsigned int uFrameID);
63 SpriteFrame *GetFrameBy_x(unsigned int uSpriteID, signed int a3);
64
65 unsigned int uNumSpriteFrames;
66 unsigned int uNumEFrames;//field_4;
67 int field_8;
68 struct SpriteFrame *pSpriteSFrames;
69 struct SpriteFrame **pSpritePFrames;
70 __int16 *pSpriteEFrames;
71 };
72 #pragma pack(pop)
73
74
75
76
77
78
79 extern struct SpriteFrameTable *pSpriteFrameTable;