Mercurial > mm7
diff Chest.h @ 0:9c0607679772
init
author | Ritor1 |
---|---|
date | Sat, 12 Jan 2013 09:45:18 +0600 |
parents | |
children | 94546824edad |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Chest.h Sat Jan 12 09:45:18 2013 +0600 @@ -0,0 +1,73 @@ +#pragma once +#include "Items.h" + + + + +/* 348 */ +enum CHEST_FLAGS +{ + CHEST_TRAPPED = 0x1, + CHEST_ITEMS_PLACED = 0x2, + CHEST_OPENED = 0x4, +}; + + + +#pragma pack(push, 1) +struct ChestDesc +{ + char pName[32]; + char uWidth; + char uHeight; + __int16 uTextureID; +}; +#pragma pack(pop) + + + +#pragma pack(push, 1) +struct ChestList +{ + inline ChestList(): //----- (00458438) + uNumChests(0), pChests(nullptr) + {} + + void ToFile(); + void FromFile(void *pSerialized); + int FromFileTxt(const char *Args); + + + unsigned int uNumChests; + struct ChestDesc *pChests; +}; +#pragma pack(pop) + + + +/* 65 */ +#pragma pack(push, 1) +struct Chest +{ + static int CanPlaceItemAt(signed int a1, int a2, unsigned int uChestID); + static int _41FF64(unsigned int uChestID); + static int _41FFA2(int a1, ItemGen *a2, unsigned int uChestID); + static unsigned int PlaceItemAt(unsigned int a1, unsigned int uItemIdx, unsigned int uChestID); + static char *_420284(unsigned int uChestID); + static bool Open(unsigned int uChestID); + static void DrawChestUI(unsigned int uChestID); + static void ToggleFlag(unsigned int uChestID, unsigned __int16 uFlag, unsigned int bToggle); + + unsigned __int16 uChestBitmapID; + unsigned __int16 uFlags; + struct ItemGen mm7__vector_pItems[140]; + __int16 pInventoryIndices[140]; +}; +#pragma pack(pop) + + + + +extern size_t uNumChests; // idb +extern struct ChestList *pChestList; +extern Chest pChests[20]; \ No newline at end of file