Mercurial > mm7
diff Chest.cpp @ 706:d6236f6a9882
Rough function rearranging to new files
author | Gloval |
---|---|
date | Tue, 19 Mar 2013 21:53:21 +0400 |
parents | ef4d646d738d |
children | c232f160e6f3 |
line wrap: on
line diff
--- a/Chest.cpp Mon Mar 18 21:50:20 2013 +0000 +++ b/Chest.cpp Tue Mar 19 21:53:21 2013 +0400 @@ -250,7 +250,7 @@ } //----- (0042092D) -------------------------------------------------------- -void Chest::DrawChestUI(unsigned int uChestID) +void Chest::DrawChestUI(signed int uChestID) { int chestBitmapId; // eax@1 @@ -315,7 +315,7 @@ //----- (0041FE71) -------------------------------------------------------- -bool Chest::CanPlaceItemAt( signed int test_cell_position, int item_id, unsigned int uChestID ) +bool Chest::CanPlaceItemAt( signed int test_cell_position, int item_id, signed int uChestID ) { int v3; // eax@1 unsigned int item_texture_id; // eax@1 @@ -383,7 +383,7 @@ // 506128: using guessed type int areWeLoadingTexture; //----- (0041FF64) -------------------------------------------------------- -int Chest::CountChestItems(unsigned int uChestID) +int Chest::CountChestItems(signed int uChestID) { signed int item_count; // eax@1 int max_items; // edx@1 @@ -409,7 +409,7 @@ } //----- (0041FFA2) -------------------------------------------------------- -int Chest::PutItemInChest(int position, ItemGen *put_item, unsigned int uChestID) +int Chest::PutItemInChest(int position, ItemGen *put_item, signed int uChestID) { int v3; // eax@1 ItemGen *v4; // edi@1 @@ -516,7 +516,7 @@ // 506128: using guessed type int areWeLoadingTexture; //----- (0042013E) -------------------------------------------------------- -void Chest::PlaceItemAt( unsigned int put_cell_pos, unsigned int item_at_cell, unsigned int uChestID ) +void Chest::PlaceItemAt( unsigned int put_cell_pos, unsigned int item_at_cell, signed int uChestID ) { int uItemID; // edi@1 @@ -568,7 +568,7 @@ // 506128: using guessed type int areWeLoadingTexture; //----- (00420284) -------------------------------------------------------- -void Chest::PlaceItems( unsigned int uChestID ) +void Chest::PlaceItems(signed int uChestID ) { int uChestArea; // edi@1 int random_chest_pos; // eax@2 @@ -622,6 +622,21 @@ } // 420284: using guessed type char Dst[144]; +//----- (00448A17) -------------------------------------------------------- +void Chest::ToggleFlag(signed int uChestID, unsigned __int16 uFlag, unsigned int bToggle) + { + unsigned __int16 *pFlags; // eax@3 + + if ( uChestID >= 0 && uChestID <= 19 ) + { + pFlags = &pChests[uChestID].uFlags; + if ( bToggle ) + *pFlags |= uFlag; + else + *pFlags &= ~uFlag; + } + } + //----- (00458B03) -------------------------------------------------------- void ChestList::ToFile() {