Mercurial > might-and-magic-trilogy
view Sprites.h @ 40:001b45e84aaa
Слияние
author | Ritor1 |
---|---|
date | Thu, 18 Oct 2012 09:12:15 +0600 |
parents | ac0fb48cd27a |
children |
line wrap: on
line source
#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;