Mercurial > might-and-magic-trilogy
view Texture.h @ 123:05b2d9653abc
15.11.12
author | Ritor1 |
---|---|
date | Thu, 15 Nov 2012 16:36:30 +0600 |
parents | b39bdc150e90 |
children |
line wrap: on
line source
#pragma once #include <stdio.h> /* 194 */ #pragma pack(push, 1) struct RGBTexture { RGBTexture(); void Release(); int _40E55E(const char *Filename, unsigned int a3); unsigned int LoadFromFILE(FILE *pFile, unsigned int mode, unsigned int bCloseFile); int DecodePCX(char *pPcx, unsigned __int16 *pOutPixels, unsigned int uNumPixels); int Load(const char *pContainer, int mode); int Reload(const char *pContainer); char pName[16]; unsigned int uNumPixels; unsigned __int16 uWidth; unsigned __int16 uHeight; __int16 field_18; __int16 field_1A; __int16 field_1C; __int16 field_1E; __int16 field_20; __int16 field_22; unsigned __int16 *pPixels; }; #pragma pack(pop) #pragma pack(push, 1) struct Texture { Texture(); void Release(); void *UnzipPalette(); char pName[16]; unsigned int uSizeOfMaxLevelOfDetail; unsigned int uTextureSize; unsigned __int16 uTextureWidth; unsigned __int16 uTextureHeight; __int16 uWidthLn2; __int16 uHeightLn2; __int16 uWidthMinus1; __int16 uHeightMinus1; short palette_id1; short palette_id2; unsigned int uDecompressedSize; int pBits; unsigned __int8 *pLevelOfDetail0; unsigned __int8 *pLevelOfDetail1; unsigned __int8 *pLevelOfDetail2; unsigned __int8 *pLevelOfDetail3; unsigned __int16 *pPalette16; unsigned __int8 *pPalette24; }; #pragma pack(pop) /* 323 */ enum TEXTURE_FRAME_TABLE_FLAGS { TEXTURE_FRAME_TABLE_MORE_FRAMES = 0x1, TEXTURE_FRAME_TABLE_FIRST = 0x2, }; /* 41 */ #pragma pack(push, 1) struct TextureFrame { char pTextureName[12]; __int16 uTextureID; __int16 uAnimTime; __int16 uAnimLength; __int16 uFlags; }; #pragma pack(pop) /* 40 */ #pragma pack(push, 1) struct TextureFrameTable { //----- (0044D4C9) -------------------------------------------------------- inline TextureFrameTable() { pTextures = 0; uNumTextures = 0; } int FromFileTxt(const char *Args); void ToFile(); void FromFile(void *pSerialized); unsigned int LoadAnimationSequenceAndPalettes(unsigned int uIconID); unsigned int GetFrameTexture(int uFrameID, signed int a3); unsigned int FindTextureByName(const char *Str2); unsigned int uNumTextures; struct TextureFrame *pTextures; }; #pragma pack(pop) extern struct TextureFrameTable *pTextureFrameTable; extern Texture *pTexture_LloydBeacons[2]; extern Texture *pTexture_50635C; extern Texture *pTexture_506368; extern Texture *pTexture_50636C; extern Texture *pTexture_506370; extern Texture *pTexture_506374; extern Texture *pTexture_506378; extern Texture *pTexture_50637C; extern Texture *pTexture_506380; extern Texture *pTexture_506384; extern Texture *pTexture_506388; extern Texture *pTexture_50638C; extern Texture *pTexture_506390; extern Texture *pTexture_506394; extern Texture *pTex_tab_an_7a__zoot_off; extern Texture *pTex_tab_an_6a__zoom_off; extern Texture *pTex_tab_an_7b__zoot_on; extern Texture *pTex_tab_an_6b__zoom_on; extern Texture *pTexture_TownPortalHarmn; extern Texture *pTexture_TownPortalElf; extern Texture *pTexture_TownPortalWarlock; extern Texture *pTexture_TownPortalIsland; extern Texture *pTexture_TownPortalHeaven; extern Texture *pTexture_TownPortalHell; extern Texture *dword_5063D8[]; extern Texture *dword_506404[]; extern Texture *dword_506434[]; extern Texture *pTexture_50643C; // idb extern Texture *ptr_506440; extern Texture *pTexture_506444; extern Texture *pTexture_506448; // idb extern Texture *pTextures_tabs[8][2]; extern Texture *pTexture_mapbordr; // idb extern Texture *pTexture_pagemask; // idb extern Texture *pTextures_5064A0[14]; extern Texture *pTexture_AutonotesBook; extern Texture *pTexture_CurrentBook; extern Texture *pTex_moon_new; extern Texture *pTex_moon_4; extern Texture *pTex_moon_2; extern Texture *pTex_moon_2_2; extern Texture *pTex_moon_ful; extern RGBTexture stru_506E40; // weak extern RGBTexture pTexture_PCX; extern int uTextureID_RestUI_restb4; // weak extern int uTextureID_RestUI_restexit; // weak extern int uTextureID_RestUI_restb3; // weak extern int uTextureID_RestUI_restb1; // weak extern int uTextureID_RestUI_restb2; // weak extern int uTextureID_RestUI_restmain; // weak extern unsigned int uTextureID_Leather; extern int uTextureID_ar_dn_dn; // weak extern int uTextureID_ar_dn_up; // weak extern int uTextureID_ar_up_dn; // weak extern int uTextureID_ar_up_up; // weak extern int uTextureID_507698; // weak extern int uTextureID_50769C; // weak extern int uTextureID_5076A0; // weak extern int uTextureID_5076A4; // weak extern int uTextureID_5076A8; // weak extern int uTextureID_5076AC; // weak extern int uTextureID_5076B0; // weak extern int uTextureID_5076B4; // weak extern int uTextureID_Parchment; // weak extern unsigned int uTextureID_mhp_yel; extern unsigned int uTextureID_mhp_red; extern unsigned int uTextureID_mhp_grn; extern unsigned int uTextureID_mhp_capr; extern unsigned int uTextureID_mhp_capl; extern unsigned int uTextureID_mhp_bd; extern unsigned int uTextureID_BUTTDESC2; extern unsigned int uTextureID_x_x_u; extern unsigned int uTextureID_BUTTMAKE2; extern unsigned int uTextureID_BUTTMAKE; extern unsigned int uTextureID_BUTTYES2; extern unsigned int uTextureID_x_ok_u; extern Texture *pPlayerPortraits[22]; extern Texture *pTexture_IC_KNIGHT[8]; extern Texture *pTexture_MAKESKY; extern Texture *pTexture_MAKETOP; extern Texture *pTextures_arrowr[20]; extern Texture *pTextures_arrowl[20]; extern Texture *pTexture_presleft; extern Texture *pTexture_pressrigh; extern Texture *pTexture_buttminu; extern Texture *pTexture_buttplus; extern unsigned int uTextureID_50792C; // weak extern unsigned int uTextureID_507930; // weak extern unsigned int uTextureID_507934; // weak extern unsigned int uTextureID_507938; // weak extern unsigned int uTextureID_50793C; // weak extern unsigned int uTextureID_507940; // weak extern unsigned int uTextureID_507944; // weak extern unsigned int uTextureID_ib_td5_A; extern unsigned int uTextureID_ib_td2_A; // weak extern unsigned int uTextureID_ib_td1_A; extern int uTextureID_507958; // weak extern int uTextureID_50795C; // weak extern unsigned int uTextureID_507970; extern unsigned int uTextureID_507978; extern unsigned int uTextureID_50797C; extern unsigned int uTextureID_507980; extern unsigned int uTextureID_507984; extern unsigned int uTextureID_FONTPAL; extern unsigned int uTextureID_50798C; extern unsigned int uTextureID_507990; extern unsigned int pTextureIDs_pMapDirs[8]; extern unsigned int uTextureID_BarRed; extern unsigned int uTextureID_BarYellow; extern unsigned int uTextureID_BarGreen; extern unsigned int uTextureID_BarBlue; extern unsigned int uTextureID_right_panel; // weak extern RGBTexture *pTexture_StatusBar; extern RGBTexture *pTexture_LeftFrame; extern RGBTexture *pTexture_TopFrame; extern RGBTexture *pTexture_BottomFrame; extern RGBTexture *pTexture_RightFrame; extern unsigned int uTextureID_507B04; // weak extern Texture *pTexture_Leather; extern Texture *pTexture_RestUI_CurrentSkyFrame; // idb extern Texture *pTexture_RestUI_CurrentHourglassFrame; // idb extern unsigned int uTextureID_507BF4; // weak extern unsigned int uTextureID_507BF8; // weak extern unsigned int uTextureID_507BFC; // weak extern unsigned int uTextureID_507C00; // weak extern unsigned int uTextureID_507C04; // weak extern unsigned int uTextureID_507C10; // weak extern unsigned int uTextureID_507C14; // weak extern unsigned int uTextureID_507C18; // weak extern unsigned int uTextureID_507C1C; // weak extern unsigned int uTextureID_507C20; // weak extern unsigned int uTextureID_507C24; // weak extern unsigned int pTextureIDs_GammaPositions[10]; extern unsigned int uTextureID_507C50; // weak extern unsigned int uTextureID_507C54; // weak extern unsigned int uTextureID_507C58; // weak extern unsigned int uTextureID_507C60; // weak extern unsigned int uTextureID_507C64[]; // weak extern unsigned int uTextureID_507C68; // weak extern unsigned int uTextureID_507C6C; // weak extern unsigned int uTextureID_507C70; // weak extern unsigned int uTextureID_507C74; // weak extern unsigned int uTextureID_507C84; // weak extern unsigned int pTextureIDs_SoundLevels[10]; extern unsigned int uTextureID_507CB0; // weak extern unsigned int uTextureID_507CB4; // weak extern unsigned int uTextureID_507CB8; // weak extern unsigned int uTextureID_5118C8; // weak extern unsigned int uTextureID_MAGNIF_B; // weak extern unsigned int uTextureID_BACKDOLL; // weak extern unsigned int uTextureID_BACKHAND; // weak extern Texture pTex_F7CE30; extern RGBTexture stru_5773C4; // idb struct stru355 { int field_0; int field_4; int field_8; int field_C; int field_10; int field_14; int field_18; int field_1C; }; /* 390 */ #pragma pack(push, 1) struct stru350 { stru350 *_450DDE(); bool _450DF1(const stru355 *p1, const stru355 *p2); unsigned int _450F55(int a2); int _450FB1(int a2); int sub_451007_scale_image_bicubic(unsigned short *pSrc, int srcWidth, int srcHeight, int srcPitch, unsigned short *pDst, int dstWidth, int dstHeight, int dstPitch, int a9, int a10); stru355 field_0; stru355 field_20; int field_40; int field_44; int field_48; int field_4C; int field_50; int field_54; int field_58; int field_5C; }; #pragma pack(pop)