view Sprites.h @ 209:29545d87e11d

m
author Ritor1
date Sat, 16 Feb 2013 16:23:07 +0600
parents 9c0607679772
children 4f2837124c69
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;