ram vars to C files

This commit is contained in:
DizzyEggg 2017-12-19 17:33:07 +01:00
parent b7a2335347
commit 4abc2eea8a
6 changed files with 23 additions and 31 deletions

View File

@ -0,0 +1,5 @@
gUnknown_03006080
gUnknown_03006084
gApproachingTrainers
gNoOfApproachingTrainers
gUnknown_030060AC

View File

@ -9,7 +9,12 @@ struct ApproachingTrainer
u8 taskId;
};
extern u16 gUnknown_03006080;
extern u8 gUnknown_03006084[4];
extern struct ApproachingTrainer gApproachingTrainers[2];
extern u8 gNoOfApproachingTrainers;
extern u8 gUnknown_030060AC;
extern u8 gApproachingTrainerId;
bool8 CheckForTrainersWantingBattle(void);
void sub_80B4578(struct MapObject *var);

View File

@ -88,9 +88,6 @@ extern u32 GetGameStat(u8 statId);
extern u32 gBattleTypeFlags;
extern u8 gBattleOutcome;
extern void (*gFieldCallback)(void);
extern u8 gApproachingTrainerId;
extern u8 gNoOfApproachingTrainers;
extern u16 gUnknown_03006080;
// this file's functions
static void DoBattlePikeWildBattle(void);
@ -113,7 +110,7 @@ static void HandleRematchVarsOnBattleEnd(void);
static const u8 *GetIntroSpeechOfApproachingTrainer(void);
static const u8 *GetTrainerCantBattleSpeech(void);
// ewram data
// ewram vars
EWRAM_DATA static u16 sTrainerBattleMode = 0;
EWRAM_DATA u16 gTrainerBattleOpponent_A = 0;
EWRAM_DATA u16 gTrainerBattleOpponent_B = 0;

View File

@ -14,12 +14,6 @@
#include "event_data.h"
#include "script_movement.h"
extern u8 gApproachingTrainerId;
extern u8 gNoOfApproachingTrainers;
extern u8 gUnknown_030060AC;
extern u16 gUnknown_03006080;
extern u8 gUnknown_03006084[];
extern bool8 InBattlePyramid(void);
extern bool32 InTrainerHill(void);
extern bool8 GetBattlePyramidTrainerFlag(u8 mapObjectId);
@ -55,6 +49,16 @@ static bool8 sub_80B44AC(u8 taskId, struct Task *task, struct MapObject *trainer
static void SpriteCB_TrainerIcons(struct Sprite *sprite);
// IWRAM common
u16 gUnknown_03006080;
u8 gUnknown_03006084[4];
struct ApproachingTrainer gApproachingTrainers[2];
u8 gNoOfApproachingTrainers;
u8 gUnknown_030060AC;
// EWRAM
EWRAM_DATA u8 gApproachingTrainerId = 0;
// const rom data
static const u8 sEmotion_ExclamationMarkGfx[] = INCBIN_U8("graphics/misc/emotion_exclamation.4bpp");
static const u8 sEmotion_QuestionMarkGfx[] = INCBIN_U8("graphics/misc/emotion_question.4bpp");

View File

@ -295,21 +295,7 @@ gUnknown_03005DF4: @ 3005DF4
.include "sound.o"
.include "task.o"
gUnknown_03006080: @ 3006080
.space 0x4
gUnknown_03006084: @ 3006084
.space 0xC
gApproachingTrainers: @ 3006090
.space 0x18
gNoOfApproachingTrainers: @ 30060A8
.space 0x4
gUnknown_030060AC: @ 30060AC
.space 0x4
.include "trainer_see.o"
gUnknown_030060B0: @ 30060B0
.space 0x4

View File

@ -707,12 +707,7 @@ gUnknown_02038BC6: @ 2038BC6
.space 0x2
.include "src/battle_setup.o"
.align 2
gApproachingTrainerId: @ 2038BFC
.space 0x4
.include "src/trainer_see.o"
.include "src/wild_encounter.o"
gFieldEffectArguments: @ 2038C08