Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy includes #223

Merged
merged 7 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions include/code_8004AA0.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ typedef struct unkStruct_202EE8C

extern unkStruct_202EE8C gUnknown_202EE8C[32];

// size: 0x4DD8
struct UnkBgStruct
{
OpenedFile *unk0[5];
u8 padding[0x4C4C - 0x14];
unkStruct_202EE8C unk4C4C[16];
u32 unk4DCC;
u32 unk4DD0;
/* 0x4DD4 */ s16 xoffset;
/* 0x4DD6 */ s16 yoffset;
};

extern struct UnkBgStruct *gUnknown_203B0E4;

// size: Variable
typedef struct unkDataFor8004AA4
{
Expand Down
42 changes: 0 additions & 42 deletions include/code_800F958.h

This file was deleted.

33 changes: 0 additions & 33 deletions include/code_8010EF0.h

This file was deleted.

3 changes: 1 addition & 2 deletions include/code_801AFA4.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef GUARD_CODE_801AFA4_H
#define GUARD_CODE_801AFA4_H

#include "global.h"
#include "constants/move.h"
#include "structs/menu.h"
#include "pokemon.h"
Expand All @@ -26,4 +25,4 @@ bool8 sub_801AFA4(u32 index);
u32 sub_801B00C(void);
void sub_801B048(void);

#endif // GUARD_CODE_801AFA4_H
#endif // GUARD_CODE_801AFA4_H
1 change: 1 addition & 0 deletions include/code_8041AD0.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef GUARD_CODE_8041AD0_H
#define GUARD_CODE_8041AD0_H

#include "structs/dungeon_entity.h"
#include "structs/str_damage.h"

void sub_80420E8(Entity *pokemon, struct DamageStruct *dmgStruct);
Expand Down
2 changes: 2 additions & 0 deletions include/code_8069D4C.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef GUARD_CODE_8069D4C_H
#define GUARD_CODE_8069D4C_H

#include "structs/dungeon_entity.h"

struct unkStruct_8069D4C
{
s16 id;
Expand Down
2 changes: 2 additions & 0 deletions include/code_8077274_1.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef GUARD_CODE_8077274_1_H
#define GUARD_CODE_8077274_1_H

#include "structs/dungeon_entity.h"

void MuzzleTarget(Entity *pokemon, Entity *target);
void TransformStatusTarget(Entity * pokemon, Entity * target);
void MobileStatusTarget(Entity * pokemon, Entity * target);
Expand Down
2 changes: 2 additions & 0 deletions include/code_808417C.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef GUARD_808417C_H
#define GUARD_808417C_H

#include "structs/dungeon_entity.h"

s32 CalculateStatusTurns(Entity *target, s16 *turnRange, bool8 factorCurerSkills);

#endif // GUARD_808417C_H
2 changes: 1 addition & 1 deletion include/constants/dungeon_action.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef GUARD_CONSTANTS_DUNGEON_ACTION_H
#define GUARD_CONSTANTS_DUNGEON_ACTION_H

enum Action
enum DungeonAction
{
ACTION_NOTHING = 0x0,
ACTION_PASS_TURN = 0x1,
Expand Down
5 changes: 5 additions & 0 deletions include/friend_list_menu.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#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
Expand Down
4 changes: 2 additions & 2 deletions include/gulpin_shop.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef GUARD_GULPIN_SHOP_H
#define GUARD_GULPIN_SHOP_H

#include "constants/move.h"
#include "file_system.h"
#include "structs/menu.h"
#include "structs/str_text.h"
#include "structs/str_moves.h"

// size: 0x18C
typedef struct GulpinShopWork
Expand Down Expand Up @@ -42,4 +42,4 @@ bool8 GulpinIsNextMoveLinked(void);

u32 sub_801E8C0(void);

#endif // GUARD_GULPIN_SHOP_H
#endif // GUARD_GULPIN_SHOP_H
4 changes: 2 additions & 2 deletions include/math.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef GUARD_MATH_H
#define GUARD_MATH_H

#include "global.h"
#include "gba/types.h"

/**
* This type represents a signed 24.8 fixed-point number, where the 24 most
Expand Down Expand Up @@ -87,7 +87,7 @@ s24_8 s24_8_mul(s24_8 x, s24_8 y);
*
* @returns The quotient `x/y` as a signed 24.8 fixed-point number.
*/
s32 s24_8_div(s32 r0, s32 r1);
s32 s24_8_div(s32 x, s32 y);

/**
* This function multiplies two unsigned 24.8 fixed-point numbers.
Expand Down
2 changes: 2 additions & 0 deletions include/move_checks.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef GUARD_MOVE_CHECKS_H
#define GUARD_MOVE_CHECKS_H

#include "structs/dungeon_entity.h"

bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move);
bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move);
bool8 HasDisabledMove(Move *moves);
Expand Down
6 changes: 6 additions & 0 deletions include/pelipper_board.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#ifndef GUARD_PELIPPER_BOARD_H
#define GUARD_PELIPPER_BOARD_H

#include "structs/menu.h"
#include "structs/str_802C39C.h"

// Guessing based off of 203B304
struct unkStruct_203B308
Expand Down Expand Up @@ -36,3 +41,4 @@ enum PelipperBoardActions
PELIPPER_BOARD_ACCEPT,
PELIPPER_BOARD_INFO,
};
#endif // GUARD_PELIPPER_BOARD_H
4 changes: 3 additions & 1 deletion include/save_menu.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef GUARD_SAVE_MENU_H
#define GUARD_SAVE_MENU_H

#include "structs/menu.h"

// size: 0x1B4
typedef struct SaveMenuWork
{
Expand All @@ -16,4 +18,4 @@ void CleanSaveMenu(void);
void CreateSaveMenu(s32 currMenu);
s32 UpdateSaveMenu(void);

#endif // GUARD_SAVE_MENU_H
#endif // GUARD_SAVE_MENU_H
1 change: 0 additions & 1 deletion include/structs/str_dungeon.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef GUARD_STR_DUNGEON_H
#define GUARD_STR_DUNGEON_H

#include "global.h"
#include "constants/monster.h"
#include "structs/dungeon_entity.h"
#include "file_system.h"
Expand Down
3 changes: 1 addition & 2 deletions include/type_chart.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef GUARD_TYPE_CHART_H
#define GUARD_TYPE_CHART_H

#include "global.h"
#include "constants/type.h"

#define NUM_EFFECTIVENESS 4
Expand All @@ -14,4 +13,4 @@
// [Attacking type][Defending type]
extern const s16 gTypeEffectivenessChart[NUM_TYPES][NUM_TYPES];

#endif
#endif
3 changes: 1 addition & 2 deletions src/code_800F958.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "global.h"
#include "code_800F958.h"
#include "dungeon_pokemon_sprites.h"
#include "memory.h"

extern DungeonPokemonSprites *gDungeonPokemonSprites;
extern DungeonPokemonSprite *NewDungeonPokemonSprite(void);
extern DungeonPokemonSprite* GetDungeonPokemonSprite(s32 id);

Expand Down
6 changes: 1 addition & 5 deletions src/code_8010EF0.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#include "global.h"
#include "code_8010EF0.h"

extern struct UnkBgStruct *gUnknown_203B0E4;

extern void CloseFile(OpenedFile *);
#include "code_8004AA0.h"

void sub_8010EF0(void)
{
Expand Down
14 changes: 0 additions & 14 deletions src/code_80118A4.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@
#include "event_flag.h"
#include "file_system.h"

// size: 0x4DD8
struct UnkBgStruct
{
OpenedFile *unk0[5];
u8 padding[0x4C4C - 0x14];
unkStruct_202EE8C unk4C4C[16];
u32 unk4DCC;
u32 unk4DD0;
/* 0x4DD4 */ s16 xoffset;
/* 0x4DD6 */ s16 yoffset;
};
extern struct UnkBgStruct *gUnknown_203B0E4;


extern const u16 gUnknown_80D4144[8];

EWRAM_DATA u32 gUnknown_202DE1C = {0};
Expand Down
25 changes: 25 additions & 0 deletions src/data/type_chart.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#define IMMUNE EFFECTIVENESS_IMMUNE
#define RESIST EFFECTIVENESS_RESIST
#define NEUTRAL EFFECTIVENESS_NEUTRAL
#define SUPER EFFECTIVENESS_SUPER

const s16 gTypeEffectivenessChart[NUM_TYPES][NUM_TYPES] = {
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, RESIST},
{NEUTRAL, NEUTRAL, RESIST, RESIST, SUPER, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, NEUTRAL, RESIST, NEUTRAL, SUPER},
{NEUTRAL, NEUTRAL, SUPER, RESIST, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, NEUTRAL, NEUTRAL},
{NEUTRAL, NEUTRAL, RESIST, SUPER, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, SUPER, RESIST, NEUTRAL, RESIST, SUPER, NEUTRAL, RESIST, NEUTRAL, RESIST},
{NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, IMMUNE, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, NEUTRAL},
{NEUTRAL, NEUTRAL, RESIST, RESIST, SUPER, NEUTRAL, RESIST, NEUTRAL, NEUTRAL, SUPER, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST},
{NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, NEUTRAL, RESIST, RESIST, RESIST, SUPER, NEUTRAL, NEUTRAL, SUPER, SUPER},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, RESIST, NEUTRAL, NEUTRAL, IMMUNE},
{NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, SUPER, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, IMMUNE, NEUTRAL, RESIST, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, SUPER},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, RESIST},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, SUPER, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, IMMUNE, RESIST},
{NEUTRAL, NEUTRAL, RESIST, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, RESIST, RESIST, NEUTRAL, RESIST, SUPER, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, SUPER, RESIST},
{NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, NEUTRAL, RESIST, SUPER, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, RESIST},
{NEUTRAL, IMMUNE, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, RESIST},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, RESIST},
{NEUTRAL, NEUTRAL, RESIST, RESIST, NEUTRAL, RESIST, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, RESIST}
};
27 changes: 2 additions & 25 deletions src/type_chart.c
Original file line number Diff line number Diff line change
@@ -1,27 +1,4 @@
#include "global.h"
#include "type_chart.h"

#define IMMUNE EFFECTIVENESS_IMMUNE
#define RESIST EFFECTIVENESS_RESIST
#define NEUTRAL EFFECTIVENESS_NEUTRAL
#define SUPER EFFECTIVENESS_SUPER

const s16 gTypeEffectivenessChart[NUM_TYPES][NUM_TYPES] = {
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, RESIST},
{NEUTRAL, NEUTRAL, RESIST, RESIST, SUPER, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, NEUTRAL, RESIST, NEUTRAL, SUPER},
{NEUTRAL, NEUTRAL, SUPER, RESIST, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, NEUTRAL, NEUTRAL},
{NEUTRAL, NEUTRAL, RESIST, SUPER, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, SUPER, RESIST, NEUTRAL, RESIST, SUPER, NEUTRAL, RESIST, NEUTRAL, RESIST},
{NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, IMMUNE, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, NEUTRAL},
{NEUTRAL, NEUTRAL, RESIST, RESIST, SUPER, NEUTRAL, RESIST, NEUTRAL, NEUTRAL, SUPER, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST},
{NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, NEUTRAL, RESIST, RESIST, RESIST, SUPER, NEUTRAL, NEUTRAL, SUPER, SUPER},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, RESIST, NEUTRAL, NEUTRAL, IMMUNE},
{NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, SUPER, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, IMMUNE, NEUTRAL, RESIST, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, SUPER},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, RESIST},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, SUPER, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, IMMUNE, RESIST},
{NEUTRAL, NEUTRAL, RESIST, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, RESIST, RESIST, NEUTRAL, RESIST, SUPER, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, SUPER, RESIST},
{NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, NEUTRAL, RESIST, SUPER, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, RESIST},
{NEUTRAL, IMMUNE, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, RESIST},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, RESIST},
{NEUTRAL, NEUTRAL, RESIST, RESIST, NEUTRAL, RESIST, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, RESIST}
};
#include "data/type_chart.h"