mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Merge pull request #1830 from sphericalice/registered-item-none
Use the ITEM_NONE constant for the registeredItem save block field
This commit is contained in:
commit
7a480c0a87
@ -987,7 +987,7 @@ static void BagMenu_ItemPrintCallback(u8 windowId, u32 itemIndex, u8 y)
|
||||
else
|
||||
{
|
||||
// Print registered icon
|
||||
if (gSaveBlock1Ptr->registeredItem && gSaveBlock1Ptr->registeredItem == itemId)
|
||||
if (gSaveBlock1Ptr->registeredItem != ITEM_NONE && gSaveBlock1Ptr->registeredItem == itemId)
|
||||
BlitBitmapToWindow(windowId, sRegisteredSelect_Gfx, 96, y - 1, 24, 16);
|
||||
}
|
||||
}
|
||||
@ -1909,7 +1909,7 @@ static void ItemMenu_Register(u8 taskId)
|
||||
u16 *cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
|
||||
if (gSaveBlock1Ptr->registeredItem == gSpecialVar_ItemId)
|
||||
gSaveBlock1Ptr->registeredItem = 0;
|
||||
gSaveBlock1Ptr->registeredItem = ITEM_NONE;
|
||||
else
|
||||
gSaveBlock1Ptr->registeredItem = gSpecialVar_ItemId;
|
||||
DestroyListMenuTask(tListTaskId, scrollPos, cursorPos);
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "berry_powder.h"
|
||||
#include "mystery_gift.h"
|
||||
#include "union_room_chat.h"
|
||||
#include "constants/items.h"
|
||||
|
||||
extern const u8 EventScript_ResetAllMapFlags[];
|
||||
|
||||
@ -181,7 +182,7 @@ void NewGameInitData(void)
|
||||
ResetPokemonStorageSystem();
|
||||
ClearRoamerData();
|
||||
ClearRoamerLocationData();
|
||||
gSaveBlock1Ptr->registeredItem = 0;
|
||||
gSaveBlock1Ptr->registeredItem = ITEM_NONE;
|
||||
ClearBag();
|
||||
NewGameInitPCItems();
|
||||
ClearPokeblocks();
|
||||
|
Loading…
Reference in New Issue
Block a user