Restored improvements from upstream

This commit is contained in:
Eduardo Quezada 2023-01-20 12:34:15 -03:00
parent 749225ace1
commit 4a9515e8db
3 changed files with 11 additions and 12 deletions

View File

@ -415,9 +415,9 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeLinkMultisChallenge::
@ to the flash, but not data in PokemonStorage. The SaveGame script that follows asks the player to do a full save,
@ which they can opt out of. As a result the player can save their party and quit without having saved the PC.
@ This allows players to clone pokemon and their held items by withdrawing them (or erase them by despositing).
@.ifndef BUGFIX
.ifndef BUGFIX
tower_save 0
@.endif
.endif
call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed

View File

@ -498,12 +498,12 @@ static const struct SpritePalette sObjectEventSpritePalettes[] = {
{gObjectEventPal_Lugia, OBJ_EVENT_PAL_TAG_LUGIA},
{gObjectEventPal_RubySapphireBrendan, OBJ_EVENT_PAL_TAG_RS_BRENDAN},
{gObjectEventPal_RubySapphireMay, OBJ_EVENT_PAL_TAG_RS_MAY},
//#ifdef BUGFIX
// {NULL, OBJ_EVENT_PAL_TAG_NONE},
//#else
#ifdef BUGFIX
{NULL, OBJ_EVENT_PAL_TAG_NONE},
#else
{}, // BUG: FindObjectEventPaletteIndexByTag looks for OBJ_EVENT_PAL_TAG_NONE and not 0x0.
// If it's looking for a tag that isn't in this table, the game locks in an infinite loop.
//#endif
#endif
};
static const u16 sReflectionPaletteTags_Brendan[] = {
@ -2000,11 +2000,11 @@ static void LoadObjectEventPalette(u16 paletteTag)
u16 i = FindObjectEventPaletteIndexByTag(paletteTag);
// FindObjectEventPaletteIndexByTag returns 0xFF on failure, not OBJ_EVENT_PAL_TAG_NONE.
//#ifdef BUGFIX
// if (i != 0xFF)
//#else
#ifdef BUGFIX
if (i != 0xFF)
#else
if (i != OBJ_EVENT_PAL_TAG_NONE)
//#endif
#endif
LoadSpritePaletteIfTagExists(&sObjectEventSpritePalettes[i]);
}

View File

@ -106,8 +106,7 @@ static u32 GetRewardItem(struct WonderNewsMetadata *data)
{
u32 itemId;
data->newsType = WONDER_NEWS_NONE;
//itemId = data->berry + FIRST_BERRY_INDEX - 1;
itemId = data->berry + 132;
itemId = data->berry + FIRST_BERRY_INDEX - 1;
data->berry = 0;
IncrementRewardCounter(data);
return itemId;