Mercurial > mm7
diff Sprites.h @ 0:9c0607679772
init
author | Ritor1 |
---|---|
date | Sat, 12 Jan 2013 09:45:18 +0600 |
parents | |
children | 4f2837124c69 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sprites.h Sat Jan 12 09:45:18 2013 +0600 @@ -0,0 +1,79 @@ +#pragma once + + +/* 18 */ +#pragma pack(push, 1) +struct Sprite +{ + void Release(); + + const char *pName; + int uPaletteID; + struct IDirectDrawSurface4 *pTextureSurface; + struct IDirect3DTexture2 *pTexture; + int uAreaX; + int uAreaY; + int uBufferWidth; + int uBufferHeight; + int uAreaWidth; + int uAreaHeight; +}; +#pragma pack(pop) + + +/* 42 */ +#pragma pack(push, 1) +struct SpriteFrame +{ + char pIconName[12]; + char pTextureName[12]; + __int16 pHwSpriteIDs[8]; + int scale; + int uFlags; + __int16 uGlowRadius; + __int16 uPaletteID; + __int16 uPaletteIndex; + __int16 uAnimTime; + __int16 uAnimLength; + __int16 _pad; +}; +#pragma pack(pop) + +/* 43 */ +#pragma pack(push, 1) +struct SpriteFrameTable +{ + //----- (0044D4BA) -------------------------------------------------------- + inline SpriteFrameTable() + { + uNumSpriteFrames = 0; + pSpriteSFrames = nullptr; + pSpritePFrames = nullptr; + pSpriteEFrames = nullptr; + } + void ToFile(); + void FromFile(void *pSerialized); + bool FromFileTxt(const char *Args); + void ReleaseSFrames(); + void ResetSomeSpriteFlags(); + void InitializeSprite(unsigned int uSpriteID); + unsigned int FastFindSprite(char *pSpriteName); + void BinarySearch(int a2, int a3, const char *pSpriteName); + SpriteFrame *GetFrame(unsigned int uSpriteID, unsigned int uFrameID); + SpriteFrame *GetFrameBy_x(unsigned int uSpriteID, signed int a3); + + unsigned int uNumSpriteFrames; + unsigned int uNumEFrames;//field_4; + int field_8; + struct SpriteFrame *pSpriteSFrames; + struct SpriteFrame **pSpritePFrames; + __int16 *pSpriteEFrames; +}; +#pragma pack(pop) + + + + + + +extern struct SpriteFrameTable *pSpriteFrameTable; \ No newline at end of file