mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-27 19:24:58 -05:00
Document some death text symbols
Based on TheZZAZZGlitch's video.
This commit is contained in:
@@ -2259,7 +2259,7 @@ _08062C3C:
|
||||
ldr r0, _08062CA0
|
||||
adds r1, r5, 0
|
||||
add r2, sp, 0x4
|
||||
bl sub_80928C0
|
||||
bl GetMoveName
|
||||
ldrb r1, [r4]
|
||||
movs r0, 0x2
|
||||
ands r0, r1
|
||||
@@ -3493,7 +3493,7 @@ _0806361E:
|
||||
ldr r0, _0806368C
|
||||
adds r1, r5, 0
|
||||
add r2, sp, 0x4
|
||||
bl sub_80928C0
|
||||
bl GetMoveName
|
||||
ldr r0, _08063690
|
||||
mov r1, r9
|
||||
bl sub_8013800
|
||||
@@ -4094,7 +4094,7 @@ _08063ACC:
|
||||
mov r0, r9
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl sub_80928C0
|
||||
bl GetMoveName
|
||||
mov r3, r8
|
||||
cmp r3, 0
|
||||
bne _08063AEC
|
||||
@@ -4172,7 +4172,7 @@ sub_8063B54:
|
||||
ldr r0, _08063BAC
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl sub_80928C0
|
||||
bl GetMoveName
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x4
|
||||
eors r0, r1
|
||||
@@ -4216,7 +4216,7 @@ sub_8063BB4:
|
||||
adds r1, r4, r7
|
||||
adds r1, r6, r1
|
||||
movs r2, 0
|
||||
bl sub_80928C0
|
||||
bl GetMoveName
|
||||
adds r4, r6, r4
|
||||
ldr r0, _08063C7C
|
||||
adds r2, r4, r0
|
||||
@@ -4282,7 +4282,7 @@ _08063C42:
|
||||
strb r0, [r1]
|
||||
ldr r0, _08063C80
|
||||
movs r2, 0
|
||||
bl sub_80928C0
|
||||
bl GetMoveName
|
||||
_08063C5C:
|
||||
adds r0, r6, r4
|
||||
bl unk_FixLinkedMovesSetEnabled4
|
||||
@@ -4390,7 +4390,7 @@ sub_8063CF0:
|
||||
adds r1, r4, r1
|
||||
adds r1, r6, r1
|
||||
movs r2, 0
|
||||
bl sub_80928C0
|
||||
bl GetMoveName
|
||||
adds r4, r6, r4
|
||||
ldr r3, _08063DA4
|
||||
adds r2, r4, r3
|
||||
@@ -4899,7 +4899,7 @@ _08064104:
|
||||
_08064130:
|
||||
ldr r0, _08064144
|
||||
movs r2, 0
|
||||
bl sub_80928C0
|
||||
bl GetMoveName
|
||||
cmp r4, 0
|
||||
beq _0806414C
|
||||
ldr r0, _08064148
|
||||
|
||||
@@ -133,7 +133,7 @@ _08072844:
|
||||
add r0, sp, 0x60
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl sub_80928C0
|
||||
bl GetMoveName
|
||||
movs r3, 0x1
|
||||
_08072872:
|
||||
adds r4, 0x8
|
||||
@@ -325,7 +325,7 @@ _080729BA:
|
||||
add r0, sp, 0x40
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl sub_80928C0
|
||||
bl GetMoveName
|
||||
movs r0, 0x1
|
||||
mov r10, r0
|
||||
_080729EA:
|
||||
|
||||
@@ -312,7 +312,7 @@ _080905A6:
|
||||
ldr r0, _080905E0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl sub_80928C0
|
||||
bl GetMoveName
|
||||
mov r0, r8
|
||||
cmp r0, 0
|
||||
bne _080905E8
|
||||
|
||||
@@ -4587,8 +4587,8 @@ gUnknown_8113050: @ 8113050
|
||||
.string "the leader.\0"
|
||||
.align 2, 0
|
||||
|
||||
.global gUnknown_8113080
|
||||
gUnknown_8113080: @ 8113080
|
||||
.global gSpecialDeathText
|
||||
gSpecialDeathText: @ 8113080
|
||||
@ replacing .incbin "baserom.gba", 0x113080, 0x7BC
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.4byte gUnknown_811380C
|
||||
@@ -4936,14 +4936,14 @@ gUnknown_811380C: @ 811380C
|
||||
.string "was transformed into a friend.\0"
|
||||
.align 2, 0
|
||||
|
||||
.global gUnknown_811382C
|
||||
gUnknown_811382C: @ 811382C
|
||||
.global DeathToMoveText
|
||||
DeathToMoveText: @ 811382C
|
||||
.string "{POKEMON_0}'s {MOVE_ITEM_0}.\0"
|
||||
.align 2, 0
|
||||
|
||||
.global gUnknown_811383C
|
||||
gUnknown_811383C: @ 811383C
|
||||
.4byte gUnknown_811382C
|
||||
.global gPtrDeathToMoveText
|
||||
gPtrDeathToMoveText: @ 811383C
|
||||
.4byte DeathToMoveText
|
||||
|
||||
.global PlaceText
|
||||
PlaceText:
|
||||
|
||||
@@ -77,8 +77,8 @@ void UnSetMove(s32 index, Move *moves);
|
||||
|
||||
u8 sub_809287C(Move *move);
|
||||
void sub_80928A0(u8 *buffer, Move *move, const unkStruct_80928C0 *);
|
||||
void sub_80928C0(u8 *buffer, Move *move, const unkStruct_80928C0 *);
|
||||
void sub_8092AA8(Move *move, u16 moveID);
|
||||
void GetMoveName(u8 *buffer, Move *move, const unkStruct_80928C0 *);
|
||||
void InitPokemonMoveOrNullObject(Move *move, u16 moveID);
|
||||
void sub_8092C84(u8 *buffer, u16 moveID);
|
||||
s32 sub_8092DB8(Move *moves, s32 index);
|
||||
s32 sub_8092F4C(Move *moves, s32 index);
|
||||
|
||||
@@ -967,7 +967,7 @@ void sub_806AED8(Moves *moves, s16 *maxHPStat, u8 *atk, u8 *def, s16 _species, s
|
||||
s32 moveIndex;
|
||||
|
||||
for (moveIndex = 0; moveIndex < MAX_MON_MOVES; moveIndex++) {
|
||||
sub_8092AA8(&moves->moves[moveIndex], structPtr->moves[moveIndex]);
|
||||
InitPokemonMoveOrNullObject(&moves->moves[moveIndex], structPtr->moves[moveIndex]);
|
||||
}
|
||||
*maxHPStat = structPtr->unkC;
|
||||
for (moveCategory = 0; moveCategory < 2; moveCategory++) {
|
||||
@@ -986,7 +986,7 @@ void sub_806AED8(Moves *moves, s16 *maxHPStat, u8 *atk, u8 *def, s16 _species, s
|
||||
|
||||
sub_8072AC8(spMoves, species, level);
|
||||
for (moveIndex = 0; moveIndex < MAX_MON_MOVES; moveIndex++) {
|
||||
sub_8092AA8(&moves->moves[moveIndex], spMoves[moveIndex]);
|
||||
InitPokemonMoveOrNullObject(&moves->moves[moveIndex], spMoves[moveIndex]);
|
||||
}
|
||||
*maxHPStat = sub_806C444(species, level);
|
||||
for (moveCategory = 0; moveCategory < 2; moveCategory++) {
|
||||
@@ -1008,7 +1008,7 @@ void sub_806AED8(Moves *moves, s16 *maxHPStat, u8 *atk, u8 *def, s16 _species, s
|
||||
structPtr->unk10[moveCategory] = sub_806C4D4(structPtr->species, structPtr->level, moveCategory);
|
||||
}
|
||||
for (moveIndex = 0; moveIndex < MAX_MON_MOVES; moveIndex++) {
|
||||
sub_8092AA8(&moves->moves[moveIndex], structPtr->moves[moveIndex]);
|
||||
InitPokemonMoveOrNullObject(&moves->moves[moveIndex], structPtr->moves[moveIndex]);
|
||||
}
|
||||
|
||||
*maxHPStat = structPtr->unkC;
|
||||
|
||||
@@ -15,7 +15,7 @@ struct unkStruct_8113080
|
||||
u8 *text;
|
||||
};
|
||||
|
||||
extern const u8 *gUnknown_811383C[];
|
||||
extern const u8 *gPtrDeathToMoveText[];
|
||||
extern const u8 *gUnknown_8113850[];
|
||||
extern const u8 *gUnknown_8113868[];
|
||||
extern const u8 *gUnknown_8113898[];
|
||||
@@ -33,7 +33,7 @@ extern const u8 *gUnknown_81139B8[];
|
||||
extern const u8 *gUnknown_81139CC[];
|
||||
extern const u8 *gUnknown_8113870[];
|
||||
|
||||
extern struct unkStruct_8113080 gUnknown_8113080[];
|
||||
extern struct unkStruct_8113080 gSpecialDeathText[];
|
||||
|
||||
void ReadBellyBits(DataSerializer *r0, FixedPoint *dst)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ void WriteBellyBits(DataSerializer *r0, FixedPoint *src)
|
||||
WriteBits(r0, &src->unk2, 16);
|
||||
}
|
||||
|
||||
static void sub_80944BC(s16 moveID, u8 *buffer)
|
||||
static void WriteDeathText(s16 moveID, u8 *buffer)
|
||||
{
|
||||
u16 moveID_u16;
|
||||
s32 moveID_s32 = moveID;
|
||||
@@ -56,11 +56,11 @@ static void sub_80944BC(s16 moveID, u8 *buffer)
|
||||
if (moveID_s32 < 0x1F4) {
|
||||
// Needed this cast/variable to match
|
||||
moveID_u16 = moveID_s32;
|
||||
sub_8092AA8(&move, moveID_u16);
|
||||
sub_80928C0(gFormatBuffer_Items[0], &move, NULL);
|
||||
FormatString(*gUnknown_811383C, buffer, buffer + 200, 0); // $m0's $i0
|
||||
InitPokemonMoveOrNullObject(&move, moveID_u16);
|
||||
GetMoveName(gFormatBuffer_Items[0], &move, NULL);
|
||||
FormatString(*gPtrDeathToMoveText, buffer, buffer + 200, 0); // $m0's $i0
|
||||
} else {
|
||||
strncpy(buffer, gUnknown_8113080[moveID - 0x1F4].text, 200);
|
||||
strncpy(buffer, gSpecialDeathText[moveID - 0x1F4].text, 200);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ static u8 sub_8094528(s16 moveID)
|
||||
}
|
||||
else
|
||||
{
|
||||
return gUnknown_8113080[moveID - 0x1F4].unk0;
|
||||
return gSpecialDeathText[moveID - 0x1F4].unk0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ void sub_8094558(u32 param_1,u8 *param_2,UnkDungeonGlobal_unk1CE98_sub *param_3)
|
||||
PrintFormattedStringOnWindow(x,y,buffer,param_1,0);
|
||||
|
||||
y += 0xA;
|
||||
sub_80944BC(param_3->moveID, buffer);
|
||||
WriteDeathText(param_3->moveID, buffer);
|
||||
|
||||
x = (0xb0 - sub_8008ED0(buffer)) / 2;
|
||||
PrintFormattedStringOnWindow(x,y,buffer,param_1,0);
|
||||
|
||||
@@ -1861,7 +1861,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
|
||||
}
|
||||
else {
|
||||
if (!statusMoveMatch) {
|
||||
sub_80928C0(gFormatBuffer_Items[0], currMove, NULL);
|
||||
GetMoveName(gFormatBuffer_Items[0], currMove, NULL);
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80F93C8); // The move can't be used!
|
||||
moveUsable = FALSE;
|
||||
}
|
||||
@@ -1876,7 +1876,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
|
||||
Move assistMove = *currMove;
|
||||
|
||||
assistMove.id = sub_8057144(attacker);
|
||||
sub_80928C0(gFormatBuffer_Items[0], &assistMove, NULL);
|
||||
GetMoveName(gFormatBuffer_Items[0], &assistMove, NULL);
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FD2DC); // Assist:
|
||||
moveWasUsed = TryUseChosenMove(attacker, var_34, itemId, arg_0, isLinkedMove, &assistMove);
|
||||
}
|
||||
@@ -1920,13 +1920,13 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
|
||||
Move *movePtr;
|
||||
|
||||
movePtr = &mimicMove;
|
||||
sub_8092AA8(&mimicMove, attackerInfo->mimicMoveIDs[i]);
|
||||
InitPokemonMoveOrNullObject(&mimicMove, attackerInfo->mimicMoveIDs[i]);
|
||||
if (MoveFlagExists(&mimicMove)) {
|
||||
if (mimicMove.id == MOVE_ASSIST) {
|
||||
assistMove = mimicMove;
|
||||
assistMove.id = sub_8057144(attacker);
|
||||
movePtr = &assistMove;
|
||||
sub_80928C0(gFormatBuffer_Items[0], &assistMove, NULL);
|
||||
GetMoveName(gFormatBuffer_Items[0], &assistMove, NULL);
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FD2DC); // Assist:
|
||||
}
|
||||
TryUseChosenMove(attacker, 0, itemId, arg_0, isLinkedMove, movePtr);
|
||||
@@ -2067,7 +2067,7 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
|
||||
}
|
||||
|
||||
SetMessageArgument_2(gFormatBuffer_Monsters[0], GetEntInfo(attacker), 0);
|
||||
sub_80928C0(gFormatBuffer_Items[0], move, NULL);
|
||||
GetMoveName(gFormatBuffer_Items[0], move, NULL);
|
||||
if (MoveMatchesBideClassStatus(attacker, move)) {
|
||||
msg = gUnknown_80FC72C; // mon loosed move
|
||||
GetEntInfo(attacker)->unkFF = 0;
|
||||
@@ -2097,7 +2097,7 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
|
||||
else if (!moveUsable) {
|
||||
SetMessageArgument_2(gFormatBuffer_Monsters[0], GetEntInfo(attacker), 0);
|
||||
if (itemId == 0) {
|
||||
sub_80928C0(gFormatBuffer_Items[0], move, NULL);
|
||||
GetMoveName(gFormatBuffer_Items[0], move, NULL);
|
||||
LogMessageByIdWithPopupCheckUser(attacker, msg);
|
||||
sub_803E708(0xA, 0x3F);
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6D0); // But the move couldn't be used!
|
||||
@@ -2222,7 +2222,7 @@ bool8 sub_8056468(Entity *entity, Move *move, const u8 *str, Entity **unkArray,
|
||||
if (r7) {
|
||||
SetMessageArgument_2(gFormatBuffer_Monsters[0], GetEntInfo(entity), 0);
|
||||
if (itemId == 0) {
|
||||
sub_80928C0(gFormatBuffer_Items[0], move, NULL);
|
||||
GetMoveName(gFormatBuffer_Items[0], move, NULL);
|
||||
}
|
||||
else {
|
||||
BufferItemName(gFormatBuffer_Items[0], itemId, NULL);
|
||||
|
||||
@@ -410,7 +410,7 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
|
||||
if ((movePtr->moveFlags & MOVE_FLAG_EXISTS) != 0) {
|
||||
if ((movePtr->moveFlags & MOVE_FLAG_DISABLED) == 0) {
|
||||
if ((movePtr->moveFlags & MOVE_FLAG_LAST_USED) != 0) {
|
||||
sub_80928C0(gFormatBuffer_Items[0],movePtr,0);
|
||||
GetMoveName(gFormatBuffer_Items[0],movePtr,0);
|
||||
// $i0 was tormented
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCFBC);
|
||||
movePtr->moveFlags |= MOVE_FLAG_DISABLED;
|
||||
@@ -428,7 +428,7 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
|
||||
InitPokemonMove(&struggleMove, MOVE_STRUGGLE);
|
||||
entityInfo->moves.struggleMoveFlags |= MOVE_FLAG_DISABLED;
|
||||
isTormented = TRUE;
|
||||
sub_80928C0(gFormatBuffer_Items[0],&struggleMove,0);
|
||||
GetMoveName(gFormatBuffer_Items[0],&struggleMove,0);
|
||||
// $i0 was tormented
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCFBC);
|
||||
}
|
||||
@@ -1595,7 +1595,7 @@ bool32 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
|
||||
}
|
||||
else {
|
||||
InitPokemonMove(move, moveId);
|
||||
sub_80928C0(gFormatBuffer_Items[0], move, 0);
|
||||
GetMoveName(gFormatBuffer_Items[0], move, 0);
|
||||
move->moveFlags2 |= MOVE_FLAG2_UNK4;
|
||||
move->moveFlags2 |= MOVE_FLAG_REPLACE;
|
||||
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FE38C);
|
||||
@@ -1951,7 +1951,7 @@ bool8 ConversionMoveAction(Entity * pokemon,Entity * target,Move * move,u32 para
|
||||
info->types[0] = moveType;
|
||||
info->types[1] = TYPE_NONE;
|
||||
info->isColorChanged = TRUE;
|
||||
sub_80928C0(gFormatBuffer_Items[0], moveStack[newIndex], NULL);
|
||||
GetMoveName(gFormatBuffer_Items[0], moveStack[newIndex], NULL);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FE330);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
10
src/moves.c
10
src/moves.c
@@ -70,10 +70,10 @@ void sub_80928A0(u8 *buffer, Move *move, const unkStruct_80928C0 *a2)
|
||||
{
|
||||
Move stack;
|
||||
CopyAndResetMove(&stack, move);
|
||||
sub_80928C0(buffer, &stack, a2);
|
||||
GetMoveName(buffer, &stack, a2);
|
||||
}
|
||||
|
||||
void sub_80928C0(u8 *buffer, Move *move, const unkStruct_80928C0 *param_3)
|
||||
void GetMoveName(u8 *buffer, Move *move, const unkStruct_80928C0 *param_3)
|
||||
{
|
||||
u32 uVar2;
|
||||
u32 basePP;
|
||||
@@ -135,7 +135,7 @@ void InitPokemonMove(Move *move, u16 moveID)
|
||||
move->ginseng = 0;
|
||||
}
|
||||
|
||||
void sub_8092AA8(Move *move, u16 moveID)
|
||||
void InitPokemonMoveOrNullObject(Move *move, u16 moveID)
|
||||
{
|
||||
if (moveID == 0)
|
||||
move->moveFlags = 0;
|
||||
@@ -241,7 +241,7 @@ void sub_8092C84(u8 *buffer, u16 moveID)
|
||||
{
|
||||
Move stack;
|
||||
InitPokemonMove(&stack, moveID);
|
||||
sub_80928C0(buffer, &stack, NULL);
|
||||
GetMoveName(buffer, &stack, NULL);
|
||||
}
|
||||
|
||||
u8 *GetMoveUseText(u16 moveID)
|
||||
@@ -1380,7 +1380,7 @@ s32 unk_PrintMoveDescription(s32 x, Move *move, s32 a3, struct subStruct_203B240
|
||||
u8 buffer[800];
|
||||
|
||||
sub_80073B8(a3);
|
||||
sub_80928C0(gFormatBuffer_Monsters[0], move, 0);
|
||||
GetMoveName(gFormatBuffer_Monsters[0], move, 0);
|
||||
PrintFormattedStringOnWindow(8 * x + 16, 0, gUnknown_8109930, a3, 0);
|
||||
y = 19;
|
||||
moveDescription = sMovesData[move->id].description;
|
||||
|
||||
@@ -640,7 +640,7 @@ void HandlePPZeroTrap(Entity *param_1,Entity *param_2)
|
||||
if (counter != 0) {
|
||||
moveIndex = DungeonRandInt(counter);
|
||||
moveStack[moveIndex]->PP = 0;
|
||||
sub_80928C0(gFormatBuffer_Items[0],moveStack[moveIndex],0);
|
||||
GetMoveName(gFormatBuffer_Items[0],moveStack[moveIndex],0);
|
||||
sub_806A9B4(param_2, indexStack[moveIndex]);
|
||||
flag = TRUE;
|
||||
}
|
||||
@@ -681,7 +681,7 @@ void HandleSealTrap(Entity *param_1,Entity *param_2)
|
||||
if (counter != 0) {
|
||||
moveIndex = DungeonRandInt(counter);
|
||||
moveStack[moveIndex]->moveFlags2 |= MOVE_FLAG_SEALED;
|
||||
sub_80928C0(gFormatBuffer_Items[0],moveStack[moveIndex], NULL);
|
||||
GetMoveName(gFormatBuffer_Items[0],moveStack[moveIndex], NULL);
|
||||
flag = TRUE;
|
||||
}
|
||||
if(flag)
|
||||
|
||||
Reference in New Issue
Block a user