mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-24 17:54:43 -05:00
game option externs
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef GUARD_GAME_OPTIONS_H
|
||||
#define GUARD_GAME_OPTIONS_H
|
||||
|
||||
#include "data_serializer.h"
|
||||
|
||||
enum DungeonSpeed
|
||||
{
|
||||
DUNGEON_SPEED_SLOW,
|
||||
@@ -66,10 +68,16 @@ typedef struct GameOptions
|
||||
|
||||
extern GameOptions *gGameOptionsRef;
|
||||
|
||||
GameOptions *GetGameOptions(void);
|
||||
bool8 GameOptionsNotChange(GameOptions *newOptions);
|
||||
void InitializeGameOptions(bool8 initializeGender);
|
||||
void LoadGameOptions(void);
|
||||
GameOptions *GetGameOptions(void);
|
||||
void InitializeGameOptions(bool8 initializeGender);
|
||||
bool8 GameOptionsNotChange(GameOptions *newOptions);
|
||||
void WriteGameOptionsBits(DataSerializer *param_1);
|
||||
void ReadGameOptionsBits(DataSerializer *param_1);
|
||||
void SetWindowBGColor(void);
|
||||
bool8 GameOptions_ShowMiniMap(void);
|
||||
bool8 GameOptions_IsTransparentMiniMap(void);
|
||||
void GameOptions_SetTransparentMiniMap(void);
|
||||
bool8 sub_8094D14(void);
|
||||
|
||||
#endif // GUARD_GAME_OPTIONS_H
|
||||
|
||||
@@ -52,10 +52,7 @@ extern void sub_800EF40(u8 r0, u8 r1);
|
||||
extern s32 sub_800E6D8(s32);
|
||||
extern void sub_800EB24(s32 param_1, DungeonPos *param_2, DungeonPos *param_3, s32 param_4, s32 param_5);
|
||||
|
||||
u32 sub_8041764(unkStruct_80416E0 *param_1, bool8 param_2);
|
||||
s32 sub_80416E0(PixelPos *pos, u32 param_2, bool8 param_3);
|
||||
s32 sub_8041550(Entity *entity, s32 a1, u8 a2, u8 a3, s32 a4, u8 a5);
|
||||
s32 sub_804151C(Entity *entity, s32 r1, u8 r2);
|
||||
void sub_804178C(u8 param_1);
|
||||
|
||||
struct UnkStruct_80F6624
|
||||
@@ -191,13 +188,16 @@ static const u32 sStatusSpriteMasks_MuzzledStatus[] = {
|
||||
/*STATUS_MUZZLED not defined*/[1] = STATUS_SPRITE_MUZZLED,
|
||||
};
|
||||
|
||||
s32 sub_804151C(Entity *entity, s32 r1, u8 r2)
|
||||
static s32 sub_8041550(Entity *entity, s32 a1, u8 a2, u8 a3, s32 a4, u8 a5);
|
||||
static u32 sub_8041764(unkStruct_80416E0 *param_1, bool8 param_2);
|
||||
|
||||
static s32 sub_804151C(Entity *entity, s32 r1, u8 r2)
|
||||
{
|
||||
u8 r3 = sub_800DC9C(r1);
|
||||
return sub_8041550(entity, r1, r2, r3, 2, 0);
|
||||
}
|
||||
|
||||
s32 sub_8041550(Entity *entity, s32 a1, u8 a2, u8 a3, s32 a4, u8 a5)
|
||||
static s32 sub_8041550(Entity *entity, s32 a1, u8 a2, u8 a3, s32 a4, u8 a5)
|
||||
{
|
||||
s32 i;
|
||||
EntityInfo *entInfo;
|
||||
@@ -258,7 +258,7 @@ s32 sub_8041550(Entity *entity, s32 a1, u8 a2, u8 a3, s32 a4, u8 a5)
|
||||
return r4;
|
||||
}
|
||||
|
||||
s32 sub_80416A4(DungeonPos *pos_1, u32 param_2, bool8 param_3)
|
||||
static s32 sub_80416A4(DungeonPos *pos_1, u32 param_2, bool8 param_3)
|
||||
{
|
||||
PixelPos pos;
|
||||
|
||||
@@ -297,7 +297,7 @@ s32 sub_80416E0(PixelPos *pos, u32 param_2, bool8 param_3)
|
||||
return ret;
|
||||
}
|
||||
|
||||
u32 sub_8041764(unkStruct_80416E0 *param_1, bool8 param_2)
|
||||
static u32 sub_8041764(unkStruct_80416E0 *param_1, bool8 param_2)
|
||||
{
|
||||
sub_800EE5C(param_1->unk0);
|
||||
sub_800EF64();
|
||||
|
||||
@@ -61,7 +61,6 @@ extern void CheckLeaderTile(void);
|
||||
extern void sub_8075708(Entity *entity);
|
||||
extern void TryForcedLoss(u32);
|
||||
extern void sub_8075900(Entity *pokemon, u8 r1);
|
||||
extern void sub_807EC28(bool8);
|
||||
extern void sub_8075050(EntityInfo *info, Unk_Entity_x184 *strPtr);
|
||||
extern bool8 sub_803F428(DungeonPos *pos);
|
||||
|
||||
|
||||
@@ -7,14 +7,13 @@
|
||||
#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 ReadGameOptionsBits(DataSerializer *param_1);
|
||||
void ReadPlayTimeBits(DataSerializer *r0);
|
||||
void WriteGameOptionsBits(DataSerializer *param_1);
|
||||
void WritePlayTimeBits(DataSerializer *r0);
|
||||
|
||||
void sub_8097670(void)
|
||||
|
||||
@@ -46,7 +46,6 @@ extern void sub_806A1B0(Entity *);
|
||||
extern void sub_8045BF8(u8 *, struct Item *);
|
||||
extern void EnemyEvolution(struct Entity *);
|
||||
extern void DiscoverMinimap(DungeonPos *);
|
||||
extern void sub_807EC28(bool8);
|
||||
|
||||
void ChooseAIMove(Entity *pokemon)
|
||||
{
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
#include "run_dungeon.h"
|
||||
#include "dungeon_run_end.h"
|
||||
#include "dungeon_music.h"
|
||||
|
||||
extern u8 sub_8094D14(void);
|
||||
#include "game_options.h"
|
||||
|
||||
void ShowDungeonClearedWindow(void)
|
||||
{
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
#include "dungeon_pos_data.h"
|
||||
#include "dungeon_data.h"
|
||||
#include "dungeon_mon_spawn.h"
|
||||
#include "run_dungeon.h"
|
||||
|
||||
extern s32 sub_803DA20(s16 species);
|
||||
extern void sub_8049840(void);
|
||||
extern void sub_80429FC(DungeonPos *r0);
|
||||
extern void sub_80498A8(s32, s32);
|
||||
extern void sub_8049B8C(void);
|
||||
extern u8 GetFloorType();
|
||||
|
||||
enum CardinalDirection
|
||||
{
|
||||
|
||||
@@ -58,19 +58,17 @@
|
||||
#include "dungeon_kecleon_shop.h"
|
||||
#include "dungeon_engine.h"
|
||||
#include "dungeon_item_action.h"
|
||||
#include "dungeon_strings.h"
|
||||
|
||||
extern void HandleUnsetItemAction(Entity *,bool8);
|
||||
extern void TryTriggerTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4);
|
||||
void TryPointCameraToMonster(Entity *a0, u8 a1);
|
||||
bool8 sub_80701A4(Entity *a0);
|
||||
void sub_8075680(u32);
|
||||
void sub_8094C88(void);
|
||||
void ClearUnpaidFlagFromAllItems(void);
|
||||
void sub_806A914(u8 a0, u8 a1, u8 a2);
|
||||
u16 GetLeaderActionId(void);
|
||||
void sub_80978C8(s16 a0);
|
||||
static void TryCreateModeArrows(Entity *leader);
|
||||
bool8 sub_8094C48(void);
|
||||
void HandleTalkFieldAction(Entity *);
|
||||
s32 GetTeamMemberEntityIndex(Entity *pokemon);
|
||||
bool8 sub_8070F80(Entity * pokemon, s32 direction);
|
||||
@@ -82,41 +80,6 @@ extern bool8 sub_8070F14(Entity * pokemon, s32 direction);
|
||||
extern Entity *sub_80696A8(Entity *a0);
|
||||
extern void sub_8041AD0(Entity *pokemon);
|
||||
extern void sub_8041AE0(Entity *pokemon);
|
||||
extern void sub_807EC28(bool8);
|
||||
extern const u8 *GetCurrentDungeonName(void);
|
||||
|
||||
|
||||
extern const u8 *gUnknown_80F8A84;
|
||||
extern const u8 *gUnknown_80F8A6C;
|
||||
extern const u8 *gUnknown_80F8ADC;
|
||||
extern const u8 *gUnknown_80F8AB0;
|
||||
extern const u8 *gUnknown_80F8B0C;
|
||||
extern const u8 *gUnknown_80FD4B0;
|
||||
extern const u8 *gUnknown_80F8A4C;
|
||||
extern const u8 *gUnknown_80F8A28;
|
||||
extern const u8 *gUnknown_8100208;
|
||||
extern const u8 *gUnknown_80F9BD8;
|
||||
extern const u8 *gUnknown_80F9C08;
|
||||
extern const u8 *gUnknown_80F9C2C;
|
||||
extern const u8 *gUnknown_80F9BB0;
|
||||
extern const u8 *gUnknown_80FDE18;
|
||||
extern const u8 *gUnknown_80F8B24;
|
||||
extern const u8 *gTeamToolboxAPtr;
|
||||
extern const u8 *gTeamToolboxBPtr;
|
||||
extern const u8 *gFieldItemMenuGroundTextPtr;
|
||||
extern const u8 *gUnknown_80FE940;
|
||||
extern const u8 *gWhichTextPtr1;
|
||||
extern const u8 *const gFieldMenuMovesPtr;
|
||||
extern const u8 *const gFieldMenuItemsPtr;
|
||||
extern const u8 *const gFieldMenuTeamPtr;
|
||||
extern const u8 *const gFieldMenuOthersPtr;
|
||||
extern const u8 *const gFieldMenuGroundPtr;
|
||||
extern const u8 *const gUnknown_80F9174;
|
||||
extern const u8 *const gUnknown_80F9190;
|
||||
extern const u8 *const gUnknown_80F91C8;
|
||||
extern const u8 *const gUnknown_80F91E0;
|
||||
extern const u8 *const gUnknown_80F91A8;
|
||||
extern const u8 *const gUnknown_80FE954;
|
||||
|
||||
extern s32 gTeamMenuChosenId;
|
||||
|
||||
@@ -128,6 +91,7 @@ static EWRAM_DATA s16 sArrowsFrames = 0;
|
||||
static EWRAM_DATA bool8 sShowThreeArrows1 = 0;
|
||||
static EWRAM_DATA bool8 sShowThreeArrows2 = 0;
|
||||
|
||||
static void TryCreateModeArrows(Entity *leader);
|
||||
static void sub_805E738(Entity *a0);
|
||||
static bool8 sub_805E874(void);
|
||||
static bool8 sub_805EC2C(Entity *a0, s32 x, s32 y);
|
||||
@@ -414,8 +378,8 @@ void DungeonHandlePlayerInput(void)
|
||||
s32 prevMapOption = gGameOptionsRef->mapOption;
|
||||
gShowMonsterDotsInDungeonMap = TRUE;
|
||||
gDungeon->unk181e8.inFloorMapMode = TRUE;
|
||||
if (!sub_8094C48()) {
|
||||
sub_8094C88();
|
||||
if (!GameOptions_ShowMiniMap()) {
|
||||
GameOptions_SetTransparentMiniMap();
|
||||
}
|
||||
sub_8052210(1);
|
||||
UpdateMinimap();
|
||||
|
||||
@@ -21,11 +21,9 @@
|
||||
#include "sprite.h"
|
||||
#include "text_1.h"
|
||||
#include "trap.h"
|
||||
#include "run_dungeon.h"
|
||||
|
||||
extern u8 GetFloorType(void);
|
||||
extern bool8 sub_8094C48(void);
|
||||
extern bool8 ShouldMinimapDisplayEntity(Entity *ent);
|
||||
extern bool8 DoesNotHaveShadedMap(void);
|
||||
|
||||
struct UnkStruct1
|
||||
{
|
||||
@@ -235,7 +233,7 @@ void DrawMinimapTile(s32 x, s32 y)
|
||||
}
|
||||
}
|
||||
|
||||
if (sub_8094C48() && !gDungeon->unk1356C) {
|
||||
if (GameOptions_ShowMiniMap() && !gDungeon->unk1356C) {
|
||||
mapGfxType = MAP_GFX_NOTHING;
|
||||
if (!blinded) {
|
||||
Entity *entity = tile->monster;
|
||||
@@ -383,7 +381,7 @@ void DrawMinimapTile(s32 x, s32 y)
|
||||
if (gGameOptionsRef->mapOption == TOP_MAP_AND_TEAM_NO_BOTTOM) {
|
||||
mapGfxType = (s16) (mapGfxType + 128);
|
||||
}
|
||||
else if (DoesNotHaveShadedMap() == TRUE) {
|
||||
else if (GameOptions_IsTransparentMiniMap() == TRUE) {
|
||||
mapGfxType = (s16) (mapGfxType + 64);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,20 +46,16 @@
|
||||
#include "text_2.h"
|
||||
#include "weather.h"
|
||||
|
||||
extern void TryTriggerTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4);
|
||||
bool8 sub_805E874(void);
|
||||
bool8 sub_80701A4(Entity *a0);
|
||||
void sub_805E738(Entity *a0);
|
||||
void sub_8040A78(void);
|
||||
void sub_805E804(void);
|
||||
void ShowDungeonOthersMenu(void);
|
||||
void sub_8075680(u32);
|
||||
void sub_8094C88(void);
|
||||
void sub_8040A84(void);
|
||||
void sub_806A914(u8 a0, u8 a1, u8 a2);
|
||||
u16 GetLeaderActionId(void);
|
||||
void sub_80978C8(s16 a0);
|
||||
bool8 sub_8094C48(void);
|
||||
bool8 sub_805EC4C(Entity *a0, u8 a1);
|
||||
void HandleTalkFieldAction(Entity *);
|
||||
void ShowMainMenu(bool8 fromBPress, bool8 a1);
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "game_options.h"
|
||||
#include "graphics_memory.h"
|
||||
#include "data_serializer.h"
|
||||
#include "game_options.h"
|
||||
|
||||
struct unkStruct_8094CB0
|
||||
{
|
||||
u16 unk0;
|
||||
s16 unk2;
|
||||
};
|
||||
|
||||
EWRAM_INIT GameOptions *gGameOptionsRef = {NULL};
|
||||
EWRAM_DATA GameOptions gGameOptions = {0};
|
||||
@@ -201,100 +195,105 @@ void SetWindowBGColor(void)
|
||||
SetFontsBaseColor(winColors[gGameOptionsRef->windowColor & NUM_WINDOW_COLORS]);
|
||||
}
|
||||
|
||||
bool8 sub_8094C48(void)
|
||||
bool8 GameOptions_ShowMiniMap(void)
|
||||
{
|
||||
switch(gGameOptionsRef->mapOption)
|
||||
{
|
||||
switch (gGameOptionsRef->mapOption) {
|
||||
default:
|
||||
return TRUE;
|
||||
case TOP_TEAM_DATA_NO_BOTTOM:
|
||||
case TOP_TEAM_DATA_NO_BOTTOM: // MAP_OPTION_OFF
|
||||
case TOP_MESSAGE_LOG_NO_BOTTOM:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
bool8 DoesNotHaveShadedMap(void)
|
||||
bool8 GameOptions_IsTransparentMiniMap(void)
|
||||
{
|
||||
switch(gGameOptionsRef->mapOption)
|
||||
{
|
||||
switch (gGameOptionsRef->mapOption) {
|
||||
default:
|
||||
return TRUE;
|
||||
case TOP_TEAM_DATA_SHADED_MAP_BOTTOM:
|
||||
case TOP_MESSAGE_LOG_SHADED_MAP_BOTTOM:
|
||||
case TOP_MESSAGE_LOG_SHADED_MAP_BOTTOM: // MAP_OPTION_SHADE
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8094C88(void)
|
||||
void GameOptions_SetTransparentMiniMap(void)
|
||||
{
|
||||
if (gGameOptionsRef->mapOption == 0 || gGameOptionsRef->mapOption == 1 || gGameOptionsRef->mapOption == 2)
|
||||
gGameOptionsRef->mapOption = 1;
|
||||
else if (gGameOptionsRef->mapOption == 3 || gGameOptionsRef->mapOption == 4 || gGameOptionsRef->mapOption == 5)
|
||||
gGameOptionsRef->mapOption = 4;
|
||||
if (gGameOptionsRef->mapOption == MAP_OPTION_OFF || gGameOptionsRef->mapOption == MAP_OPTION_CLEAR || gGameOptionsRef->mapOption == MAP_OPTION_SHADE)
|
||||
gGameOptionsRef->mapOption = MAP_OPTION_CLEAR;
|
||||
else if (gGameOptionsRef->mapOption == TOP_MESSAGE_LOG_NO_BOTTOM || gGameOptionsRef->mapOption == TOP_MESSAGE_LOG_CLEAR_MAP_BOTTOM || gGameOptionsRef->mapOption == TOP_MESSAGE_LOG_SHADED_MAP_BOTTOM)
|
||||
gGameOptionsRef->mapOption = TOP_MESSAGE_LOG_CLEAR_MAP_BOTTOM;
|
||||
}
|
||||
|
||||
void sub_8094CB0(struct unkStruct_8094CB0 *r0)
|
||||
// DS Stuff below?
|
||||
struct unkStruct_8094CB0
|
||||
{
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
};
|
||||
|
||||
UNUSED static void sub_8094CB0(struct unkStruct_8094CB0 *r0)
|
||||
{
|
||||
r0->unk0 = -1;
|
||||
r0->unk2 = -1;
|
||||
}
|
||||
|
||||
void sub_8094CC0(struct unkStruct_8094CB0 *r0)
|
||||
UNUSED static void sub_8094CC0(struct unkStruct_8094CB0 *r0)
|
||||
{
|
||||
r0->unk0 = -1;
|
||||
r0->unk2 = -1;
|
||||
}
|
||||
|
||||
void sub_8094CD0(struct unkStruct_8094CB0 *r0)
|
||||
UNUSED static void sub_8094CD0(struct unkStruct_8094CB0 *r0)
|
||||
{
|
||||
r0->unk0 = -1;
|
||||
r0->unk2 = -1;
|
||||
}
|
||||
|
||||
void sub_8094CE0(struct unkStruct_8094CB0 *r0)
|
||||
UNUSED static void sub_8094CE0(struct unkStruct_8094CB0 *r0)
|
||||
{
|
||||
r0->unk0 = -1;
|
||||
r0->unk2 = -1;
|
||||
}
|
||||
|
||||
void sub_8094CF0(struct unkStruct_8094CB0 *r0)
|
||||
UNUSED static void sub_8094CF0(struct unkStruct_8094CB0 *r0)
|
||||
{
|
||||
r0->unk0 = -1;
|
||||
r0->unk2 = -1;
|
||||
}
|
||||
|
||||
void sub_8094D00(struct unkStruct_8094CB0 *r0)
|
||||
UNUSED static void sub_8094D00(struct unkStruct_8094CB0 *r0)
|
||||
{
|
||||
r0->unk0 = -1;
|
||||
r0->unk2 = -1;
|
||||
}
|
||||
|
||||
u32 sub_8094D10(void)
|
||||
UNUSED static u32 sub_8094D10(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 sub_8094D14(void)
|
||||
bool8 sub_8094D14(void)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
UNUSED static u32 sub_8094D18(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sub_8094D18(void)
|
||||
UNUSED static u32 sub_8094D1C(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sub_8094D1C(void)
|
||||
UNUSED static u32 sub_8094D20(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sub_8094D20(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sub_8094D24(void)
|
||||
UNUSED static u32 sub_8094D24(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
#include "dungeon_tilemap.h"
|
||||
#include "pokemon_3.h"
|
||||
#include "move_orb_actions_1.h"
|
||||
#include "run_dungeon.h"
|
||||
|
||||
extern void sub_8041D84(Entity *);
|
||||
extern void sub_804178C(u32);
|
||||
extern void sub_8041D5C(Entity *);
|
||||
extern void sub_8041D48(Entity *);
|
||||
extern void sub_8041D38(Entity * pokemon);
|
||||
extern u8 GetFloorType(void);
|
||||
extern void sub_8041CDC(Entity *pokemon);
|
||||
extern void sub_8041CEC(Entity *pokemon);
|
||||
extern void nullsub_73(Entity *);
|
||||
@@ -53,7 +53,6 @@ extern void nullsub_85(Entity *);
|
||||
extern void UpdateMinimap();
|
||||
extern void EntityUpdateStatusSprites(Entity *);
|
||||
extern void sub_8042A74(Entity *r0);
|
||||
extern void sub_807EC28(bool8);
|
||||
extern void DealDamageToEntity(Entity *, s16, u32, u32);
|
||||
extern void sub_80420C8(Entity *r0);
|
||||
extern void nullsub_68(Entity *);
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
#include "dungeon_pos_data.h"
|
||||
#include "dungeon_damage.h"
|
||||
#include "dungeon_mon_spawn.h"
|
||||
#include "dungeon_kecleon_shop.h"
|
||||
|
||||
extern void UpdateMinimap();
|
||||
extern void EntityUpdateStatusSprites(Entity *);
|
||||
extern void sub_8042A74(Entity *r0);
|
||||
extern void sub_807EC28(bool8);
|
||||
extern s32 GetMonsterApparentID(Entity *param_1, s16 param_2);
|
||||
extern void sub_806A898(Entity *, u32, u32);
|
||||
extern void HealTargetHP(Entity *pokemon, Entity *r1, s16, s16, u32);
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "wigglytuff_shop3.h"
|
||||
#include "wonder_mail.h"
|
||||
#include "naming_screen.h"
|
||||
#include "game_options.h"
|
||||
#include "script_item.h"
|
||||
#include "structs/menu.h"
|
||||
#include "structs/str_file_system.h"
|
||||
@@ -130,7 +131,6 @@ void sub_8096BD0(void);
|
||||
bool8 DrawCredits(s32 creditsCategoryIndex, s32);
|
||||
u32 sub_8035574();
|
||||
void sub_803565C(void);
|
||||
u8 sub_8094D14(void);
|
||||
void GroundMap_ExecuteEvent(s16, u32);
|
||||
bool8 sub_8015080(u8 *buffer, const MenuItem *menuItems);
|
||||
s32 sub_801516C();
|
||||
|
||||
Reference in New Issue
Block a user