clean up some file splits

This commit is contained in:
DizzyEggg 2025-10-27 14:34:30 +01:00
parent a558376692
commit 25aaa28330
31 changed files with 380 additions and 484 deletions

View File

@ -1,9 +1,6 @@
.section .rodata
@ ???
.string "pksdir0\0"
@ ???
.string "pksdir0\0"
@ ???
.string "pksdir0\0"
@ ???.c

View File

@ -1,5 +1,3 @@
.section .rodata
.string "pksdir0\0"
.string "pksdir0\0"
.align 2,0

View File

@ -1,7 +1,8 @@
#ifndef GUARD_CODE_8097670_H
#define GUARD_CODE_8097670_H
#ifndef GUARD_ADVENTURE_INFO_H
#define GUARD_ADVENTURE_INFO_H
#include "structs/str_dungeon.h"
#include "structs/str_dungeon_location.h"
#include "data_serializer.h"
// See gAdventureLogText
enum AdventureAchievement
@ -60,28 +61,32 @@ struct unkStruct_203B494
extern struct unkStruct_203B494 *gUnknown_203B494;
const u8 *GetAdventureLogLine(u8 index);
DungeonLocation *GetDungeonLocationInfo(void);
s32 GetNumAdventures(void);
void ResetNumAdventures(void);
void sub_8097670(void);
struct unkStruct_203B494 *sub_8097680(void);
void SetDungeonLocationInfo(DungeonLocation *dl);
DungeonLocation *GetDungeonLocationInfo(void);
void ResetAdventureInfo(void);
void SetAdventureAchievement(u8);
bool8 GetAdventureAchievement(u8);
const u8 *GetAdventureLogLine(u8 index);
void ResetNumAdventures(void);
void IncrementNumAdventures(void);
s32 GetNumAdventures(void);
void IncrementFriendRescueSuccesses(void);
s32 GetFriendRescueSuccesses(void);
void IncrementNumEvolved(void);
s32 GetAdventureNumEvolved(void);
void IncrementThievingSuccesses(void);
s16 GetThievingSuccesses(void);
void IncrementAdventureNumJoined(void);
s16 GetAdventureNumJoined(void);
s16 GetAdventureMovesLearned(void);
void IncrementAdventureFloorsExplored(void);
s16 GetAdventureFloorsExplored(void);
void sub_80978C8(s16 pokeIndex);
bool8 sub_8097900(s16 pokeIndex);
void UpdateAdventureAchievements(void);
u32 SaveAdventureData(u8 *r0, u32 size);
u32 RestoreAdventureData(u8 *r0, u32 size);
void SetDungeonLocationInfo(DungeonLocation *dl);
void WriteAdventureBits(DataSerializer *r0);
void ReadAdventureBits(DataSerializer *r0);
#endif // GUARD_CODE_8097670_H
#endif // GUARD_ADVENTURE_INFO_H

7
include/adventure_save.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef GUARD_ADVENTURE_SAVE_H
#define GUARD_ADVENTURE_SAVE_H
u32 SaveAdventureData(u8 *buffer, u32 bufLen);
u32 RestoreAdventureData(u8 *buffer, u32 bufLen);
#endif // GUARD_ADVENTURE_SAVE_H

View File

@ -1,78 +1,9 @@
#ifndef INCLUDE_FRIEND_LIST_MENU_H
#define INCLUDE_FRIEND_LIST_MENU_H
#include "structs/menu.h"
#include "structs/str_items.h"
#include "structs/str_moves.h"
#include "structs/str_pokemon.h"
// there might be more overlap with unkStruct_203B2BC
// I was working on the moves and put the data that seemed to correspond to that
// into a separate struct
typedef struct unkStruct_203B2B4
{
// size: 0x178
s32 unk0;
s32 state;
u32 fallbackState;
u8 unkC; // friend Area
u8 unkD; // friend Area
s16 species;
u32 itemIndex;
BulkItem item1;
BulkItem item2;
/* 0x1C */ Pokemon *pokeStruct;
u32 moveIndex; // some sort of move index
u16 moveID;
Move moves[8];
u16 moveIDs[4]; // some list of move IDs
u32 menuAction1;
s32 menuAction2;
MenuStruct unk78;
MenuItem unkC8[8];
u16 unk108[8];
WindowTemplates unk118;
} unkStruct_203B2B4;
bool8 CreateFriendListMenu(s32 param_1);
u32 sub_8025354(void);
u8 sub_802540C(void);
void CleanFriendListMenu(void);
enum FriendListMenuStates {
// 0
// 1
// 2
// 3
FRIEND_LIST_MENU_STATE_SUMMARY = 4,
FRIEND_LIST_MENU_STATE_CHECK_IQ = 5,
FRIEND_LIST_MENU_STATE_STANDBY = 7,
FRIEND_LIST_MENU_STATE_ITEM_GIVEN = 8,
FRIEND_LIST_MENU_STATE_ITEM_EXCHANGE = 9,
FRIEND_LIST_MENU_STATE_TAKE = 0xA,
FRIEND_LIST_MENU_STATE_GIVE = 0xB,
// 0xC
// 0xD
FRIEND_LIST_MENU_STATE_INFO = 0xE,
FRIEND_LIST_MENU_STATE_MOVES = 0xF,
// 0x10
// 0x11
// 0x12
FRIEND_LIST_MENU_STATE_EXIT = 0x13
};
enum FriendListMenuActions {
FRIEND_LIST_MENU_NULL = 1,
FRIEND_LIST_MENU_INFO = 4,
FRIEND_LIST_MENU_SUMMARY = 4,
FRIEND_LIST_MENU_CHECK_IQ = 5,
FRIEND_LIST_MENU_MOVES,
FRIEND_LIST_MENU_VISIT,
// 8
FRIEND_LIST_MENU_STANDBY = 9,
FRIEND_LIST_MENU_GIVE = 0xA,
FRIEND_LIST_MENU_TAKE,
};
#endif

View File

@ -1,92 +1,9 @@
#ifndef GUARD_PARTY_LIST_MENU_H
#define GUARD_PARTY_LIST_MENU_H
#include "constants/move.h"
#include "items.h"
#include "structs/menu.h"
#include "pokemon.h"
#include "structs/str_text.h"
// size: 0x280
typedef struct unkStruct_203B2B8
{
/* 0x0 */ s32 state;
/* 0x4 */ s32 fallbackState;
bool8 unk8;
/* 0xA */ s16 pokeSpecies;
/* 0xC */ u32 id;
/* 0x10 */ BulkItem item1;
/* 0x14 */ BulkItem item2;
/* 0x18 */ Pokemon *pokeStruct;
/* 0x1C */ bool8 isTeamLeader;
/* 0x20 */ u32 moveIndex;
/* 0x24 */ u16 moveID;
/* 0x28 */ Move moves[8];
/* 0x68 */ u16 moveIDs[4]; // some list of move IDs
/* 0x70 */ u32 menuAction1;
/* 0x74 */ u32 menuAction2;
/* 0x78 */ u32 menuAction3; // unused
MenuStruct unk7C;
MenuStruct unkCC;
MenuStruct unk11C; // unused
MenuItem unk16C[10];
MenuItem unk1BC[10];
u16 unk20C[10];
WindowTemplates unk220;
} unkStruct_203B2B8;
bool8 CreatePartyListMenu(Pokemon *pokeStruct);
u32 sub_8025F68(void);
bool8 sub_802604C(void);
void CleanPartyListMenu(void);
enum PartyListMenuStates
{
PARTY_LIST_STATE_INIT,
PARTY_LIST_STATE_MAIN_MENU,
PARTY_LIST_STATE_MAIN_MENU_1,
PARTY_LIST_STATE_SUMMARY = 3,
PARTY_LIST_STATE_CHECK_IQ = 4,
PARTY_LIST_STATE_JOIN_TEAM = 5,
PARTY_LIST_STATE_STANDBY = 6,
PARTY_LIST_STATE_MAKE_LEADER = 7,
PARTY_LIST_STATE_POKEMON_FAREWELL = 8,
// 9
// 0xA
// 0xB
PARTY_LIST_STATE_SAY_FAREWELL = 0xC,
PARTY_LIST_STATE_CONFIRM_SAY_FAREWELL = 0xD,
PARTY_LIST_STATE_GIVE_GUMMI = 0xe,
PARTY_LIST_STATE_GIVEN_ITEM = 0xF,
PARTY_LIST_STATE_GIVEN_ITEM_HELD_ITEM = 0x10,
PARTY_LIST_STATE_TAKE_ITEM = 0x11,
PARTY_LIST_STATE_GIVE_ITEM = 0x12,
PARTY_LIST_STATE_GIVE_ITEM_1 = 0x13,
// 0x14
// 0x15
PARTY_LIST_STATE_MOVES = 0x16,
// 0x17
// 0x18
PARTY_LIST_STATE_EXIT = 0x19,
};
enum PartyListMenuActions
{
PARTY_LIST_MENU_NULL = 1,
PARTY_LIST_MENU_YES,
PARTY_LIST_MENU_NO,
PARTY_LIST_MENU_INFO = 4,
PARTY_LIST_MENU_SUMMARY = 4,
PARTY_LIST_MENU_CHECK_IQ,
PARTY_LIST_MENU_JOIN_TEAM,
PARTY_LIST_MENU_STANDBY,
PARTY_LIST_MENU_MAKE_LEADER,
PARTY_LIST_MENU_SAY_FAREWELL,
PARTY_LIST_MENU_GIVE_GUMMI,
PARTY_LIST_MENU_GIVE_ITEM,
PARTY_LIST_MENU_TAKE_ITEM,
PARTY_LIST_MENU_MOVES,
};
#endif // GUARD_PARTY_LIST_MENU_H

View File

@ -1,6 +1,8 @@
#ifndef GUARD_PLAY_TIME_H
#define GUARD_PLAY_TIME_H
#include "data_serializer.h"
struct PlayTimeStruct
{
s16 hours;
@ -13,12 +15,13 @@ struct PlayTimeStruct
extern struct PlayTimeStruct *gPlayTimeRef;
extern struct PlayTimeStruct gPlayTime;
void IncrementPlayTime(struct PlayTimeStruct *Time);
void ResetPlayTime(struct PlayTimeStruct *Time);
struct PlayTimeStruct *GetPlayTime(void);
void DeconstructPlayTime(struct PlayTimeStruct *r0, u32 *outHours, u32 *outMinutes, u32 *outSeconds);
void InitializePlayTime(void);
struct PlayTimeStruct *GetPlayTime(void);
void ResetPlayTime(struct PlayTimeStruct *Time);
void IncrementPlayTime(struct PlayTimeStruct *Time);
void DeconstructPlayTime(struct PlayTimeStruct *r0, u32 *outHours, u32 *outMinutes, u32 *outSeconds);
void WritePlayTimeBits(DataSerializer *r0);
void ReadPlayTimeBits(DataSerializer *r0);
#endif // GUARD_PLAY_TIME_H
#endif // GUARD_PLAY_TIME_H

View File

@ -327,7 +327,8 @@ SECTIONS {
src/code_80958E8.o(.text);
src/code_80972F4.o(.text);
src/code_8097504.o(.text);
src/code_8097670.o(.text);
src/adventure_info.o(.text);
src/adventure_save.o(.text);
src/code_8097DD0.o(.text);
src/code_8097F40.o(.text);
src/exclusive_pokemon.o(.text);
@ -715,6 +716,8 @@ SECTIONS {
src/code_80958E8.o(.rodata);
src/code_80972F4.o(.rodata);
src/code_8097504.o(.rodata);
src/adventure_info.o(.rodata);
src/adventure_save.o(.rodata);
data/data_8109D10.o(.rodata);
src/dungeon_data.o(.rodata);
src/exclusive_pokemon.o(.rodata);

View File

@ -1,21 +1,17 @@
#include "global.h"
#include "code_8097670.h"
#include "exclusive_pokemon.h"
#include "globaldata.h"
#include "adventure_info.h"
#include "pokemon.h"
#include "pokemon_3.h"
#include "friend_area.h"
#include "moves.h"
#include "strings.h"
#include "dungeon_info.h"
#include "game_options.h"
static EWRAM_DATA struct unkStruct_203B494 sUnknown_2039778 = {0};
EWRAM_INIT struct unkStruct_203B494 *gUnknown_203B494 = { NULL }; // NDS=20EB98C
void ReadPlayTimeBits(DataSerializer *r0);
void WritePlayTimeBits(DataSerializer *r0);
void sub_8097670(void)
{
gUnknown_203B494 = &sUnknown_2039778;
@ -180,32 +176,15 @@ s16 GetAdventureFloorsExplored(void)
void sub_80978C8(s16 pokeIndex)
{
s32 iVar2;
struct unkStruct_203B494 *preload;
s32 baseSpecies;
baseSpecies = GetBaseSpeciesNoUnown(pokeIndex);
preload = gUnknown_203B494;
iVar2 = baseSpecies;
if (baseSpecies < 0)
iVar2 = baseSpecies + 0x1F; // 0b11111
preload->unk54[iVar2 >> 5] |= 1 << (baseSpecies + (iVar2 >> 5) * -32);
s32 baseSpecies = GetBaseSpeciesNoUnown(pokeIndex);
gUnknown_203B494->unk54[baseSpecies / 32] |= 1 << (baseSpecies % 32);
}
bool8 sub_8097900(s16 pokeIndex)
{
s32 iVar2;
struct unkStruct_203B494 *preload;
s32 baseSpecies;
s32 baseSpecies = GetBaseSpeciesNoUnown(pokeIndex);
baseSpecies = GetBaseSpeciesNoUnown(pokeIndex);
preload = gUnknown_203B494;
iVar2 = baseSpecies;
if (baseSpecies < 0)
iVar2 = baseSpecies + 0x1F; // 0b11111
if (preload->unk1C[iVar2 >> 5] & (1 << (baseSpecies + (iVar2 >> 5) * -32)))
if (gUnknown_203B494->unk1C[baseSpecies / 32] & (1 << (baseSpecies % 32)))
return TRUE;
return FALSE;
}
@ -328,7 +307,7 @@ void UpdateAdventureAchievements(void)
}
}
static void WriteAdventureBits(DataSerializer *r0)
void WriteAdventureBits(DataSerializer *r0)
{
UpdateAdventureAchievements();
WriteBits(r0, &gUnknown_203B494->numAdventures, 17);
@ -345,7 +324,7 @@ static void WriteAdventureBits(DataSerializer *r0)
WriteDungeonLocationBits(r0, &gUnknown_203B494->dungeonLocation);
}
static void ReadAdventureBits(DataSerializer *r0)
void ReadAdventureBits(DataSerializer *r0)
{
ReadBits(r0, &gUnknown_203B494->numAdventures, 17);
ReadBits(r0, &gUnknown_203B494->friendRescueSuccesses, 17);
@ -360,33 +339,3 @@ static void ReadAdventureBits(DataSerializer *r0)
ReadBits(r0, gUnknown_203B494->learnedMoves, ARRAY_COUNT_INT(gUnknown_203B494->learnedMoves) * 32);
ReadDungeonLocationBits(r0, &gUnknown_203B494->dungeonLocation);
}
u32 SaveAdventureData(u8 *buffer, u32 bufLen)
{
DataSerializer seri;
InitBitWriter(&seri, buffer, bufLen);
WriteGameOptionsBits(&seri);
WritePlayTimeBits(&seri);
WriteAdventureBits(&seri);
WriteExclusivePokemon(&seri);
FinishBitSerializer(&seri);
return seri.count;
}
u32 RestoreAdventureData(u8 *buffer, u32 bufLen)
{
DataSerializer seri;
InitBitReader(&seri, buffer, bufLen);
ReadGameOptionsBits(&seri);
ReadPlayTimeBits(&seri);
ReadAdventureBits(&seri);
ReadExclusivePokemon(&seri);
FinishBitSerializer(&seri);
return seri.count;
}

View File

@ -4,7 +4,7 @@
#include "text_3.h"
#include "adventure_log.h"
#include "music_util.h"
#include "code_8097670.h"
#include "adventure_info.h"
#include "input.h"
#include "memory.h"
#include "menu_input.h"

37
src/adventure_save.c Normal file
View File

@ -0,0 +1,37 @@
#include "global.h"
#include "globaldata.h"
#include "adventure_info.h"
#include "data_serializer.h"
#include "play_time.h"
#include "game_options.h"
#include "exclusive_pokemon.h"
u32 SaveAdventureData(u8 *buffer, u32 bufLen)
{
DataSerializer seri;
InitBitWriter(&seri, buffer, bufLen);
WriteGameOptionsBits(&seri);
WritePlayTimeBits(&seri);
WriteAdventureBits(&seri);
WriteExclusivePokemon(&seri);
FinishBitSerializer(&seri);
return seri.count;
}
u32 RestoreAdventureData(u8 *buffer, u32 bufLen)
{
DataSerializer seri;
InitBitReader(&seri, buffer, bufLen);
ReadGameOptionsBits(&seri);
ReadPlayTimeBits(&seri);
ReadAdventureBits(&seri);
ReadExclusivePokemon(&seri);
FinishBitSerializer(&seri);
return seri.count;
}

View File

@ -3,7 +3,7 @@
#include "constants/friend_area.h"
#include "constants/main_menu.h"
#include "constants/move_id.h"
#include "code_8097670.h"
#include "adventure_info.h"
#include "debug_menu1.h"
#include "friend_area.h"
#include "input.h"

View File

@ -62,8 +62,7 @@
#include "dungeon_entity_movement.h"
#include "dungeon_8041AD0.h"
#include "status_checks.h"
void sub_80978C8(s16 a0);
#include "adventure_info.h"
static EWRAM_DATA bool8 sInDiagonalMode = 0;
static EWRAM_DATA bool8 sInRotateMode = 0;

View File

@ -10,7 +10,7 @@
#include "music_util.h"
#include "dungeon_message.h"
#include "dungeon_mon_sprite_render.h"
#include "code_8097670.h"
#include "adventure_info.h"
#include "dungeon_info.h"
#include "dungeon_items.h"
#include "dungeon_logic.h"
@ -30,8 +30,7 @@
#include "string_format.h"
#include "dungeon_mon_spawn.h"
#include "move_orb_effects_5.h"
extern bool8 sub_8097900(s16 pokeIndex);
#include "adventure_info.h"
static void nullsub_96(Entity *pokemon,Entity *target);
static void sub_806F910(void);

View File

@ -12,7 +12,7 @@
#include "other_random.h"
#include "friend_area.h"
#include "code_80972F4.h"
#include "code_8097670.h"
#include "adventure_info.h"
#include "pokemon.h"
#include "pokemon_3.h"
#include "ground_place.h"

View File

@ -36,32 +36,21 @@ void InitializeExclusivePokemon(void)
void sub_8097FA8(u8 param_1)
{
gUnknown_203B498->unk48[param_1 >> 5] |= 1 << ((param_1 & 0x1f));
gUnknown_203B498->unk48[param_1 / 32] |= 1 << ((param_1 % 32));
}
void sub_8097FD0(u8 param_1)
{
gUnknown_203B498->unk3C[param_1 >> 5] |= 1 << ((param_1 & 0x1f));
gUnknown_203B498->unk3C[param_1 / 32] |= 1 << ((param_1 % 32));
}
void sub_8097FF8(void)
{
s32 iVar1;
s32 index;
struct ExclusivePokemonData *ptr;
for(index = 0; index < 0x40; index++)
{
ptr = gUnknown_203B498;
if (index < 0) {
iVar1 = index + 0x1f;
}
else
{
iVar1 = index;
}
if ((ptr->unk48[iVar1 >> 5] & (1 << (index - ((iVar1 >> 5) * 0x20)))) != 0) {
ptr->unk3C[iVar1 >> 5] |= (1 << (index - ((iVar1 >> 5) * 0x20)));
for (index = 0; index < 0x40; index++) {
if ((gUnknown_203B498->unk48[index / 32] & (1 << (index % 32))) != 0) {
gUnknown_203B498->unk3C[index / 32] |= (1 << (index % 32));
}
}
sub_8098080();
@ -69,8 +58,8 @@ void sub_8097FF8(void)
void sub_8098044(u8 param_1)
{
gUnknown_203B498->unk3C[param_1 >> 5] &= ~(1 << (((param_1 & 0x1f))));
gUnknown_203B498->unk48[param_1 >> 5] &= ~(1 << (((param_1 & 0x1f))));
gUnknown_203B498->unk3C[param_1 / 32] &= ~(1 << (((param_1 % 32))));
gUnknown_203B498->unk48[param_1 / 32] &= ~(1 << (((param_1 % 32))));
}
void sub_8098080(void)
@ -92,39 +81,26 @@ u8 sub_80980A4(void)
void sub_80980B4(s16 pokeID)
{
s32 index;
s32 pokeID_s32;
s32 pokeID_s32_1;
struct ExclusivePokemonData *ptr;
s32 pokeID_s32 = pokeID;
s32 pokeID_s32_1 = pokeID_s32;
if (pokeID_s32 == MONSTER_DECOY)
return;
if (pokeID_s32 == MONSTER_STATUE)
return;
if (pokeID_s32 == MONSTER_RAYQUAZA_CUTSCENE)
return;
pokeID_s32 = pokeID;
pokeID_s32_1 = pokeID_s32;
if (pokeID_s32 != MONSTER_DECOY)
{
if(pokeID_s32 != MONSTER_STATUE)
{
if(pokeID_s32 != MONSTER_RAYQUAZA_CUTSCENE) {
ptr = gUnknown_203B498;
index = pokeID_s32;
if (pokeID_s32 < 0) {
index = pokeID_s32 + 0x1f;
}
ptr->unk4[index >> 5] |= 1 << (s16)((pokeID_s32_1 - (index >> 5) * 0x20));
}
}
}
gUnknown_203B498->unk4[pokeID_s32 / 32] |= 1 << (s16)(pokeID_s32_1 % 32);
}
bool8 sub_8098100(u8 param_1)
{
u32 index = param_1;
if (index > 0x3f) {
if (param_1 > 0x3f) {
return FALSE;
}
else
{
return (gUnknown_203B498->unk3C[param_1 >> 0x5] & (1 << (index & 0x1f))) != 0;
return (gUnknown_203B498->unk3C[param_1 / 32] & (1 << (param_1 % 32))) != 0;
}
}
@ -135,12 +111,12 @@ bool8 sub_8098134(s16 pokeID)
pokeID_s32 = pokeID;
pokeID_s32_1 = pokeID_s32;
return ((gUnknown_203B498->unk4[pokeID_s32 / 32] & (1 << (s16)(pokeID_s32_1 - ((pokeID_s32 / 32) * 0x20)))) != 0);
return ((gUnknown_203B498->unk4[pokeID_s32 / 32] & (1 << (s16)(pokeID_s32_1 % 32))) != 0);
}
void SetTutorialFlag(s32 index)
{
gUnknown_203B498->unk54[index / 32] |= (1 << (index - ((index / 32) * 32)));
gUnknown_203B498->unk54[index / 32] |= (1 << (index % 32));
}
bool32 GetTutorialFlag(s32 index)
@ -149,7 +125,7 @@ bool32 GetTutorialFlag(s32 index)
return FALSE;
}
else {
return (((gUnknown_203B498->unk54[index / 32]) & (1 << (index - ((index / 32) * 32)))) != 0);
return (((gUnknown_203B498->unk54[index / 32]) & (1 << (index % 32))) != 0);
}
}
@ -224,39 +200,32 @@ void WriteExclusivePokemon(DataSerializer *r0)
void ReadExclusivePokemon(DataSerializer *r0)
{
s32 index;
u8 stack_0;
u8 stack_1;
u8 stack_2;
u8 stack_3;
memset(gUnknown_203B498, 0, sizeof(struct ExclusivePokemonData));
ReadBits(r0, gUnknown_203B498, 1);
for(index = 0; index < MONSTER_MAX; index++)
{
for (index = 0; index < MONSTER_MAX; index++) {
u8 stack_0;
ReadBits(r0, &stack_0, 1);
if(stack_0)
sub_80980B4(index);
}
for(index = 0; index < 64; index++)
{
for (index = 0; index < 64; index++) {
u8 stack_1;
ReadBits(r0, &stack_1, 1);
if(stack_1)
sub_8097FA8(index);
}
for(index = 0; index < 31; index++)
{
for (index = 0; index < 31; index++) {
u8 stack_2;
ReadBits(r0, &stack_2, 1);
if(stack_2)
SetTutorialFlag(index);
}
for(index = 0; index < NUM_EXCLUSIVE_POKEMON; index++)
{
for (index = 0; index < NUM_EXCLUSIVE_POKEMON; index++) {
u8 stack_3;
ReadBits(r0, &stack_3, 1);
do; while(0); // do/while needed for matching - jiang
gUnknown_203B498->Exclusives[index] = 1 & stack_3;
gUnknown_203B498->Exclusives[index] = (stack_3 & 1) != 0;
}
sub_8097FF8();
}

View File

@ -1,5 +1,6 @@
#include "global.h"
#include "globaldata.h"
#include "friend_list_menu.h"
#include "constants/dungeon.h"
#include "music_util.h"
#include "code_801602C.h"
@ -11,7 +12,6 @@
#include "code_8099360.h"
#include "common_strings.h"
#include "event_flag.h"
#include "friend_list_menu.h"
#include "ground_map.h"
#include "input.h"
#include "iq_skill_menu.h"
@ -27,31 +27,92 @@
#include "text_2.h"
#include "unk_ds_only_feature.h"
EWRAM_INIT unkStruct_203B2B4 *gUnknown_203B2B4 = {NULL};
// there might be more overlap with unkStruct_203B2BC
// I was working on the moves and put the data that seemed to correspond to that
// into a separate struct
typedef struct unkStruct_203B2B4
{
// size: 0x178
s32 unk0;
s32 state;
u32 fallbackState;
u8 unkC; // friend Area
u8 unkD; // friend Area
s16 species;
u32 itemIndex;
BulkItem item1;
BulkItem item2;
/* 0x1C */ Pokemon *pokeStruct;
u32 moveIndex; // some sort of move index
u16 moveID;
Move moves[8];
u16 moveIDs[4]; // some list of move IDs
u32 menuAction1;
s32 menuAction2;
MenuStruct unk78;
MenuItem unkC8[8];
u16 unk108[8];
WindowTemplates unk118;
} unkStruct_203B2B4;
static EWRAM_INIT unkStruct_203B2B4 *gUnknown_203B2B4 = {NULL};
#include "data/friend_list_menu.h"
extern s32 sub_80144A4(s32 *);
static void SetFriendListMenuState(s32);
static void sub_802544C(void);
static void sub_8025518(void);
static void sub_8025728(void);
static void sub_802591C(void);
static void sub_80259F0(void);
static void sub_8025A84(void);
static void sub_8025BCC(void);
static void sub_8025BE8(void);
static void sub_8025C04(void);
static void sub_8025CB4(void);
static void sub_8025D90(void);
static void sub_8025DAC(void);
static void sub_8025E08(void);
static void sub_8025E24(void);
static void FriendListMenu_GotoFallbackState(void);
static void sub_8025E68(u32 , BulkItem *);
static bool8 FriendListMenu_isOnTeam(Pokemon *);
void SetFriendListMenuState(s32);
void sub_802544C(void);
void sub_8025518(void);
void sub_8025728(void);
void sub_802591C(void);
void sub_80259F0(void);
void sub_8025A84(void);
void sub_8025BCC(void);
void sub_8025BE8(void);
void sub_8025C04(void);
void sub_8025CB4(void);
void sub_8025D90(void);
void sub_8025DAC(void);
void sub_8025E08(void);
void sub_8025E24(void);
void FriendListMenu_GotoFallbackState(void);
void sub_8025E68(u32 , BulkItem *);
bool8 FriendListMenu_isOnTeam(Pokemon *);
enum FriendListMenuStates {
// 0
// 1
// 2
// 3
FRIEND_LIST_MENU_STATE_SUMMARY = 4,
FRIEND_LIST_MENU_STATE_CHECK_IQ = 5,
FRIEND_LIST_MENU_STATE_STANDBY = 7,
FRIEND_LIST_MENU_STATE_ITEM_GIVEN = 8,
FRIEND_LIST_MENU_STATE_ITEM_EXCHANGE = 9,
FRIEND_LIST_MENU_STATE_TAKE = 0xA,
FRIEND_LIST_MENU_STATE_GIVE = 0xB,
// 0xC
// 0xD
FRIEND_LIST_MENU_STATE_INFO = 0xE,
FRIEND_LIST_MENU_STATE_MOVES = 0xF,
// 0x10
// 0x11
// 0x12
FRIEND_LIST_MENU_STATE_EXIT = 0x13
};
enum FriendListMenuActions {
FRIEND_LIST_MENU_NULL = 1,
FRIEND_LIST_MENU_INFO = 4,
FRIEND_LIST_MENU_SUMMARY = 4,
FRIEND_LIST_MENU_CHECK_IQ = 5,
FRIEND_LIST_MENU_MOVES,
FRIEND_LIST_MENU_VISIT,
// 8
FRIEND_LIST_MENU_STANDBY = 9,
FRIEND_LIST_MENU_GIVE = 0xA,
FRIEND_LIST_MENU_TAKE,
};
bool8 CreateFriendListMenu(s32 param_1)
{
@ -126,21 +187,17 @@ u8 sub_802540C(void)
void CleanFriendListMenu(void)
{
if(gUnknown_203B2B4 != NULL)
{
MemoryFree(gUnknown_203B2B4);
gUnknown_203B2B4 = NULL;
}
TRY_FREE_AND_SET_NULL(gUnknown_203B2B4);
}
void SetFriendListMenuState(s32 newState)
static void SetFriendListMenuState(s32 newState)
{
gUnknown_203B2B4->state = newState;
sub_802544C();
sub_8025518();
}
void sub_802544C(void)
static void sub_802544C(void)
{
s32 i;
@ -171,7 +228,7 @@ void sub_802544C(void)
ShowWindows(&gUnknown_203B2B4->unk118, TRUE, TRUE);
}
void sub_8025518(void)
static void sub_8025518(void)
{
u32 uVar3;
Item item;
@ -257,7 +314,7 @@ void sub_8025518(void)
}
}
void sub_8025728(void)
static void sub_8025728(void)
{
int index;
Pokemon *pokeStruct;
@ -330,7 +387,7 @@ void sub_8025728(void)
}
}
void sub_802591C(void)
static void sub_802591C(void)
{
int index;
s32 loopMax = 0;
@ -368,7 +425,7 @@ void sub_802591C(void)
}
}
void sub_80259F0(void)
static void sub_80259F0(void)
{
switch(FriendList_HandleInput(TRUE))
{
@ -391,7 +448,7 @@ void sub_80259F0(void)
}
}
void sub_8025A84(void)
static void sub_8025A84(void)
{
s32 menuAction = 0;
@ -452,7 +509,7 @@ void sub_8025A84(void)
}
}
void sub_8025BCC(void)
static void sub_8025BCC(void)
{
switch(sub_80244E4())
{
@ -467,7 +524,7 @@ void sub_8025BCC(void)
}
}
void sub_8025BE8(void)
static void sub_8025BE8(void)
{
switch(sub_801BF48())
{
@ -482,7 +539,7 @@ void sub_8025BE8(void)
}
}
void sub_8025C04(void)
static void sub_8025C04(void)
{
switch(sub_801A6E8(TRUE))
{
@ -509,7 +566,7 @@ void sub_8025C04(void)
}
}
void sub_8025CB4(void)
static void sub_8025CB4(void)
{
u32 nextState;
s32 menuAction;
@ -554,7 +611,7 @@ void sub_8025CB4(void)
}
}
void sub_8025D90(void)
static void sub_8025D90(void)
{
switch(sub_801B410())
{
@ -568,7 +625,7 @@ void sub_8025D90(void)
}
}
void sub_8025DAC(void)
static void sub_8025DAC(void)
{
switch(sub_801EF38(1))
{
@ -590,7 +647,7 @@ void sub_8025DAC(void)
}
}
void sub_8025E08(void)
static void sub_8025E08(void)
{
switch(sub_801F890())
{
@ -604,7 +661,7 @@ void sub_8025E08(void)
}
}
void sub_8025E24(void)
static void sub_8025E24(void)
{
switch(sub_8016080())
{
@ -617,7 +674,7 @@ void sub_8025E24(void)
}
}
void FriendListMenu_GotoFallbackState(void)
static void FriendListMenu_GotoFallbackState(void)
{
s32 local;
if(sub_80144A4(&local) == 0)
@ -626,7 +683,7 @@ void FriendListMenu_GotoFallbackState(void)
}
}
void sub_8025E68(u32 r0, BulkItem *heldItem)
static void sub_8025E68(u32 r0, BulkItem *heldItem)
{
Item item;
struct unkStruct_8090F58 a3;
@ -643,21 +700,13 @@ void sub_8025E68(u32 r0, BulkItem *heldItem)
sub_80073E0(r0);
}
bool8 FriendListMenu_isOnTeam(Pokemon *pokeStruct)
static bool8 FriendListMenu_isOnTeam(Pokemon *pokeStruct)
{
bool32 flag;
if (pokeStruct->isTeamLeader)
{
return FALSE;
}
else
{
flag = FALSE;
if(pokeStruct->dungeonLocation.id == DUNGEON_JOIN_LOCATION_PARTNER)
flag = TRUE;
if(flag && !sub_80023E4(8))
return FALSE;
else
return TRUE;
}
return FALSE;
if (IsMonPartner(pokeStruct) && !sub_80023E4(8))
return FALSE;
return TRUE;
}

View File

@ -12,7 +12,7 @@
#include "code_8094F88.h"
#include "code_80958E8.h"
#include "code_80972F4.h"
#include "code_8097670.h"
#include "adventure_info.h"
#include "code_80A26CC.h"
#include "debug.h"
#include "dungeon_info.h"

View File

@ -6,7 +6,7 @@
#include "bg_palette_buffer.h"
#include "code_800D090.h"
#include "code_8094F88.h"
#include "code_8097670.h"
#include "adventure_info.h"
#include "def_filearchives.h"
#include "dungeon_info.h"
#include "event_flag.h"

View File

@ -6,7 +6,7 @@
#include "music_util.h"
#include "code_801602C.h"
#include "code_801B3C0.h"
#include "code_8097670.h"
#include "adventure_info.h"
#include "code_8099360.h"
#include "common_strings.h"
#include "input.h"

View File

@ -13,7 +13,7 @@
#include "run_dungeon.h"
#include "code_8094F88.h"
#include "code_80958E8.h"
#include "code_8097670.h"
#include "adventure_info.h"
#include "code_8099360.h"
#include "code_80A26CC.h"
#include "cpu.h"
@ -86,7 +86,6 @@ static u32 xxx_script_related_8001334(u32 r0);
static void MainLoops_RunFrameActions(u32 unused);
extern bool8 sub_8096A08(u8 dungeon, Pokemon *pokemon);
extern void IncrementNumAdventures(void);
extern void sub_8096BD0(void);
static const unkTalkTable sBaseKindTable[17] = {

View File

@ -28,39 +28,113 @@
#include "text_util.h"
#include "unk_ds_only_feature.h"
// size: 0x280
typedef struct unkStruct_203B2B8
{
/* 0x0 */ s32 state;
/* 0x4 */ s32 fallbackState;
bool8 unk8;
/* 0xA */ s16 pokeSpecies;
/* 0xC */ u32 id;
/* 0x10 */ BulkItem item1;
/* 0x14 */ BulkItem item2;
/* 0x18 */ Pokemon *pokeStruct;
/* 0x1C */ bool8 isTeamLeader;
/* 0x20 */ u32 moveIndex;
/* 0x24 */ u16 moveID;
/* 0x28 */ Move moves[8];
/* 0x68 */ u16 moveIDs[4]; // some list of move IDs
/* 0x70 */ u32 menuAction1;
/* 0x74 */ u32 menuAction2;
/* 0x78 */ u32 menuAction3; // unused
MenuStruct unk7C;
MenuStruct unkCC;
MenuStruct unk11C; // unused
MenuItem unk16C[10];
MenuItem unk1BC[10];
u16 unk20C[10];
WindowTemplates unk220;
} unkStruct_203B2B8;
static EWRAM_INIT unkStruct_203B2B8 *sUnknown_203B2B8 = {NULL};
#include "data/party_list_menu.h"
extern u32 sub_8026F04(Pokemon *);
bool8 CanTakePokemonHeldItem(Pokemon *r0);
bool8 sub_8026E88(Pokemon *r0);
bool8 sub_8026EB8(Pokemon *r0);
void sub_8026E08(u32 r0);
void sub_8026DAC(u32 r0, BulkItem *item);
void sub_8026FA4(void);
void PartyListMenu_BuildYesNoMenu(void);
void PartyListMenu_CreateMenu2(void);
void PartyListMenu_CreateMenu1(void);
void HandlePartyListMenuCallback(void);
void PartyListMenu_HandleMenu1(void);
void sub_8026A78(void);
void sub_8026A94(void);
void sub_8026AB0(void);
void sub_8026B10(void);
void sub_8026B48(void);
void sub_8026B64(void);
void PartyListMenu_HandleMenu2(void);
void sub_8026CF0(void);
void sub_8026D0C(void);
void sub_8026D6C(void);
void PartyListMenu_GotoFallbackState(void);
static u32 sub_8026F04(Pokemon *);
static bool8 CanTakePokemonHeldItem(Pokemon *r0);
static bool8 sub_8026E88(Pokemon *r0);
static bool8 sub_8026EB8(Pokemon *r0);
static void sub_8026E08(u32 r0);
static void sub_8026DAC(u32 r0, BulkItem *item);
static void sub_8026FA4(void);
static void PartyListMenu_BuildYesNoMenu(void);
static void PartyListMenu_CreateMenu2(void);
static void PartyListMenu_CreateMenu1(void);
static void HandlePartyListMenuCallback(void);
static void PartyListMenu_HandleMenu1(void);
static void sub_8026A78(void);
static void sub_8026A94(void);
static void sub_8026AB0(void);
static void sub_8026B10(void);
static void sub_8026B48(void);
static void sub_8026B64(void);
static void PartyListMenu_HandleMenu2(void);
static void sub_8026CF0(void);
static void sub_8026D0C(void);
static void sub_8026D6C(void);
static void PartyListMenu_GotoFallbackState(void);
static void SetPartyListMenuState(s32 newState);
static void sub_802608C(void);
enum PartyListMenuStates
{
PARTY_LIST_STATE_INIT,
PARTY_LIST_STATE_MAIN_MENU,
PARTY_LIST_STATE_MAIN_MENU_1,
PARTY_LIST_STATE_SUMMARY = 3,
PARTY_LIST_STATE_CHECK_IQ = 4,
PARTY_LIST_STATE_JOIN_TEAM = 5,
PARTY_LIST_STATE_STANDBY = 6,
PARTY_LIST_STATE_MAKE_LEADER = 7,
PARTY_LIST_STATE_POKEMON_FAREWELL = 8,
// 9
// 0xA
// 0xB
PARTY_LIST_STATE_SAY_FAREWELL = 0xC,
PARTY_LIST_STATE_CONFIRM_SAY_FAREWELL = 0xD,
PARTY_LIST_STATE_GIVE_GUMMI = 0xe,
PARTY_LIST_STATE_GIVEN_ITEM = 0xF,
PARTY_LIST_STATE_GIVEN_ITEM_HELD_ITEM = 0x10,
PARTY_LIST_STATE_TAKE_ITEM = 0x11,
PARTY_LIST_STATE_GIVE_ITEM = 0x12,
PARTY_LIST_STATE_GIVE_ITEM_1 = 0x13,
// 0x14
// 0x15
PARTY_LIST_STATE_MOVES = 0x16,
// 0x17
// 0x18
PARTY_LIST_STATE_EXIT = 0x19,
};
enum PartyListMenuActions
{
PARTY_LIST_MENU_NULL = 1,
PARTY_LIST_MENU_YES,
PARTY_LIST_MENU_NO,
PARTY_LIST_MENU_INFO = 4,
PARTY_LIST_MENU_SUMMARY = 4,
PARTY_LIST_MENU_CHECK_IQ,
PARTY_LIST_MENU_JOIN_TEAM,
PARTY_LIST_MENU_STANDBY,
PARTY_LIST_MENU_MAKE_LEADER,
PARTY_LIST_MENU_SAY_FAREWELL,
PARTY_LIST_MENU_GIVE_GUMMI,
PARTY_LIST_MENU_GIVE_ITEM,
PARTY_LIST_MENU_TAKE_ITEM,
PARTY_LIST_MENU_MOVES,
};
bool8 CreatePartyListMenu(Pokemon *pokeStruct)
{
s32 i;
@ -141,10 +215,7 @@ bool8 sub_802604C(void)
void CleanPartyListMenu(void)
{
if (sUnknown_203B2B8) {
MemoryFree(sUnknown_203B2B8);
sUnknown_203B2B8 = NULL;
}
TRY_FREE_AND_SET_NULL(sUnknown_203B2B8);
}
static void SetPartyListMenuState(s32 newState)
@ -189,7 +260,7 @@ static void sub_802608C(void)
ShowWindows(&sUnknown_203B2B8->unk220, TRUE, TRUE);
}
void HandlePartyListMenuCallback(void)
static void HandlePartyListMenuCallback(void)
{
Item item;
@ -301,7 +372,8 @@ void HandlePartyListMenuCallback(void)
}
}
void PartyListMenu_CreateMenu1(void) {
static void PartyListMenu_CreateMenu1(void)
{
Pokemon *pokeStruct;
s32 index;
s32 loopMax = 0;
@ -404,7 +476,7 @@ void PartyListMenu_CreateMenu1(void) {
}
}
void PartyListMenu_CreateMenu2(void)
static void PartyListMenu_CreateMenu2(void)
{
s32 index;
s32 loopMax = 0;
@ -440,7 +512,8 @@ void PartyListMenu_CreateMenu2(void)
}
}
void PartyListMenu_BuildYesNoMenu(void) {
static void PartyListMenu_BuildYesNoMenu(void)
{
s32 loopMax = 0;
sUnknown_203B2B8->unk1BC[loopMax].text = gCommonYes[0];
sUnknown_203B2B8->unk1BC[loopMax].menuAction = PARTY_LIST_MENU_YES;
@ -452,7 +525,7 @@ void PartyListMenu_BuildYesNoMenu(void) {
sUnknown_203B2B8->unk1BC[loopMax].menuAction = PARTY_LIST_MENU_NULL;
}
void PartyListMenu_HandleMenu1(void)
static void PartyListMenu_HandleMenu1(void)
{
Pokemon *playerPokemon;
Pokemon *newLeader;
@ -526,7 +599,7 @@ void PartyListMenu_HandleMenu1(void)
}
}
void sub_8026A78(void)
static void sub_8026A78(void)
{
switch(sub_80244E4())
{
@ -541,7 +614,7 @@ void sub_8026A78(void)
}
}
void sub_8026A94(void)
static void sub_8026A94(void)
{
switch(sub_801BF48())
{
@ -556,7 +629,6 @@ void sub_8026A94(void)
}
}
static inline bool8 sub_8026AB0_sub(void) {
if (sUnknown_203B2B8->pokeStruct->dungeonLocation.id == DUNGEON_HOWLING_FOREST_2 || sUnknown_203B2B8->pokeStruct->dungeonLocation.id == DUNGEON_POKEMON_SQUARE)
return TRUE;
@ -564,7 +636,7 @@ static inline bool8 sub_8026AB0_sub(void) {
return FALSE;
}
void sub_8026AB0(void)
static void sub_8026AB0(void)
{
s32 temp;
if(sub_80144A4(&temp) == 0)
@ -585,7 +657,7 @@ void sub_8026AB0(void)
}
}
void sub_8026B10(void)
static void sub_8026B10(void)
{
s32 temp;
if(sub_80144A4(&temp) == 0)
@ -603,8 +675,7 @@ void sub_8026B10(void)
}
}
void sub_8026B48(void)
static void sub_8026B48(void)
{
switch(sub_8022860())
{
@ -619,8 +690,7 @@ void sub_8026B48(void)
}
}
void sub_8026B64(void)
static void sub_8026B64(void)
{
switch(sub_801A6E8(TRUE))
{
@ -647,7 +717,7 @@ void sub_8026B64(void)
}
}
void PartyListMenu_HandleMenu2(void)
static void PartyListMenu_HandleMenu2(void)
{
u32 nextState;
struct unkStruct_8090F58 temp;
@ -691,7 +761,7 @@ void PartyListMenu_HandleMenu2(void)
}
}
void sub_8026CF0(void)
static void sub_8026CF0(void)
{
switch(sub_801B410())
{
@ -706,8 +776,7 @@ void sub_8026CF0(void)
}
}
void sub_8026D0C(void)
static void sub_8026D0C(void)
{
switch(sub_801EF38(1))
{
@ -727,7 +796,7 @@ void sub_8026D0C(void)
}
}
void sub_8026D6C(void)
static void sub_8026D6C(void)
{
switch(sub_801F890())
{
@ -742,7 +811,7 @@ void sub_8026D6C(void)
}
}
void PartyListMenu_GotoFallbackState(void)
static void PartyListMenu_GotoFallbackState(void)
{
s32 temp;
if(sub_80144A4(&temp) == 0)
@ -751,7 +820,7 @@ void PartyListMenu_GotoFallbackState(void)
}
}
void sub_8026DAC(u32 r0, BulkItem *item)
static void sub_8026DAC(u32 r0, BulkItem *item)
{
Item slot;
struct unkStruct_8090F58 temp;
@ -768,7 +837,7 @@ void sub_8026DAC(u32 r0, BulkItem *item)
sub_80073E0(r0);
}
void sub_8026E08(u32 r0)
static void sub_8026E08(u32 r0)
{
u8 buffer1[40];
u8 buffer[20];
@ -784,7 +853,7 @@ void sub_8026E08(u32 r0)
sub_80073E0(r0);
}
bool8 sub_8026E88(Pokemon *r0)
static bool8 sub_8026E88(Pokemon *r0)
{
bool8 flag;
if(!r0->isTeamLeader)
@ -799,7 +868,7 @@ bool8 sub_8026E88(Pokemon *r0)
return TRUE;
}
bool8 sub_8026EB8(Pokemon *r0)
static bool8 sub_8026EB8(Pokemon *r0)
{
bool8 flag;
if(sub_808D3BC() != r0)
@ -820,8 +889,7 @@ bool8 sub_8026EB8(Pokemon *r0)
return FALSE;
}
u32 sub_8026F04(Pokemon *r0)
static u32 sub_8026F04(Pokemon *r0)
{
if(r0->heldItem.id == ITEM_NOTHING)
return 0;
@ -833,7 +901,7 @@ u32 sub_8026F04(Pokemon *r0)
return 3;
}
bool8 CanTakePokemonHeldItem(Pokemon *r0)
static bool8 CanTakePokemonHeldItem(Pokemon *r0)
{
if(IsNotMoneyOrUsedTMItem(r0->heldItem.id))
{
@ -853,7 +921,7 @@ bool8 CanTakePokemonHeldItem(Pokemon *r0)
return TRUE;
}
void sub_8026FA4(void)
static void sub_8026FA4(void)
{
switch(sub_8026F04(sUnknown_203B2B8->pokeStruct))
{

View File

@ -6,7 +6,6 @@
EWRAM_INIT struct PlayTimeStruct *gPlayTimeRef = {NULL};
EWRAM_DATA struct PlayTimeStruct gPlayTime = {0};
void InitializePlayTime(void)
{
gPlayTimeRef = &gPlayTime;

View File

@ -5,7 +5,7 @@
#include "pokemon_3.h"
#include "text_util.h"
#include "friend_area.h"
#include "code_8097670.h"
#include "adventure_info.h"
#include "constants/evolve_type.h"
#include "constants/evolution_status.h"

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "globaldata.h"
#include "position_util.h"
#include "constants/direction.h"
@ -11,56 +12,25 @@ static const s32 sFacingDirMapping[3][3] = {
s32 GetDirectionTowardsPosition(DungeonPos *originPos, DungeonPos *targetPos)
{
s32 direction;
s32 yDiff;
s32 xDiff;
s32 xDiff = targetPos->x - originPos->x;
s32 yDiff = targetPos->y - originPos->y;
xDiff = targetPos->x - originPos->x;
yDiff = targetPos->y - originPos->y;
if (xDiff == 0 && yDiff == 0)
{
direction = DIRECTION_SOUTH;
}
else
{
if (xDiff > 0)
{
xDiff = 1;
}
if (yDiff > 0)
{
yDiff = 1;
}
if (xDiff <= -1)
{
xDiff = -1;
}
if (yDiff <= -1)
{
yDiff = -1;
}
direction = sFacingDirMapping[yDiff + 1][xDiff + 1];
}
return direction;
return DIRECTION_SOUTH;
if (xDiff >= 1)
xDiff = 1;
if (yDiff >= 1)
yDiff = 1;
if (xDiff <= -1)
xDiff = -1;
if (yDiff <= -1)
yDiff = -1;
return sFacingDirMapping[yDiff + 1][xDiff + 1];
}
s32 GetDistance(DungeonPos *pos1, DungeonPos *pos2)
{
s32 distanceX = pos1->x - pos2->x;
s32 distance;
if (distanceX < 0)
{
distanceX = -distanceX;
}
distance = pos1->y - pos2->y;
if (distance < 0)
{
distance = -distance;
}
if (distance < distanceX)
{
distance = distanceX;
}
return distance;
return max(abs(pos1->x - pos2->x), abs(pos1->y - pos2->y));
}

View File

@ -62,6 +62,7 @@
#include "dungeon_8041AD0.h"
#include "ground_main.h"
#include "dungeon_mon_sprite_render.h"
#include "adventure_info.h"
EWRAM_INIT struct UnkStruct_203B414 *gUnknown_203B414 = NULL;
EWRAM_INIT Dungeon *gDungeon = NULL;
@ -70,10 +71,8 @@ static EWRAM_INIT u8 *gSerializedData_203B41C = NULL;
extern void sub_8068BDC(u8 r0);
extern void sub_803D4AC(void);
extern void sub_8068F28(void);
extern void IncrementThievingSuccesses(void);
extern void sub_8043D60(void);
extern void sub_80840A4(void);
extern void IncrementAdventureFloorsExplored(void);
extern void sub_806AB2C(void);
extern void sub_807E5AC(void);
extern void nullsub_16(void);

View File

@ -1,8 +1,9 @@
#include "global.h"
#include "globaldata.h"
#include "save.h"
#include "music_util.h"
#include "string_format.h"
#include "code_8097670.h"
#include "adventure_info.h"
#include "event_flag.h"
#include "exclusive_pokemon.h"
#include "flash.h"
@ -11,7 +12,7 @@
#include "memory.h"
#include "pokemon_3.h"
#include "random.h"
#include "save.h"
#include "adventure_save.h"
// size: 0x800
struct unk_struct

View File

@ -55,9 +55,6 @@ static const WindowTemplate sOnlyTextDialogueBoxWindowTemplate = {
.header = NULL,
};
extern void DisplayMonPortraitSprite(s32 a0, const u8 *compressedData, s32 a2);
extern void sub_80073E0(s32 a0);
static void sub_8014A88(void);
static bool8 sub_8014B94(void);
static void nullsub_35(void);

View File

@ -5,7 +5,7 @@
#include "code_800D090.h"
#include "code_802F204.h"
#include "code_8094F88.h"
#include "code_8097670.h"
#include "adventure_info.h"
#include "code_8099360.h"
#include "event_flag.h"
#include "game_options.h"

View File

@ -71,7 +71,7 @@
.space 4
.include "src/code_80958E8.o"
.space 4
.include "src/code_8097670.o"
.include "src/adventure_info.o"
.space 4
.include "src/exclusive_pokemon.o"
.space 4

View File

@ -136,7 +136,7 @@
.include "src/play_time.o"
.include "src/code_8094F88.o"
.include "src/code_80958E8.o"
.include "src/code_8097670.o"
.include "src/adventure_info.o"
.include "src/exclusive_pokemon.o"
.include "src/ground_main.o"
.include "src/script_item.o"