diff --git a/ld_script.txt b/ld_script.txt index c5c3b27dc..629649adf 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -21,7 +21,7 @@ SECTIONS { *libc.a:locale.o(.data); *libc.a:mallocr.o(.data); . = 0x40000; -} + } . = 0x3000000; diff --git a/ld_script_modern.txt b/ld_script_modern.txt index b60a22171..b724b74cf 100644 --- a/ld_script_modern.txt +++ b/ld_script_modern.txt @@ -49,8 +49,11 @@ SECTIONS { ALIGN(4) { src/rom_header.o(.text*); - src/*.o(.text*); + src/rom_header_gf.o(.text.*); + src/crt0.o(.text); + src/main.o(.text); gflib/*.o(.text*); + src/*.o(.text*); asm/*.o(.text*); } =0 diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 4f5ea52a2..78a0ef353 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -8880,14 +8880,14 @@ static void TakeItemFromMon(u8 cursorArea, u8 cursorPos) if (cursorArea == CURSOR_AREA_IN_BOX) { SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &itemId); - SetBoxMonIconObjMode(cursorPos, 1); + SetBoxMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND); SetMonFormPSS(&gPokemonStoragePtr->boxes[StorageGetCurrentBox()][cursorPos]); } else { struct Pokemon *mon = &gPlayerParty[cursorPos]; SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &itemId); - SetPartyMonIconObjMode(cursorPos, 1); + SetPartyMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND); SetMonFormPSS(&mon->box); } @@ -8952,14 +8952,14 @@ static void GiveItemToMon(u8 cursorArea, u8 cursorPos) if (cursorArea == CURSOR_AREA_IN_BOX) { SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &sStorage->movingItemId); - SetBoxMonIconObjMode(cursorPos, 0); + SetBoxMonIconObjMode(cursorPos, ST_OAM_OBJ_NORMAL); SetMonFormPSS(&gPokemonStoragePtr->boxes[StorageGetCurrentBox()][cursorPos]); } else { struct Pokemon *mon = &gPlayerParty[cursorPos]; SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &sStorage->movingItemId); - SetPartyMonIconObjMode(cursorPos, 0); + SetPartyMonIconObjMode(cursorPos, ST_OAM_OBJ_NORMAL); SetMonFormPSS(&mon->box); } } @@ -8979,14 +8979,14 @@ static void MoveItemFromMonToBag(u8 cursorArea, u8 cursorPos) if (cursorArea == CURSOR_AREA_IN_BOX) { SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &itemId); - SetBoxMonIconObjMode(cursorPos, 1); + SetBoxMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND); SetMonFormPSS(&gPokemonStoragePtr->boxes[StorageGetCurrentBox()][cursorPos]); } else { struct Pokemon *mon = &gPlayerParty[cursorPos]; SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &itemId); - SetPartyMonIconObjMode(cursorPos, 1); + SetPartyMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND); SetMonFormPSS(&mon->box); } } diff --git a/src/rom_header_gf.c b/src/rom_header_gf.c index d769d47f8..f498474ba 100644 --- a/src/rom_header_gf.c +++ b/src/rom_header_gf.c @@ -6,6 +6,15 @@ #include "item.h" #include "pokeball.h" +// The purpose of this struct is for outside applications to be +// able to access parts of the ROM or its save file, like a public API. +// In vanilla, it was used by Colosseum and XD to access pokemon graphics. +// +// If this struct is rearranged in any way, it defeats the purpose of +// having it at all. Applications like PKHex or streaming HUDs may find +// these values useful, so there's some potential benefit to keeping it. +// If there's a compilation problem below, just comment out the assignment +// instead of changing this struct. struct GFRomHeader { u32 version; diff --git a/src/scrcmd.c b/src/scrcmd.c index e5ea3d5e1..745e0d882 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1153,10 +1153,7 @@ bool8 ScrCmd_resetobjectsubpriority(struct ScriptContext *ctx) bool8 ScrCmd_faceplayer(struct ScriptContext *ctx) { if (gObjectEvents[gSelectedObjectEvent].active) - { - ObjectEventFaceOppositeDirection(&gObjectEvents[gSelectedObjectEvent], - GetPlayerFacingDirection()); - } + ObjectEventFaceOppositeDirection(&gObjectEvents[gSelectedObjectEvent], GetPlayerFacingDirection()); return FALSE; }