mirror of
https://github.com/pret/pmd-red.git
synced 2026-07-18 16:53:54 -05:00
split dungeon cutscene groudon rayquaza mankey
This commit is contained in:
parent
51e4dccf99
commit
d41f80e470
|
|
@ -1,16 +1,13 @@
|
|||
.section .rodata
|
||||
|
||||
|
||||
.string "pksdir0\0" @Groudon
|
||||
.string "pksdir0\0" @Ray
|
||||
|
||||
.string "pksdir0\0" @Mewtwo
|
||||
.string "pksdir0\0" @Entei
|
||||
.string "pksdir0\0" @Raikou
|
||||
.string "pksdir0\0" @Suicune
|
||||
.string "pksdir0\0" @HoOh
|
||||
.string "pksdir0\0" @Latios
|
||||
.string "pksdir0\0"
|
||||
.string "pksdir0\0"
|
||||
.string "pksdir0\0"
|
||||
.string "pksdir0\0" @
|
||||
.string "pksdir0\0" @ regis
|
||||
|
||||
.align 2,0
|
||||
|
|
|
|||
|
|
@ -288,6 +288,10 @@ SECTIONS {
|
|||
src/dungeon_cutscene_moltres.o(.text);
|
||||
src/dungeon_cutscene_articuno.o(.text);
|
||||
src/dungeon_cutscene_empty_summit.o(.text);
|
||||
src/dungeon_cutscene_groudon.o(.text);
|
||||
src/dungeon_cutscene_magma_cavern.o(.text);
|
||||
src/dungeon_cutscene_rayquaza.o(.text);
|
||||
src/dungeon_cutscene_mankey.o(.text);
|
||||
src/dungeon_cutscenes.o(.text);
|
||||
src/dungeon_cutscene_jirachi.o(.text);
|
||||
src/dungeon_cutscene_lugia.o(.text);
|
||||
|
|
@ -643,6 +647,10 @@ SECTIONS {
|
|||
src/dungeon_cutscene_moltres.o(.rodata);
|
||||
src/dungeon_cutscene_articuno.o(.rodata);
|
||||
src/dungeon_cutscene_empty_summit.o(.rodata);
|
||||
src/dungeon_cutscene_groudon.o(.rodata);
|
||||
src/dungeon_cutscene_magma_cavern.o(.rodata);
|
||||
src/dungeon_cutscene_rayquaza.o(.rodata);
|
||||
src/dungeon_cutscene_mankey.o(.rodata);
|
||||
data/data_8107224.o(.rodata);
|
||||
src/dungeon_cutscene_jirachi.o(.rodata);
|
||||
src/dungeon_cutscene_lugia.o(.rodata);
|
||||
|
|
|
|||
386
src/dungeon_cutscene_groudon.c
Normal file
386
src/dungeon_cutscene_groudon.c
Normal file
|
|
@ -0,0 +1,386 @@
|
|||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "code_800DAC0.h"
|
||||
#include "code_800E9A8.h"
|
||||
#include "code_803E46C.h"
|
||||
#include "code_803E668.h"
|
||||
#include "code_8041AD0.h"
|
||||
#include "code_804267C.h"
|
||||
#include "code_80861A8.h"
|
||||
#include "code_806CD90.h"
|
||||
#include "code_80869E4.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
#include "dungeon_leader.h"
|
||||
#include "dungeon_map_access.h"
|
||||
#include "dungeon_message.h"
|
||||
#include "dungeon_music.h"
|
||||
#include "dungeon_misc.h"
|
||||
#include "dungeon_logic.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "dungeon_util_1.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "exclusive_pokemon.h"
|
||||
#include "friend_area.h"
|
||||
#include "items.h"
|
||||
#include "pokemon_3.h"
|
||||
#include "pokemon.h"
|
||||
#include "position_util.h"
|
||||
#include "trap.h"
|
||||
#include "math.h"
|
||||
#include "dungeon_config.h"
|
||||
#include "dungeon_boss_dialogue.h"
|
||||
|
||||
extern void sub_8042B0C(Entity *);
|
||||
extern u8 sub_806FD18(Entity *);
|
||||
extern void sub_806FDF4(Entity *, Entity *, Entity **);
|
||||
extern s32 GetCameraXPos(void);
|
||||
extern s32 GetCameraYPos(void);
|
||||
extern void sub_803F878(u32, s32);
|
||||
extern void BgColorCallNullsub4(void);
|
||||
extern void sub_8085EB0(void);
|
||||
extern void sub_8049884(void);
|
||||
extern void sub_8049B8C(void);
|
||||
extern void ShowWholeRevealedDungeonMap(void);
|
||||
extern void sub_8086A54(Entity *);
|
||||
extern void ResetMonEntityData(EntityInfo *, u32);
|
||||
extern void sub_8041888(u32);
|
||||
extern u32 sub_80861F8(u32, Entity *, u32);
|
||||
extern u8 sub_80860A8(u32);
|
||||
extern void sub_8052D44(s16 *, Entity *, Entity *);
|
||||
extern void sub_80464C8(Entity *, DungeonPos *, Item *);
|
||||
extern void SetDungeonBGColorRGB(u32, u32, u32, u32, u32);
|
||||
extern u32 sub_8085EC8(u32, u32, u32, DungeonPos *, u32);
|
||||
extern void sub_807EAA0(u32, u32);
|
||||
extern void sub_8072008(Entity *, Entity *, s16, u32, u32);
|
||||
extern void sub_8085374(void);
|
||||
extern u32 GetRandomFloorItem(u32);
|
||||
extern bool8 sub_8085B80(struct_8085B80 *);
|
||||
extern void sub_8086A3C(Entity *pokemon);
|
||||
extern void SetupBossFightHP(Entity *pokemon, s32 newHP, u16 songIndex);
|
||||
extern u8 sub_8086AE4(s16 _index);
|
||||
|
||||
static void SceneGroudonMovement(Entity * groudonEntity);
|
||||
static void GroudonScreenFlash(void);
|
||||
static void GroudonScreenFlash2(void);
|
||||
|
||||
void sub_808862C(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * alakazamEntity;
|
||||
Entity * groudonEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_1);
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80867F4();
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
SetFacingDirection(alakazamEntity, DIRECTION_NORTH);
|
||||
sub_80861D4(alakazamEntity,0xd,DIRECTION_NORTH);
|
||||
SetFacingDirection(groudonEntity, DIRECTION_SOUTH);
|
||||
sub_8086A3C(groudonEntity);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y -3);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM);
|
||||
}
|
||||
|
||||
void sub_80886C4(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * alakazamEntity;
|
||||
Entity * groudonEntity;
|
||||
|
||||
u32 XPos;
|
||||
s32 YPos;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_1);
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2);
|
||||
PlaySoundEffect(0x3e5);
|
||||
sub_80867F4();
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_8068FE0(alakazamEntity,0x21c,0);
|
||||
SetFacingDirection(groudonEntity, DIRECTION_SOUTH);
|
||||
sub_8086A3C(groudonEntity);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y);
|
||||
XPos = GetCameraXPos();
|
||||
YPos = GetCameraYPos();
|
||||
sub_803F878(XPos,YPos + -0x1000);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM);
|
||||
}
|
||||
|
||||
void sub_808875C(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * alakazamEntity;
|
||||
Entity * groudonEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_1);
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2);
|
||||
sub_80867F4();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
sub_8068FE0(alakazamEntity,0x21c,0);
|
||||
if (sub_8086AE4(MONSTER_GROUDON)) {
|
||||
sub_8068FE0(groudonEntity,0x21c,0);
|
||||
}
|
||||
else {
|
||||
sub_8072008(groudonEntity,groudonEntity,gGroudonConfigLevel,0,0);
|
||||
SetFacingDirection(groudonEntity, DIRECTION_SOUTH);
|
||||
sub_80861D4(groudonEntity,0xf,DIRECTION_SOUTH);
|
||||
}
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM);
|
||||
}
|
||||
|
||||
void sub_8088818(u8 param_1, u8 param_2)
|
||||
{
|
||||
if ((param_2 == 0x12 || param_2 == 0x13 || param_2 == 0x14) && (param_1 == 0xE)) {
|
||||
sub_8097FA8(0xC);
|
||||
gDungeon->unk2 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8088848(void)
|
||||
{
|
||||
sub_8086854();
|
||||
}
|
||||
|
||||
void GroudonPreFightDialogue(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * partnerEntity;
|
||||
Entity * alakazamEntity;
|
||||
Entity * groudonEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
partnerEntity = GetPartnerEntity();
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_1);
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2);
|
||||
sub_8086448();
|
||||
DisplayDungeonDialogue(GroudonPreFightDialogue_1);
|
||||
sub_803E708(10,0x46);
|
||||
sub_803E708(0x3c,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_2);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8086838(1,1,1);
|
||||
sub_808680C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
sub_808682C();
|
||||
sub_803E708(0x1e,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_3);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8086838(1,1,1);
|
||||
sub_808680C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_4);
|
||||
sub_803E708(10,0x46);
|
||||
GroudonScreenFlash();
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_5);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_6);
|
||||
sub_803E708(10,0x46);
|
||||
PlaySoundEffect(0x1d5);
|
||||
SpriteLookAroundEffect(partnerEntity);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_7);
|
||||
sub_803E708(10,0x46);
|
||||
sub_808682C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
sub_80861B8(alakazamEntity,6,DIRECTION_NORTH);
|
||||
PlaySoundEffect(0x205);
|
||||
sub_8086738();
|
||||
sub_8068FE0(alakazamEntity,0x21c,0);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_8);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_9);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_8086764();
|
||||
sub_803E708(0x28,0x46);
|
||||
PlaySoundEffect(0x1d5);
|
||||
SpriteLookAroundEffect(partnerEntity);
|
||||
DisplayDungeonDialogue(GroudonPreFightDialogue_10);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8086838(1,1,1);
|
||||
sub_808680C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
DisplayDungeonDialogue(GroudonPreFightDialogue_11);
|
||||
sub_803E708(10,0x46);
|
||||
DungeonStopBGM();
|
||||
GroudonScreenFlash2();
|
||||
sub_803E708(0x1e,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_12);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_13);
|
||||
sub_803E708(10,0x46);
|
||||
sub_803E708(0x1e,0x46);
|
||||
sub_808682C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
PlaySoundEffect(0x1fa);
|
||||
sub_8086738();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
DisplayDungeonDialogue(GroudonPreFightDialogue_14);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8086A54(groudonEntity);
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_8086764();
|
||||
SetupBossFightHP(groudonEntity,500,MUS_BOSS_BATTLE);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void GroudonReFightDialogue(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * groudonEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2);
|
||||
sub_8086838(1,1,1);
|
||||
sub_808680C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
DisplayDungeonDialogue(gGroudonReFightDialogue_1);
|
||||
sub_803E708(10,0x46);
|
||||
GroudonScreenFlash();
|
||||
sub_803E708(0x1e,0x46);
|
||||
DisplayDungeonDialogue(gGroudonReFightDialogue_2);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&gGroudonReFightDialogue_3);
|
||||
sub_803E708(10,0x46);
|
||||
sub_808682C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
DungeonStopBGM();
|
||||
PlaySoundEffect(0x1fa);
|
||||
sub_8086738();
|
||||
DisplayDungeonDialogue(gGroudonReFightDialogue_4);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8086A54(groudonEntity);
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_8086764();
|
||||
SetupBossFightHP(groudonEntity,500,MUS_BOSS_BATTLE);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void GroudonPostStoryPreFightDialogue(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * groudonEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2);
|
||||
sub_8086448();
|
||||
if (sub_8086AE4(MONSTER_GROUDON)) {
|
||||
sub_80866C4(&gUnknown_8103488);
|
||||
}
|
||||
else{
|
||||
DisplayDungeonDialogue(&gGroudonPostStoryPreFightDialogue_1);
|
||||
sub_803E708(10,0x46);
|
||||
SceneGroudonMovement(groudonEntity);
|
||||
SceneGroudonMovement(groudonEntity);
|
||||
DisplayDungeonDialogue(&gGroudonPostStoryPreFightDialogue_2);
|
||||
PlaySoundEffect(0x1f6);
|
||||
GroudonScreenFlash();
|
||||
DisplayDungeonDialogue(&gGroudonPostStoryPreFightDialogue_3);
|
||||
PlaySoundEffect(0x1f6);
|
||||
GroudonScreenFlash();
|
||||
DisplayDungeonDialogue(&gGroudonPostStoryPreFightDialogue_4);
|
||||
sub_803E708(10,0x46);
|
||||
SetupBossFightHP(groudonEntity,500,MUS_BOSS_BATTLE);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
}
|
||||
|
||||
// Moves Groudon down in a walking fashion
|
||||
static void SceneGroudonMovement(Entity * groudonEntity)
|
||||
{
|
||||
int iVar1;
|
||||
|
||||
sub_8086848(0x18,0x10);
|
||||
sub_806CDD4(groudonEntity,0,DIRECTION_SOUTH);
|
||||
for(iVar1 = 0; iVar1 < 0x2C; iVar1++)
|
||||
{
|
||||
if ((iVar1 == 10) || (iVar1 == 0x20)) {
|
||||
PlaySoundEffect(0x1f9);
|
||||
sub_8086838(0,1,0);
|
||||
sub_808680C();
|
||||
}
|
||||
if ((iVar1 - 10U < 0xc) || (iVar1 > 0x1f)) {
|
||||
IncreaseEntityPixelPos(groudonEntity,0,0x100);
|
||||
}
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_80856C8(groudonEntity,groudonEntity->pos.x,groudonEntity->pos.y + 1);
|
||||
sub_80861D4(groudonEntity,0xf,DIRECTION_SOUTH);
|
||||
sub_803E708(10,0x46);
|
||||
sub_808682C();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_803E708(0x22,0x46);
|
||||
}
|
||||
|
||||
static void GroudonScreenFlash(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
|
||||
for(iVar1 = 250; iVar1 > 0x95; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_803E708(10,0x46);
|
||||
|
||||
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1,iVar1 / 2,0,1,1);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_803E708(10,0x46);
|
||||
|
||||
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_803E708(10,0x46);
|
||||
sub_8085EB0();
|
||||
}
|
||||
|
||||
static void GroudonScreenFlash2(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
|
||||
for(iVar1 = 250; iVar1 > 0x95; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_803E708(10,0x46);
|
||||
|
||||
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1,iVar1 / 2,0,1,1);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_803E708(10,0x46);
|
||||
|
||||
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_803E708(10,0x46);
|
||||
sub_8085EB0();
|
||||
}
|
||||
|
||||
|
||||
331
src/dungeon_cutscene_magma_cavern.c
Normal file
331
src/dungeon_cutscene_magma_cavern.c
Normal file
|
|
@ -0,0 +1,331 @@
|
|||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "code_800DAC0.h"
|
||||
#include "code_800E9A8.h"
|
||||
#include "code_803E46C.h"
|
||||
#include "code_803E668.h"
|
||||
#include "code_8041AD0.h"
|
||||
#include "code_804267C.h"
|
||||
#include "code_80861A8.h"
|
||||
#include "code_806CD90.h"
|
||||
#include "code_80869E4.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
#include "dungeon_leader.h"
|
||||
#include "dungeon_map_access.h"
|
||||
#include "dungeon_message.h"
|
||||
#include "dungeon_music.h"
|
||||
#include "dungeon_misc.h"
|
||||
#include "dungeon_logic.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "dungeon_util_1.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "exclusive_pokemon.h"
|
||||
#include "friend_area.h"
|
||||
#include "items.h"
|
||||
#include "pokemon_3.h"
|
||||
#include "pokemon.h"
|
||||
#include "position_util.h"
|
||||
#include "trap.h"
|
||||
#include "math.h"
|
||||
#include "dungeon_config.h"
|
||||
#include "dungeon_boss_dialogue.h"
|
||||
|
||||
extern void sub_8042B0C(Entity *);
|
||||
extern u8 sub_806FD18(Entity *);
|
||||
extern void sub_806FDF4(Entity *, Entity *, Entity **);
|
||||
extern s32 GetCameraXPos(void);
|
||||
extern s32 GetCameraYPos(void);
|
||||
extern void sub_803F878(u32, s32);
|
||||
extern void BgColorCallNullsub4(void);
|
||||
extern void sub_8085EB0(void);
|
||||
extern void sub_8049884(void);
|
||||
extern void sub_8049B8C(void);
|
||||
extern void ShowWholeRevealedDungeonMap(void);
|
||||
extern void sub_8086A54(Entity *);
|
||||
extern void ResetMonEntityData(EntityInfo *, u32);
|
||||
extern void sub_8041888(u32);
|
||||
extern u32 sub_80861F8(u32, Entity *, u32);
|
||||
extern u8 sub_80860A8(u32);
|
||||
extern void sub_8052D44(s16 *, Entity *, Entity *);
|
||||
extern void sub_80464C8(Entity *, DungeonPos *, Item *);
|
||||
extern void SetDungeonBGColorRGB(u32, u32, u32, u32, u32);
|
||||
extern u32 sub_8085EC8(u32, u32, u32, DungeonPos *, u32);
|
||||
extern void sub_807EAA0(u32, u32);
|
||||
extern void sub_8072008(Entity *, Entity *, s16, u32, u32);
|
||||
extern void sub_8085374(void);
|
||||
extern u32 GetRandomFloorItem(u32);
|
||||
extern bool8 sub_8085B80(struct_8085B80 *);
|
||||
extern void sub_8086A3C(Entity *pokemon);
|
||||
extern void SetupBossFightHP(Entity *pokemon, s32 newHP, u16 songIndex);
|
||||
extern u8 sub_8086AE4(s16 _index);
|
||||
|
||||
static void sub_80891F0(void);
|
||||
static void sub_8089294(void);
|
||||
|
||||
void sub_8088DC0(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * groudonEntity;
|
||||
Entity * alakazamEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_1);
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_2);
|
||||
sub_80867F4();
|
||||
sub_8086838(0,1,0);
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
sub_8086A3C(groudonEntity);
|
||||
sub_806CDD4(groudonEntity,0xe,DIRECTION_SOUTH);
|
||||
sub_8086A3C(alakazamEntity);
|
||||
sub_806CDD4(alakazamEntity,0xe,DIRECTION_SOUTH);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM);
|
||||
}
|
||||
|
||||
void sub_8088E5C(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * groudonEntity;
|
||||
Entity * alakazamEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_1);
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_2);
|
||||
sub_80867F4();
|
||||
sub_8086838(0,1,0);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
sub_8068FE0(groudonEntity,0x21c,0);
|
||||
sub_8068FE0(alakazamEntity,0x21c,0);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM);
|
||||
}
|
||||
|
||||
void sub_8088EE8(void)
|
||||
{
|
||||
sub_8086854();
|
||||
}
|
||||
|
||||
void MagmaCavernMidDialogue(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * partnerEntity;
|
||||
Entity * groudonEntity;
|
||||
Entity * alakazamEntity;
|
||||
s16 IDStack [2];
|
||||
PixelPos pos;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
partnerEntity = GetPartnerEntity();
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_1);
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_2);
|
||||
sub_8052D44(IDStack,leaderEntity,partnerEntity);
|
||||
sub_8086448();
|
||||
SpriteLookAroundEffect(partnerEntity);
|
||||
// Let's see..
|
||||
// I wonder where we are?
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_1);
|
||||
sub_803E708(10,0x46);
|
||||
sub_80869E4(partnerEntity,4,1,DIRECTION_EAST);
|
||||
sub_80869E4(leaderEntity,4,2,DIRECTION_WEST);
|
||||
// I know we've come pretty
|
||||
// far...
|
||||
//
|
||||
// I'm certain we've come quite
|
||||
// far already..
|
||||
DisplayDungeonDialogue(MagmaCavernMidDialogue_2);
|
||||
sub_803E708(10,0x46);
|
||||
DungeonStopBGM();
|
||||
sub_80855E4(sub_80868F4);
|
||||
sub_808680C();
|
||||
PlaySoundEffect(0x1c5);
|
||||
sub_803E708(0x28,0x46);
|
||||
// Waaah!
|
||||
// Qu-quake!
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_3);
|
||||
sub_803E708(0x78,0x46);
|
||||
StopSoundEffect(0x1c5);
|
||||
sub_808682C();
|
||||
sub_80855E4(sub_8086910);
|
||||
sub_803E708(0x14,0x46);
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_803E708(10,0x46);
|
||||
// Whew!
|
||||
// It settled down.
|
||||
//
|
||||
// Whew
|
||||
// It's over.
|
||||
DisplayDungeonDialogue(MagmaCavernMidDialogue_4);
|
||||
sub_803E708(10,0x46);
|
||||
PlaySoundEffect(0x1d5);
|
||||
SpriteLookAroundEffect(partnerEntity);
|
||||
PlaySoundEffect(0x1c7);
|
||||
sub_80856E0(partnerEntity, DIRECTION_NORTH);
|
||||
// Hey! {POKEMON_0}!
|
||||
// Over there!
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_5);
|
||||
GetEntInfo(groudonEntity)->unk15E = 0;
|
||||
GetEntInfo(alakazamEntity)->unk15E =0;
|
||||
pos.x = (groudonEntity->pixelPos.x + alakazamEntity->pixelPos.x) / 2;
|
||||
pos.y = (groudonEntity->pixelPos.y + alakazamEntity->pixelPos.y) / 2 + 0x800;
|
||||
ShiftCameraToPosition(&pos,0x20);
|
||||
sub_803E708(0x3c,0x46);
|
||||
sub_80891F0();
|
||||
// Hey!
|
||||
// Are you OK?!
|
||||
//
|
||||
// Hey!
|
||||
// Snap out of it!
|
||||
DisplayDungeonDialogue(MagmaCavernMidDialogue_6);
|
||||
sub_803E708(10,0x46);
|
||||
// Urrrrgh...
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_7);
|
||||
sub_803E708(10,0x46);
|
||||
sub_80869E4(leaderEntity,4,2,DIRECTION_NORTHWEST);
|
||||
// What happened to you?
|
||||
//
|
||||
// What happened here?
|
||||
DisplayDungeonDialogue(MagmaCavernMidDialogue_8);
|
||||
sub_803E708(10,0x46);
|
||||
// We challenged..
|
||||
// {POKEMON_2}...
|
||||
// And wiped out..
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_9);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_10);
|
||||
sub_803E708(10,0x46);
|
||||
sub_80869E4(leaderEntity,4,1,DIRECTION_NORTHEAST);
|
||||
sub_80869E4(partnerEntity,4,1,DIRECTION_NORTHEAST);
|
||||
// Grrgh..
|
||||
// We... It crushed us
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_11);
|
||||
sub_803E708(10,0x46);
|
||||
PlaySoundEffect(0x1d5);
|
||||
SpriteLookAroundEffect(partnerEntity);
|
||||
// That's right...
|
||||
// What happened to {POKEMON_3}?
|
||||
// Where is {POKEMON_3}?
|
||||
//
|
||||
// Wait...
|
||||
// What about {POKEMON_3}?
|
||||
// Where did {POKEMON_3} go?
|
||||
DisplayDungeonDialogue(MagmaCavernMidDialogue_12);
|
||||
sub_803E708(0x1e,0x46);
|
||||
// {POKEMON_3} is...
|
||||
// Still battling {POKEMON_2}...
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_13);
|
||||
sub_803E708(10,0x46);
|
||||
sub_80869E4(partnerEntity,4,1,DIRECTION_EAST);
|
||||
sub_80869E4(leaderEntity,4,2,DIRECTION_WEST);
|
||||
|
||||
// {POKEMON_0}!
|
||||
// We've got to hurry!
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_14);
|
||||
sub_8089294();
|
||||
// Be careful!
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_15);
|
||||
sub_803E708(10,0x46);
|
||||
gDungeon->unk2 = 1;
|
||||
}
|
||||
|
||||
void sub_8089168(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
sub_8086448();
|
||||
sub_803E708(10,0x46);
|
||||
SpriteLookAroundEffect(leaderEntity);
|
||||
sub_803E708(10,0x46);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void sub_808919C(Entity *r0)
|
||||
{
|
||||
IncreaseEntityPixelPos(r0, 0, -512);
|
||||
}
|
||||
|
||||
void sub_80891B0(Entity *r0)
|
||||
{
|
||||
sub_806CDD4(r0, 0, DIRECTION_NORTH);
|
||||
GetEntInfo(r0)->unk15F = 1;
|
||||
}
|
||||
|
||||
void sub_80891D0(Entity *r0)
|
||||
{
|
||||
sub_806CDD4(r0, 7, DIRECTION_NORTH);
|
||||
GetEntInfo(r0)->unk15F = 0;
|
||||
}
|
||||
|
||||
static void sub_80891F0(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
|
||||
sub_80855E4(sub_80891B0);
|
||||
for(iVar1 = 0; iVar1 < 0x30; iVar1++)
|
||||
{
|
||||
sub_80855E4(sub_808919C);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_80855E4(sub_80891D0);
|
||||
}
|
||||
|
||||
void sub_8089224(Entity * entity)
|
||||
{
|
||||
s32 xPixelPos;
|
||||
|
||||
if (entity->pixelPos.y < 0x9001) {
|
||||
return;
|
||||
}
|
||||
xPixelPos = entity->pixelPos.x;
|
||||
|
||||
if(xPixelPos < 0xE400)
|
||||
{
|
||||
if(xPixelPos <= 0xB400)
|
||||
{
|
||||
// 0 - 0xB400
|
||||
IncreaseEntityPixelPos(entity, 0, -512);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 0xB401 - 0xE3FF
|
||||
IncreaseEntityPixelPos(entity, -512, 0);
|
||||
}
|
||||
}
|
||||
else if(xPixelPos < 0xFC00)
|
||||
{
|
||||
IncreaseEntityPixelPos(entity, 0, -512);
|
||||
}
|
||||
else if(xPixelPos <= 0x11400)
|
||||
{
|
||||
IncreaseEntityPixelPos(entity, 0x200, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
IncreaseEntityPixelPos(entity, 0, -512);
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8089294(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
|
||||
sub_80855E4(sub_80891B0);
|
||||
for(iVar1 = 0; iVar1 <= 0x77; iVar1++)
|
||||
{
|
||||
sub_80855E4(sub_8089224);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_80855E4(sub_80891D0);
|
||||
}
|
||||
|
||||
185
src/dungeon_cutscene_mankey.c
Normal file
185
src/dungeon_cutscene_mankey.c
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "code_800DAC0.h"
|
||||
#include "code_800E9A8.h"
|
||||
#include "code_803E46C.h"
|
||||
#include "code_803E668.h"
|
||||
#include "code_8041AD0.h"
|
||||
#include "code_804267C.h"
|
||||
#include "code_80861A8.h"
|
||||
#include "code_806CD90.h"
|
||||
#include "code_80869E4.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
#include "dungeon_leader.h"
|
||||
#include "dungeon_map_access.h"
|
||||
#include "dungeon_message.h"
|
||||
#include "dungeon_music.h"
|
||||
#include "dungeon_misc.h"
|
||||
#include "dungeon_logic.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "dungeon_util_1.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "exclusive_pokemon.h"
|
||||
#include "friend_area.h"
|
||||
#include "items.h"
|
||||
#include "pokemon_3.h"
|
||||
#include "pokemon.h"
|
||||
#include "position_util.h"
|
||||
#include "trap.h"
|
||||
#include "math.h"
|
||||
#include "dungeon_config.h"
|
||||
#include "dungeon_boss_dialogue.h"
|
||||
|
||||
extern void sub_8042B0C(Entity *);
|
||||
extern u8 sub_806FD18(Entity *);
|
||||
extern void sub_806FDF4(Entity *, Entity *, Entity **);
|
||||
extern s32 GetCameraXPos(void);
|
||||
extern s32 GetCameraYPos(void);
|
||||
extern void sub_803F878(u32, s32);
|
||||
extern void BgColorCallNullsub4(void);
|
||||
extern void sub_8085EB0(void);
|
||||
extern void sub_8049884(void);
|
||||
extern void sub_8049B8C(void);
|
||||
extern void ShowWholeRevealedDungeonMap(void);
|
||||
extern void sub_8086A54(Entity *);
|
||||
extern void ResetMonEntityData(EntityInfo *, u32);
|
||||
extern void sub_8041888(u32);
|
||||
extern u32 sub_80861F8(u32, Entity *, u32);
|
||||
extern u8 sub_80860A8(u32);
|
||||
extern void sub_8052D44(s16 *, Entity *, Entity *);
|
||||
extern void sub_80464C8(Entity *, DungeonPos *, Item *);
|
||||
extern void SetDungeonBGColorRGB(u32, u32, u32, u32, u32);
|
||||
extern u32 sub_8085EC8(u32, u32, u32, DungeonPos *, u32);
|
||||
extern void sub_807EAA0(u32, u32);
|
||||
extern void sub_8072008(Entity *, Entity *, s16, u32, u32);
|
||||
extern void sub_8085374(void);
|
||||
extern u32 GetRandomFloorItem(u32);
|
||||
extern bool8 sub_8085B80(struct_8085B80 *);
|
||||
extern void sub_8086A3C(Entity *pokemon);
|
||||
extern void SetupBossFightHP(Entity *pokemon, s32 newHP, u16 songIndex);
|
||||
extern u8 sub_8086AE4(s16 _index);
|
||||
|
||||
static void sub_80898F8(Entity *r0);
|
||||
static void sub_8089908(Entity *r0);
|
||||
|
||||
void sub_808970C(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
DungeonStartNewBGM(MUS_TINY_WOODS);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
sub_808563C(sub_8089908);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y -3);
|
||||
}
|
||||
|
||||
void sub_808974C(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
sub_808563C(sub_80898F8);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3);
|
||||
}
|
||||
|
||||
void sub_8089788(Entity *entity, u8 param_2, u8 param_3)
|
||||
{
|
||||
Entity *monEntity;
|
||||
s32 index;
|
||||
bool8 found = FALSE;
|
||||
|
||||
if (param_3 == 0x1A || param_3 == 0x1B) {
|
||||
for(index = 0; index < DUNGEON_MAX_WILD_POKEMON; index++)
|
||||
{
|
||||
monEntity = gDungeon->wildPokemon[index];
|
||||
if ((EntityIsValid(monEntity)) && (monEntity != entity) && (GetEntInfo(monEntity)->monsterBehavior == param_2)) {
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!found){
|
||||
sub_8097FA8(0x11);
|
||||
gDungeon->unk2 = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80897F0(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
sub_8086448();
|
||||
sub_803E708(10,0x46);
|
||||
sub_808563C(SpriteShockEffect);
|
||||
sub_803E708(0x20,0x46);
|
||||
sub_808692C();
|
||||
DisplayDungeonDialogue(&gUnknown_8103BD8);
|
||||
// We don't like to brag or
|
||||
// nothing, but
|
||||
DisplayDungeonDialogue(&gUnknown_8103C00);
|
||||
// We get furious real easy
|
||||
// You know that?!
|
||||
DisplayDungeonDialogue(&gUnknown_8103C3C);
|
||||
// What really irritates us is
|
||||
// when we see some dim witted face
|
||||
DisplayDungeonDialogue(&gUnknown_8103C74);
|
||||
// .........
|
||||
// Wrooooooar!
|
||||
// That vacant expression
|
||||
DisplayDungeonDialogue(&gUnknown_8103CC4);
|
||||
// Gwoooh
|
||||
// It's ticking me off!
|
||||
// I'm seeing red!
|
||||
DisplayDungeonDialogue(&gUnknown_8103D0C);
|
||||
// Mukkkeeeeeh
|
||||
// Get 'em! It's frenzy time!
|
||||
DisplayDungeonDialogue(&gUnknown_8103D50);
|
||||
sub_803E708(10,0x46);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void sub_8089878(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
sub_8086448();
|
||||
sub_803E708(10,0x46);
|
||||
sub_808563C(SpriteShockEffect);
|
||||
sub_803E708(0x20,0x46);
|
||||
sub_808692C();
|
||||
DisplayDungeonDialogue(&gUnknown_8103D8C);
|
||||
DisplayDungeonDialogue(&gUnknown_8103D98);
|
||||
DisplayDungeonDialogue(&gUnknown_8103DD8);
|
||||
DisplayDungeonDialogue(&gUnknown_8103E28);
|
||||
sub_803E708(10,0x46);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void sub_80898E4(void)
|
||||
{
|
||||
sub_8086448();
|
||||
sub_80866C4(&gUnknown_8103E34);
|
||||
}
|
||||
|
||||
static void sub_80898F8(Entity *r0)
|
||||
{
|
||||
sub_8068FE0(r0, 0x21C, 0);
|
||||
}
|
||||
|
||||
static void sub_8089908(Entity *r0)
|
||||
{
|
||||
SetFacingDirection(r0, DIRECTION_NORTH);
|
||||
}
|
||||
|
||||
255
src/dungeon_cutscene_rayquaza.c
Normal file
255
src/dungeon_cutscene_rayquaza.c
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "code_800DAC0.h"
|
||||
#include "code_800E9A8.h"
|
||||
#include "code_803E46C.h"
|
||||
#include "code_803E668.h"
|
||||
#include "code_8041AD0.h"
|
||||
#include "code_804267C.h"
|
||||
#include "code_80861A8.h"
|
||||
#include "code_806CD90.h"
|
||||
#include "code_80869E4.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
#include "dungeon_leader.h"
|
||||
#include "dungeon_map_access.h"
|
||||
#include "dungeon_message.h"
|
||||
#include "dungeon_music.h"
|
||||
#include "dungeon_misc.h"
|
||||
#include "dungeon_logic.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "dungeon_util_1.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "exclusive_pokemon.h"
|
||||
#include "friend_area.h"
|
||||
#include "items.h"
|
||||
#include "pokemon_3.h"
|
||||
#include "pokemon.h"
|
||||
#include "position_util.h"
|
||||
#include "trap.h"
|
||||
#include "math.h"
|
||||
#include "dungeon_config.h"
|
||||
#include "dungeon_boss_dialogue.h"
|
||||
|
||||
extern void sub_8042B0C(Entity *);
|
||||
extern u8 sub_806FD18(Entity *);
|
||||
extern void sub_806FDF4(Entity *, Entity *, Entity **);
|
||||
extern s32 GetCameraXPos(void);
|
||||
extern s32 GetCameraYPos(void);
|
||||
extern void sub_803F878(u32, s32);
|
||||
extern void BgColorCallNullsub4(void);
|
||||
extern void sub_8085EB0(void);
|
||||
extern void sub_8049884(void);
|
||||
extern void sub_8049B8C(void);
|
||||
extern void ShowWholeRevealedDungeonMap(void);
|
||||
extern void sub_8086A54(Entity *);
|
||||
extern void ResetMonEntityData(EntityInfo *, u32);
|
||||
extern void sub_8041888(u32);
|
||||
extern u32 sub_80861F8(u32, Entity *, u32);
|
||||
extern u8 sub_80860A8(u32);
|
||||
extern void sub_8052D44(s16 *, Entity *, Entity *);
|
||||
extern void sub_80464C8(Entity *, DungeonPos *, Item *);
|
||||
extern void SetDungeonBGColorRGB(u32, u32, u32, u32, u32);
|
||||
extern u32 sub_8085EC8(u32, u32, u32, DungeonPos *, u32);
|
||||
extern void sub_807EAA0(u32, u32);
|
||||
extern void sub_8072008(Entity *, Entity *, s16, u32, u32);
|
||||
extern void sub_8085374(void);
|
||||
extern u32 GetRandomFloorItem(u32);
|
||||
extern bool8 sub_8085B80(struct_8085B80 *);
|
||||
extern void sub_8086A3C(Entity *pokemon);
|
||||
extern void SetupBossFightHP(Entity *pokemon, s32 newHP, u16 songIndex);
|
||||
extern u8 sub_8086AE4(s16 _index);
|
||||
|
||||
static void RayquazaDropInEffect(Entity *rayquazaEntity);
|
||||
static void RayquazaScreenFlash(void);
|
||||
|
||||
void sub_80892C8(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * RayquazaEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
RayquazaEntity = GetEntityFromMonsterBehavior(BEHAVIOR_RAYQUAZA);
|
||||
DungeonStartNewBGM(MUS_RAYQUAZAS_DOMAIN);
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
SetFacingDirection(RayquazaEntity, DIRECTION_SOUTH);
|
||||
sub_8086A3C(RayquazaEntity);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2],MONSTER_RAYQUAZA);
|
||||
}
|
||||
|
||||
void sub_8089328(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * rayquazaEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
rayquazaEntity = GetEntityFromMonsterBehavior(BEHAVIOR_RAYQUAZA);
|
||||
DungeonStartNewBGM(MUS_RAYQUAZAS_DOMAIN);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
if (sub_8086AE4(MONSTER_RAYQUAZA)) {
|
||||
sub_8068FE0(rayquazaEntity,0x21c,0);
|
||||
}
|
||||
else {
|
||||
sub_8072008(rayquazaEntity,rayquazaEntity,gRayquazaConfigLevel,0,0);
|
||||
sub_8086A3C(rayquazaEntity);
|
||||
}
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2],MONSTER_RAYQUAZA);
|
||||
}
|
||||
|
||||
void sub_80893B4(u8 param_1, u8 param_2)
|
||||
{
|
||||
if ((param_2 == 0x17 || param_2 == 0x18 || param_2 == 0x19) && (param_1 == 0xF)) {
|
||||
sub_8097FA8(0xF);
|
||||
gDungeon->unk2 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void RayquazaPreFightDialogue(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
Entity *partnerEntity;
|
||||
Entity *rayquazaEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
partnerEntity = GetPartnerEntity();
|
||||
rayquazaEntity = GetEntityFromMonsterBehavior(BEHAVIOR_RAYQUAZA);
|
||||
sub_8086448();
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_1);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_2);
|
||||
sub_80856E0(partnerEntity, DIRECTION_NORTH);
|
||||
SpriteLookAroundEffect(partnerEntity);
|
||||
sub_803E708(10,0x46);
|
||||
sub_80869E4(partnerEntity,4,1,DIRECTION_EAST);
|
||||
sub_80869E4(leaderEntity,4,2,DIRECTION_WEST);
|
||||
DisplayDungeonDialogue(gRayquazaPreFightDialogue_3);
|
||||
sub_80869E4(partnerEntity,4,2,DIRECTION_NORTH);
|
||||
sub_80869E4(leaderEntity,4,1,DIRECTION_NORTH);
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_4);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_5);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_6);
|
||||
RayquazaScreenFlash();
|
||||
PlaySoundEffect(0x1da); // Rayquaza Cry
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_7);
|
||||
RayquazaDropInEffect(rayquazaEntity);
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_8);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_9);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_10);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_11);
|
||||
SetupBossFightHP(rayquazaEntity,600,MUS_BATTLE_WITH_RAYQUAZA);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void RayquazaReFightDialogue(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
Entity *rayquazaEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
rayquazaEntity = GetEntityFromMonsterBehavior(BEHAVIOR_RAYQUAZA);
|
||||
sub_8086448();
|
||||
RayquazaScreenFlash();
|
||||
PlaySoundEffect(0x1da); // Rayquaza Cry
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_7);
|
||||
sub_803E708(10,0x46);
|
||||
RayquazaDropInEffect(rayquazaEntity);
|
||||
DisplayDungeonDialogue(&gRayquazaReFightDialogue_1);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaReFightDialogue_2);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaReFightDialogue_3);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaReFightDialogue_4);
|
||||
SetupBossFightHP(rayquazaEntity,600,MUS_BATTLE_WITH_RAYQUAZA);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void RayquazaPostStoryPreFightDialogue(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
Entity *rayquazaEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
rayquazaEntity = GetEntityFromMonsterBehavior(BEHAVIOR_RAYQUAZA);
|
||||
sub_8086448();
|
||||
if (sub_8086AE4(MONSTER_RAYQUAZA)) {
|
||||
sub_80866C4(&gRayquazaPostStoryPreFightDialogue_6);
|
||||
}
|
||||
else {
|
||||
PlaySoundEffect(0x1da); // Rayquaza Cry
|
||||
DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_1);
|
||||
RayquazaDropInEffect(rayquazaEntity);
|
||||
DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_2);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_3);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_4);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_5);
|
||||
SetupBossFightHP(rayquazaEntity,600,MUS_BOSS_BATTLE);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
}
|
||||
|
||||
static void RayquazaDropInEffect(Entity *rayquazaEntity)
|
||||
{
|
||||
s24_8 iVar1;
|
||||
s24_8 iVar2;
|
||||
|
||||
GetEntInfo(rayquazaEntity)->unk15E = 0;
|
||||
iVar2 = IntToF248_2(200);
|
||||
iVar1 = IntToF248_2(6);
|
||||
PlaySoundEffect(0x1f8);
|
||||
while( 1 ) {
|
||||
iVar2.raw = iVar2.raw - iVar1.raw; // must be .raw
|
||||
iVar1 = F248_Sub(iVar1, FloatToF248_2(3./32.));
|
||||
if (F248LessThanFloat(iVar1, 0.08)) {
|
||||
iVar1 = FloatToF248(0.08);
|
||||
}
|
||||
if (F248LessThanInt(iVar2, 0)) break;
|
||||
GetEntInfo(rayquazaEntity)->unk174 = iVar2;
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
GetEntInfo(rayquazaEntity)->unk174 = IntToF248_2(0);
|
||||
}
|
||||
|
||||
static void RayquazaScreenFlash(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
|
||||
PlaySoundEffect(0x1f6);
|
||||
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1 / 2, iVar1, iVar1 / 2, 1, 1);
|
||||
DungeonRunFrameActions(70);
|
||||
}
|
||||
sub_803E708(10,70);
|
||||
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1 / 2, iVar1, 0, 1, 1);
|
||||
DungeonRunFrameActions(70);
|
||||
}
|
||||
sub_803E708(10,70);
|
||||
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1 / 2, iVar1, iVar1 / 2, 1, 1);
|
||||
DungeonRunFrameActions(70);
|
||||
}
|
||||
sub_803E708(10,70);
|
||||
sub_8085EB0();
|
||||
}
|
||||
|
|
@ -153,904 +153,21 @@ void SkarmoryEntry(Entity *);
|
|||
|
||||
//
|
||||
|
||||
void sub_808862C(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * alakazamEntity;
|
||||
Entity * groudonEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_1);
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80867F4();
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
SetFacingDirection(alakazamEntity, DIRECTION_NORTH);
|
||||
sub_80861D4(alakazamEntity,0xd,DIRECTION_NORTH);
|
||||
SetFacingDirection(groudonEntity, DIRECTION_SOUTH);
|
||||
sub_8086A3C(groudonEntity);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y -3);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM);
|
||||
}
|
||||
|
||||
void sub_80886C4(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * alakazamEntity;
|
||||
Entity * groudonEntity;
|
||||
|
||||
u32 XPos;
|
||||
s32 YPos;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_1);
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2);
|
||||
PlaySoundEffect(0x3e5);
|
||||
sub_80867F4();
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_8068FE0(alakazamEntity,0x21c,0);
|
||||
SetFacingDirection(groudonEntity, DIRECTION_SOUTH);
|
||||
sub_8086A3C(groudonEntity);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y);
|
||||
XPos = GetCameraXPos();
|
||||
YPos = GetCameraYPos();
|
||||
sub_803F878(XPos,YPos + -0x1000);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM);
|
||||
}
|
||||
|
||||
void sub_808875C(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * alakazamEntity;
|
||||
Entity * groudonEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_1);
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2);
|
||||
sub_80867F4();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
sub_8068FE0(alakazamEntity,0x21c,0);
|
||||
if (sub_8086AE4(MONSTER_GROUDON)) {
|
||||
sub_8068FE0(groudonEntity,0x21c,0);
|
||||
}
|
||||
else {
|
||||
sub_8072008(groudonEntity,groudonEntity,gGroudonConfigLevel,0,0);
|
||||
SetFacingDirection(groudonEntity, DIRECTION_SOUTH);
|
||||
sub_80861D4(groudonEntity,0xf,DIRECTION_SOUTH);
|
||||
}
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM);
|
||||
}
|
||||
|
||||
void sub_8088818(u8 param_1, u8 param_2)
|
||||
{
|
||||
if ((param_2 == 0x12 || param_2 == 0x13 || param_2 == 0x14) && (param_1 == 0xE)) {
|
||||
sub_8097FA8(0xC);
|
||||
gDungeon->unk2 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8088848(void)
|
||||
{
|
||||
sub_8086854();
|
||||
}
|
||||
|
||||
void GroudonPreFightDialogue(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * partnerEntity;
|
||||
Entity * alakazamEntity;
|
||||
Entity * groudonEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
partnerEntity = GetPartnerEntity();
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_1);
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2);
|
||||
sub_8086448();
|
||||
DisplayDungeonDialogue(GroudonPreFightDialogue_1);
|
||||
sub_803E708(10,0x46);
|
||||
sub_803E708(0x3c,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_2);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8086838(1,1,1);
|
||||
sub_808680C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
sub_808682C();
|
||||
sub_803E708(0x1e,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_3);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8086838(1,1,1);
|
||||
sub_808680C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_4);
|
||||
sub_803E708(10,0x46);
|
||||
GroudonScreenFlash();
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_5);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_6);
|
||||
sub_803E708(10,0x46);
|
||||
PlaySoundEffect(0x1d5);
|
||||
SpriteLookAroundEffect(partnerEntity);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_7);
|
||||
sub_803E708(10,0x46);
|
||||
sub_808682C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
sub_80861B8(alakazamEntity,6,DIRECTION_NORTH);
|
||||
PlaySoundEffect(0x205);
|
||||
sub_8086738();
|
||||
sub_8068FE0(alakazamEntity,0x21c,0);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_8);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_9);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_8086764();
|
||||
sub_803E708(0x28,0x46);
|
||||
PlaySoundEffect(0x1d5);
|
||||
SpriteLookAroundEffect(partnerEntity);
|
||||
DisplayDungeonDialogue(GroudonPreFightDialogue_10);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8086838(1,1,1);
|
||||
sub_808680C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
DisplayDungeonDialogue(GroudonPreFightDialogue_11);
|
||||
sub_803E708(10,0x46);
|
||||
DungeonStopBGM();
|
||||
GroudonScreenFlash2();
|
||||
sub_803E708(0x1e,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_12);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_13);
|
||||
sub_803E708(10,0x46);
|
||||
sub_803E708(0x1e,0x46);
|
||||
sub_808682C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
PlaySoundEffect(0x1fa);
|
||||
sub_8086738();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
DisplayDungeonDialogue(GroudonPreFightDialogue_14);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8086A54(groudonEntity);
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_8086764();
|
||||
SetupBossFightHP(groudonEntity,500,MUS_BOSS_BATTLE);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void GroudonReFightDialogue(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * groudonEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2);
|
||||
sub_8086838(1,1,1);
|
||||
sub_808680C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
DisplayDungeonDialogue(gGroudonReFightDialogue_1);
|
||||
sub_803E708(10,0x46);
|
||||
GroudonScreenFlash();
|
||||
sub_803E708(0x1e,0x46);
|
||||
DisplayDungeonDialogue(gGroudonReFightDialogue_2);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&gGroudonReFightDialogue_3);
|
||||
sub_803E708(10,0x46);
|
||||
sub_808682C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
DungeonStopBGM();
|
||||
PlaySoundEffect(0x1fa);
|
||||
sub_8086738();
|
||||
DisplayDungeonDialogue(gGroudonReFightDialogue_4);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8086A54(groudonEntity);
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_8086764();
|
||||
SetupBossFightHP(groudonEntity,500,MUS_BOSS_BATTLE);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void GroudonPostStoryPreFightDialogue(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * groudonEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2);
|
||||
sub_8086448();
|
||||
if (sub_8086AE4(MONSTER_GROUDON)) {
|
||||
sub_80866C4(&gUnknown_8103488);
|
||||
}
|
||||
else{
|
||||
DisplayDungeonDialogue(&gGroudonPostStoryPreFightDialogue_1);
|
||||
sub_803E708(10,0x46);
|
||||
SceneGroudonMovement(groudonEntity);
|
||||
SceneGroudonMovement(groudonEntity);
|
||||
DisplayDungeonDialogue(&gGroudonPostStoryPreFightDialogue_2);
|
||||
PlaySoundEffect(0x1f6);
|
||||
GroudonScreenFlash();
|
||||
DisplayDungeonDialogue(&gGroudonPostStoryPreFightDialogue_3);
|
||||
PlaySoundEffect(0x1f6);
|
||||
GroudonScreenFlash();
|
||||
DisplayDungeonDialogue(&gGroudonPostStoryPreFightDialogue_4);
|
||||
sub_803E708(10,0x46);
|
||||
SetupBossFightHP(groudonEntity,500,MUS_BOSS_BATTLE);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
}
|
||||
|
||||
// Moves Groudon down in a walking fashion
|
||||
void SceneGroudonMovement(Entity * groudonEntity)
|
||||
{
|
||||
int iVar1;
|
||||
|
||||
sub_8086848(0x18,0x10);
|
||||
sub_806CDD4(groudonEntity,0,DIRECTION_SOUTH);
|
||||
for(iVar1 = 0; iVar1 < 0x2C; iVar1++)
|
||||
{
|
||||
if ((iVar1 == 10) || (iVar1 == 0x20)) {
|
||||
PlaySoundEffect(0x1f9);
|
||||
sub_8086838(0,1,0);
|
||||
sub_808680C();
|
||||
}
|
||||
if ((iVar1 - 10U < 0xc) || (iVar1 > 0x1f)) {
|
||||
IncreaseEntityPixelPos(groudonEntity,0,0x100);
|
||||
}
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_80856C8(groudonEntity,groudonEntity->pos.x,groudonEntity->pos.y + 1);
|
||||
sub_80861D4(groudonEntity,0xf,DIRECTION_SOUTH);
|
||||
sub_803E708(10,0x46);
|
||||
sub_808682C();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_803E708(0x22,0x46);
|
||||
}
|
||||
|
||||
void GroudonScreenFlash(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
|
||||
for(iVar1 = 250; iVar1 > 0x95; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_803E708(10,0x46);
|
||||
|
||||
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1,iVar1 / 2,0,1,1);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_803E708(10,0x46);
|
||||
|
||||
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_803E708(10,0x46);
|
||||
sub_8085EB0();
|
||||
}
|
||||
|
||||
void GroudonScreenFlash2(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
|
||||
for(iVar1 = 250; iVar1 > 0x95; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_803E708(10,0x46);
|
||||
|
||||
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1,iVar1 / 2,0,1,1);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_803E708(10,0x46);
|
||||
|
||||
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_803E708(10,0x46);
|
||||
sub_8085EB0();
|
||||
}
|
||||
|
||||
// FILE SPLIT
|
||||
|
||||
|
||||
void sub_8088DC0(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * groudonEntity;
|
||||
Entity * alakazamEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_1);
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_2);
|
||||
sub_80867F4();
|
||||
sub_8086838(0,1,0);
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
sub_8086A3C(groudonEntity);
|
||||
sub_806CDD4(groudonEntity,0xe,DIRECTION_SOUTH);
|
||||
sub_8086A3C(alakazamEntity);
|
||||
sub_806CDD4(alakazamEntity,0xe,DIRECTION_SOUTH);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM);
|
||||
}
|
||||
|
||||
void sub_8088E5C(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * groudonEntity;
|
||||
Entity * alakazamEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_1);
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_2);
|
||||
sub_80867F4();
|
||||
sub_8086838(0,1,0);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
sub_8068FE0(groudonEntity,0x21c,0);
|
||||
sub_8068FE0(alakazamEntity,0x21c,0);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM);
|
||||
}
|
||||
|
||||
void sub_8088EE8(void)
|
||||
{
|
||||
sub_8086854();
|
||||
}
|
||||
|
||||
|
||||
void MagmaCavernMidDialogue(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * partnerEntity;
|
||||
Entity * groudonEntity;
|
||||
Entity * alakazamEntity;
|
||||
s16 IDStack [2];
|
||||
PixelPos pos;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
partnerEntity = GetPartnerEntity();
|
||||
groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_1);
|
||||
alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_2);
|
||||
sub_8052D44(IDStack,leaderEntity,partnerEntity);
|
||||
sub_8086448();
|
||||
SpriteLookAroundEffect(partnerEntity);
|
||||
// Let's see..
|
||||
// I wonder where we are?
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_1);
|
||||
sub_803E708(10,0x46);
|
||||
sub_80869E4(partnerEntity,4,1,DIRECTION_EAST);
|
||||
sub_80869E4(leaderEntity,4,2,DIRECTION_WEST);
|
||||
// I know we've come pretty
|
||||
// far...
|
||||
//
|
||||
// I'm certain we've come quite
|
||||
// far already..
|
||||
DisplayDungeonDialogue(MagmaCavernMidDialogue_2);
|
||||
sub_803E708(10,0x46);
|
||||
DungeonStopBGM();
|
||||
sub_80855E4(sub_80868F4);
|
||||
sub_808680C();
|
||||
PlaySoundEffect(0x1c5);
|
||||
sub_803E708(0x28,0x46);
|
||||
// Waaah!
|
||||
// Qu-quake!
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_3);
|
||||
sub_803E708(0x78,0x46);
|
||||
StopSoundEffect(0x1c5);
|
||||
sub_808682C();
|
||||
sub_80855E4(sub_8086910);
|
||||
sub_803E708(0x14,0x46);
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_803E708(10,0x46);
|
||||
// Whew!
|
||||
// It settled down.
|
||||
//
|
||||
// Whew
|
||||
// It's over.
|
||||
DisplayDungeonDialogue(MagmaCavernMidDialogue_4);
|
||||
sub_803E708(10,0x46);
|
||||
PlaySoundEffect(0x1d5);
|
||||
SpriteLookAroundEffect(partnerEntity);
|
||||
PlaySoundEffect(0x1c7);
|
||||
sub_80856E0(partnerEntity, DIRECTION_NORTH);
|
||||
// Hey! {POKEMON_0}!
|
||||
// Over there!
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_5);
|
||||
GetEntInfo(groudonEntity)->unk15E = 0;
|
||||
GetEntInfo(alakazamEntity)->unk15E =0;
|
||||
pos.x = (groudonEntity->pixelPos.x + alakazamEntity->pixelPos.x) / 2;
|
||||
pos.y = (groudonEntity->pixelPos.y + alakazamEntity->pixelPos.y) / 2 + 0x800;
|
||||
ShiftCameraToPosition(&pos,0x20);
|
||||
sub_803E708(0x3c,0x46);
|
||||
sub_80891F0();
|
||||
// Hey!
|
||||
// Are you OK?!
|
||||
//
|
||||
// Hey!
|
||||
// Snap out of it!
|
||||
DisplayDungeonDialogue(MagmaCavernMidDialogue_6);
|
||||
sub_803E708(10,0x46);
|
||||
// Urrrrgh...
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_7);
|
||||
sub_803E708(10,0x46);
|
||||
sub_80869E4(leaderEntity,4,2,DIRECTION_NORTHWEST);
|
||||
// What happened to you?
|
||||
//
|
||||
// What happened here?
|
||||
DisplayDungeonDialogue(MagmaCavernMidDialogue_8);
|
||||
sub_803E708(10,0x46);
|
||||
// We challenged..
|
||||
// {POKEMON_2}...
|
||||
// And wiped out..
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_9);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_10);
|
||||
sub_803E708(10,0x46);
|
||||
sub_80869E4(leaderEntity,4,1,DIRECTION_NORTHEAST);
|
||||
sub_80869E4(partnerEntity,4,1,DIRECTION_NORTHEAST);
|
||||
// Grrgh..
|
||||
// We... It crushed us
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_11);
|
||||
sub_803E708(10,0x46);
|
||||
PlaySoundEffect(0x1d5);
|
||||
SpriteLookAroundEffect(partnerEntity);
|
||||
// That's right...
|
||||
// What happened to {POKEMON_3}?
|
||||
// Where is {POKEMON_3}?
|
||||
//
|
||||
// Wait...
|
||||
// What about {POKEMON_3}?
|
||||
// Where did {POKEMON_3} go?
|
||||
DisplayDungeonDialogue(MagmaCavernMidDialogue_12);
|
||||
sub_803E708(0x1e,0x46);
|
||||
// {POKEMON_3} is...
|
||||
// Still battling {POKEMON_2}...
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_13);
|
||||
sub_803E708(10,0x46);
|
||||
sub_80869E4(partnerEntity,4,1,DIRECTION_EAST);
|
||||
sub_80869E4(leaderEntity,4,2,DIRECTION_WEST);
|
||||
|
||||
// {POKEMON_0}!
|
||||
// We've got to hurry!
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_14);
|
||||
sub_8089294();
|
||||
// Be careful!
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_15);
|
||||
sub_803E708(10,0x46);
|
||||
gDungeon->unk2 = 1;
|
||||
}
|
||||
|
||||
void sub_8089168(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
sub_8086448();
|
||||
sub_803E708(10,0x46);
|
||||
SpriteLookAroundEffect(leaderEntity);
|
||||
sub_803E708(10,0x46);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void sub_808919C(Entity *r0)
|
||||
{
|
||||
IncreaseEntityPixelPos(r0, 0, 0xfffffe00);
|
||||
}
|
||||
|
||||
void sub_80891B0(Entity *r0)
|
||||
{
|
||||
sub_806CDD4(r0, 0, DIRECTION_NORTH);
|
||||
GetEntInfo(r0)->unk15F = 1;
|
||||
}
|
||||
|
||||
|
||||
void sub_80891D0(Entity *r0)
|
||||
{
|
||||
sub_806CDD4(r0, 7, DIRECTION_NORTH);
|
||||
GetEntInfo(r0)->unk15F = 0;
|
||||
}
|
||||
|
||||
void sub_80891F0(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
|
||||
sub_80855E4(sub_80891B0);
|
||||
for(iVar1 = 0; iVar1 < 0x30; iVar1++)
|
||||
{
|
||||
sub_80855E4(sub_808919C);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_80855E4(sub_80891D0);
|
||||
}
|
||||
|
||||
void sub_8089224(Entity * entity)
|
||||
{
|
||||
s32 xPixelPos;
|
||||
|
||||
if (entity->pixelPos.y < 0x9001) {
|
||||
return;
|
||||
}
|
||||
xPixelPos = entity->pixelPos.x;
|
||||
|
||||
if(xPixelPos < 0xE400)
|
||||
{
|
||||
if(xPixelPos <= 0xB400)
|
||||
{
|
||||
// 0 - 0xB400
|
||||
IncreaseEntityPixelPos(entity, 0, 0xfffffe00);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 0xB401 - 0xE3FF
|
||||
IncreaseEntityPixelPos(entity, 0xfffffe00, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(xPixelPos < 0xFC00)
|
||||
{
|
||||
IncreaseEntityPixelPos(entity, 0, 0xfffffe00);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(xPixelPos <= 0x11400)
|
||||
{
|
||||
IncreaseEntityPixelPos(entity, 0x200, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
IncreaseEntityPixelPos(entity, 0, 0xfffffe00);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8089294(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
|
||||
sub_80855E4(sub_80891B0);
|
||||
for(iVar1 = 0; iVar1 <= 0x77; iVar1++)
|
||||
{
|
||||
sub_80855E4(sub_8089224);
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
sub_80855E4(sub_80891D0);
|
||||
}
|
||||
|
||||
void sub_80892C8(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * RayquazaEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
RayquazaEntity = GetEntityFromMonsterBehavior(BEHAVIOR_RAYQUAZA);
|
||||
DungeonStartNewBGM(MUS_RAYQUAZAS_DOMAIN);
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
SetFacingDirection(RayquazaEntity, DIRECTION_SOUTH);
|
||||
sub_8086A3C(RayquazaEntity);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2],MONSTER_RAYQUAZA);
|
||||
}
|
||||
|
||||
void sub_8089328(void)
|
||||
{
|
||||
Entity * leaderEntity;
|
||||
Entity * rayquazaEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
rayquazaEntity = GetEntityFromMonsterBehavior(BEHAVIOR_RAYQUAZA);
|
||||
DungeonStartNewBGM(MUS_RAYQUAZAS_DOMAIN);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
if (sub_8086AE4(MONSTER_RAYQUAZA)) {
|
||||
sub_8068FE0(rayquazaEntity,0x21c,0);
|
||||
}
|
||||
else {
|
||||
sub_8072008(rayquazaEntity,rayquazaEntity,gRayquazaConfigLevel,0,0);
|
||||
sub_8086A3C(rayquazaEntity);
|
||||
}
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2],MONSTER_RAYQUAZA);
|
||||
}
|
||||
|
||||
void sub_80893B4(u8 param_1, u8 param_2)
|
||||
{
|
||||
if ((param_2 == 0x17 || param_2 == 0x18 || param_2 == 0x19) && (param_1 == 0xF)) {
|
||||
sub_8097FA8(0xF);
|
||||
gDungeon->unk2 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void RayquazaPreFightDialogue(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
Entity *partnerEntity;
|
||||
Entity *rayquazaEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
partnerEntity = GetPartnerEntity();
|
||||
rayquazaEntity = GetEntityFromMonsterBehavior(BEHAVIOR_RAYQUAZA);
|
||||
sub_8086448();
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_1);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_2);
|
||||
sub_80856E0(partnerEntity, DIRECTION_NORTH);
|
||||
SpriteLookAroundEffect(partnerEntity);
|
||||
sub_803E708(10,0x46);
|
||||
sub_80869E4(partnerEntity,4,1,DIRECTION_EAST);
|
||||
sub_80869E4(leaderEntity,4,2,DIRECTION_WEST);
|
||||
DisplayDungeonDialogue(gRayquazaPreFightDialogue_3);
|
||||
sub_80869E4(partnerEntity,4,2,DIRECTION_NORTH);
|
||||
sub_80869E4(leaderEntity,4,1,DIRECTION_NORTH);
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_4);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_5);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_6);
|
||||
RayquazaScreenFlash();
|
||||
PlaySoundEffect(0x1da); // Rayquaza Cry
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_7);
|
||||
RayquazaDropInEffect(rayquazaEntity);
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_8);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_9);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_10);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_11);
|
||||
SetupBossFightHP(rayquazaEntity,600,MUS_BATTLE_WITH_RAYQUAZA);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void RayquazaReFightDialogue(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
Entity *rayquazaEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
rayquazaEntity = GetEntityFromMonsterBehavior(BEHAVIOR_RAYQUAZA);
|
||||
sub_8086448();
|
||||
RayquazaScreenFlash();
|
||||
PlaySoundEffect(0x1da); // Rayquaza Cry
|
||||
DisplayDungeonDialogue(&gRayquazaPreFightDialogue_7);
|
||||
sub_803E708(10,0x46);
|
||||
RayquazaDropInEffect(rayquazaEntity);
|
||||
DisplayDungeonDialogue(&gRayquazaReFightDialogue_1);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaReFightDialogue_2);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaReFightDialogue_3);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaReFightDialogue_4);
|
||||
SetupBossFightHP(rayquazaEntity,600,MUS_BATTLE_WITH_RAYQUAZA);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void RayquazaPostStoryPreFightDialogue(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
Entity *rayquazaEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
rayquazaEntity = GetEntityFromMonsterBehavior(BEHAVIOR_RAYQUAZA);
|
||||
sub_8086448();
|
||||
if (sub_8086AE4(MONSTER_RAYQUAZA)) {
|
||||
sub_80866C4(&gRayquazaPostStoryPreFightDialogue_6);
|
||||
}
|
||||
else {
|
||||
PlaySoundEffect(0x1da); // Rayquaza Cry
|
||||
DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_1);
|
||||
RayquazaDropInEffect(rayquazaEntity);
|
||||
DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_2);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_3);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_4);
|
||||
RayquazaScreenFlash();
|
||||
DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_5);
|
||||
SetupBossFightHP(rayquazaEntity,600,MUS_BOSS_BATTLE);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
}
|
||||
|
||||
void RayquazaDropInEffect(Entity *rayquazaEntity)
|
||||
{
|
||||
s24_8 iVar1;
|
||||
s24_8 iVar2;
|
||||
|
||||
GetEntInfo(rayquazaEntity)->unk15E = 0;
|
||||
iVar2 = IntToF248_2(200);
|
||||
iVar1 = IntToF248_2(6);
|
||||
PlaySoundEffect(0x1f8);
|
||||
while( 1 ) {
|
||||
iVar2.raw = iVar2.raw - iVar1.raw; // must be .raw
|
||||
iVar1 = F248_Sub(iVar1, FloatToF248_2(3./32.));
|
||||
if (F248LessThanFloat(iVar1, 0.08)) {
|
||||
iVar1 = FloatToF248(0.08);
|
||||
}
|
||||
if (F248LessThanInt(iVar2, 0)) break;
|
||||
GetEntInfo(rayquazaEntity)->unk174 = iVar2;
|
||||
DungeonRunFrameActions(0x46);
|
||||
}
|
||||
GetEntInfo(rayquazaEntity)->unk174 = IntToF248_2(0);
|
||||
}
|
||||
|
||||
void RayquazaScreenFlash(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
|
||||
PlaySoundEffect(0x1f6);
|
||||
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1 / 2, iVar1, iVar1 / 2, 1, 1);
|
||||
DungeonRunFrameActions(70);
|
||||
}
|
||||
sub_803E708(10,70);
|
||||
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1 / 2, iVar1, 0, 1, 1);
|
||||
DungeonRunFrameActions(70);
|
||||
}
|
||||
sub_803E708(10,70);
|
||||
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
|
||||
{
|
||||
SetDungeonBGColorRGB(iVar1 / 2, iVar1, iVar1 / 2, 1, 1);
|
||||
DungeonRunFrameActions(70);
|
||||
}
|
||||
sub_803E708(10,70);
|
||||
sub_8085EB0();
|
||||
}
|
||||
|
||||
|
||||
void sub_808970C(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
DungeonStartNewBGM(MUS_TINY_WOODS);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
sub_808563C(sub_8089908);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3);
|
||||
}
|
||||
|
||||
void sub_808974C(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
sub_808563C(sub_80898F8);
|
||||
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3);
|
||||
}
|
||||
|
||||
void sub_8089788(Entity *entity, u8 param_2, u8 param_3)
|
||||
{
|
||||
Entity *monEntity;
|
||||
s32 index;
|
||||
u32 unk1;
|
||||
|
||||
unk1 = 0;
|
||||
|
||||
if (param_3 == 0x1A || param_3 == 0x1B) {
|
||||
for(index = 0; index < DUNGEON_MAX_WILD_POKEMON; index++)
|
||||
{
|
||||
monEntity = gDungeon->wildPokemon[index];
|
||||
if ((EntityIsValid(monEntity)) && (monEntity != entity) && (GetEntInfo(monEntity)->monsterBehavior == param_2)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// WTF is this??
|
||||
if(!unk1){
|
||||
sub_8097FA8(0x11);
|
||||
gDungeon->unk2 = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80897F0(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
sub_8086448();
|
||||
sub_803E708(10,0x46);
|
||||
sub_808563C(SpriteShockEffect);
|
||||
sub_803E708(0x20,0x46);
|
||||
sub_808692C();
|
||||
DisplayDungeonDialogue(&gUnknown_8103BD8);
|
||||
// We don't like to brag or
|
||||
// nothing, but
|
||||
DisplayDungeonDialogue(&gUnknown_8103C00);
|
||||
// We get furious real easy
|
||||
// You know that?!
|
||||
DisplayDungeonDialogue(&gUnknown_8103C3C);
|
||||
// What really irritates us is
|
||||
// when we see some dim witted face
|
||||
DisplayDungeonDialogue(&gUnknown_8103C74);
|
||||
// .........
|
||||
// Wrooooooar!
|
||||
// That vacant expression
|
||||
DisplayDungeonDialogue(&gUnknown_8103CC4);
|
||||
// Gwoooh
|
||||
// It's ticking me off!
|
||||
// I'm seeing red!
|
||||
DisplayDungeonDialogue(&gUnknown_8103D0C);
|
||||
// Mukkkeeeeeh
|
||||
// Get 'em! It's frenzy time!
|
||||
DisplayDungeonDialogue(&gUnknown_8103D50);
|
||||
sub_803E708(10,0x46);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
// File split
|
||||
|
||||
|
||||
|
||||
void sub_8089878(void)
|
||||
{
|
||||
Entity *leaderEntity;
|
||||
// File split
|
||||
|
||||
leaderEntity = xxx_call_GetLeader();
|
||||
sub_8086448();
|
||||
sub_803E708(10,0x46);
|
||||
sub_808563C(SpriteShockEffect);
|
||||
sub_803E708(0x20,0x46);
|
||||
sub_808692C();
|
||||
DisplayDungeonDialogue(&gUnknown_8103D8C);
|
||||
DisplayDungeonDialogue(&gUnknown_8103D98);
|
||||
DisplayDungeonDialogue(&gUnknown_8103DD8);
|
||||
DisplayDungeonDialogue(&gUnknown_8103E28);
|
||||
sub_803E708(10,0x46);
|
||||
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
|
||||
}
|
||||
|
||||
void sub_80898E4(void)
|
||||
{
|
||||
sub_8086448();
|
||||
sub_80866C4(&gUnknown_8103E34);
|
||||
}
|
||||
|
||||
void sub_80898F8(Entity *r0)
|
||||
{
|
||||
sub_8068FE0(r0, 0x21C, 0);
|
||||
}
|
||||
|
||||
void sub_8089908(Entity *r0)
|
||||
{
|
||||
SetFacingDirection(r0, DIRECTION_NORTH);
|
||||
}
|
||||
// File split
|
||||
|
||||
void sub_8089914(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user