comparison Engine/Graphics/Sprites.h @ 2496:5abd8fc8f1c6

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