mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-27 19:24:58 -05:00
more decomping and some cleanup
This commit is contained in:
@@ -464,7 +464,7 @@ _08057778: .4byte gUnknown_80F502A
|
||||
thumb_func_start sub_805777C
|
||||
sub_805777C:
|
||||
push {lr}
|
||||
bl sub_8079DB8
|
||||
bl VitalThrowStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
|
||||
@@ -111,7 +111,7 @@ sub_8057E50:
|
||||
bl sub_807A9D8
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl sub_8079CA0
|
||||
bl MirrorMoveStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
@@ -1925,7 +1925,7 @@ _08058BDC: .4byte gUnknown_8106A4C
|
||||
sub_8058BE0:
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
bl sub_8079C24
|
||||
bl EndureStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@@ -2595,7 +2595,7 @@ _080590C4: .4byte gUnknown_80F4DE8
|
||||
thumb_func_start sub_80590C8
|
||||
sub_80590C8:
|
||||
push {lr}
|
||||
bl sub_80798B0
|
||||
bl MistStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@@ -2736,7 +2736,7 @@ _080591D4: .4byte gUnknown_80F4DEA
|
||||
thumb_func_start sub_80591D8
|
||||
sub_80591D8:
|
||||
push {lr}
|
||||
bl sub_8079834
|
||||
bl SafeguardStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@@ -4145,7 +4145,7 @@ _08059C7C: .4byte gUnknown_80FE36C
|
||||
thumb_func_start sub_8059C80
|
||||
sub_8059C80:
|
||||
push {lr}
|
||||
bl sub_8079D1C
|
||||
bl Conversion2StatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@@ -5146,7 +5146,7 @@ _0805A3F8: .4byte gUnknown_8106A4C
|
||||
thumb_func_start sub_805A3FC
|
||||
sub_805A3FC:
|
||||
push {lr}
|
||||
bl sub_807992C
|
||||
bl WishStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@@ -6089,7 +6089,7 @@ _0805AB44: .4byte gUnknown_80FC5CC
|
||||
thumb_func_start sub_805AB48
|
||||
sub_805AB48:
|
||||
push {lr}
|
||||
bl sub_8079A24
|
||||
bl LightScreenStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@@ -7106,7 +7106,7 @@ _0805B2E0: .4byte gUnknown_80F4F94
|
||||
thumb_func_start sub_805B2E4
|
||||
sub_805B2E4:
|
||||
push {lr}
|
||||
bl sub_80799A8
|
||||
bl MagicCoatStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@@ -7115,7 +7115,7 @@ sub_805B2E4:
|
||||
thumb_func_start sub_805B2F0
|
||||
sub_805B2F0:
|
||||
push {lr}
|
||||
bl sub_8079B1C
|
||||
bl ProtectStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@@ -7220,7 +7220,7 @@ _0805B39E:
|
||||
thumb_func_start sub_805B3A8
|
||||
sub_805B3A8:
|
||||
push {lr}
|
||||
bl sub_8079BA8
|
||||
bl MirrorCoatStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@@ -7797,7 +7797,7 @@ _0805B7F8: .4byte gUnknown_80FDCA0
|
||||
thumb_func_start sub_805B7FC
|
||||
sub_805B7FC:
|
||||
push {lr}
|
||||
bl sub_8079AA0
|
||||
bl ReflectStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@@ -8518,7 +8518,7 @@ _0805BD52:
|
||||
thumb_func_start sub_805BD64
|
||||
sub_805BD64:
|
||||
push {lr}
|
||||
bl sub_8078D8C
|
||||
bl MuzzleTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@@ -9095,7 +9095,7 @@ _0805C1AC: .4byte 0x0000270f
|
||||
thumb_func_start sub_805C1B0
|
||||
sub_805C1B0:
|
||||
push {lr}
|
||||
bl sub_80790C8
|
||||
bl IdentityItemHolders
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
|
||||
2187
asm/code_8077274.s
2187
asm/code_8077274.s
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,37 @@
|
||||
#ifndef GUARD_CODE_8077274_1_H
|
||||
#define GUARD_CODE_8077274_1_H
|
||||
|
||||
void MuzzleTarget(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
void sub_8078E18(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void sub_8078F50(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void sub_8078FDC(struct DungeonEntity * pokemon, struct DungeonEntity * target, s16 param_3);
|
||||
void IdentityItemHolders(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
void BlindTarget(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
void CrossEyeVisionTarget(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
void RestoreVisionTarget(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
void RestorePPTarget(struct DungeonEntity * pokemon,struct DungeonEntity * target, s32 param_3);
|
||||
void sub_80793B0(struct DungeonEntity * pokemon,struct DungeonEntity * target, s32 param_3);
|
||||
void sub_8079420(struct DungeonEntity * pokemon,struct DungeonEntity * target, s32 param_3);
|
||||
void sub_8079490(struct DungeonEntity * pokemon,struct DungeonEntity * target, s32 param_3);
|
||||
void sub_8079500(struct DungeonEntity * pokemon,struct DungeonEntity * target, s32 param_3);
|
||||
void LongTossStatusTarget(struct DungeonEntity * pokemon,struct DungeonEntity * target);
|
||||
void PierceStatusTarget(struct DungeonEntity * pokemon,struct DungeonEntity * target);
|
||||
void sub_8079618(struct DungeonEntity *pokemon, struct DungeonEntity *target, u8 newStatus, struct PokemonMove *move, u8 *message);
|
||||
void sub_8079764(struct DungeonEntity * pokemon);
|
||||
void sub_80797A0(struct DungeonEntity * pokemon, struct DungeonEntity * target, u8 newStatus);
|
||||
void SafeguardStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void MistStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void WishStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void MagicCoatStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void LightScreenStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void ReflectStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void ProtectStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void MirrorCoatStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void EndureStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void MirrorMoveStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void Conversion2StatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void VitalThrowStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void sub_8079618(struct DungeonEntity * pokemon, struct DungeonEntity *target, u8 newStatus, struct PokemonMove *move, u8 *message);
|
||||
void sub_8079F20(struct DungeonEntity * pokemon, struct DungeonEntity * target, u8 param_3, u8 param_4);
|
||||
void sub_807A0CC(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void SendSleepEndMessage(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 param_3, bool8 param_4);
|
||||
|
||||
@@ -103,7 +103,7 @@ struct DungeonEntityData
|
||||
/* 0x94 */ u8 tactic;
|
||||
u8 fill95[0x9C - 0x95];
|
||||
/* 0x9C */ u32 unk9C;
|
||||
u8 fillA0[0xA4 - 0xA0];
|
||||
/* 0xA0 */ u32 unkA0;
|
||||
/* 0xA4 */ u8 clientType;
|
||||
u8 fillA5[0xA8 - 0xA5];
|
||||
// Statuses are split into groups based on which ones can't overlap.
|
||||
@@ -151,8 +151,8 @@ struct DungeonEntityData
|
||||
/* 0xE5 */ u8 transformStatusTurnsLeft;
|
||||
u8 fillE6[0xE8 - 0xE6];
|
||||
/* 0xE8 */ u8 eyesightStatus;
|
||||
u8 fillE9;
|
||||
/* 0xEA */ u8 eyesightStatusTurnsLeft;
|
||||
/* 0xE9 */ u8 eyesightStatusTurnsLeft;
|
||||
/* 0xEA */ u8 unkEA;
|
||||
u8 fillEB;
|
||||
/* 0xEC */ bool8 muzzledStatus;
|
||||
/* 0xED */ u8 muzzledTurnsLeft;
|
||||
@@ -195,7 +195,9 @@ struct DungeonEntityData
|
||||
u8 fill146;
|
||||
/* 0x147 */ bool8 waiting; // True if an AI Pokémon decided to do nothing this turn.
|
||||
/* 0x148 */ bool8 attacking;
|
||||
u8 fill149[0x14E - 0x149];
|
||||
/* 0x149 */ u8 unk149;
|
||||
/* 0x14A */ u8 unk14A;
|
||||
u8 fill14B[0x14E - 0x14B];
|
||||
/* 0x14E */ u16 visualFlags;
|
||||
/* 0x150 */ u16 previousVisualFlags;
|
||||
/* 0x152 */ u8 unk152;
|
||||
|
||||
@@ -61,7 +61,8 @@ struct DungeonGlobalData
|
||||
u8 fill673[0x674 - 0x673];
|
||||
u8 unk674;
|
||||
u8 unk675;
|
||||
u8 unk676[0x68A - 0x676];
|
||||
/* 0x676 */ bool8 itemHoldersIdentified;
|
||||
u8 unk677[0x68A - 0x677];
|
||||
/* 0x68A */ u8 unk68A;
|
||||
u8 fill68B[0x363C - 0x68B];
|
||||
/* 0x363C */ u8 expYieldRankings[NUM_SPECIES];
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "dungeon_random.h"
|
||||
#include "number_util.h"
|
||||
#include "moves.h"
|
||||
#include "code_8077274_1.h"
|
||||
|
||||
extern u8 *gUnknown_80F89F4[];
|
||||
extern u8 gAvailablePokemonNames[0x58];
|
||||
@@ -40,18 +41,11 @@ extern void sub_8076D10(struct DungeonEntity *pokemon, struct DungeonEntity *r1)
|
||||
extern void LevelDownTarget(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32 r2);
|
||||
extern void sub_8078B5C(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32);
|
||||
extern void SetMessageArgument(u8 *buffer, struct DungeonEntity *r1, u32);
|
||||
extern void SendNonVolatileEndMessage(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void sub_80522F4(struct DungeonEntity *pokemon, struct DungeonEntity *r1, const char[]);
|
||||
extern void RestoreVisionTarget(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void sub_8077910(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32, u32);
|
||||
extern void sub_80791D8(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void BlindTarget(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void HealTargetHP(struct DungeonEntity *pokemon, struct DungeonEntity *r1, s16, s16, u32);
|
||||
extern void sub_80792F8(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32);
|
||||
extern void sub_8079F20(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32, u8);
|
||||
extern void sub_806F370(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32);
|
||||
extern void sub_8078A58(struct DungeonEntity *, struct DungeonEntity *, s16, u32);
|
||||
extern void SendImmobilizeEndMessage(struct DungeonEntity*, struct DungeonEntity*);
|
||||
extern s32 sub_8042520(struct DungeonEntity *);
|
||||
struct DungeonEntity *sub_80696FC(struct DungeonEntity *);
|
||||
extern void sub_80943A0(void*, s32);
|
||||
@@ -79,7 +73,7 @@ void sub_804839C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
|
||||
void sub_80483C4(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_80792F8(pokemon, target, 999);
|
||||
RestorePPTarget(pokemon, target, 999);
|
||||
}
|
||||
|
||||
void sub_80483D4(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
@@ -94,7 +88,7 @@ void sub_80483F4(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
|
||||
void sub_8048400(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_80791D8(pokemon, target);
|
||||
CrossEyeVisionTarget(pokemon, target);
|
||||
}
|
||||
|
||||
void sub_804840C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
|
||||
@@ -12,7 +12,7 @@ extern u8 gAvailablePokemonNames[];
|
||||
|
||||
extern s16 gUnknown_80F4DB6;
|
||||
extern u16 gUnknown_80F4F42;
|
||||
extern u32 gUnknown_80FAC88;
|
||||
extern u8 *gUnknown_80FAC88;
|
||||
extern u8 *gUnknown_80FD018[];
|
||||
extern u8 *gUnknown_80FCFBC[];
|
||||
extern u8 *gUnknown_80FCFE4[];
|
||||
@@ -49,7 +49,6 @@ extern u8 sub_805727C(struct DungeonEntity *, struct DungeonEntity *, s16);
|
||||
extern u32 sub_8055640(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32);
|
||||
extern void sub_80779F0(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern void sub_8078968(struct DungeonEntity *r0, struct DungeonEntity *r1);
|
||||
extern void sub_8079618(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u32, u32);
|
||||
|
||||
extern void sub_8077AE4(struct DungeonEntity *pokemon, struct DungeonEntity *target, u32);
|
||||
extern void sub_8077084(struct DungeonEntity *pokemon, struct DungeonEntity *target, u32, u32);
|
||||
@@ -122,10 +121,10 @@ bool32 sub_8057948(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 sub_8057954(struct DungeonEntity *pokemon, struct DungeonEntity *target, u32 param_3)
|
||||
bool32 sub_8057954(struct DungeonEntity *pokemon, struct DungeonEntity *target, struct PokemonMove *move)
|
||||
{
|
||||
// {ARG_POKEMON_0} is enraged
|
||||
sub_8079618(pokemon,target,0xc,param_3,gUnknown_80FAC88);
|
||||
sub_8079618(pokemon,target,0xc,move,gUnknown_80FAC88);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
1015
src/code_8077274_1.c
1015
src/code_8077274_1.c
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
||||
#include "status_checker.h"
|
||||
|
||||
#include "code_80521D0.h"
|
||||
#include "code_8077274_1.h"
|
||||
#include "constants/move_id.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/type.h"
|
||||
@@ -24,8 +25,6 @@
|
||||
extern void sub_807F43C(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_8078F50(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_8077E4C(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_8079570(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_80795C4(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_807DC68(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_8077BB4(struct DungeonEntity *, struct DungeonEntity *, u8);
|
||||
extern void sub_8078A58(struct DungeonEntity *, struct DungeonEntity *, s16, u32);
|
||||
@@ -281,13 +280,13 @@ bool8 sub_805C474(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
|
||||
bool8 sub_805C480(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8079570(pokemon, target);
|
||||
LongTossStatusTarget(pokemon, target);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_805C48C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_80795C4(pokemon, target);
|
||||
PierceStatusTarget(pokemon, target);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user