diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-05-04 02:26:11 +0000 |
---|---|---|
committer | YamaArashi <YamaArashi@users.noreply.github.com> | 2017-05-03 19:26:11 -0700 |
commit | 010bbc4b48464e09bb8b30e38cde628520944452 (patch) | |
tree | e0ff2b834ef38bd863059c4de8b3640bf64b1e42 | |
parent | b55e13179f3aef2ea5ae6a6821ebb15d4f261952 (diff) |
pokedex.s and fldeff_80CC incbins and resolve weird code in player_pc.c (#255)
* dump pokedex incbins
* dump fldeff_80C5CD4 incbins
* try to make sense of the weird code at the end of sub_813AA30 (thanks padz)
-rw-r--r-- | data/fldeff_80C5CD4.s | 11 | ||||
-rw-r--r-- | data/pokedex.s | 13 | ||||
-rw-r--r-- | graphics/unknown/unknown_3B555C.bin | bin | 0 -> 32 bytes | |||
-rw-r--r-- | graphics/unknown/unknown_3D190C.pal | 19 | ||||
-rw-r--r-- | graphics/unknown/unknown_3D190C.png | bin | 0 -> 132 bytes | |||
-rw-r--r-- | src/player_pc.c | 17 |
6 files changed, 26 insertions, 34 deletions
diff --git a/data/fldeff_80C5CD4.s b/data/fldeff_80C5CD4.s index f4de75f7d..4f0e83832 100644 --- a/data/fldeff_80C5CD4.s +++ b/data/fldeff_80C5CD4.s @@ -5,7 +5,7 @@ .align 2 gUnknown_083D1898:: @ 83D1898 - obj_pal gUnknownPal_083D190C, 0x0080 + obj_tiles gUnknownGfx_083D190C, 0x80, 0 .align 2 gUnknown_083D18A0:: @ 83D18A0 @@ -39,10 +39,8 @@ gUnknownPal_083D18EC:: .incbin "graphics/unknown/unknown_3D18EC.gbapal" .align 2 -gUnknownPal_083D190C:: - .incbin "graphics/unknown/unknown_3D190C.gbapal" - - .incbin "baserom.gba", 0x003d192c, 0x60 +gUnknownGfx_083D190C:: + .incbin "graphics/unknown/unknown_3D190C.4bpp" .align 2 gSpriteImage_83D198C:: @ 83D198C @@ -64,8 +62,7 @@ gSpriteImage_83D1B0C:: @ 83D1B0C gSpriteImage_83D1B8C:: @ 83D1B8C .incbin "graphics/unknown_sprites/83D259C/4.4bpp" - .align 2 - .incbin "baserom.gba", 0x003d1c0c, 0x20 + .space 32 .align 2 gFieldEffectObjectPalette7: @ 83D1C2C diff --git a/data/pokedex.s b/data/pokedex.s index 984adfe9c..a9ee7a9be 100644 --- a/data/pokedex.s +++ b/data/pokedex.s @@ -264,7 +264,7 @@ gUnknown_083B4EC4:: @ 83B4EC4 gUnknown_083B5558:: @ 83B5558 .string "{CLEAR_TO 0}$" - .incbin "baserom.gba", 0x3b555c, 0x20 + .incbin "graphics/unknown/unknown_3B555C.bin" .align 2 gOamData_83B557C:: @ 83B557C @@ -367,7 +367,16 @@ gUnknown_083B57A4:: @ 83B57A4 spr_template 0xFFFF, 0, gOamData_83B557C, NULL, gSpriteImageTable_83B5594, gDummySpriteAffineAnimTable, nullsub_59 gUnknown_083B57BC:: @ 83B57BC - .incbin "baserom.gba", 0x003b57bc, 0x28 + .byte 0, 0, 0, 0 + .byte 187, 3, 213, 3 + .byte 190, 3, 216, 3 + .byte 193, 3, 219, 3 + .byte 196, 3, 222, 3 + .byte 199, 3, 225, 3 + .byte 202, 3, 228, 3 + .byte 205, 3, 231, 3 + .byte 208, 3, 234, 3 + .byte 211, 2, 237, 2 .align 2 gUnknown_083B57E4:: @ 83B57E4 diff --git a/graphics/unknown/unknown_3B555C.bin b/graphics/unknown/unknown_3B555C.bin Binary files differnew file mode 100644 index 000000000..10c81cbb8 --- /dev/null +++ b/graphics/unknown/unknown_3B555C.bin diff --git a/graphics/unknown/unknown_3D190C.pal b/graphics/unknown/unknown_3D190C.pal deleted file mode 100644 index 088afec9e..000000000 --- a/graphics/unknown/unknown_3D190C.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -139 65 32 -139 65 32 -139 65 32 -139 65 32 -139 65 32 -139 65 32 -139 65 32 -139 65 32 -139 65 32 -139 65 32 -139 65 32 -139 65 32 -139 65 32 -139 65 32 -139 65 32 -139 65 32 diff --git a/graphics/unknown/unknown_3D190C.png b/graphics/unknown/unknown_3D190C.png Binary files differnew file mode 100644 index 000000000..3ba7a7570 --- /dev/null +++ b/graphics/unknown/unknown_3D190C.png diff --git a/src/player_pc.c b/src/player_pc.c index 96cbb6512..d85f90cc4 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -677,7 +677,6 @@ void sub_813A9EC(u8 taskId) gTasks[taskId].func = sub_813A280; } -// seems like it was meant to return data[8] - data[1], but doesn't. void sub_813AA30(u8 taskId, u8 arg) { s16 *data = gTasks[taskId].data; @@ -702,11 +701,17 @@ void sub_813AA30(u8 taskId, u8 arg) sub_813AD58(gSaveBlock1.pcItems[var].itemId); } - // dead code not getting optimized out what the fuck??? - { - register int data8 asm("r1") = data[8]; - register int data1 asm("r0") = data[1]; - asm(""::"r"(data8 - data1)); + /* + THEORY: This check produces essentially dead code, but it might have been working in an earlier build + in which case it allows a programmer to easily duplicate items without the use of a debug menu. + With the removal of a lot of the debug menus close to release, a programmer may have added this to + help test things with a low key (such as planting a lot of duplicated berries, which requires this lazy "cheat") + without bringing the relevent debug menus back. The commented out line is intentionally left in below to show + what it may have looked like. + */ + if(data[8] - data[1] > 0) { // this check is arbitrary and used to generate the correct assembly using the subtraction, which is what matters. the 0 check doesn't. + //gSaveBlock1.pcItems[data[8]].quantity += 100; + gSaveBlock1.pcItems[data[8]].quantity += 0; // do not enforce item cap. } } |