mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-15 05:25:57 -05:00
code cleanup
This commit is contained in:
9
include/friend_list_menu.h
Normal file
9
include/friend_list_menu.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef INCLUDE_FRIEND_LIST_MENU_H
|
||||
#define INCLUDE_FRIEND_LIST_MENU_H
|
||||
|
||||
bool8 sub_80252F0(s32 param_1);
|
||||
u32 sub_8025354(void);
|
||||
u8 sub_802540C(void);
|
||||
void sub_8025418(void);
|
||||
|
||||
#endif
|
||||
@@ -129,6 +129,7 @@ s32 FindItemInInventory(u8 id);
|
||||
bool8 IsHMItem(u8 id);
|
||||
bool8 IsEdibleItem(u8 id);
|
||||
u8 xxx_bit_lut_lookup_8091E50(u8 i0, u8 i1);
|
||||
bool8 IsInvalidItemReward(u8 itemID);
|
||||
|
||||
void RestoreHeldItem(struct unkStruct_8094924*, struct BulkItem*);
|
||||
void SaveHeldItem(struct unkStruct_8094924*, struct BulkItem*);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/input.h"
|
||||
#include "file_system.h"
|
||||
#include "friend_list_menu.h"
|
||||
#include "item.h"
|
||||
#include "menu.h"
|
||||
#include "team_inventory.h"
|
||||
@@ -55,9 +56,6 @@ extern u32 sub_8022860();
|
||||
extern void sub_8022908();
|
||||
extern u32 sub_80244E4(void);
|
||||
extern void sub_802453C(void);
|
||||
extern u32 sub_8025354(void);
|
||||
extern u8 sub_802540C(void);
|
||||
extern void sub_8025418(void);
|
||||
extern u32 sub_8025F68();
|
||||
extern u8 sub_802604C();
|
||||
extern void sub_8026058();
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "item.h"
|
||||
#include "moves.h"
|
||||
#include "move_effects_target.h"
|
||||
#include "move_util.h"
|
||||
#include "number_util.h"
|
||||
#include "status.h"
|
||||
#include "status_actions.h"
|
||||
#include "tile_types.h"
|
||||
@@ -94,14 +96,12 @@ extern s16 gUnknown_80F501A[];
|
||||
|
||||
extern u32 sub_8055864(struct Entity *pokemon, struct Entity *target, struct Move *param_3, s32 param_4, s32 param_5);
|
||||
extern void sub_80943A0(void*, s32);
|
||||
s32 RoundUpFixedPoint(s32 fixedPointNumber);
|
||||
extern s16 sub_8057600(struct Move*, u32);
|
||||
extern void sub_806CDD4(struct Entity *, u32, u32);
|
||||
extern u8 sub_8044B28(void);
|
||||
extern u8 sub_803F428(struct Position *pos);
|
||||
extern void IncreaseEntityPixelPos(struct Entity *, u32, u32);
|
||||
extern void sub_803E46C(u32);
|
||||
bool8 sub_80571F0(struct Entity * pokemon, struct Move *move);
|
||||
extern void sub_807EC28(u32);
|
||||
extern void sub_806F370(struct Entity *r0, struct Entity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32);
|
||||
void sub_8075900(struct Entity *pokemon, u8 r1);
|
||||
@@ -116,11 +116,9 @@ void sub_80522F4(struct Entity *r0, struct Entity *r1, char r2[]);
|
||||
extern void sub_806A6E8(struct Entity *);
|
||||
extern u32 sub_8055640(struct Entity *, struct Entity *, struct Move *, u32, u32);
|
||||
extern void sub_807EA30(u32);
|
||||
extern bool8 sub_805727C(struct Entity *, struct Entity *, s16);
|
||||
extern void sub_806ABAC(struct Entity *, struct Entity *);
|
||||
extern u8 sub_807EAA0(u32, u32);
|
||||
extern void sub_8045C28(struct Item *, u8 , u8);
|
||||
extern u8 sub_8057308(struct Entity *, u32);
|
||||
extern void sub_805A7D4(struct Entity *, struct Entity *, struct Item *, struct Position *);
|
||||
extern void sub_8045394(struct Entity *, s32, s32);
|
||||
extern void sub_804652C(struct Entity *, struct Entity *, struct Item *, u32, struct Position *);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "dungeon_pokemon_attributes.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "move_effects_target.h"
|
||||
#include "pokemon.h"
|
||||
#include "weather.h"
|
||||
#include "game_options.h"
|
||||
@@ -36,7 +37,6 @@ void sub_80522F4(struct Entity *r0, struct Entity *r1, const char r2[]);
|
||||
extern void sub_8042900(struct Entity *r0);
|
||||
extern void sub_8042968(struct Entity *r0);
|
||||
extern void sub_806ABAC(struct Entity *, struct Entity *);
|
||||
extern void PausedStatusTarget(struct Entity *, struct Entity *,u32,u32,u32);
|
||||
void sub_8041BBC(struct Entity *r0);
|
||||
extern u8 sub_8045888(struct Entity *);
|
||||
extern void sub_806A2BC(struct Entity *, u8);
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#include "dungeon_entity.h"
|
||||
#include "dungeon_global_data.h"
|
||||
#include "dungeon_music.h"
|
||||
#include "dungeon_pokemon_attributes.h"
|
||||
#include "pokemon.h"
|
||||
#include "dungeon_util_1.h"
|
||||
|
||||
extern void LoadIQSkills(struct Entity *);
|
||||
extern struct Entity *GetPartnerEntity();
|
||||
extern struct Entity *xxx_call_GetLeader(void);
|
||||
extern void SetDefaultIQSkills(u8 *param_1, u8 param_2);
|
||||
|
||||
@@ -13,10 +13,7 @@
|
||||
extern s32 GetDungeonFloorCount(u8);
|
||||
extern bool8 sub_809017C(struct DungeonLocation *);
|
||||
extern s16 GetBaseSpecies(s16);
|
||||
extern bool8 IsInvalidItemReward(u8);
|
||||
extern u8 sub_803C1D0(struct DungeonLocation *, u8);
|
||||
extern bool8 IsNotMoneyOrUsedTMItem(u8);
|
||||
extern u8 xxx_bit_lut_lookup_8091E50(u8 ,u8 );
|
||||
extern u32 GetMaxItemsAllowed(u8);
|
||||
extern bool8 sub_803C0DC(s16);
|
||||
extern void ResetMailboxSlot(u8);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "memory.h"
|
||||
#include "text.h"
|
||||
#include "input.h"
|
||||
@@ -268,7 +269,7 @@ void sub_8027A5C(void)
|
||||
}
|
||||
|
||||
static inline bool8 sub_8027A78_sub(void) {
|
||||
if (gUnknown_203B2BC->pokeStruct->dungeonLocation.id == 0x44 || gUnknown_203B2BC->pokeStruct->dungeonLocation.id == 0x45)
|
||||
if (gUnknown_203B2BC->pokeStruct->dungeonLocation.id == DUNGEON_HOWLING_FOREST_2 || gUnknown_203B2BC->pokeStruct->dungeonLocation.id == DUNGEON_POKEMON_SQUARE)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
@@ -459,7 +460,7 @@ bool8 sub_8027D9C(struct PokemonStruct *pokeStruct)
|
||||
if(!pokeStruct->isTeamLeader)
|
||||
{
|
||||
var1 = 0;
|
||||
if(pokeStruct->dungeonLocation.id == 0x41)
|
||||
if(pokeStruct->dungeonLocation.id == DUNGEON_JOIN_LOCATION_PARTNER)
|
||||
var1 = 1;
|
||||
if(var1 != 0)
|
||||
{
|
||||
@@ -480,7 +481,7 @@ bool8 sub_8027DCC(struct PokemonStruct *pokeStruct)
|
||||
if(!pokeStruct->isTeamLeader)
|
||||
{
|
||||
var1 = 0;
|
||||
if(pokeStruct->dungeonLocation.id == 0x41)
|
||||
if(pokeStruct->dungeonLocation.id == DUNGEON_JOIN_LOCATION_PARTNER)
|
||||
var1 = 1;
|
||||
if(var1 != 0)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "memory.h"
|
||||
#include "text.h"
|
||||
#include "input.h"
|
||||
@@ -115,7 +116,6 @@ extern void sub_8008C54(u32);
|
||||
extern void sub_80073B8(u32);
|
||||
extern void sub_80073E0(u32);
|
||||
extern void xxx_format_and_draw(s32, s32, const u8 *, ...);
|
||||
bool8 sub_8025EC4(struct PokemonStruct *);
|
||||
extern u32 sub_8023A94(u32);
|
||||
extern s16 sub_8023B44(void);
|
||||
extern void sub_8023C60(void);
|
||||
@@ -123,22 +123,6 @@ extern void sub_80141B4(const char *r0, u32, struct OpenedFile **r1, u32);
|
||||
extern s16 sub_80A5728(void);
|
||||
extern u8 sub_8002658(s16);
|
||||
extern bool8 sub_8024108(u32);
|
||||
extern void sub_8025434(s32);
|
||||
extern void sub_80259F0(void);
|
||||
extern void sub_8025A84(void);
|
||||
extern void sub_8025BCC(void);
|
||||
extern void sub_8025BE8(void);
|
||||
extern void sub_8025C04(void);
|
||||
extern void sub_8025CB4(void);
|
||||
extern void sub_8025D90(void);
|
||||
extern void sub_8025DAC(void);
|
||||
extern void sub_8025E08(void);
|
||||
extern void sub_8025E24(void);
|
||||
extern void sub_8025E44(void);
|
||||
extern void sub_802544C(void);
|
||||
extern void sub_8025518(void);
|
||||
extern void sub_8025728(void);
|
||||
extern void sub_802591C(void);
|
||||
extern u32 sub_801B3C0(struct Item *param_1);
|
||||
extern void sub_8023868(u32, u32, u32, u32);
|
||||
extern void sub_801F1B0(u32, u32);
|
||||
@@ -164,8 +148,7 @@ extern u32 sub_801F194(void);
|
||||
extern void sub_801F214(void);
|
||||
extern void sub_801EE10(u32, s16, struct Move *, u32, u32, u32);
|
||||
extern void sub_801F808(u16 *);
|
||||
u32 sub_801602C(u32 r0, u8 *name);
|
||||
void sub_8025E68(u32 , struct BulkItem *);
|
||||
extern u32 sub_801602C(u32 r0, u8 *name);
|
||||
extern u32 sub_801A6E8(u32);
|
||||
extern u32 sub_801A8AC(void);
|
||||
extern void sub_8099690(u32);
|
||||
@@ -177,10 +160,29 @@ extern u32 sub_8016080(void);
|
||||
extern s32 sub_80144A4(s32 *);
|
||||
extern bool8 sub_80023E4(u32);
|
||||
|
||||
void sub_8025434(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 sub_8025E44(void);
|
||||
void sub_8025E68(u32 , struct BulkItem *);
|
||||
bool8 sub_8025EC4(struct PokemonStruct *);
|
||||
|
||||
|
||||
bool8 sub_80252F0(s32 param_1)
|
||||
{
|
||||
|
||||
if ((param_1 == 2) && (sub_8024108(4) != '\0')) {
|
||||
if ((param_1 == 2) && (sub_8024108(4) != 0)) {
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
@@ -770,17 +772,17 @@ void sub_8025E68(u32 r0, struct BulkItem *heldItem)
|
||||
sub_80073E0(r0);
|
||||
}
|
||||
|
||||
bool8 sub_8025EC4(struct PokemonStruct *param_1)
|
||||
bool8 sub_8025EC4(struct PokemonStruct *pokeStruct)
|
||||
{
|
||||
bool32 flag;
|
||||
if (param_1->isTeamLeader)
|
||||
if (pokeStruct->isTeamLeader)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = FALSE;
|
||||
if(param_1->dungeonLocation.id == 0x41)
|
||||
if(pokeStruct->dungeonLocation.id == DUNGEON_JOIN_LOCATION_PARTNER)
|
||||
flag = TRUE;
|
||||
if(flag && !sub_80023E4(8))
|
||||
return FALSE;
|
||||
|
||||
@@ -1500,7 +1500,7 @@ void ClearAllItems_8091FB4() {
|
||||
}
|
||||
}
|
||||
|
||||
bool32 IsInvalidItemReward(u8 itemID)
|
||||
bool8 IsInvalidItemReward(u8 itemID)
|
||||
{
|
||||
s32 index;
|
||||
|
||||
|
||||
@@ -273,7 +273,6 @@ extern struct MainMenu *GetMainMenu(void);
|
||||
|
||||
extern void SetMenuItems(struct MenuStruct *, struct UnkTextStruct2 *, u32, const struct UnkTextStruct2 *, const struct MenuItem *, u32, u32, u32);
|
||||
extern void sub_8035CF4(struct MenuStruct *r0, u32, u32);
|
||||
bool8 IsInvalidItemReward(u8);
|
||||
bool8 sub_8095298(s32);
|
||||
bool8 sub_803D204(u8 *, struct unkStruct_203B480 *);
|
||||
extern s32 GetDungeonFloorCount(u8);
|
||||
|
||||
Reference in New Issue
Block a user