mirror of
https://github.com/pret/pmd-red.git
synced 2026-10-05 08:56:58 -04:00
Add more ewram and iwram
This commit is contained in:
+2
-2
@@ -3,8 +3,8 @@
|
||||
#include "random.h"
|
||||
#include "reg_control.h"
|
||||
|
||||
extern u32 gUnknown_203B0B8;
|
||||
extern u16 gRawKeyInput;
|
||||
EWRAM_DATA_2 u32 gUnknown_203B0B8 = {0};
|
||||
EWRAM_DATA_2 u16 gRawKeyInput = {0};
|
||||
|
||||
void sub_800CB20(void)
|
||||
{
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
#include "pokemon_3.h"
|
||||
#include "pokemon.h"
|
||||
#include "position_util.h"
|
||||
#include "structs/dungeon_entity.h"
|
||||
#include "structs/str_dungeon.h"
|
||||
#include "exclusive_pokemon.h"
|
||||
#include "trap.h"
|
||||
|
||||
extern u32 gUnknown_202EDC8;
|
||||
extern u8 gUnknown_202E038[0x50];
|
||||
@@ -457,7 +457,6 @@ extern void sub_8046860(Entity *, Position *, Item *, u32);
|
||||
extern u32 sub_803D73C(u32);
|
||||
|
||||
extern void sub_80460F8(Position *, Item *, u8);
|
||||
extern void sub_807FE04(Position *, u8);
|
||||
|
||||
void ZapdosReFightDialogue(void)
|
||||
{
|
||||
|
||||
+1
-1
@@ -15,10 +15,10 @@
|
||||
#include "structs/str_dungeon.h"
|
||||
#include "tile_types.h"
|
||||
#include "position_util.h"
|
||||
#include "trap.h"
|
||||
|
||||
extern void sub_8049ED4(void);
|
||||
extern void sub_8073D14(Entity *);
|
||||
extern void sub_807FE9C(Entity *, Position *, u32, u32);
|
||||
|
||||
void sub_8075680(void)
|
||||
{
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ extern void sub_80426C8(u32, u32);
|
||||
extern void sub_8068FE0(Entity *, u32, Entity *r2);
|
||||
extern void nullsub_93(Position *);
|
||||
extern void sub_80522F4(Entity *, Entity *, u8 *);
|
||||
extern void sub_806F370(Entity *r0, Entity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32);
|
||||
extern void sub_806F370(Entity *pokemon, Entity *target, u32, u32, u8 *, u8 moveType, s32, u32, u32, u32);
|
||||
extern void sub_80694C0(Entity *, s32, s32, u32);
|
||||
extern void sub_804535C(Entity *, u32);
|
||||
extern void sub_804AC20(Position *);
|
||||
@@ -35,7 +35,7 @@ extern u8 *gUnknown_80F9CBC[];
|
||||
extern u8 gAvailablePokemonNames[];
|
||||
extern u8 *gUnknown_80FCAC0[];
|
||||
|
||||
void sub_807E1A0(Entity *pokemon,Entity *target,u8 param_3,s16 param_4,s32 param_5)
|
||||
void sub_807E1A0(Entity *pokemon,Entity *target,u8 moveType,s16 param_4,s32 param_5)
|
||||
{
|
||||
EntityInfo *targetInfo;
|
||||
u8 flag;
|
||||
@@ -65,7 +65,7 @@ void sub_807E1A0(Entity *pokemon,Entity *target,u8 param_3,s16 param_4,s32 param
|
||||
newHP /= 2;
|
||||
}
|
||||
}
|
||||
sub_806F370(pokemon,target,newHP,0,&flag,param_3,param_4_s32,0,0,0);
|
||||
sub_806F370(pokemon,target,newHP,0,&flag,moveType,param_4_s32,0,0,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+29
-29
@@ -1,19 +1,19 @@
|
||||
#include "global.h"
|
||||
#include "code_8092334.h"
|
||||
#include "structs/str_position.h"
|
||||
|
||||
extern void sub_8082FE0(u32, void *, u32);
|
||||
extern void sub_8082FA8(void *, void *, u32);
|
||||
extern void sub_8082FE0(unkStruct_8094924 *, void *, u32 size);
|
||||
extern void sub_8082FA8(unkStruct_8094924 *, void *, u32);
|
||||
|
||||
|
||||
void nullsub_98()
|
||||
void nullsub_98(unkStruct_8094924 *param_1)
|
||||
{}
|
||||
|
||||
void sub_808300C(u32 *param_1, u32 *param_2)
|
||||
void sub_808300C(unkStruct_8094924 *param_1, u8 *param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, param_2, 8);
|
||||
}
|
||||
|
||||
void sub_8083018(u32 param_1)
|
||||
void sub_8083018(unkStruct_8094924 *param_1)
|
||||
{
|
||||
u8 auStack_10 [12];
|
||||
|
||||
@@ -21,7 +21,7 @@ void sub_8083018(u32 param_1)
|
||||
auStack_10[8] = 0;
|
||||
}
|
||||
|
||||
void sub_8083030(u32 *param_1, u32 param_2)
|
||||
void sub_8083030(unkStruct_8094924 *param_1, u16 param_2)
|
||||
{
|
||||
u16 uStack_8;
|
||||
|
||||
@@ -29,7 +29,7 @@ void sub_8083030(u32 *param_1, u32 param_2)
|
||||
sub_8082FA8(param_1,&uStack_8,2);
|
||||
}
|
||||
|
||||
void sub_8083048(u32 *param_1, u32 param_2)
|
||||
void sub_8083048(unkStruct_8094924 *param_1, u32 param_2)
|
||||
{
|
||||
u16 uStack_8;
|
||||
|
||||
@@ -37,7 +37,7 @@ void sub_8083048(u32 *param_1, u32 param_2)
|
||||
sub_8082FA8(param_1,&uStack_8,2);
|
||||
}
|
||||
|
||||
void sub_8083060(u32 *param_1, u32 param_2)
|
||||
void sub_8083060(unkStruct_8094924 *param_1, u32 param_2)
|
||||
{
|
||||
u8 uStack_8;
|
||||
|
||||
@@ -45,7 +45,7 @@ void sub_8083060(u32 *param_1, u32 param_2)
|
||||
sub_8082FA8(param_1,&uStack_8,1);
|
||||
}
|
||||
|
||||
void sub_8083078(u32 *param_1, u32 param_2)
|
||||
void sub_8083078(unkStruct_8094924 *param_1, u32 param_2)
|
||||
{
|
||||
u32 uStack_8;
|
||||
|
||||
@@ -53,7 +53,7 @@ void sub_8083078(u32 *param_1, u32 param_2)
|
||||
sub_8082FA8(param_1,&uStack_8,4);
|
||||
}
|
||||
|
||||
void sub_808308C(u32 *param_1, u32 param_2)
|
||||
void sub_808308C(unkStruct_8094924 *param_1, u32 param_2)
|
||||
{
|
||||
u32 uStack_8;
|
||||
|
||||
@@ -61,7 +61,7 @@ void sub_808308C(u32 *param_1, u32 param_2)
|
||||
sub_8082FA8(param_1,&uStack_8,4);
|
||||
}
|
||||
|
||||
void sub_80830A0(u32 *param_1, u32 param_2)
|
||||
void sub_80830A0(unkStruct_8094924 *param_1, u32 param_2)
|
||||
{
|
||||
u32 uStack_8;
|
||||
|
||||
@@ -69,7 +69,7 @@ void sub_80830A0(u32 *param_1, u32 param_2)
|
||||
sub_8082FA8(param_1,&uStack_8,4);
|
||||
}
|
||||
|
||||
void sub_80830B4(u32 *param_1, u8 param_2)
|
||||
void sub_80830B4(unkStruct_8094924 *param_1, u8 param_2)
|
||||
{
|
||||
u8 local_8;
|
||||
|
||||
@@ -77,13 +77,13 @@ void sub_80830B4(u32 *param_1, u8 param_2)
|
||||
sub_8082FA8(param_1,&local_8,1);
|
||||
}
|
||||
|
||||
void SavePosition(u32 *param_1, Position *param_2)
|
||||
void SavePosition(unkStruct_8094924 *param_1, Position *param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2->x, 1);
|
||||
sub_8082FA8(param_1, ¶m_2->y, 1);
|
||||
}
|
||||
|
||||
void sub_80830F8(u32 *param_1, u32 *param_2)
|
||||
void sub_80830F8(unkStruct_8094924 *param_1, u32 *param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2[0], 1);
|
||||
sub_8082FA8(param_1, ¶m_2[1], 1);
|
||||
@@ -91,18 +91,18 @@ void sub_80830F8(u32 *param_1, u32 *param_2)
|
||||
sub_8082FA8(param_1, ¶m_2[3], 1);
|
||||
}
|
||||
|
||||
void sub_808312C(u32 *param_1, u16 *param_2)
|
||||
void sub_808312C(unkStruct_8094924 *param_1, u16 *param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2[0], 1);
|
||||
sub_8082FA8(param_1, ¶m_2[1], 1);
|
||||
}
|
||||
|
||||
void SaveSpeedCounters(u32 *param_1, u32 *speedCounters, u32 numCounters)
|
||||
void SaveSpeedCounters(unkStruct_8094924 *param_1, u32 *speedCounters, u32 numCounters)
|
||||
{
|
||||
sub_8082FA8(param_1, speedCounters, numCounters);
|
||||
}
|
||||
|
||||
u16 sub_8083158(u32 param_1)
|
||||
u16 sub_8083158(unkStruct_8094924 *param_1)
|
||||
{
|
||||
u16 local_8;
|
||||
|
||||
@@ -110,7 +110,7 @@ u16 sub_8083158(u32 param_1)
|
||||
return local_8;
|
||||
}
|
||||
|
||||
s16 sub_8083170(u32 param_1)
|
||||
s16 sub_8083170(unkStruct_8094924 *param_1)
|
||||
{
|
||||
s16 local_8;
|
||||
|
||||
@@ -118,7 +118,7 @@ s16 sub_8083170(u32 param_1)
|
||||
return local_8;
|
||||
}
|
||||
|
||||
u8 sub_8083188(u32 param_1)
|
||||
u8 sub_8083188(unkStruct_8094924 *param_1)
|
||||
{
|
||||
u8 local_8;
|
||||
|
||||
@@ -126,7 +126,7 @@ u8 sub_8083188(u32 param_1)
|
||||
return local_8;
|
||||
}
|
||||
|
||||
u32 sub_80831A0(u32 param_1)
|
||||
u32 sub_80831A0(unkStruct_8094924 *param_1)
|
||||
{
|
||||
u32 local_8;
|
||||
|
||||
@@ -134,7 +134,7 @@ u32 sub_80831A0(u32 param_1)
|
||||
return local_8;
|
||||
}
|
||||
|
||||
u32 sub_80831B4(u32 param_1)
|
||||
u32 sub_80831B4(unkStruct_8094924 *param_1)
|
||||
{
|
||||
u32 local_8;
|
||||
|
||||
@@ -142,7 +142,7 @@ u32 sub_80831B4(u32 param_1)
|
||||
return local_8;
|
||||
}
|
||||
|
||||
u32 sub_80831C8(u32 param_1)
|
||||
u32 sub_80831C8(unkStruct_8094924 *param_1)
|
||||
{
|
||||
u32 local_8;
|
||||
|
||||
@@ -150,7 +150,7 @@ u32 sub_80831C8(u32 param_1)
|
||||
return local_8;
|
||||
}
|
||||
|
||||
bool8 sub_80831DC(u32 param_1)
|
||||
bool8 sub_80831DC(unkStruct_8094924 *param_1)
|
||||
{
|
||||
u8 local_8;
|
||||
|
||||
@@ -158,7 +158,7 @@ bool8 sub_80831DC(u32 param_1)
|
||||
return local_8 != 0;
|
||||
}
|
||||
|
||||
void sub_80831F8(u32 param_1,u16 *param_2)
|
||||
void sub_80831F8(unkStruct_8094924 *param_1,u16 *param_2)
|
||||
{
|
||||
param_2[0] = 0;
|
||||
param_2[1] = 0;
|
||||
@@ -167,7 +167,7 @@ void sub_80831F8(u32 param_1,u16 *param_2)
|
||||
}
|
||||
|
||||
|
||||
void sub_8083220(u32 param_1,u32 *param_2)
|
||||
void sub_8083220(unkStruct_8094924 *param_1,u32 *param_2)
|
||||
{
|
||||
param_2[0] = 0;
|
||||
param_2[1] = 0;
|
||||
@@ -179,7 +179,7 @@ void sub_8083220(u32 param_1,u32 *param_2)
|
||||
sub_8082FE0(param_1,¶m_2[3],1);
|
||||
}
|
||||
|
||||
void sub_8083260(u32 param_1,u16 *param_2)
|
||||
void sub_8083260(unkStruct_8094924 *param_1,u16 *param_2)
|
||||
{
|
||||
param_2[0] = 0;
|
||||
param_2[1] = 0;
|
||||
@@ -187,8 +187,8 @@ void sub_8083260(u32 param_1,u16 *param_2)
|
||||
sub_8082FE0(param_1,¶m_2[1],1);
|
||||
}
|
||||
|
||||
void sub_8083288(u32 r0, u16 *r1, u32 r2)
|
||||
void sub_8083288(unkStruct_8094924 *r0, u16 *r1, u32 size)
|
||||
{
|
||||
sub_8082FE0(r0, r1, r2);
|
||||
sub_8082FE0(r0, r1, size);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "global.h"
|
||||
|
||||
IWRAM_DATA u32 gUnknown_3001198[0x270] = {0};
|
||||
EWRAM_DATA_2 s32 gUnknown_203B470 = {0};
|
||||
EWRAM_DATA_2 s32 gUnknown_203B474 = {0};
|
||||
|
||||
void sub_8094D28(s32 r0) {
|
||||
|
||||
gUnknown_3001198[0] = r0;
|
||||
gUnknown_203B470 = 1;
|
||||
|
||||
for(; gUnknown_203B470 < 0x270; gUnknown_203B470++)
|
||||
{
|
||||
gUnknown_3001198[gUnknown_203B470] =
|
||||
(gUnknown_3001198[gUnknown_203B470 - 1] ^
|
||||
(gUnknown_3001198[gUnknown_203B470 - 1] >> 0x1e)) * 0x6c078965 + gUnknown_203B470;
|
||||
}
|
||||
}
|
||||
+2
-43
@@ -1,50 +1,9 @@
|
||||
#include "global.h"
|
||||
#include "text1.h"
|
||||
#include "memory.h"
|
||||
#include "file_system.h"
|
||||
#include "structs/str_3001B64.h"
|
||||
|
||||
struct unkStruct_3001B64_sub
|
||||
{
|
||||
// size: 0x24
|
||||
u16 unk0;
|
||||
/* 0x2 */ s16 speciesID;
|
||||
u8 unk4;
|
||||
u8 unk5;
|
||||
u8 unk6;
|
||||
u8 unk7;
|
||||
u32 unk8;
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
/* 0x14 */ u8 *faceData;
|
||||
u32 fill18;
|
||||
u8 unk1C;
|
||||
u8 fill1D[0x20 - 0x1D];
|
||||
/* 0x20 */ OpenedFile *faceFile;
|
||||
};
|
||||
|
||||
struct unkStruct_3001B64
|
||||
{
|
||||
// size: 0x5A8
|
||||
u32 unk0;
|
||||
u32 unk4;
|
||||
u32 unk8;
|
||||
u32 unkC;
|
||||
u8 fill10[0x414 - 0x10];
|
||||
u32 unk414;
|
||||
u32 unk418;
|
||||
u32 unk41C;
|
||||
u32 unk420;
|
||||
u32 unk424;
|
||||
u32 unk428;
|
||||
u32 unk42C;
|
||||
u32 unk430;
|
||||
u32 unk434;
|
||||
u32 fill438;
|
||||
struct unkStruct_3001B64_sub unk43C[10];
|
||||
u16 unk5A4;
|
||||
};
|
||||
|
||||
extern struct unkStruct_3001B64 *gUnknown_3001B64;
|
||||
IWRAM_DATA struct unkStruct_3001B64 *gUnknown_3001B64 = {0};
|
||||
|
||||
extern u16 gUnknown_20399DC;
|
||||
extern u16 gUnknown_20399DE;
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
#include "global.h"
|
||||
#include "structs/str_3001B64.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_801D014.h"
|
||||
#include "credits2.h"
|
||||
#include "event_flag.h"
|
||||
#include "flash.h"
|
||||
#include "friend_list_menu.h"
|
||||
#include "ground_main.h"
|
||||
#include "personality_test1.h"
|
||||
|
||||
extern struct unkStruct_3001B64 *gUnknown_3001B64;
|
||||
|
||||
u32 sub_802E90C();
|
||||
void sub_802E918();
|
||||
u32 sub_80282DC(u8 *r0);
|
||||
void sub_809927C(u8);
|
||||
void sub_80282FC(void);
|
||||
void sub_80993C0(u32);
|
||||
void sub_8001064(void);
|
||||
void sub_809965C(void);
|
||||
|
||||
void sub_809C39C(void) {
|
||||
gUnknown_3001B64->unk430 = sub_801D178();
|
||||
if(gUnknown_3001B64->unk430 == 3)
|
||||
GroundMainGroundRequest(sub_8002694(sub_801D1D4()), 0, -1);
|
||||
sub_801D1E0();
|
||||
}
|
||||
|
||||
void sub_809C3D8(void)
|
||||
{
|
||||
gUnknown_3001B64->unk430 = sub_801D178();
|
||||
if(gUnknown_3001B64->unk430 == 3)
|
||||
GroundMainGroundRequest(sub_8002694(sub_801D1D4()), 0, -1);
|
||||
sub_801D1E0();
|
||||
}
|
||||
|
||||
void sub_809C414(void)
|
||||
{
|
||||
u8 val;
|
||||
|
||||
val = sub_802540C();
|
||||
|
||||
if(val != 0)
|
||||
{
|
||||
gUnknown_3001B64->unk430 = val;
|
||||
GroundMainGroundRequest(sub_8002694(val), 0, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_3001B64->unk430 = -1;
|
||||
}
|
||||
sub_8025418();
|
||||
|
||||
}
|
||||
|
||||
void sub_809C464(void)
|
||||
{
|
||||
DeleteTestTracker();
|
||||
sub_8001064();
|
||||
sub_809965C();
|
||||
}
|
||||
|
||||
void sub_809C478(void)
|
||||
{
|
||||
s32 temp;
|
||||
s32 temp1;
|
||||
|
||||
if(sub_80356A0() == 0x3)
|
||||
{
|
||||
PlaySound(0x313);
|
||||
InitFlash();
|
||||
ClearFlashData();
|
||||
}
|
||||
|
||||
sub_8035758();
|
||||
|
||||
sub_8001B88(3, &temp, &temp1);
|
||||
sub_80993C0(0);
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/WyHAL - (84.32% matching - Seth)
|
||||
NAKED
|
||||
void sub_809C4B0(void)
|
||||
{
|
||||
asm_unified(
|
||||
"\tpush {r4,r5,lr}\n"
|
||||
"\tmovs r4, 0x1\n"
|
||||
"\tnegs r4, r4\n"
|
||||
"\tldr r5, _0809C4FC\n"
|
||||
"\tldr r0, [r5]\n"
|
||||
"\tmovs r2, 0x86\n"
|
||||
"\tlsls r2, 3\n"
|
||||
"\tadds r1, r0, r2\n"
|
||||
"\tldr r0, [r1]\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbne _0809C4DE\n"
|
||||
"\tbl sub_803B168\n"
|
||||
"\tlsls r0, 16\n"
|
||||
"\tldr r1, [r5]\n"
|
||||
"\tldr r3, _0809C500\n"
|
||||
"\tadds r2, r1, r3\n"
|
||||
"\tasrs r4, r0, 16\n"
|
||||
"\tlsrs r0, 16\n"
|
||||
"\tstrh r0, [r2]\n"
|
||||
"\tmovs r0, 0x86\n"
|
||||
"\tlsls r0, 3\n"
|
||||
"\tadds r1, r0\n"
|
||||
"_0809C4DE:\n"
|
||||
"\tstr r4, [r1]\n"
|
||||
"\tbl sub_803B1BC\n"
|
||||
"\tmovs r0, 0x1\n"
|
||||
"\tnegs r0, r0\n"
|
||||
"\tcmp r4, r0\n"
|
||||
"\tbeq _0809C4F4\n"
|
||||
"\tadds r0, r4, 0\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tbl GroundMap_ExecuteEvent\n"
|
||||
"_0809C4F4:\n"
|
||||
"\tpop {r4,r5}\n"
|
||||
"\tpop {r0}\n"
|
||||
"\tbx r0\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0809C4FC: .4byte gUnknown_3001B64\n"
|
||||
"_0809C500: .4byte 0x000005a4");
|
||||
}
|
||||
|
||||
|
||||
void sub_809C504(void)
|
||||
{
|
||||
u8 temp;
|
||||
|
||||
if(sub_80282DC(&temp) == 1)
|
||||
{
|
||||
sub_809927C(temp);
|
||||
gUnknown_3001B64->unk430 = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_3001B64->unk430 = -1;
|
||||
}
|
||||
sub_80282FC();
|
||||
}
|
||||
|
||||
void sub_809C550(void)
|
||||
{
|
||||
u32 ret;
|
||||
s32 val;
|
||||
|
||||
ret = sub_802E90C();
|
||||
val = 0;
|
||||
sub_802E918();
|
||||
|
||||
switch(ret)
|
||||
{
|
||||
case 1:
|
||||
if(sub_8001CC4(4, 0x1D, 0x3))
|
||||
val = 1;
|
||||
break;
|
||||
case 2:
|
||||
if(sub_8001CC4(4, 0x1F, 0x2))
|
||||
val = 2;
|
||||
break;
|
||||
case 3:
|
||||
if(sub_8001CC4(0xB, 0x33, 0x8))
|
||||
val = 3;
|
||||
break;
|
||||
}
|
||||
gUnknown_3001B64->unk430 = val;
|
||||
}
|
||||
+1
-1
@@ -23,7 +23,7 @@ struct unkStruct_3001B68
|
||||
u8 unk20;
|
||||
};
|
||||
|
||||
extern struct unkStruct_3001B68 *gUnknown_3001B68;
|
||||
IWRAM_DATA struct unkStruct_3001B68 *gUnknown_3001B68 = {0};
|
||||
|
||||
|
||||
struct unkStruct_20399E0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "bg_control.h"
|
||||
#include "cpu.h"
|
||||
|
||||
extern u32 gUnknown_202D800;
|
||||
EWRAM_DATA u32 gUnknown_202D800 = {0};
|
||||
extern u16 gUnknown_203B0BE[];
|
||||
extern u16 *gUnknown_2026E3C;
|
||||
extern u8 gUnknown_2026E38;
|
||||
|
||||
@@ -34,10 +34,12 @@ enum ItemTargetFlag
|
||||
ITEM_TARGET_ALLY = 1 << 1
|
||||
};
|
||||
|
||||
extern s32 gNumPotentialTargets;
|
||||
extern u32 gPotentialItemTargetWeights[NUM_DIRECTIONS];
|
||||
extern u32 gPotentialItemTargetDirections[NUM_DIRECTIONS];
|
||||
extern bool8 gTargetAhead[NUM_DIRECTIONS];
|
||||
EWRAM_DATA_2 s32 gNumPotentialTargets = {0};
|
||||
|
||||
EWRAM_DATA u32 gPotentialItemTargetDirections[NUM_DIRECTIONS] = {0};
|
||||
EWRAM_DATA bool8 gTargetAhead[NUM_DIRECTIONS] = {0};
|
||||
EWRAM_DATA u32 gPotentialItemTargetWeights[NUM_DIRECTIONS] = {0};
|
||||
|
||||
extern TeamInventory *gTeamInventoryRef;
|
||||
|
||||
void sub_807360C(void)
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include "dungeon_visibility.h"
|
||||
#include "pokemon_3.h"
|
||||
#include "pokemon.h"
|
||||
#include "code_8077274_1.h"
|
||||
#include "trap.h"
|
||||
|
||||
extern u8 gUnknown_202F221;
|
||||
extern u8 gUnknown_202F222;
|
||||
@@ -55,7 +57,6 @@ void HandlePickUpPlayerAction(Entity *);
|
||||
void sub_8066E14(Entity * );
|
||||
void sub_807348C(void);
|
||||
void sub_80732F0(void);
|
||||
void sub_807FD84(Entity *);
|
||||
void sub_8066BD4(Entity*);
|
||||
void HandleTalkFieldAction(Entity *);
|
||||
void HandleUseMovePlayerAction(Entity *);
|
||||
@@ -67,7 +68,6 @@ void HandleUseItemAction(Entity *);
|
||||
void sub_8066FA4(Entity *);
|
||||
void HandleSetItemAction(Entity *,bool8);
|
||||
void HandleUnsetItemAction(Entity *,bool8);
|
||||
void sub_807FE9C(Entity *,Position *,u32,u32);
|
||||
extern u8 sub_8044B28(void);
|
||||
extern u8 UseAttack(Entity *);
|
||||
void sub_8052740(u32);
|
||||
|
||||
@@ -7,25 +7,28 @@
|
||||
#include "tile_types.h"
|
||||
#include "random.h"
|
||||
#include "dungeon_engine.h"
|
||||
#include "dungeon_movement.h"
|
||||
|
||||
extern unkStruct_202F190 gUnknown_202F190;
|
||||
extern unkStruct_202F190 *gUnknown_203B430;
|
||||
extern unkStruct_202F190 gUnknown_80F69D4;
|
||||
extern unkStruct_202F190 gUnknown_80F69EC;
|
||||
|
||||
extern u8 gUnknown_8108EC0[];
|
||||
extern u8 gUnknown_80F6A04[];
|
||||
extern u8 gUnknown_80F6A10[];
|
||||
extern u8 gUnknown_80F6A28[];
|
||||
extern u8 gUnknown_80F6A1C[];
|
||||
extern u8 gUnknown_80F6A34[];
|
||||
extern u8 gUnknown_80F6A40[];
|
||||
extern u8 gUnknown_8108EC0[];
|
||||
extern const struct FileArchive gDungeonFileArchive;
|
||||
|
||||
extern OpenedFile *gUnknown_202F18C;
|
||||
extern OpenedFile *gDungeonPaletteFile;
|
||||
extern unkStruct_202EE8C gUnknown_202EE8C[32];
|
||||
extern u8 gWalkableTileToCrossableTerrain[8];
|
||||
// ewram
|
||||
EWRAM_DATA OpenedFile *gDungeonPaletteFile = {0};
|
||||
EWRAM_DATA unkStruct_202EE8C gUnknown_202EE8C[32] = {0};
|
||||
EWRAM_DATA OpenedFile *gUnknown_202F18C = {0};
|
||||
EWRAM_DATA unkStruct_202F190 gUnknown_202F190 = {0};
|
||||
|
||||
// ewram2
|
||||
EWRAM_DATA_2 unkStruct_202F190 *gUnknown_203B430 = {0};
|
||||
|
||||
extern u8 sub_8043CE4(u32);
|
||||
|
||||
extern int sprintf(char *, const char *, ...);
|
||||
@@ -331,4 +334,4 @@ void sub_8049B8C(void)
|
||||
sub_8049BB0(XCoord,YCoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "pokemon.h"
|
||||
#include "weather.h"
|
||||
|
||||
extern u8 gWalkableTileToCrossableTerrain[8];
|
||||
EWRAM_DATA u8 gWalkableTileToCrossableTerrain[8] = {0};
|
||||
|
||||
u8 GetCrossableTerrain(s16 species)
|
||||
{
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ void sub_8098CC8(void)
|
||||
ClearAllItems_8091FB4();
|
||||
}
|
||||
|
||||
bool8 GroundMainGroundRequest(s16 r0, u32 r1, u32 r2)
|
||||
bool8 GroundMainGroundRequest(s16 r0, u32 r1, s32 r2)
|
||||
{
|
||||
s32 temp;
|
||||
temp = r0; // force a asr shift
|
||||
|
||||
+3
-2
@@ -8,6 +8,8 @@
|
||||
#include "memory.h"
|
||||
#include "sprite.h"
|
||||
|
||||
IWRAM_DATA unkStruct_3001B7C *gUnknown_3001B7C = {0};
|
||||
|
||||
extern unkStruct_2039DB0 gUnknown_2039DB0;
|
||||
extern unkStruct_2039DB0 gUnknown_2039DC0;
|
||||
extern u16 gUnknown_2039DCC;
|
||||
@@ -15,7 +17,6 @@ extern u16 gUnknown_2039DCE;
|
||||
extern u8 gUnknown_2039DD0;
|
||||
extern u32 gUnknown_2039DD4;
|
||||
extern OpenedFile *gUnknown_203B4B4;
|
||||
extern unkStruct_3001B7C *gUnknown_3001B7C;
|
||||
|
||||
// dungeon_sbin.s
|
||||
extern const struct FileArchive gDungeonFileArchive;
|
||||
@@ -204,4 +205,4 @@ UNUSED static u16 sub_80A65D8(u16 *a0)
|
||||
u16 sub_80A65E0(u32 a0)
|
||||
{
|
||||
return (a0 >> 16) & 0x337F;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +214,6 @@ extern u8 sub_806F4A4(Entity *, u32);
|
||||
extern void sub_807DF38(Entity *pokemon, Entity *target, Position *pos, u32, u8 moveType, s16);
|
||||
extern void nullsub_92(Entity *);
|
||||
extern u32 sub_8055864(Entity *pokemon, Entity *target, Move *param_3, s32 param_4, s32 param_5);
|
||||
void sub_8079E34(Entity * pokemon, Entity * target, bool8 param_3);
|
||||
extern u8 sub_807EAA0(u32, u32);
|
||||
extern void sub_80522F4(Entity *r1, Entity *r2, const char[]);
|
||||
extern s32 sub_80556BC(Entity *, Entity *, u8, Move *, u32, u32);
|
||||
|
||||
@@ -409,4 +409,4 @@ static void PersonalityTest_DisplayStarterSprite(void)
|
||||
sub_800836C(1, r6, 14);
|
||||
CloseFile(faceFile);
|
||||
sub_80073E0(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@ extern void sub_8049BB0(s32, s32);
|
||||
extern s16 sub_8057600(Move*, u32);
|
||||
extern u32 sub_8055864(Entity *pokemon, Entity *target, Move *param_3, s32 param_4, s32 param_5);
|
||||
extern void sub_807D148(Entity *pokemon, Entity *r1, u32 r2, Position *r3);
|
||||
extern void sub_807FE04(Position *, u32);
|
||||
extern void sub_807DB74(Entity *);
|
||||
extern void HandleLuminousOrbAction(Entity *pokemon);
|
||||
extern void sub_807D510(Entity *, Entity *);
|
||||
|
||||
+4
-23
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "code_8045A00.h"
|
||||
#include "code_80521D0.h"
|
||||
#include "code_8077274_1.h"
|
||||
#include "code_808417C.h"
|
||||
#include "constants/trap.h"
|
||||
#include "constants/type.h"
|
||||
@@ -64,37 +65,17 @@ extern Entity* sub_806B7F8(struct unkStruct_806B7F8 *, bool8);
|
||||
|
||||
void sub_806A9B4(Entity *, u32);
|
||||
|
||||
void sub_8079E34(Entity *param_1, Entity *param_2, u32);
|
||||
s16 sub_803D970(u32);
|
||||
bool8 sub_806AA0C(s32, s32);
|
||||
void sub_80421EC(Position *, u32);
|
||||
|
||||
bool8 sub_8045888(Entity *);
|
||||
void SetTrap(Tile *, u32);
|
||||
void sub_803E708(u32, u32);
|
||||
u8 sub_8043D10(void);
|
||||
void sub_8068FE0(Entity *, u32, Entity *);
|
||||
void sub_805239C(Entity *, u8 *);
|
||||
void sub_8045C28(Item *, u8 , u8);
|
||||
void sub_8045BF8(u8 *, Item *);
|
||||
void HandleTripTrap(Entity *pokemon,Entity *target);
|
||||
void HandleMudTrap(Entity *pokemon,Entity *target);
|
||||
void HandleStickyTrap(Entity *pokemon,Entity *target);
|
||||
void HandleGrimyTrap(Entity *pokemon,Entity *target);
|
||||
void HandleSummonTrap(Entity *pokemon,Position *pos);
|
||||
void HandlePitfallTrap(Entity *pokemon,Entity *target,Tile *tile);
|
||||
void HandleWarpTrap(Entity *pokemon,Entity *target);
|
||||
void HandleWhirlwindTrap(Entity *entity,Entity *target);
|
||||
void HandleSpinTrap(Entity *pokemon,Entity *target);
|
||||
void HandleSlumberTrap(Entity *pokemon,Entity *target);
|
||||
void HandleSlowTrap(Entity *pokemon,Entity *target);
|
||||
void HandleSealTrap(Entity *pokemon,Entity *target);
|
||||
void HandlePoisonTrap(Entity *pokemon,Entity *target);
|
||||
void HandleSelfdestructTrap(Entity *pokemon,Entity *target);
|
||||
void HandleExplosionTrap(Entity *pokemon,Entity *target);
|
||||
void HandlePPZeroTrap(Entity *pokemon,Entity *target);
|
||||
void HandleWonderTile(Entity *pokemon,Entity *target);
|
||||
void HandlePokemonTrap(Entity *pokemon,Position *pos);
|
||||
void sub_806F324(Entity *,s16,u32,u32);
|
||||
void sub_806F480(Entity *, u32);
|
||||
extern void sub_80421C0(Entity *, u32);
|
||||
@@ -104,7 +85,7 @@ extern u8 sub_803F428(Position *pos);
|
||||
void sub_806A1E8(Entity *pokemon);
|
||||
void sub_8052364(Entity *, Position *, u8 *);
|
||||
void sub_8049ED4(void);
|
||||
void sub_80522F4(Entity *r0, Entity *r1, const char r2[]);
|
||||
void sub_80522F4(Entity *pokemon, Entity *target, const char r2[]);
|
||||
u8 sub_803D6FC(void);
|
||||
Entity *sub_8045684(u8, Position *, u8);
|
||||
extern void sub_807D148(Entity *pokemon, Entity *target, u32 r2, Position *r3);
|
||||
@@ -690,7 +671,7 @@ void HandlePPZeroTrap(Entity *param_1,Entity *param_2)
|
||||
}
|
||||
}
|
||||
|
||||
void HandleWonderTile(Entity *param_1, Entity *param_2)
|
||||
void HandleWonderTile(Entity *pokemon, Entity *target)
|
||||
{
|
||||
sub_8079E34(param_1, param_2, 0);
|
||||
sub_8079E34(pokemon, target, FALSE);
|
||||
}
|
||||
|
||||
+12
-10
@@ -1,4 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "structs/dungeon_entity.h"
|
||||
#include "structs/map.h"
|
||||
#include "trap.h"
|
||||
#include "code_806CD90.h"
|
||||
#include "code_8092334.h"
|
||||
@@ -10,7 +12,7 @@
|
||||
extern u8 gUnknown_81071E0[];
|
||||
extern u8 gUnknown_81071D4[];
|
||||
|
||||
extern void sub_8082FA8(void *, void *, u32);
|
||||
extern void sub_8082FA8(unkStruct_8094924 *, void *, s32);
|
||||
|
||||
void sub_8081B60(void *, Tile *);
|
||||
void sub_80830F8(void * , u32*);
|
||||
@@ -70,27 +72,27 @@ void sub_803E708(u32, u32);
|
||||
void sub_80421C0(Entity *, u32);
|
||||
void sub_804687C(Entity *, Position *, Position *, Item *, u32);
|
||||
|
||||
void HandleTripTrap(Entity *param_1, Entity *param_2)
|
||||
void HandleTripTrap(Entity *pokemon, Entity *target)
|
||||
{
|
||||
u32 direction;
|
||||
EntityInfo *info;
|
||||
Position pos;
|
||||
Item item;
|
||||
|
||||
if (param_2 != NULL) {
|
||||
sub_806CDD4(param_2, 6, NUM_DIRECTIONS);
|
||||
if (target != NULL) {
|
||||
sub_806CDD4(target, 6, NUM_DIRECTIONS);
|
||||
sub_803E708(0x10, 0x55);
|
||||
sub_806CE68(param_2, NUM_DIRECTIONS);
|
||||
info = param_2->info;
|
||||
sub_806CE68(target, NUM_DIRECTIONS);
|
||||
info = target->info;
|
||||
if ((info->heldItem).flags & ITEM_FLAG_EXISTS) {
|
||||
item = (info->heldItem);
|
||||
(info->heldItem).flags = 0;
|
||||
FillInventoryGaps();
|
||||
sub_80421C0(param_2, 400);
|
||||
sub_80421C0(target, 400);
|
||||
direction = (info->action).direction & DIRECTION_MASK;
|
||||
pos.x = (param_2->pos).x + gAdjacentTileOffsets[direction].x;
|
||||
pos.y = (param_2->pos).y + gAdjacentTileOffsets[direction].y;
|
||||
sub_804687C(param_1, ¶m_2->pos, &pos, &item, 1);
|
||||
pos.x = (target->pos).x + gAdjacentTileOffsets[direction].x;
|
||||
pos.y = (target->pos).y + gAdjacentTileOffsets[direction].y;
|
||||
sub_804687C(pokemon, &target->pos, &pos, &item, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user