move some const data to dungeon move/message

This commit is contained in:
DizzyEggg 2024-10-25 22:47:46 +02:00
parent b0f1f8a878
commit 848d0a0b5f
4 changed files with 30 additions and 27 deletions

View File

@ -14245,24 +14245,3 @@ gUnknown_810697C: @ 810697C
.byte 0x04, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte gUnknown_8103E40
.string "pksdir0\0"
.align 2,0
.global gUnknown_8106990
gUnknown_8106990: @ 8106990
@ replacing .incbin "baserom.gba", 0x106990, 0x2C
.byte 0x01, 0x00, 0x54, 0x00, 0xf0, 0xff, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x54, 0x00
.byte 0x6a, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00
.global gUnknown_81069BC
gUnknown_81069BC: @ 81069BC
@ replacing .incbin "baserom.gba", 0x1069BC, 0x18
.byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00
.global gUnknown_81069D4
gUnknown_81069D4: @ 81069D4
@ replacing .incbin "baserom.gba", 0x1069D4, 0x20
.byte 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00

View File

@ -556,6 +556,7 @@ SECTIONS {
src/dungeon_pokemon_attributes.o(.rodata);
src/called_move_data.o(.rodata);
data/data_80F59C8.o(.rodata);
src/dungeon_message.o(.rodata);
src/dungeon_move.o(.rodata);
data/data_8106A4C.o(.rodata);
src/code_806CD90.o(.rodata);

View File

@ -671,7 +671,6 @@ extern const struct TutorialFlagMsg gMoneyTutorial;
extern const u8 *const gUnknown_80FF6F8;
extern const u8 *const gUnknown_80FF6A4;
extern const u8 gUnknown_8106990[]; // Possibly something menu related?
static inline bool32 DislayTutorialMsg(Entity *leader, const struct TutorialFlagMsg *tutorial, bool32 unkFunctionCall)
{
@ -888,6 +887,16 @@ static void CopyStringToMessageLog(const u8 *src, u32 a1, u32 a2)
#define MESSAGE_LOG_ROW_COUNT 8 // How many log messages are shown
UNUSED static const char sPksDirMeme[] = "pksdir0";
// Possibly something menu related?
// Unfortunately, this is passed to sub_8014140 which is a nullsub. It could be used for Blue and Nintendo DS' touch screen.
static const u8 sUnknownMessageLogData[] =
{
0x01, 0x00, 0x54, 0x00, 0xf0, 0xff, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x54, 0x00,
0x6a, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00
};
bool32 DisplayMessageLog(void)
{
bool8 unkRet;
@ -910,7 +919,7 @@ bool32 DisplayMessageLog(void)
sMessageLogFlags = 0;
nullsub_34(&menuInput, 0);
unkVar = sub_8014140(0, gUnknown_8106990);
unkVar = sub_8014140(0, sUnknownMessageLogData);
if (TryScrollLogUp(unkVar))
scroll = TRUE;

View File

@ -320,8 +320,6 @@ extern const s16 gUnknown_80F5006;
extern const s32 gUnknown_80F519C;
extern const s32 gUnknown_80F51A0;
extern const s32 gUnknown_80F50F4[2][21];
extern const s32 gUnknown_81069D4[];
extern const s32 gUnknown_81069BC[];
extern const s16 gUnknown_80F4E70[];
extern const s16 gUnknown_80F4E74[];
extern const u16 gUnknown_80F5004;
@ -1758,10 +1756,9 @@ UNUSED bool32 TargetNotImmuneTo(Move *move, Entity *target)
}
for (i = 0; i < 2; i++) {
s32 multiplier[4]; // 0, 1, 1, 1 ; 0 is for EFFECTIVENESS_IMMUNE
s32 multiplier[4] = {0, 1, 1, 1}; // EFFECTIVENESS_IMMUNE is 0, others are 1
s32 effectiveness;
memcpy(multiplier, &gUnknown_81069BC, sizeof(multiplier));
if (ghostImmunity && targetInfo->types[i] == TYPE_GHOST && !targetInfo->exposed) {
effectiveness = EFFECTIVENESS_IMMUNE;
}
@ -2528,6 +2525,21 @@ NAKED s32 sub_8056564(Entity *entity, Position *pos, Move *move, s32 r4)
}
#endif // NONMATCHING
// This would signify a new file starts here, but it makes little sense tbh.
UNUSED static const char sPksDirMeme[] = "pksdir0";
static const s32 gUnknown_81069D4[NUM_DIRECTIONS] =
{
[DIRECTION_SOUTH] = 1,
[DIRECTION_SOUTHEAST] = 1,
[DIRECTION_EAST] = 1,
[DIRECTION_NORTHEAST] = 0,
[DIRECTION_NORTH] = 0,
[DIRECTION_NORTHWEST] = 0,
[DIRECTION_WEST] = 1,
[DIRECTION_SOUTHWEST] = 1
};
// This function looks important, but what does it do?
void sub_80566F8(Entity *attacker, Move *move, s32 a2, bool8 a3, s32 itemId, s32 isLinkedMove)
{
@ -3298,3 +3310,5 @@ static void SortTargets(Entity **targetsArray, Entity *attacker)
targetsArray[i] = localArray[i];
}
}
// TODO: This file could(should?) be merged with move_actions.c, status_actions.c and move_checks.c into one.