address review commnts, label almost all dialogue and few more funcs

This commit is contained in:
Seth Barberee
2022-05-07 07:51:12 -07:00
parent c806523537
commit 482ade61be
19 changed files with 1326 additions and 1362 deletions

View File

@@ -5178,8 +5178,8 @@ _0803F984:
bx r0
thumb_func_end sub_803F878
thumb_func_start sub_803F994
sub_803F994:
thumb_func_start GetCameraXPos
GetCameraXPos:
ldr r0, _0803F9A8
ldr r0, [r0]
ldr r1, _0803F9AC
@@ -5192,10 +5192,10 @@ sub_803F994:
.align 2, 0
_0803F9A8: .4byte gDungeonGlobalData
_0803F9AC: .4byte 0x000181e8
thumb_func_end sub_803F994
thumb_func_end GetCameraXPos
thumb_func_start sub_803F9B0
sub_803F9B0:
thumb_func_start GetCameraYPos
GetCameraYPos:
ldr r0, _0803F9C4
ldr r0, [r0]
ldr r1, _0803F9C8
@@ -5208,7 +5208,7 @@ sub_803F9B0:
.align 2, 0
_0803F9C4: .4byte gDungeonGlobalData
_0803F9C8: .4byte 0x000181e8
thumb_func_end sub_803F9B0
thumb_func_end GetCameraYPos
thumb_func_start sub_803F9CC
sub_803F9CC:

View File

@@ -4259,7 +4259,7 @@ _08054968:
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057A0C
bl PainSplitMoveAction
bl _080554BA
_08054978:
adds r0, r7, 0

View File

@@ -309,7 +309,7 @@ _080854C0:
cmp r5, 0x3
ble _08085490
movs r0, 0x2
bl sub_8085680
bl GetEntityFromClientType
_080854CC:
pop {r4,r5}
pop {r1}
@@ -550,8 +550,8 @@ _08085678: .4byte gDungeonGlobalData
_0808567C: .4byte 0x0001358c
thumb_func_end sub_808563C
thumb_func_start sub_8085680
sub_8085680:
thumb_func_start GetEntityFromClientType
GetEntityFromClientType:
push {r4-r6,lr}
lsls r0, 24
lsrs r6, r0, 24
@@ -588,7 +588,7 @@ _080856C0:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8085680
thumb_func_end GetEntityFromClientType
thumb_func_start sub_80856C8
sub_80856C8:

View File

@@ -5,40 +5,6 @@
.text
thumb_func_start sub_8085B0C
sub_8085B0C:
push {r4,r5,lr}
sub sp, 0x1C
adds r5, r0, 0
ldr r1, _08085B48
mov r0, sp
movs r2, 0x19
bl memcpy
mov r0, sp
ldrb r0, [r0]
cmp r0, 0
beq _08085B3E
mov r4, sp
_08085B26:
ldrb r1, [r4]
adds r0, r5, 0
bl SetFacingDirection
movs r0, 0x6
movs r1, 0x46
bl sub_803E708
adds r4, 0x1
ldrb r0, [r4]
cmp r0, 0
bne _08085B26
_08085B3E:
add sp, 0x1C
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08085B48: .4byte gUnknown_8107358
thumb_func_end sub_8085B0C
thumb_func_start sub_8085B4C
sub_8085B4C:
push {r4-r6,lr}
@@ -180,8 +146,8 @@ _08085C4C: .4byte gAdjacentTileOffsets
_08085C50: .4byte gUnknown_202F3D8
thumb_func_end sub_8085B80
thumb_func_start sub_8085C54
sub_8085C54:
thumb_func_start SetDungeonBGColorRGB
SetDungeonBGColorRGB:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
@@ -482,7 +448,7 @@ _08085E88: .4byte 0xffff0000
_08085E8C: .4byte gUnknown_202EE8C
_08085E90: .4byte gUnknown_202ECA4
_08085E94: .4byte 0x000181e4
thumb_func_end sub_8085C54
thumb_func_end SetDungeonBGColorRGB
thumb_func_start sub_8085E98
sub_8085E98:

View File

@@ -108,7 +108,7 @@ TeamMeaniesPreFightDialogue:
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
bl ShiftCameraToPosition
pop {r4}
pop {r0}
bx r0
@@ -186,7 +186,7 @@ TeamMeaniesReFightDialogue:
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
bl ShiftCameraToPosition
pop {r4,r5}
pop {r0}
bx r0
@@ -219,13 +219,13 @@ sub_8087144:
push {r6,r7}
sub sp, 0xF0
movs r0, 0x5
bl sub_8085680
bl GetEntityFromClientType
adds r7, r0, 0
movs r0, 0x6
bl sub_8085680
bl GetEntityFromClientType
mov r8, r0
movs r0, 0x7
bl sub_8085680
bl GetEntityFromClientType
mov r9, r0
ldr r1, _080871E0
mov r0, sp
@@ -324,7 +324,7 @@ sub_8087230:
bl xxx_call_GetLeaderEntity
adds r6, r0, 0
movs r0, 0x8
bl sub_8085680
bl GetEntityFromClientType
adds r5, r0, 0
movs r0, 0x72
bl sub_8083E88
@@ -370,7 +370,7 @@ sub_808729C:
bl xxx_call_GetLeaderEntity
adds r5, r0, 0
movs r0, 0x8
bl sub_8085680
bl GetEntityFromClientType
adds r4, r0, 0
bl sub_80854D4
movs r0, 0x4
@@ -471,7 +471,7 @@ ZapdosPreFightDialogue:
bl GetPartnerEntity
adds r6, r0, 0
movs r0, 0x8
bl sub_8085680
bl GetEntityFromClientType
str r0, [sp, 0x68]
bl sub_8086448
movs r0, 0xA
@@ -687,7 +687,7 @@ _0808752A:
bl SetupBossFightHP
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
bl ShiftCameraToPosition
add sp, 0x70
pop {r3-r5}
mov r8, r3

View File

@@ -14,7 +14,7 @@ JirachiWish:
push {r5-r7}
sub sp, 0x78
movs r0, 0x1A
bl sub_8085680
bl GetEntityFromClientType
adds r6, r0, 0
ldr r0, _0808B82C
ldr r1, _0808B830
@@ -507,8 +507,8 @@ _0808BA70: .4byte gUnknown_81058E0
_0808BA74: .4byte gUnknown_810593C
thumb_func_end JirachiWish
thumb_func_start JirachiPreFightDialogue1
JirachiPreFightDialogue1:
thumb_func_start JirachiReFightDialogue
JirachiReFightDialogue:
push {lr}
ldr r0, _0808BA94
bl HasRecruitedMon
@@ -521,16 +521,16 @@ JirachiPreFightDialogue1:
b _0808BAA0
.align 2, 0
_0808BA94: .4byte 0x0000019d
_0808BA98: .4byte gUnknown_8105E14
_0808BA98: .4byte gJirachiReFightDialogue_1
_0808BA9C:
bl JirachiPreFightDialogue
_0808BAA0:
pop {r0}
bx r0
thumb_func_end JirachiPreFightDialogue1
thumb_func_end JirachiReFightDialogue
thumb_func_start sub_808BAA4
sub_808BAA4:
thumb_func_start JirachiWishGrantFlash
JirachiWishGrantFlash:
push {r4,r5,lr}
sub sp, 0x4
ldr r0, _0808BB34
@@ -546,7 +546,7 @@ _0808BAB8:
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
bl SetDungeonBGColorRGB
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
@@ -563,7 +563,7 @@ _0808BADE:
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
bl SetDungeonBGColorRGB
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
@@ -580,7 +580,7 @@ _0808BB04:
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
bl SetDungeonBGColorRGB
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
@@ -597,7 +597,7 @@ _0808BB04:
.align 2, 0
_0808BB34: .4byte 0x000002c1
_0808BB38: .4byte gUnknown_202EDC8
thumb_func_end sub_808BAA4
thumb_func_end JirachiWishGrantFlash
thumb_func_start sub_808BB3C
sub_808BB3C:

View File

@@ -223,13 +223,13 @@ gUnknown_80E04B4: @ 80E04B4
.global gUnknown_80E04F4
gUnknown_80E04F4: @ 80E04F4
.string "#+...Oh~2c wait~2c sorry.#P"
.string "#+You already have the \n"
.string "#+#C4$h Friend Area#R.#P"
.string "#+I~27m sorry that my reward is\n"
.string "#+something you already have.#P"
.string "#+In its place~2c #CN$m0#R~2c\n"
.string "#+you can have #CG1~2c000#R {POKE}.\0"
.string "{CENTER_ALIGN}...Oh{COMMA} wait{COMMA} sorry.{EXTRA_MSG}"
.string "{CENTER_ALIGN}You already have the \n"
.string "{CENTER_ALIGN}{COLOR_1 GREEN}$h Friend Area{END_COLOR_TEXT_1}.{EXTRA_MSG}"
.string "{CENTER_ALIGN}I{APOSTROPHE}m sorry that my reward is\n"
.string "{CENTER_ALIGN}something you already have.{EXTRA_MSG}"
.string "{CENTER_ALIGN}In its place{COMMA} {COLOR_1 YELLOW_5}$m0{END_COLOR_TEXT_1}{COMMA}\n"
.string "{CENTER_ALIGN}you can have {COLOR_1 LIGHT_BLUE_2}1{COMMA}000{END_COLOR_TEXT_1} {POKE}.\0"
.align 2, 0
.global gUnknown_80E05C0

File diff suppressed because it is too large Load Diff

View File

@@ -77,7 +77,7 @@ struct DungeonGlobalData
u8 unkE26B;
u8 weatherTurnsLeft;
u8 fillE26D[0xE26F - 0xE26D];
/* 0xE26F */ u8 unkE26F[8]; // The weather at the start of the floor. If the weather changes, then expires, revert back to the starting weather.
/* 0xE26F */ u8 startingWeather[8]; // The weather at the start of the floor. If the weather changes, then expires, revert back to the starting weather.
/* 0xE277 */ u8 mudSportTurnsLeft;
/* 0xE278 */ u8 waterSportTurnsLeft;
/* 0xE279 */ u8 unkE279;

View File

@@ -4,5 +4,6 @@
#include "dungeon_entity.h"
bool8 IsMovingClient(struct DungeonEntity *entity);
void ShiftCameraToPosition(struct Position32 *posStruct, s32 cameraSteps);
#endif

View File

@@ -6,68 +6,69 @@
#include "dungeon_map_access.h"
#include "dungeon_random.h"
#include "dungeon_util.h"
#include "dungeon_util_1.h"
#include "friend_area.h"
#include "map.h"
#include "pokemon.h"
extern struct DungeonEntity *xxx_call_GetLeaderEntity(void);
extern struct DungeonEntity *sub_8085680(u32);
extern struct DungeonEntity *GetEntityFromClientType(u32);
extern char gUnknown_202E038[0x50];
extern u32 gUnknown_202EDC8;
extern u32 gUnknown_81062A8;
extern u32 gUnknown_8106074;
extern u32 gUnknown_81060BC;
extern u32 gUnknown_8106104;
extern u32 gUnknown_8106140;
extern u32 gUnknown_8106214;
extern u32 gUnknown_8106244;
extern u32 gUnknown_810627C;
extern u32 gKyogrePreFightDialogue_8;
extern u32 gKyogrePreFightDialogue_1;
extern u32 gKyogrePreFightDialogue_2;
extern u32 gKyogrePreFightDialogue_3;
extern u32 gKyogrePreFightDialogue_4;
extern u32 gKyogrePreFightDialogue_5;
extern u32 gKyogrePreFightDialogue_6;
extern u32 gKyogrePreFightDialogue_7;
extern u32 gUnknown_810697C;
extern u64 gUnknown_8107544[];
extern u32 gUnknown_8106778;
extern u32 gUnknown_81067BC;
extern u32 gUnknown_81067E0;
extern u32 gUnknown_8106834;
extern u32 gUnknown_810688C;
extern u32 gUnknown_81068D0;
extern u32 gUnknown_8106918;
extern u32 gUnknown_8106934;
extern u32 gMedichamRescueDialogue_1;
extern u32 gMedichamRescueDialogue_2;
extern u32 gMedichamRescueDialogue_3;
extern u32 gMedichamRescueDialogue_4;
extern u32 gSmeargleRescueDialogue_1;
extern u32 gSmeargleRescueDialogue_2;
extern u32 gSmeargleRescueDialogue_3;
extern u32 gSmeargleRescueDialogue_4;
extern u32 gUnknown_8106720;
extern u32 gUnknown_810663C;
extern u32 gUnknown_81063D0;
extern u32 gUnknown_8106400;
extern u32 gUnknown_810643C;
extern u32 gUnknown_8106468;
extern u32 gUnknown_810648C;
extern u32 gUnknown_81064BC;
extern u32 gUnknown_8106500;
extern u32 gUnknown_8106534;
extern u32 gUnknown_8106560;
extern u32 gCelebiJoinDialogue_10;
extern u32 gCelebiJoinDialogue_1;
extern u32 gCelebiJoinDialogue_2;
extern u32 gCelebiJoinDialogue_3;
extern u32 gCelebiJoinDialogue_4;
extern u32 gCelebiJoinDialogue_5;
extern u32 gCelebiJoinDialogue_6;
extern u32 gCelebiJoinDialogue_7;
extern u32 gCelebiJoinDialogue_8;
extern u32 gCelebiJoinDialogue_9;
extern u32 *gPtrPurityForestAllowCelebiToJoinText;
extern u32 gPurityForestAllowCelebiToJoinPrompt;
extern u32 *gPtrPurityForestRefuseCelebiConfirmText;
extern u32 gPurityForestRefuseCelebiConfirmPrompt;
extern u32 gUnknown_81062B4;
extern u32 gUnknown_81062E8;
extern u32 gUnknown_8106368;
extern u32 gUnknown_8106390;
extern u32 gUnknown_81063C4;
extern u32 gUnknown_8106068;
extern u32 gUnknown_8105E88;
extern u32 gUnknown_8105EF8;
extern u32 gUnknown_8105F38;
extern u32 gUnknown_8105F74;
extern u32 gUnknown_8105FA0;
extern u32 gUnknown_8105FD8;
extern u32 gUnknown_8106024;
extern u32 gDeoxysPreFightDialogue_1;
extern u32 gDeoxysPreFightDialogue_2;
extern u32 gDeoxysPreFightDialogue_3;
extern u32 gDeoxysPreFightDialogue_4;
extern u32 gDeoxysPreFightDialogue_5;
extern u32 gLugiaPreFightDialogue_8;
extern u32 gLugiaPreFightDialogue_1;
extern u32 gLugiaPreFightDialogue_2;
extern u32 gLugiaPreFightDialogue_3;
extern u32 gLugiaPreFightDialogue_4;
extern u32 gLugiaPreFightDialogue_5;
extern u32 gLugiaPreFightDialogue_6;
extern u32 gLugiaPreFightDialogue_7;
extern u32 gUnknown_81058C4;
extern u32 gUnknown_81058A8;
extern u8 sub_800E9A8(u32);
extern void sub_800DC14(u32);
extern void sub_808BAA4();
extern void JirachiWishGrantFlash();
extern void sub_8086A3C(struct DungeonEntity *r0);
extern void sub_8083E88(u32);
@@ -105,16 +106,15 @@ extern void sub_80861D4(struct DungeonEntity *, u32, u32);
extern void sub_806FDF4(struct DungeonEntity *, struct DungeonEntity *, struct DungeonEntity **);
extern u32 sub_80861F8(u32, struct DungeonEntity *, u32);
extern void sub_8083ED8(u32);
extern u32 sub_803F994();
extern s32 sub_803F9B0();
extern s32 GetCameraXPos();
extern s32 GetCameraYPos();
extern void sub_803F878(u32, s32);
extern void SetupBossFightHP(struct DungeonEntity *, u32, u32);
extern void sub_8085C54(u32, u32, u32, u32, u32);
extern void SetDungeonBGColorRGB(u32, u32, u32, u32, u32);
extern void sub_803E9D0(void);
extern void DeoxysScreenFlash(void);
extern void sub_8085EB0();
extern void sub_808563C(void *);
extern void sub_80858AC(u32 *, u32);
void SetupDeoxysFightHP(struct DungeonEntity *r0);
void sub_808C550(void);
@@ -126,8 +126,8 @@ void sub_808C360(void);
void KyogreScreenFlash();
void sub_808C0CC();
void sub_808BFA0();
void sub_808C02C();
void LugiaScreenFlash();
void LugiaScreenFlash2();
extern void sub_80861B8(struct DungeonEntity *, u32, u32);
void nullsub_99();
@@ -200,7 +200,7 @@ void JirachiWishGrantDialogue(struct DungeonEntity *param_1)
sub_800DC14(uVar2);
}
sub_803E708(10,0x46);
sub_808BAA4();
JirachiWishGrantFlash();
}
void sub_808BCE4(void)
@@ -272,7 +272,7 @@ void sub_808BDEC(void)
struct DungeonEntity * LugiaEntity;
LeaderEntity = xxx_call_GetLeaderEntity();
LugiaEntity = sub_8085680(0x1b);
LugiaEntity = GetEntityFromClientType(0x1b);
sub_8083F14();
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
@@ -303,89 +303,89 @@ void LugiaPreFightDialogue(void)
struct DungeonEntity * LugiaEntity;
LeaderEntity = xxx_call_GetLeaderEntity();
LugiaEntity = sub_8085680(0x1b);
LugiaEntity = GetEntityFromClientType(0x1b);
if (HasRecruitedMon(SPECIES_LUGIA)) {
sub_8086448();
sub_80866C4(&gUnknown_8106068);
sub_80866C4(&gLugiaPreFightDialogue_8);
}
else {
sub_8083F14();
sub_8086448();
DisplayDungeonDialogue(&gUnknown_8105E88);
DisplayDungeonDialogue(&gLugiaPreFightDialogue_1);
sub_8083EA8(0x23,0x3c);
sub_808C0CC();
DisplayDungeonDialogue(&gUnknown_8105EF8);
sub_808BFA0();
DisplayDungeonDialogue(&gUnknown_8105F38);
DisplayDungeonDialogue(&gLugiaPreFightDialogue_2);
LugiaScreenFlash();
DisplayDungeonDialogue(&gLugiaPreFightDialogue_3);
sub_803E708(10,0x46);
DisplayDungeonDialogue(&gUnknown_8105F74);
DisplayDungeonDialogue(&gLugiaPreFightDialogue_4);
PlaySoundEffect(0x1f8);
sub_80861D4(LugiaEntity,0xd,0);
sub_803E708(0x2b,0x46);
sub_80861B8(LugiaEntity,0,0);
DisplayDungeonDialogue(&gUnknown_8105FA0);
sub_808BFA0();
DisplayDungeonDialogue(&gUnknown_8105FD8);
sub_808C02C();
sub_8085C54(0xffffff06,0xffffff06,0xffffff06,1,0);
DisplayDungeonDialogue(&gLugiaPreFightDialogue_5);
LugiaScreenFlash();
DisplayDungeonDialogue(&gLugiaPreFightDialogue_6);
LugiaScreenFlash2();
SetDungeonBGColorRGB(0xffffff06,0xffffff06,0xffffff06,1,0);
sub_8083F14();
sub_80861D4(LugiaEntity,7,0);
DisplayDungeonDialogue(&gUnknown_8106024);
sub_808BFA0();
DisplayDungeonDialogue(&gLugiaPreFightDialogue_7);
LugiaScreenFlash();
SetupBossFightHP(LugiaEntity,800,0x20);
sub_8083E88(0x23);
sub_80858AC(&LeaderEntity->posPixel.x,0x10);
ShiftCameraToPosition(&LeaderEntity->posPixel,0x10);
}
}
void sub_808BFA0(void)
void LugiaScreenFlash(void)
{
s32 iVar1;
PlaySoundEffect(0x1f6);
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10){
sub_8085C54(0,0,iVar1,1,1);
SetDungeonBGColorRGB(0,0,iVar1,1,1);
sub_803E46C(0x46);
}
sub_803E708(10,0x46);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10){
sub_8085C54(0,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(0,iVar1,iVar1,1,1);
sub_803E46C(0x46);
}
sub_803E708(10,0x46);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10){
sub_8085C54(0,0,iVar1,1,1);
SetDungeonBGColorRGB(0,0,iVar1,1,1);
sub_803E46C(0x46);
}
sub_803E708(10,0x46);
sub_8085EB0();
}
void sub_808C02C(void)
void LugiaScreenFlash2(void)
{
s32 iVar1;
PlaySoundEffect(0x1f6);
for(iVar1 = 0; iVar1 < 200; iVar1 += 100){
sub_8085C54(iVar1,iVar1,iVar1,1,0);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,0);
sub_803E46C(0x46);
}
for(iVar1 = 200; iVar1 >= 0; iVar1 -= 100){
sub_8085C54(iVar1,iVar1,iVar1,1,0);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,0);
sub_803E46C(0x46);
}
sub_803E708(4,0x46);
for(iVar1 = 0; iVar1 < 200; iVar1 += 100){
sub_8085C54(iVar1,iVar1,iVar1,1,0);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,0);
sub_803E46C(0x46);
}
for(iVar1 = 200; iVar1 >= 0; iVar1 -= 100){
sub_8085C54(iVar1,iVar1,iVar1,1,0);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,0);
sub_803E46C(0x46);
}
@@ -396,11 +396,11 @@ void sub_808C02C(void)
void sub_808C0CC(void)
{
gUnknown_202EDC8 = 0x1f;
sub_8085C54(0,0,0,1,1);
SetDungeonBGColorRGB(0,0,0,1,1);
sub_803E9D0();
sub_803E46C(0x46);
gDungeonGlobalData->unk7 = 0;
sub_808BFA0();
LugiaScreenFlash();
}
void sub_808C10C(void)
@@ -412,7 +412,7 @@ void sub_808C10C(void)
s32 iVar2;
LeaderEntity = xxx_call_GetLeaderEntity();
KyogreEntity = sub_8085680(0x1c);
KyogreEntity = GetEntityFromClientType(0x1c);
sub_8083F14();
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
@@ -424,8 +424,8 @@ void sub_808C10C(void)
SetFacingDirection(KyogreEntity, DIRECTION_SOUTH);
}
sub_8085860(LeaderEntity->posWorld.x,LeaderEntity->posWorld.y);
uVar3 = sub_803F994();
iVar2 = sub_803F9B0();
uVar3 = GetCameraXPos();
iVar2 = GetCameraYPos();
sub_803F878(uVar3,iVar2 + -0x1000);
CopySpeciesNametoBuffer(gUnknown_202E038,SPECIES_KYOGRE);
// TODO: gUnknown_202E088 doesn't match but gUnknown_202E038 + 0x50 does
@@ -446,45 +446,45 @@ void KyogrePreFightDialogue(void)
struct DungeonEntity *KyogreEntity;
LeaderEntity = xxx_call_GetLeaderEntity();
KyogreEntity = sub_8085680(0x1c);
KyogreEntity = GetEntityFromClientType(0x1c);
sub_8083F14();
if (HasRecruitedMon(SPECIES_KYOGRE)) {
sub_8083EA8(0x23,0x3c);
SpriteLookAroundEffect(LeaderEntity);
sub_803E708(10,0x46);
DisplayDungeonDialogue(&gUnknown_81062A8);
DisplayDungeonDialogue(&gKyogrePreFightDialogue_8);
sub_803E708(10,0x46);
gDungeonGlobalData->unk2 = 1;
}
else {
DisplayDungeonDialogue(&gUnknown_8106074);
DisplayDungeonDialogue(&gKyogrePreFightDialogue_1);
sub_803E708(10,0x46);
DisplayDungeonDialogue(&gUnknown_81060BC);
DisplayDungeonDialogue(&gKyogrePreFightDialogue_2);
sub_803E708(10,0x46);
nullsub_99();
sub_803E708(10,0x46);
// Gwwwwwooooooooh
DisplayDungeonDialogue(&gUnknown_8106104);
DisplayDungeonDialogue(&gKyogrePreFightDialogue_3);
sub_803E708(10,0x46);
sub_8083EA8(0x23,0x3c);
sub_808C360();
// My duels against {ARG_POKEMON_3} (Groudon) left us both exhausted
DisplayDungeonDialogue(&gUnknown_8106140);
DisplayDungeonDialogue(&gKyogrePreFightDialogue_4);
KyogreScreenFlash();
// I am {ARG_POKEMON_2} (Kyogre)!
// The lord of the sea!
DisplayDungeonDialogue(&gUnknown_8106214);
DisplayDungeonDialogue(&gKyogrePreFightDialogue_5);
KyogreScreenFlash();
// Witness the destructive force of my waves!
DisplayDungeonDialogue(&gUnknown_8106244);
DisplayDungeonDialogue(&gKyogrePreFightDialogue_6);
KyogreScreenFlash();
// Marvel at my awesome
// power!
DisplayDungeonDialogue(&gUnknown_810627C);
DisplayDungeonDialogue(&gKyogrePreFightDialogue_7);
sub_803E708(10,0x46);
SetupBossFightHP(KyogreEntity,600,0xb);
sub_8083E88(0x23);
sub_80858AC(&LeaderEntity->posPixel.x,0x10);
ShiftCameraToPosition(&LeaderEntity->posPixel,0x10);
}
}
@@ -498,17 +498,17 @@ void KyogreScreenFlash(void)
PlaySoundEffect(0x1f8);
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10){
sub_8085C54(0,0,iVar1,1,1);
SetDungeonBGColorRGB(0,0,iVar1,1,1);
sub_803E46C(0x46);
}
sub_803E708(10,0x46);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10){
sub_8085C54(0,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(0,iVar1,iVar1,1,1);
sub_803E46C(0x46);
}
sub_803E708(10,0x46);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10){
sub_8085C54(0,0,iVar1,1,1);
SetDungeonBGColorRGB(0,0,iVar1,1,1);
sub_803E46C(0x46);
}
sub_803E708(10,0x46);
@@ -518,7 +518,7 @@ void KyogreScreenFlash(void)
void sub_808C360(void)
{
gUnknown_202EDC8 = 0x1f;
sub_8085C54(0,0,0,1,1);
SetDungeonBGColorRGB(0,0,0,1,1);
sub_803E9D0();
sub_803E46C(0x46);
gDungeonGlobalData->unk7 = 0;
@@ -562,20 +562,20 @@ void DeoxysPreFightDialogue(void)
if (HasRecruitedMon(SPECIES_DEOXYS_NORMAL)) {
// There appears to be no one here.
// It's impossible to go any further
sub_80866C4(&gUnknown_81063C4);
sub_80866C4(&gDeoxysPreFightDialogue_5);
}
else {
DisplayDungeonDialogue(&gUnknown_81062B4);
DisplayDungeonDialogue(&gDeoxysPreFightDialogue_1);
sub_8083EA8(0x1a,0x3c);
sub_808C550();
DisplayDungeonDialogue(&gUnknown_81062E8);
DisplayDungeonDialogue(&gDeoxysPreFightDialogue_2);
DeoxysScreenFlash();
DisplayDungeonDialogue(&gUnknown_8106368);
DisplayDungeonDialogue(&gDeoxysPreFightDialogue_3);
DeoxysScreenFlash();
DisplayDungeonDialogue(&gUnknown_8106390);
DisplayDungeonDialogue(&gDeoxysPreFightDialogue_4);
sub_803E708(10,0x46);
sub_808563C(SetupDeoxysFightHP);
sub_80858AC(&LeaderEntity->posPixel.x,0x10);
ShiftCameraToPosition(&LeaderEntity->posPixel,0x10);
}
}
@@ -585,17 +585,17 @@ void DeoxysScreenFlash(void)
PlaySoundEffect(0x2c1);
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10){
sub_8085C54(iVar1,0,0,1,1);
SetDungeonBGColorRGB(iVar1,0,0,1,1);
sub_803E46C(0x46);
}
sub_803E708(10,0x46);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10){
sub_8085C54(iVar1,iVar1,0,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,0,1,1);
sub_803E46C(0x46);
}
sub_803E708(10,0x46);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10){
sub_8085C54(iVar1,0,0,1,1);
SetDungeonBGColorRGB(iVar1,0,0,1,1);
sub_803E46C(0x46);
}
sub_803E708(10,0x46);
@@ -605,7 +605,7 @@ void DeoxysScreenFlash(void)
void sub_808C550(void)
{
gUnknown_202EDC8 = 0x1f;
sub_8085C54(0,0,0,1,1);
SetDungeonBGColorRGB(0,0,0,1,1);
sub_803E9D0();
sub_803E46C(0x46);
gDungeonGlobalData->unk7 = 0;
@@ -636,14 +636,14 @@ void sub_808C5C0(void)
s32 iVar2;
LeaderEntity = xxx_call_GetLeaderEntity();
CelebiEntity = sub_8085680(0x1e);
CelebiEntity = GetEntityFromClientType(0x1e);
sub_8083E88(0x7f);
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
SetFacingDirection(CelebiEntity, DIRECTION_SOUTH);
sub_8085860(LeaderEntity->posWorld.x,LeaderEntity->posWorld.y);
uVar3 = sub_803F994();
iVar2 = sub_803F9B0();
uVar3 = GetCameraXPos();
iVar2 = GetCameraYPos();
sub_803F878(uVar3,iVar2 + 0xfffff000);
CopySpeciesNametoBuffer(gUnknown_202E038, SPECIES_CELEBI);
}
@@ -662,14 +662,14 @@ void CelebiJoinDialogue(void)
struct DungeonEntity *CelebiEntity;
LeaderEntity = xxx_call_GetLeaderEntity();
CelebiEntity = sub_8085680(0x1e);
CelebiEntity = GetEntityFromClientType(0x1e);
if ((HasRecruitedMon(SPECIES_CELEBI)) || (sub_806FD18(CelebiEntity) == '\0'))
{
sub_8068FE0(local_1c,0x21c,0);
SpriteLookAroundEffect(LeaderEntity);
sub_803E708(10,0x46);
// .........
DisplayDungeonDialogue(&gUnknown_810663C);
DisplayDungeonDialogue(&gCelebiJoinDialogue_10);
}
else
{
@@ -678,14 +678,14 @@ void CelebiJoinDialogue(void)
sub_80862BC(LeaderEntity);
sub_803E708(10,0x46);
// Oh? There's someone there.
DisplayDungeonDialogue(&gUnknown_81063D0);
DisplayDungeonDialogue(&gCelebiJoinDialogue_1);
sub_803E708(10,0x46);
sub_8086598();
sub_8086598();
sub_8086598();
sub_8086598();
// The Time-Traveling Pokemon {ARG_POKEMON_2} (Celebi)!
DisplayDungeonDialogue(&gUnknown_8106400);
DisplayDungeonDialogue(&gCelebiJoinDialogue_2);
PlaySoundEffect(0x1c7);
sub_806CDD4(CelebiEntity,10,DIRECTION_SOUTH);
sub_803E708(0x14,0x46);
@@ -693,7 +693,7 @@ void CelebiJoinDialogue(void)
sub_803E708(4,0x46);
PlaySoundEffect(0x1c7);
sub_806CDD4(CelebiEntity,10,DIRECTION_SOUTH);
DisplayDungeonDialogue(&gUnknown_810643C);
DisplayDungeonDialogue(&gCelebiJoinDialogue_3);
sub_803E708(10,0x46);
state = 0;
do {
@@ -721,11 +721,11 @@ void CelebiJoinDialogue(void)
sub_803E708(0x1a,0x46);
PlaySoundEffect(0x1d5);
sub_803E708(0x1c,0x46);
DisplayDungeonDialogue(&gUnknown_8106468);
DisplayDungeonDialogue(&gCelebiJoinDialogue_4);
sub_803E708(10,0x46);
sub_806FDF4(LeaderEntity,CelebiEntity,&CelebiEntity);
sub_8083E88(0x7f);
DisplayDungeonDialogue(&gUnknown_810648C);
DisplayDungeonDialogue(&gCelebiJoinDialogue_5);
sub_803E708(10,0x46);
PlaySoundEffect(0x1c7);
sub_80861D4(CelebiEntity,0xd,0);
@@ -734,7 +734,7 @@ void CelebiJoinDialogue(void)
sub_803E708(0x1a,0x46);
PlaySoundEffect(0x1d5);
sub_803E708(0x1b,0x46);
DisplayDungeonDialogue(&gUnknown_81064BC);
DisplayDungeonDialogue(&gCelebiJoinDialogue_6);
sub_803E708(10,0x46);
state = 2;
}
@@ -754,15 +754,15 @@ void CelebiJoinDialogue(void)
else
{
sub_803E708(10,0x46);
DisplayDungeonDialogue(&gUnknown_8106500);
DisplayDungeonDialogue(&gCelebiJoinDialogue_7);
sub_80861F8(0x3e,CelebiEntity,1);
sub_803E708(0x18,0x46);
sub_80861F8(0x3e,CelebiEntity,1);
sub_803E708(0xe,0x46);
DisplayDungeonDialogue(&gUnknown_8106534);
DisplayDungeonDialogue(&gCelebiJoinDialogue_8);
sub_803E708(10,0x46);
sub_808C8E0(CelebiEntity);
DisplayDungeonDialogue(&gUnknown_8106560);
DisplayDungeonDialogue(&gCelebiJoinDialogue_9);
sub_803E708(10,0x46);
state = 2;
}
@@ -786,7 +786,7 @@ void CelebiJoinDialogue(void)
"\tbl xxx_call_GetLeaderEntity\n"
"\tadds r7, r0, 0\n"
"\tmovs r0, 0x1E\n"
"\tbl sub_8085680\n"
"\tbl GetEntityFromClientType\n"
"\tstr r0, [sp]\n"
"\tmovs r0, 0x8A\n"
"\tlsls r0, 1\n"
@@ -814,7 +814,7 @@ void CelebiJoinDialogue(void)
"\tbl DisplayDungeonDialogue\n"
"\tb _0808C8AC\n"
"\t.align 2, 0\n"
"_0808C67C: .4byte gUnknown_810663C\n"
"_0808C67C: .4byte gCelebiJoinDialogue_10\n"
"_0808C680:\n"
"\tadds r0, r7, 0\n"
"\tbl SpriteLookAroundEffect\n"
@@ -876,10 +876,10 @@ void CelebiJoinDialogue(void)
"_0808C718:\n"
"\tb _0808C8A6\n"
"\t.align 2, 0\n"
"_0808C71C: .4byte gUnknown_81063D0\n"
"_0808C720: .4byte gUnknown_8106400\n"
"_0808C71C: .4byte gCelebiJoinDialogue_1\n"
"_0808C720: .4byte gCelebiJoinDialogue_2\n"
"_0808C724: .4byte 0x000001c7\n"
"_0808C728: .4byte gUnknown_810643C\n"
"_0808C728: .4byte gCelebiJoinDialogue_3\n"
"_0808C72C: .4byte 0x000001d5\n"
"_0808C730:\n"
"\tldr r5, _0808C75C\n"
@@ -973,9 +973,9 @@ void CelebiJoinDialogue(void)
"\tldr r0, _0808C820\n"
"\tb _0808C898\n"
"\t.align 2, 0\n"
"_0808C818: .4byte gUnknown_8106468\n"
"_0808C81C: .4byte gUnknown_810648C\n"
"_0808C820: .4byte gUnknown_81064BC\n"
"_0808C818: .4byte gCelebiJoinDialogue_4\n"
"_0808C81C: .4byte gCelebiJoinDialogue_5\n"
"_0808C820: .4byte gCelebiJoinDialogue_6\n"
"_0808C824:\n"
"movs r0, 0x1\n"
"b _0808C8A6\n"
@@ -1053,9 +1053,9 @@ void CelebiJoinDialogue(void)
"\tpop {r0}\n"
"\tbx r0\n"
"\t.align 2, 0\n"
"_0808C8D0: .4byte gUnknown_8106500\n"
"_0808C8D4: .4byte gUnknown_8106534\n"
"_0808C8D8: .4byte gUnknown_8106560\n"
"_0808C8D0: .4byte gCelebiJoinDialogue_7\n"
"_0808C8D4: .4byte gCelebiJoinDialogue_8\n"
"_0808C8D8: .4byte gCelebiJoinDialogue_9\n"
"_0808C8DC: .4byte gDungeonGlobalData");
}
#endif
@@ -1123,7 +1123,7 @@ void sub_808C9C4(void)
struct DungeonEntity *MedichamEntity;
LeaderEntity = xxx_call_GetLeaderEntity();
MedichamEntity = sub_8085680(7);
MedichamEntity = GetEntityFromClientType(7);
sub_8083E88(0x72);
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
@@ -1139,16 +1139,16 @@ void MedichamRescueDialogue(void)
struct DungeonEntity *MedichamEntity;
s32 counter;
MedichamEntity = sub_8085680(7);
MedichamEntity = GetEntityFromClientType(7);
SpriteLookAroundEffect(MedichamEntity);
sub_803E708(0xA, 0x46);
// Oh my I can't seem to find a way out...
DisplayDungeonDialogue(&gUnknown_8106778);
DisplayDungeonDialogue(&gMedichamRescueDialogue_1);
sub_803E708(0xA, 0x46);
sub_80869E4(MedichamEntity, 4, 2, 4);
sub_803E708(0xA, 0x46);
// What am I to do...?
DisplayDungeonDialogue(&gUnknown_81067BC);
DisplayDungeonDialogue(&gMedichamRescueDialogue_2);
sub_803E708(0xA, 0x46);
sub_8086448();
sub_8086598();
@@ -1156,7 +1156,7 @@ void MedichamRescueDialogue(void)
sub_80862BC(MedichamEntity);
sub_803E708(0x20, 0x46);
sub_80869E4(MedichamEntity, 4, 2, 0);
DisplayDungeonDialogue(&gUnknown_81067E0);
DisplayDungeonDialogue(&gMedichamRescueDialogue_3);
sub_803E708(0xA, 0x46);
PlaySoundEffect(0x1c7);
sub_806CDD4(MedichamEntity, 0xA, DIRECTION_SOUTH);
@@ -1170,7 +1170,7 @@ void MedichamRescueDialogue(void)
// I am so lucky
//
// There appears to be no one here
DisplayDungeonDialogue(&gUnknown_8106834);
DisplayDungeonDialogue(&gMedichamRescueDialogue_4);
sub_803E708(0xA, 0x46);
sub_806CDD4(MedichamEntity, 0, DIRECTION_SOUTH);
for(counter = 0x17; counter >= 0; counter--)
@@ -1192,7 +1192,7 @@ void sub_808CB5C(void)
struct DungeonEntity *MedichamEntity;
LeaderEntity = xxx_call_GetLeaderEntity();
MedichamEntity = sub_8085680(7);
MedichamEntity = GetEntityFromClientType(7);
sub_8083E88(0x72);
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
@@ -1211,7 +1211,7 @@ void sub_808CBB0(void)
struct DungeonEntity *SmeargleEntity;
LeaderEntity = xxx_call_GetLeaderEntity();
SmeargleEntity = sub_8085680(0x1F);
SmeargleEntity = GetEntityFromClientType(0x1F);
sub_8083E88(0x72);
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
@@ -1227,19 +1227,19 @@ void SmeargleRescueDialogue(void)
struct DungeonEntity *SmeargleEntity;
s32 counter;
SmeargleEntity = sub_8085680(0x1F);
SmeargleEntity = GetEntityFromClientType(0x1F);
SpriteLookAroundEffect(SmeargleEntity);
sub_803E708(0xA, 0x46);
// Ohhh...
// I've lost my bearings
DisplayDungeonDialogue(&gUnknown_810688C);
DisplayDungeonDialogue(&gSmeargleRescueDialogue_1);
sub_803E708(0xA, 0x46);
sub_80869E4(SmeargleEntity, 4, 2, 4);
sub_803E708(0xA, 0x46);
// I can't get out...
// I'm hungry...
// I'm in trouble
DisplayDungeonDialogue(&gUnknown_81068D0);
DisplayDungeonDialogue(&gSmeargleRescueDialogue_2);
sub_803E708(0xA, 0x46);
sub_8086448();
sub_8086598();
@@ -1248,7 +1248,7 @@ void SmeargleRescueDialogue(void)
sub_803E708(0x20, 0x46);
sub_80869E4(SmeargleEntity, 4, 2, 0);
// Oh! You are?
DisplayDungeonDialogue(&gUnknown_8106918);
DisplayDungeonDialogue(&gSmeargleRescueDialogue_3);
sub_803E708(0xA, 0x46);
PlaySoundEffect(0x1c7);
sub_806CDD4(SmeargleEntity, 0xA, DIRECTION_SOUTH);
@@ -1260,7 +1260,7 @@ void SmeargleRescueDialogue(void)
sub_803E708(0x14, 0x46);
// Did you maybe come to rescue me?
// Am I glad to see you
DisplayDungeonDialogue(&gUnknown_8106934);
DisplayDungeonDialogue(&gSmeargleRescueDialogue_4);
sub_803E708(0xA, 0x46);
sub_806CDD4(SmeargleEntity, 0, DIRECTION_SOUTH);
for(counter = 0x17; counter >= 0; counter--)
@@ -1283,7 +1283,7 @@ void sub_808CD44(void)
struct DungeonEntity *SmeargleEntity;
LeaderEntity = xxx_call_GetLeaderEntity();
SmeargleEntity = sub_8085680(0x1F);
SmeargleEntity = GetEntityFromClientType(0x1F);
sub_8083E88(0x72);
sub_80854D4();
sub_8085930(DIRECTION_NORTH);

View File

@@ -148,7 +148,7 @@ bool32 sub_8057974(struct DungeonEntity *pokemon, struct DungeonEntity *target,
return local_24;
}
bool8 sub_8057A0C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
bool8 PainSplitMoveAction(struct DungeonEntity *pokemon, struct DungeonEntity *target)
{
s32 newHP;
struct DungeonEntityData *iVar2;

File diff suppressed because it is too large Load Diff

View File

@@ -30,18 +30,18 @@ extern void sub_80897F0();
extern void sub_8089878();
extern void sub_80898E4();
extern void MewtwoPreFightDialogue();
extern void MewtwoPreFightDialogue1();
extern void MewtwoReFightDialogue();
extern void EnteiPreFightDialogue();
extern void EnteiPreFightDialogue1();
extern void EnteiPreFightDialogue2();
extern void EnteiReFightDialogue();
extern void EnteiPostStoryPreFightDialogue();
extern void RaikouPreFightDialogue();
extern void RaikouPreFightDialogue1();
extern void RaikouPreFightDialogue2();
extern void RaikouReFightDialogue();
extern void RaikouPostStoryPreFightDialogue();
extern void SuicunePreFightDialogue();
extern void SuicunePreFightDialogue1();
extern void SuicunePreFightDialogue2();
extern void SuicuneReFightDialogue();
extern void SuicunePostStoryPreFightDialogue();
extern void HoOhPreFightDialogue();
extern void HoOhPreFightDialogue1();
extern void HoOhReFightDialogue();
extern void LatiosPreFightDialogue();
extern void LatiosReFightDialogue();
extern void sub_808AC3C();
@@ -49,7 +49,7 @@ extern void RegirockPreFightDialogue();
extern void RegicePreFightDialogue();
extern void RegisteelPreFightDialogue();
extern void JirachiPreFightDialogue();
extern void JirachiPreFightDialogue1();
extern void JirachiReFightDialogue();
extern void LugiaPreFightDialogue();
extern void KyogrePreFightDialogue();
extern void DeoxysPreFightDialogue();
@@ -418,40 +418,40 @@ void DisplayPreFightDialogue(void)
MewtwoPreFightDialogue();
break;
case 0x1f:
MewtwoPreFightDialogue1();
MewtwoReFightDialogue();
break;
case 0x20:
EnteiPreFightDialogue();
break;
case 0x21:
EnteiPreFightDialogue1();
EnteiReFightDialogue();
break;
case 0x22:
EnteiPreFightDialogue2();
EnteiPostStoryPreFightDialogue();
break;
case 0x23:
RaikouPreFightDialogue();
break;
case 0x24:
RaikouPreFightDialogue1();
RaikouReFightDialogue();
break;
case 0x25:
RaikouPreFightDialogue2();
RaikouPostStoryPreFightDialogue();
break;
case 0x26:
SuicunePreFightDialogue();
break;
case 0x27:
SuicunePreFightDialogue1();
SuicuneReFightDialogue();
break;
case 0x28:
SuicunePreFightDialogue2();
SuicunePostStoryPreFightDialogue();
break;
case 0x29:
HoOhPreFightDialogue();
break;
case 0x2a:
HoOhPreFightDialogue1();
HoOhReFightDialogue();
break;
case 0x2b:
LatiosPreFightDialogue();
@@ -475,7 +475,7 @@ void DisplayPreFightDialogue(void)
JirachiPreFightDialogue();
break;
case 0x32:
JirachiPreFightDialogue1();
JirachiReFightDialogue();
break;
case 0x33:
LugiaPreFightDialogue();

View File

@@ -22,7 +22,7 @@ void sub_80869E4(struct DungeonEntity *r0, u32, u8, s8);
extern void sub_80859F0(u32);
extern void sub_803E46C(u32);
extern void sub_803E9D0(void);
extern void sub_8085C54(u32, u32, u32, u32, u32);
extern void SetDungeonBGColorRGB(u32, u32, u32, u32, u32);
extern void PlaySoundEffect(u32);
extern struct DungeonEntity *xxx_call_GetLeaderEntity(void);
void SpriteLookAroundEffect(struct DungeonEntity *r0);
@@ -36,8 +36,8 @@ extern u32 gUnknown_202EDC8;
extern void sub_8085EB0(void);
extern void sub_803E748(void);
extern void sub_80855E4(void *);
extern u32 sub_803F994(void);
extern u32 sub_803F9B0(void);
extern s32 GetCameraXPos(void);
extern s32 GetCameraYPos(void);
extern void sub_803F878(u32, u32);
extern void sub_8086384(struct DungeonEntity *r0);
extern void sub_8085930(u32);
@@ -156,8 +156,8 @@ void sub_8086448(void)
for(iVar1 = 0; iVar1 < 0x38; iVar1++)
{
retVar = sub_803F994();
retVar2 = sub_803F9B0();
retVar = GetCameraXPos();
retVar2 = GetCameraYPos();
retVar2 += (0x80 << 1);
sub_803F878(retVar, retVar2);
sub_80855E4(sub_8086410);
@@ -201,9 +201,9 @@ void sub_8086500(void)
for(iVar1 = 0; iVar1 < 0x48; iVar1++)
{
retVar = sub_803F994();
retVar = GetCameraXPos();
retVar += (0x80 << 1);
retVar2 = sub_803F9B0();
retVar2 = GetCameraYPos();
sub_803F878(retVar, retVar2);
sub_80855E4(sub_8086434);
sub_803E46C(0x46);
@@ -221,9 +221,9 @@ void sub_808654C(void)
for(iVar1 = 0; iVar1 < 0x78; iVar1++)
{
retVar = sub_803F994();
retVar = GetCameraXPos();
retVar += (0x80 << 1);
retVar2 = sub_803F9B0();
retVar2 = GetCameraYPos();
sub_803F878(retVar, retVar2);
sub_80855E4(sub_8086434);
sub_803E46C(0x46);
@@ -241,8 +241,8 @@ void sub_8086598(void)
for(iVar1 = 0; iVar1 < 0x18; iVar1++)
{
retVar = sub_803F994();
retVar2 = sub_803F9B0();
retVar = GetCameraXPos();
retVar2 = GetCameraYPos();
sub_803F878(retVar, retVar2 + (0xffffff00));
sub_80855E4(sub_8086410);
sub_803E46C(0x46);
@@ -260,8 +260,8 @@ void sub_80865E8(void)
for(iVar1 = 0; iVar1 < 0xC; iVar1++)
{
retVar = sub_803F994();
retVar2 = sub_803F9B0();
retVar = GetCameraXPos();
retVar2 = GetCameraYPos();
sub_803F878(retVar, retVar2 + (0x80 << 2));
sub_80855E4(sub_8086424);
sub_80855E4(sub_8086424);
@@ -280,8 +280,8 @@ void sub_808663C(void)
for(iVar1 = 0; iVar1 < 0x10; iVar1++)
{
retVar = sub_803F994();
retVar2 = sub_803F9B0();
retVar = GetCameraXPos();
retVar2 = GetCameraYPos();
sub_803F878(retVar, retVar2 + (0x80 << 2));
sub_80855E4(sub_8086424);
sub_80855E4(sub_8086424);
@@ -323,7 +323,7 @@ void sub_80866FC(void)
for(iVar1 = 0; iVar1 >= -0xFA; iVar1 -= 0xA)
{
sub_8085C54(iVar1, iVar1, iVar1, 1, 0);
SetDungeonBGColorRGB(iVar1, iVar1, iVar1, 1, 0);
sub_803E46C(0x46);
}
}
@@ -339,7 +339,7 @@ void sub_8086738(void)
for(iVar1 = 0; iVar1 < 0xFA; iVar1 += 0xA)
{
sub_8085C54(iVar1, iVar1, iVar1, 1, 0);
SetDungeonBGColorRGB(iVar1, iVar1, iVar1, 1, 0);
sub_803E46C(0x46);
}
}
@@ -350,7 +350,7 @@ void sub_8086764(void)
for(iVar1 = 0xFA; iVar1 >= 0; iVar1 -= 5)
{
sub_8085C54(iVar1, iVar1, iVar1, 1, 0);
SetDungeonBGColorRGB(iVar1, iVar1, iVar1, 1, 0);
sub_803E46C(0x46);
}
sub_8085EB0();
@@ -364,7 +364,7 @@ void sub_8086794(void)
for(iVar1 = 0; iVar1 < 0xC8; iVar1++)
{
sub_8085C54(0, 0, 0, 1, 0);
SetDungeonBGColorRGB(0, 0, 0, 1, 0);
sub_803E9D0();
sub_803E46C(0x46);
if((iVar1 & 3) == 0)

View File

@@ -3,11 +3,12 @@
#include "dungeon_entity.h"
#include "dungeon_global_data.h"
#include "pokemon.h"
#include "dungeon_util_1.h"
extern void LoadIQSkills(struct DungeonEntity *);
extern struct DungeonEntity *GetPartnerEntity();
extern struct DungeonEntity *xxx_call_GetLeaderEntity(void);
extern struct DungeonEntity *sub_8085680(u32);
extern struct DungeonEntity *GetEntityFromClientType(u32);
extern void SetDefaultIQSkills(u8 *param_1, u8 param_2);
extern void sub_8097FF8(void);
extern u8 sub_8044B28(void);
@@ -21,7 +22,6 @@ extern void sub_80855E4(void *);
extern void sub_8085860(s32 r0, u32 r1);
extern void sub_8068FE0(struct DungeonEntity *, u32, u32);
extern void sub_8097FA8(u32);
extern void sub_80858AC(void *, u32);
extern void DisplayDungeonDialogue(u8 *);
extern void sub_806CDD4(struct DungeonEntity *, u32, u32);
extern void sub_80869E4(struct DungeonEntity *, u32, u32, u32);
@@ -35,13 +35,6 @@ extern void sub_8086A54(struct DungeonEntity *);
extern void PlaySoundEffect(u32);
extern void sub_808563C(void *);
// X / Y Coords??
struct subStruct_Skarmory
{
int x;
int y;
};
extern u8 gUnknown_8100768;
extern u8 gUnknown_8100798;
extern u8 gUnknown_8100820;
@@ -119,8 +112,8 @@ void sub_8086B14(void)
struct DungeonEntity * SkarmoryEntity;
LeaderEntity = xxx_call_GetLeaderEntity();
DiglettEntity = sub_8085680(4);
SkarmoryEntity = sub_8085680(3);
DiglettEntity = GetEntityFromClientType(4);
SkarmoryEntity = GetEntityFromClientType(3);
sub_8083E88(0x72);
sub_8085374();
sub_80854D4();
@@ -140,8 +133,8 @@ void sub_8086B94(void)
struct DungeonEntity * SkarmoryEntity;
LeaderEntity = xxx_call_GetLeaderEntity();
DiglettEntity = sub_8085680(4);
SkarmoryEntity = sub_8085680(3);
DiglettEntity = GetEntityFromClientType(4);
SkarmoryEntity = GetEntityFromClientType(3);
sub_8068FE0(SkarmoryEntity,0x21c,0);
sub_8068FE0(DiglettEntity,0x21c,0);
@@ -165,13 +158,13 @@ void SkarmoryPreFightDialogue(void)
struct DungeonEntity * DiglettEntity;
struct DungeonEntity * SkarmoryEntity;
struct subStruct_Skarmory local_1c;
struct subStruct_Skarmory local_20;
struct Position32 local_1c;
struct Position32 local_20;
LeaderEntity = xxx_call_GetLeaderEntity(); // Player
PartnerEntity = GetPartnerEntity(); // Partner
DiglettEntity = sub_8085680(4); // Diglett
SkarmoryEntity = sub_8085680(3); // Skarmory
DiglettEntity = GetEntityFromClientType(4); // Diglett
SkarmoryEntity = GetEntityFromClientType(3); // Skarmory
local_1c.x = DiglettEntity->posPixel.x;
local_1c.y = DiglettEntity->posPixel.y + 0x3000;
@@ -185,16 +178,16 @@ void SkarmoryPreFightDialogue(void)
sub_803E708(0x20,0x46);
sub_803E708(10,0x46);
DisplayDungeonDialogue(&gUnknown_8100768);
sub_80858AC(&local_1c,0x40);
ShiftCameraToPosition(&local_1c,0x40);
sub_803E708(0x40,0x46);
sub_80858AC(&local_20,0x30);
ShiftCameraToPosition(&local_20,0x30);
DisplayDungeonDialogue(&gUnknown_8100798);
sub_803E708(10,0x46);
DiglettEntity->entityData->unk15D = 1;
sub_80858AC(&local_1c,0x30);
ShiftCameraToPosition(&local_1c,0x30);
DisplayDungeonDialogue(&gUnknown_8100820); // Diglett: ...I...\nI'm scared.
sub_803E708(10,0x46);
sub_80858AC(&local_20,0x20);
ShiftCameraToPosition(&local_20,0x20);
sub_803E708(0x20,0x46);
sub_8086E74(SkarmoryEntity);
DisplayDungeonDialogue(&gUnknown_8100844); // Skarmory: You!\nWhat do you think you're doing here?!
@@ -215,23 +208,23 @@ void SkarmoryPreFightDialogue(void)
sub_80869E4(LeaderEntity,4,1,4);
sub_803E708(10,0x46);
sub_8083E88(0xb);
sub_80858AC(&LeaderEntity->posPixel.x,0x10);
ShiftCameraToPosition(&LeaderEntity->posPixel,0x10);
}
void SkarmoryReFightDialogue(void)
{
struct DungeonEntity * LeaderEntity;
struct DungeonEntity * SkarmoryEntity;
struct subStruct_Skarmory local_14;
struct Position32 local_14;
LeaderEntity = xxx_call_GetLeaderEntity();
SkarmoryEntity = sub_8085680(3);
SkarmoryEntity = GetEntityFromClientType(3);
local_14.x = SkarmoryEntity->posPixel.x;
local_14.y = SkarmoryEntity->posPixel.y + 0x2000;
sub_8086448();
sub_803E708(10,0x46);
sub_8086E74(SkarmoryEntity);
sub_80858AC(&local_14,0x10);
ShiftCameraToPosition(&local_14,0x10);
DisplayDungeonDialogue(&gUnknown_8100C90);
sub_803E708(10,0x46);
DisplayDungeonDialogue(&gUnknown_8100CBC);
@@ -239,7 +232,7 @@ void SkarmoryReFightDialogue(void)
sub_806CDD4(SkarmoryEntity,0xd,0);
DisplayDungeonDialogue(&gUnknown_8100CDC);
sub_803E708(10,0x46);
sub_80858AC(&LeaderEntity->posPixel.x,0x10);
ShiftCameraToPosition(&LeaderEntity->posPixel,0x10);
sub_8083E88(0xb);
}

View File

@@ -6,13 +6,16 @@
#include "dungeon_util.h"
#include "random.h"
extern const u8 gUnknown_8107358[25];
extern void sub_806CE68(struct DungeonEntity *, s32);
extern s32 sub_803F994(void);
extern s32 sub_803F9B0(void);
extern s32 GetCameraXPos(void);
extern s32 GetCameraYPos(void);
extern void sub_803F4A0(u32);
extern void sub_803F878(s32, s32);
extern void sub_803E46C(u32);
extern void sub_803E708(u32, u32);
void sub_8085860(s32 x, s32 y)
{
@@ -27,28 +30,28 @@ void sub_8085890(s32 x, s32 y)
sub_803F878(x, y);
}
void sub_80858AC(s32 *param_1, s32 param_2)
void ShiftCameraToPosition(struct Position32 *posStruct, s32 cameraSteps)
{
s32 iVar1;
s32 iVar2;
s32 iVar3;
s32 iVar4;
s32 XPos;
s32 YPos;
s32 XIncrement;
s32 YIncrement;
iVar1 = sub_803F994();
iVar2 = sub_803F9B0();
iVar3 = (param_1[0] - iVar1) / param_2;
iVar4 = (param_1[1] - iVar2) / param_2;
XPos = GetCameraXPos();
YPos = GetCameraYPos();
XIncrement = (posStruct->x - XPos) / cameraSteps;
YIncrement = (posStruct->y - YPos) / cameraSteps;
sub_803F4A0(0);
if (0 < param_2) {
if (0 < cameraSteps) {
do {
iVar1 += iVar3;
iVar2 += iVar4;
sub_803F878(iVar1,iVar2);
XPos += XIncrement;
YPos += YIncrement;
sub_803F878(XPos,YPos);
sub_803E46C(0x46);
param_2--;
} while (param_2 != 0);
cameraSteps--;
} while (cameraSteps != 0);
}
sub_803F878(param_1[0],param_1[1]);
sub_803F878(posStruct->x,posStruct->y);
sub_803E46C(0x46);
}
@@ -168,3 +171,18 @@ bool8 IsMovingClient(struct DungeonEntity *pokemon)
return FALSE;
}
}
void sub_8085B0C(struct DungeonEntity *pokemon)
{
s32 index;
u8 local_28 [25];
index = 0;
memcpy(local_28, gUnknown_8107358, 25);
while (local_28[index] != 0) {
SetFacingDirection(pokemon, local_28[index]);
sub_803E708(6,0x46);
index++;
}
}

View File

@@ -183,13 +183,13 @@ bool8 FillInOrbAction(struct DungeonEntity *pokemon,struct DungeonEntity *target
struct MapTile *tileToFill;
struct DungeonEntityData *iVar5;
int y;
bool8 didWork; // TODO better name for this... signifies that orb worked
bool8 filledInTile;
int x;
u16 cast_x;
u32 cast_y;
struct Position_Alt tileCoords;
didWork = FALSE;
filledInTile = FALSE;
iVar5 = target->entityData;
if (IsBossBattle()) {
SendMessage(pokemon,*gUnknown_80FD0B8);
@@ -197,7 +197,7 @@ bool8 FillInOrbAction(struct DungeonEntity *pokemon,struct DungeonEntity *target
}
else
{
// Calcuate the coordinates of the tile in front of the user
// Calculate the coordinates of the tile in front of the user
cast_x = target->posWorld.x + gAdjacentTileOffsets[iVar5->action.facingDir].x;
tileCoords.temp.full_bits = (tileCoords.temp.full_bits & 0xffff0000) | cast_x;
@@ -212,7 +212,7 @@ bool8 FillInOrbAction(struct DungeonEntity *pokemon,struct DungeonEntity *target
for(y = -1; y < 2; y++)
for(x = -1; x < 2; x++)
sub_80498A8(tileCoords.temp.norm.x + x, tileCoords.temp.norm.y + y);
didWork = TRUE;
filledInTile = TRUE;
sub_806CF60();
}
@@ -220,7 +220,7 @@ bool8 FillInOrbAction(struct DungeonEntity *pokemon,struct DungeonEntity *target
for(x = 0; x < DUNGEON_MAX_SIZE_X; x++)
sub_8049BB0(x,y);
if (didWork) {
if (filledInTile) {
sub_8042A64((struct Position *)&tileCoords);
sub_80522F4(pokemon,target,*gUnknown_80FD0B4);
}
@@ -229,7 +229,7 @@ bool8 FillInOrbAction(struct DungeonEntity *pokemon,struct DungeonEntity *target
}
sub_8040A84();
sub_8049ED4();
return didWork;
return filledInTile;
}
}

View File

@@ -41,7 +41,7 @@ void sub_807E5E4(u8 weather)
gDungeonGlobalData->unkE279 = 0;
for(index = 0; index < 8; index++) {
gDungeonGlobalData->unkE267[index] = 0;
gDungeonGlobalData->unkE26F[index] = 0;
gDungeonGlobalData->startingWeather[index] = 0;
}
preload = &gDungeonGlobalData->weatherDamageTimer;
index = 0;