Decompile OAM and text functions#57
Conversation
| * @param gfxSlot Graphics slot | ||
| * @param stage Stage | ||
| */ | ||
| void DisplayMessage(u8 gfxSlot, u8 stage) |
There was a problem hiding this comment.
The function is missing the Text prefix
| if (index) | ||
| index = sAbilityRamValues[index].messageNumber; | ||
| else | ||
| if ((u8)(gEquipment.securityHatchLevel - 1) < 4) |
There was a problem hiding this comment.
You can change this to gEquipment.securityHatchLevel == 1 || gEquipment.securityHatchLevel == 2 || gEquipment.securityHatchLevel == 3 || gEquipment.securityHatchLevel == 4 it's more verbose but at least the values are clearer
| else | ||
| if ((u8)(gEquipment.securityHatchLevel - 1) < 4) |
There was a problem hiding this comment.
You can put the else and if on the same line
| else | ||
| BitFill(3, 0, VRAM_BASE + 0x6000, 0x2000, 32); |
There was a problem hiding this comment.
Missing {} on the else for consistency with the linked else/ifs
| * | ||
| * @param action Type of clearing action | ||
| */ | ||
| void ClearTextGraphics(u8 action) |
There was a problem hiding this comment.
Missing Text prefix, you can swap Clear and Text
| static u8 sBlob_79c5c0_79e6a0[] = INCBIN_U8("data/Blob_79c5c0_79e6a0.bin"); | ||
| static u8 sBlob_79c5c0_79cdd8[] = INCBIN_U8("data/Blob_79c5c0_79cdd8.bin"); | ||
|
|
||
| u16** sLocationTextPointers[LANGUAGE_COUNT] = { |
There was a problem hiding this comment.
Array should be const pointers
| (u16**)0x879cd70 | ||
| }; | ||
|
|
||
| u16** sMessageTextPointers[LANGUAGE_COUNT] = { |
There was a problem hiding this comment.
Array should be const pointers
| }; | ||
|
|
||
| static u8 sBlob_79c5c0_79e6a0[] = INCBIN_U8("data/Blob_79c5c0_79e6a0.bin"); | ||
| static u8 sBlob_79c5c0_79cdd8[] = INCBIN_U8("data/Blob_79c5c0_79cdd8.bin"); |
| (u16**)0x879ccb0 | ||
| }; | ||
|
|
||
| static u8 sBlob_79ce10_79e6a0[] = INCBIN_U8("data/Blob_79ce10_79e6a0.bin"); |
Decompiles
UpdateMenuOamDataId- https://decomp.me/scratch/FAlRmDrawLocationText- https://decomp.me/scratch/dicicTextDrawMessageBanner- https://decomp.me/scratch/w15JjDisplayMessage- https://decomp.me/scratch/r3aeeClearTextGraphics- https://decomp.me/scratch/muIatand fixes a typo in the Kihunter functions.
./check_roms.sh returns OK