summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--[-rwxr-xr-x]src/battle/anim/current.c0
-rw-r--r--[-rwxr-xr-x]src/battle/anim/egg.c0
-rw-r--r--[-rwxr-xr-x]src/battle/anim/flying.c0
-rw-r--r--[-rwxr-xr-x]src/battle/anim/ghost.c0
-rw-r--r--[-rwxr-xr-x]src/battle/anim/ground.c0
-rw-r--r--[-rwxr-xr-x]src/battle/anim/ice.c0
-rw-r--r--[-rwxr-xr-x]src/battle/anim/normal.c0
-rw-r--r--src/battle/battle_2.c8
-rw-r--r--[-rwxr-xr-x]src/battle/battle_ai_switch_items.c0
-rw-r--r--[-rwxr-xr-x]src/battle/battle_anim_812C144.c0
-rw-r--r--src/battle/battle_setup.c36
-rw-r--r--src/battle/pokeball.c2
-rw-r--r--src/berry_blender.c6
-rw-r--r--src/bike.c4
-rw-r--r--src/cable_car.c2
-rw-r--r--src/cable_club.c4
-rw-r--r--src/contest.c2
-rw-r--r--src/credits.c4
-rw-r--r--src/data/battle_strings_en.h4
-rw-r--r--[-rwxr-xr-x]src/data/field_event_obj/event_object_graphics.h0
-rw-r--r--[-rwxr-xr-x]src/data/field_event_obj/field_effect_object_graphics.h0
-rw-r--r--src/debug/nakamura_debug_menu.c8
-rw-r--r--src/debug/sound_check_menu.c252
-rw-r--r--src/decoration.c14
-rw-r--r--src/evolution_scene.c20
-rw-r--r--src/field_camera.c52
-rw-r--r--src/field_effect.c2
-rw-r--r--src/field_tasks.c4
-rw-r--r--src/fieldmap.c108
-rw-r--r--src/hall_of_fame.c2
-rw-r--r--src/item_use.c12
-rw-r--r--src/main_menu.c2
-rw-r--r--src/mauville_man.c2
-rw-r--r--src/move_tutor_menu.c4
-rw-r--r--src/overworld.c76
-rw-r--r--src/party_menu.c2
-rw-r--r--src/pokemon_3.c30
-rw-r--r--src/region_map.c20
-rw-r--r--src/roulette.c4
-rw-r--r--src/secret_base.c6
-rw-r--r--src/shop.c8
-rw-r--r--src/slot_machine.c14
-rw-r--r--src/sound.c24
-rw-r--r--src/tileset_anim.c12
-rw-r--r--src/trade.c6
-rw-r--r--src/wild_encounter.c2
46 files changed, 379 insertions, 379 deletions
diff --git a/src/battle/anim/current.c b/src/battle/anim/current.c
index af72edef0..af72edef0 100755..100644
--- a/src/battle/anim/current.c
+++ b/src/battle/anim/current.c
diff --git a/src/battle/anim/egg.c b/src/battle/anim/egg.c
index 5b6d56dac..5b6d56dac 100755..100644
--- a/src/battle/anim/egg.c
+++ b/src/battle/anim/egg.c
diff --git a/src/battle/anim/flying.c b/src/battle/anim/flying.c
index ec40e26c4..ec40e26c4 100755..100644
--- a/src/battle/anim/flying.c
+++ b/src/battle/anim/flying.c
diff --git a/src/battle/anim/ghost.c b/src/battle/anim/ghost.c
index fd33d4782..fd33d4782 100755..100644
--- a/src/battle/anim/ghost.c
+++ b/src/battle/anim/ghost.c
diff --git a/src/battle/anim/ground.c b/src/battle/anim/ground.c
index a523df20e..a523df20e 100755..100644
--- a/src/battle/anim/ground.c
+++ b/src/battle/anim/ground.c
diff --git a/src/battle/anim/ice.c b/src/battle/anim/ice.c
index 50c8b9030..50c8b9030 100755..100644
--- a/src/battle/anim/ice.c
+++ b/src/battle/anim/ice.c
diff --git a/src/battle/anim/normal.c b/src/battle/anim/normal.c
index 8303e7c68..8303e7c68 100755..100644
--- a/src/battle/anim/normal.c
+++ b/src/battle/anim/normal.c
diff --git a/src/battle/battle_2.c b/src/battle/battle_2.c
index 79d60125e..11ddd6b71 100644
--- a/src/battle/battle_2.c
+++ b/src/battle/battle_2.c
@@ -6339,7 +6339,7 @@ void HandleEndTurn_BattleWon(void)
{
case TRAINER_CLASS_ELITE_FOUR:
case TRAINER_CLASS_CHAMPION:
- PlayBGM(BGM_KACHI5);
+ PlayBGM(MUS_KACHI5);
break;
case TRAINER_CLASS_TEAM_AQUA:
case TRAINER_CLASS_TEAM_MAGMA:
@@ -6347,13 +6347,13 @@ void HandleEndTurn_BattleWon(void)
case TRAINER_CLASS_AQUA_LEADER:
case TRAINER_CLASS_MAGMA_ADMIN:
case TRAINER_CLASS_MAGMA_LEADER:
- PlayBGM(BGM_KACHI4);
+ PlayBGM(MUS_KACHI4);
break;
case TRAINER_CLASS_LEADER:
- PlayBGM(BGM_KACHI3);
+ PlayBGM(MUS_KACHI3);
break;
default:
- PlayBGM(BGM_KACHI1);
+ PlayBGM(MUS_KACHI1);
break;
}
}
diff --git a/src/battle/battle_ai_switch_items.c b/src/battle/battle_ai_switch_items.c
index 4dd7614bf..4dd7614bf 100755..100644
--- a/src/battle/battle_ai_switch_items.c
+++ b/src/battle/battle_ai_switch_items.c
diff --git a/src/battle/battle_anim_812C144.c b/src/battle/battle_anim_812C144.c
index 601e3c6df..601e3c6df 100755..100644
--- a/src/battle/battle_anim_812C144.c
+++ b/src/battle/battle_anim_812C144.c
diff --git a/src/battle/battle_setup.c b/src/battle/battle_setup.c
index f53959cc2..8c5f68902 100644
--- a/src/battle/battle_setup.c
+++ b/src/battle/battle_setup.c
@@ -587,7 +587,7 @@ void ScrSpecial_StartRayquazaBattle(void)
ScriptContext2_Enable();
gMain.savedCallback = CB2_EndScriptedWildBattle;
gBattleTypeFlags = BATTLE_TYPE_LEGENDARY;
- CreateBattleStartTask(B_TRANSITION_BLUR, BGM_BATTLE34);
+ CreateBattleStartTask(B_TRANSITION_BLUR, MUS_BATTLE34);
IncrementGameStat(GAME_STAT_TOTAL_BATTLES);
IncrementGameStat(GAME_STAT_WILD_BATTLES);
}
@@ -598,9 +598,9 @@ void ScrSpecial_StartGroudonKyogreBattle(void)
gMain.savedCallback = CB2_EndScriptedWildBattle;
gBattleTypeFlags = BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_KYOGRE_GROUDON;
if (gGameVersion == VERSION_RUBY)
- CreateBattleStartTask(B_TRANSITION_SHARDS, BGM_BATTLE34); // GROUDON
+ CreateBattleStartTask(B_TRANSITION_SHARDS, MUS_BATTLE34); // GROUDON
else
- CreateBattleStartTask(B_TRANSITION_RIPPLE, BGM_BATTLE34); // KYOGRE
+ CreateBattleStartTask(B_TRANSITION_RIPPLE, MUS_BATTLE34); // KYOGRE
IncrementGameStat(GAME_STAT_TOTAL_BATTLES);
IncrementGameStat(GAME_STAT_WILD_BATTLES);
}
@@ -610,7 +610,7 @@ void ScrSpecial_StartRegiBattle(void)
ScriptContext2_Enable();
gMain.savedCallback = CB2_EndScriptedWildBattle;
gBattleTypeFlags = BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_REGI;
- CreateBattleStartTask(B_TRANSITION_GRID_SQUARES, BGM_BATTLE36);
+ CreateBattleStartTask(B_TRANSITION_GRID_SQUARES, MUS_BATTLE36);
IncrementGameStat(GAME_STAT_TOTAL_BATTLES);
IncrementGameStat(GAME_STAT_WILD_BATTLES);
}
@@ -1172,46 +1172,46 @@ void PlayTrainerEncounterMusic(void)
switch (sub_803FC58(gTrainerBattleOpponent))
{
case TRAINER_ENCOUNTER_MUSIC_MALE:
- music = BGM_BOYEYE;
+ music = MUS_BOYEYE;
break;
case TRAINER_ENCOUNTER_MUSIC_FEMALE:
- music = BGM_GIRLEYE;
+ music = MUS_GIRLEYE;
break;
case TRAINER_ENCOUNTER_MUSIC_GIRL:
- music = BGM_SYOUJOEYE;
+ music = MUS_SYOUJOEYE;
break;
case TRAINER_ENCOUNTER_MUSIC_INTENSE:
- music = BGM_HAGESHII;
+ music = MUS_HAGESHII;
break;
case TRAINER_ENCOUNTER_MUSIC_COOL:
- music = BGM_KAKKOII;
+ music = MUS_KAKKOII;
break;
case TRAINER_ENCOUNTER_MUSIC_AQUA:
- music = BGM_AQA_0;
+ music = MUS_AQA_0;
break;
case TRAINER_ENCOUNTER_MUSIC_MAGMA:
- music = BGM_MGM0;
+ music = MUS_MGM0;
break;
case TRAINER_ENCOUNTER_MUSIC_SWIMMER:
- music = BGM_SWIMEYE;
+ music = MUS_SWIMEYE;
break;
case TRAINER_ENCOUNTER_MUSIC_TWINS:
- music = BGM_HUTAGO;
+ music = MUS_HUTAGO;
break;
case TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR:
- music = BGM_SITENNOU;
+ music = MUS_SITENNOU;
break;
case TRAINER_ENCOUNTER_MUSIC_HIKER:
- music = BGM_YAMA_EYE;
+ music = MUS_YAMA_EYE;
break;
case TRAINER_ENCOUNTER_MUSIC_INTERVIEWER:
- music = BGM_INTER_V;
+ music = MUS_INTER_V;
break;
case TRAINER_ENCOUNTER_MUSIC_RICH:
- music = BGM_TEST;
+ music = MUS_TEST;
break;
default:
- music = BGM_AYASII;
+ music = MUS_AYASII;
}
PlayNewMapMusic(music);
}
diff --git a/src/battle/pokeball.c b/src/battle/pokeball.c
index be2adbf1b..c619141a1 100644
--- a/src/battle/pokeball.c
+++ b/src/battle/pokeball.c
@@ -815,7 +815,7 @@ static void sub_8046FBC(struct Sprite *sprite)
{
gDoingBattleAnim = 0;
m4aMPlayAllStop();
- PlaySE(BGM_FANFA5);
+ PlaySE(MUS_FANFA5);
}
else if (sprite->data[4] == 315)
{
diff --git a/src/berry_blender.c b/src/berry_blender.c
index 4531ea546..8bf669a92 100644
--- a/src/berry_blender.c
+++ b/src/berry_blender.c
@@ -1245,7 +1245,7 @@ static void sub_804E9F8(void)
{
gBerryBlenderData->field_178 = GetCurrentMapMusic();
}
- PlayBGM(BGM_CYCLING);
+ PlayBGM(MUS_CYCLING);
break;
case 100:
Menu_DrawStdWindowFrame(0, 13, 29, 19);
@@ -1507,7 +1507,7 @@ static void sub_804F378(void)
{
gBerryBlenderData->field_178 = GetCurrentMapMusic();
}
- PlayBGM(BGM_CYCLING);
+ PlayBGM(MUS_CYCLING);
PlaySE(SE_MOTER);
Blender_ControlHitPitch();
break;
@@ -3524,7 +3524,7 @@ static void sub_8052BD0(u8 taskID)
{
if (gTasks[taskID].data[0] == 0)
{
- PlayFanfare(BGM_FANFA1);
+ PlayFanfare(MUS_FANFA1);
gTasks[taskID].data[0]++;
}
if (IsFanfareTaskInactive())
diff --git a/src/bike.c b/src/bike.c
index f0f996b6b..41090a375 100644
--- a/src/bike.c
+++ b/src/bike.c
@@ -1001,8 +1001,8 @@ void GetOnOffBike(u8 var)
else
{
SetPlayerAvatarTransitionFlags(var);
- Overworld_SetSavedMusic(BGM_CYCLING);
- Overworld_ChangeMusicTo(BGM_CYCLING);
+ Overworld_SetSavedMusic(MUS_CYCLING);
+ Overworld_ChangeMusicTo(MUS_CYCLING);
}
}
diff --git a/src/cable_car.c b/src/cable_car.c
index c4276c733..52111b285 100644
--- a/src/cable_car.c
+++ b/src/cable_car.c
@@ -386,7 +386,7 @@ static void CableCarMainCallback_Setup(void)
break;
case 7:
BeginNormalPaletteFade(0xFFFFFFFF, 3, 16, 0, RGB(0, 0, 0));
- FadeInNewBGM(BGM_ROPEWAY, 1);
+ FadeInNewBGM(MUS_ROPEWAY, 1);
sub_8123FBC(1);
gMain.state++;
break;
diff --git a/src/cable_club.c b/src/cable_club.c
index 0da23c5f3..1e1f0af07 100644
--- a/src/cable_club.c
+++ b/src/cable_club.c
@@ -766,9 +766,9 @@ static void sub_808382C(u8 taskId)
break;
case 5:
if (gLinkPlayers[0].trainerId & 1)
- current_map_music_set__default_for_battle(BGM_BATTLE32);
+ current_map_music_set__default_for_battle(MUS_BATTLE32);
else
- current_map_music_set__default_for_battle(BGM_BATTLE20);
+ current_map_music_set__default_for_battle(MUS_BATTLE20);
switch (gSpecialVar_0x8004)
{
diff --git a/src/contest.c b/src/contest.c
index fcadd8ae1..9dff08ea7 100644
--- a/src/contest.c
+++ b/src/contest.c
@@ -1584,7 +1584,7 @@ void sub_80AC2CC(u8 taskId)
{
case 0:
sub_80B1EA8(-1, 1);
- PlayFanfare(BGM_ME_ZANNEN);
+ PlayFanfare(MUS_ME_ZANNEN);
gTasks[taskId].data[10]++;
break;
case 1:
diff --git a/src/credits.c b/src/credits.c
index b99bc56bd..1a810492b 100644
--- a/src/credits.c
+++ b/src/credits.c
@@ -497,7 +497,7 @@ void sub_81439D0(void)
SetVBlankCallback(vblank_8143948);
- m4aSongNumStart(BGM_THANKFOR);
+ m4aSongNumStart(MUS_THANKFOR);
SetMainCallback2(sub_814395C);
gUnknown_02039325 = 0;
@@ -741,7 +741,7 @@ static void task_a_8144080(u8 taskIdA)
}
if (gTasks[taskIdA].data[TDA_0] == 6840)
- m4aSongNumStart(BGM_END);
+ m4aSongNumStart(MUS_END);
gTasks[taskIdA].data[TDA_0] -= 1;
}
diff --git a/src/data/battle_strings_en.h b/src/data/battle_strings_en.h
index 67eb70ee1..7ae5467dd 100644
--- a/src/data/battle_strings_en.h
+++ b/src/data/battle_strings_en.h
@@ -747,8 +747,8 @@ const u8 BattleText_BallBrokeOhNo[] = _("Oh, no!\nThe POKéMON broke free!");
const u8 BattleText_BallBrokeAppeared[] = _("Aww!\nIt appeared to be caught!");
const u8 BattleText_BallBrokeAlmost[] = _("Aargh!\nAlmost had it!");
const u8 BattleText_BallBrokeSoClose[] = _("Shoot!\nIt was so close, too!");
-const u8 BattleText_BallCaught1[] = _("Gotcha!\n{STRING 3} was caught!{UNKNOWN_A}{PLAY_BGM BGM_KACHI22}\p");
-const u8 BattleText_BallCaught2[] = _("Gotcha!\n{STRING 3} was caught!{UNKNOWN_A}{PLAY_BGM BGM_KACHI22}{PAUSE 127}");
+const u8 BattleText_BallCaught1[] = _("Gotcha!\n{STRING 3} was caught!{UNKNOWN_A}{PLAY_BGM MUS_KACHI22}\p");
+const u8 BattleText_BallCaught2[] = _("Gotcha!\n{STRING 3} was caught!{UNKNOWN_A}{PLAY_BGM MUS_KACHI22}{PAUSE 127}");
const u8 BattleText_GiveNickname[] = _("Give a nickname to the\ncaptured {STRING 3}?");
const u8 BattleText_SentToPC[] = _("{STRING 3} was sent to\n{STRING 35} PC.");
const u8 BattleText_Someone[] = _("someone’s");
diff --git a/src/data/field_event_obj/event_object_graphics.h b/src/data/field_event_obj/event_object_graphics.h
index 8f1bb96a8..8f1bb96a8 100755..100644
--- a/src/data/field_event_obj/event_object_graphics.h
+++ b/src/data/field_event_obj/event_object_graphics.h
diff --git a/src/data/field_event_obj/field_effect_object_graphics.h b/src/data/field_event_obj/field_effect_object_graphics.h
index 36850a4ec..36850a4ec 100755..100644
--- a/src/data/field_event_obj/field_effect_object_graphics.h
+++ b/src/data/field_event_obj/field_effect_object_graphics.h
diff --git a/src/debug/nakamura_debug_menu.c b/src/debug/nakamura_debug_menu.c
index a20d58319..508dc048e 100644
--- a/src/debug/nakamura_debug_menu.c
+++ b/src/debug/nakamura_debug_menu.c
@@ -752,14 +752,14 @@ static const u8 Str_843E58D[] = _(
static u16 FishingPoints_CountFishingTilesInMapThird(u8 a0)
{
u16 retval = 0;
- u16 height = gMapHeader.mapData->height / 3;
+ u16 height = gMapHeader.mapLayout->height / 3;
u16 y;
u16 x;
u16 start = height * a0;
for (y = start; y < start + height; y++)
{
- for (x = 0; x < gMapHeader.mapData->width; x++)
+ for (x = 0; x < gMapHeader.mapLayout->width; x++)
{
if (MetatileBehavior_IsFeebasEncounterable(MapGridGetMetatileBehaviorAt(x + 7, y + 7)) == TRUE)
{
@@ -783,9 +783,9 @@ static u16 FishingPoints_GetIndexOfCurrentFishingSpot(void)
x -= 7;
y -= 7;
- for (yy = 0; yy < gMapHeader.mapData->height; yy++)
+ for (yy = 0; yy < gMapHeader.mapLayout->height; yy++)
{
- for (xx = 0; xx < gMapHeader.mapData->width; xx++)
+ for (xx = 0; xx < gMapHeader.mapLayout->width; xx++)
{
if (MetatileBehavior_IsFeebasEncounterable(MapGridGetMetatileBehaviorAt(xx + 7, yy + 7)) == TRUE)
{
diff --git a/src/debug/sound_check_menu.c b/src/debug/sound_check_menu.c
index 1fcf52f38..d57c699da 100644
--- a/src/debug/sound_check_menu.c
+++ b/src/debug/sound_check_menu.c
@@ -19,7 +19,7 @@
// window selections
enum
{
- BGM_WINDOW,
+ MUS_WINDOW,
SE_WINDOW
};
@@ -151,7 +151,7 @@ void CB2_StartSoundCheckMenu(void)
SetMainCallback2(CB2_SoundCheckMenu);
REG_DISPCNT = 0x7140;
taskId = CreateTask(Task_InitSoundCheckMenu, 0);
- gTasks[taskId].tWindowSelected = BGM_WINDOW;
+ gTasks[taskId].tWindowSelected = MUS_WINDOW;
gTasks[taskId].tBgmIndex = 0;
gTasks[taskId].tSeIndex = 0;
gTasks[taskId].data[3] = 0;
@@ -196,7 +196,7 @@ extern const u8 *const gSENames[];
void sub_80BA384(u8 taskId) // Task_HandleDrawingSoundCheckMenuText
{
HighlightSelectedWindow(gTasks[taskId].tWindowSelected);
- PrintSoundNumber(gTasks[taskId].tBgmIndex + BGM_STOP, 7, 8); // print by BGM index
+ PrintSoundNumber(gTasks[taskId].tBgmIndex + MUS_STOP, 7, 8); // print by BGM index
sub_80BA79C(gBGMNames[gTasks[taskId].tBgmIndex], 11, 8);
PrintSoundNumber(gTasks[taskId].tSeIndex, 7, 15);
sub_80BA79C(gSENames[gTasks[taskId].tSeIndex], 11, 15);
@@ -247,19 +247,19 @@ bool8 Task_ProcessSoundCheckMenuInput(u8 taskId)
{
if (gTasks[taskId].tBgmIndex != 0)
{
- m4aSongNumStop(gTasks[taskId].data[3] + BGM_STOP);
- m4aSongNumStart(gTasks[taskId].tBgmIndex + BGM_STOP);
+ m4aSongNumStop(gTasks[taskId].data[3] + MUS_STOP);
+ m4aSongNumStart(gTasks[taskId].tBgmIndex + MUS_STOP);
gTasks[taskId].data[3] = gTasks[taskId].tBgmIndex;
}
else
{
- m4aSongNumStop(gTasks[taskId].data[3] + BGM_STOP);
+ m4aSongNumStop(gTasks[taskId].data[3] + MUS_STOP);
gTasks[taskId].data[3] = 0;
}
}
else if (gTasks[taskId].tBgmIndex != 0)
{
- m4aSongNumStart(gTasks[taskId].tBgmIndex + BGM_STOP);
+ m4aSongNumStart(gTasks[taskId].tBgmIndex + MUS_STOP);
gTasks[taskId].data[3] = gTasks[taskId].tBgmIndex;
}
}
@@ -346,7 +346,7 @@ void HighlightSelectedWindow(u8 windowType)
{
switch (windowType)
{
- case BGM_WINDOW:
+ case MUS_WINDOW:
default:
REG_WIN1H = WIN_RANGE(17, 223);
REG_WIN1V = WIN_RANGE(41, 87);
@@ -819,124 +819,124 @@ void sub_80BB1D4(void)
}
#define SOUND_LIST_BGM \
- X(BGM_STOP, "STOP") \
- X(BGM_TETSUJI, "TETSUJI") \
- X(BGM_FIELD13, "FIELD13") \
- X(BGM_KACHI22, "KACHI22") \
- X(BGM_KACHI2, "KACHI2") \
- X(BGM_KACHI3, "KACHI3") \
- X(BGM_KACHI5, "KACHI5") \
- X(BGM_PCC, "PCC") \
- X(BGM_NIBI, "NIBI") \
- X(BGM_SUIKUN, "SUIKUN") \
- X(BGM_DOORO1, "DOORO1") \
- X(BGM_DOORO_X1, "DOORO-X1") \
- X(BGM_DOORO_X3, "DOORO-X3") \
- X(BGM_MACHI_S2, "MACHI-S2") \
- X(BGM_MACHI_S4, "MACHI-S4") \
- X(BGM_GIM, "GIM") \
- X(BGM_NAMINORI, "NAMINORI") \
- X(BGM_DAN01, "DAN01") \
- X(BGM_FANFA1, "FANFA1") \
- X(BGM_ME_ASA, "ME-ASA") \
- X(BGM_ME_BACHI, "ME-BACHI") \
- X(BGM_FANFA4, "FANFA4") \
- X(BGM_FANFA5, "FANFA5") \
- X(BGM_ME_WAZA, "ME-WAZA") \
- X(BGM_BIJYUTU, "BIJYUTU") \
- X(BGM_DOORO_X4, "DOORO-X4") \
- X(BGM_FUNE_KAN, "FUNE-KAN") \
- X(BGM_ME_SHINKA, "ME-SHINKA") \
- X(BGM_SHINKA, "SHINKA") \
- X(BGM_ME_WASURE, "ME-WASURE") \
- X(BGM_SYOUJOEYE, "SYOUJOEYE") \
- X(BGM_BOYEYE, "BOYEYE") \
- X(BGM_DAN02, "DAN02") \
- X(BGM_MACHI_S3, "MACHI-S3") \
- X(BGM_ODAMAKI, "ODAMAKI") \
- X(BGM_B_TOWER, "B-TOWER") \
- X(BGM_SWIMEYE, "SWIMEYE") \
- X(BGM_DAN03, "DAN03") \
- X(BGM_ME_KINOMI, "ME-KINOMI") \
- X(BGM_ME_TAMA, "ME-TAMA") \
- X(BGM_ME_B_BIG, "ME-B-BIG") \
- X(BGM_ME_B_SMALL, "ME-B-SMALL") \
- X(BGM_ME_ZANNEN, "ME-ZANNEN") \
- X(BGM_BD_TIME, "BD-TIME") \
- X(BGM_TEST1, "TEST1") \
- X(BGM_TEST2, "TEST2") \
- X(BGM_TEST3, "TEST3") \
- X(BGM_TEST4, "TEST4") \
- X(BGM_TEST, "TEST") \
- X(BGM_GOMACHI0, "GOMACHI0") \
- X(BGM_GOTOWN, "GOTOWN") \
- X(BGM_POKECEN, "POKECEN") \
- X(BGM_NEXTROAD, "NEXTROAD") \
- X(BGM_GRANROAD, "GRANROAD") \
- X(BGM_CYCLING, "CYCLING") \
- X(BGM_FRIENDLY, "FRIENDLY") \
- X(BGM_MISHIRO, "MISHIRO") \
- X(BGM_TOZAN, "TOZAN") \
- X(BGM_GIRLEYE, "GIRLEYE") \
- X(BGM_MINAMO, "MINAMO") \
- X(BGM_ASHROAD, "ASHROAD") \
- X(BGM_EVENT0, "EVENT0") \
- X(BGM_DEEPDEEP, "DEEPDEEP") \
- X(BGM_KACHI1, "KACHI1") \
- X(BGM_TITLE3, "TITLE3") \
- X(BGM_DEMO1, "DEMO1") \
- X(BGM_GIRL_SUP, "GIRL-SUP") \
- X(BGM_HAGESHII, "HAGESHII") \
- X(BGM_KAKKOII, "KAKKOII") \
- X(BGM_KAZANBAI, "KAZANBAI") \
- X(BGM_AQA_0, "AQA-0") \
- X(BGM_TSURETEK, "TSURETEK") \
- X(BGM_BOY_SUP, "BOY-SUP") \
- X(BGM_RAINBOW, "RAINBOW") \
- X(BGM_AYASII, "AYASII") \
- X(BGM_KACHI4, "KACHI4") \
- X(BGM_ROPEWAY, "ROPEWAY") \
- X(BGM_CASINO, "CASINO") \
- X(BGM_HIGHTOWN, "HIGHTOWN") \
- X(BGM_SAFARI, "SAFARI") \
- X(BGM_C_ROAD, "C-ROAD") \
- X(BGM_AJITO, "AJITO") \
- X(BGM_M_BOAT, "M-BOAT") \
- X(BGM_M_DUNGON, "M-DUNGON") \
- X(BGM_FINECITY, "FINECITY") \
- X(BGM_MACHUPI, "MACHUPI") \
- X(BGM_P_SCHOOL, "P-SCHOOL") \
- X(BGM_DENDOU, "DENDOU") \
- X(BGM_TONEKUSA, "TONEKUSA") \
- X(BGM_MABOROSI, "MABOROSI") \
- X(BGM_CON_FAN, "CON-FAN") \
- X(BGM_CONTEST0, "CONTEST0") \
- X(BGM_MGM0, "MGM0") \
- X(BGM_T_BATTLE, "T-BATTLE") \
- X(BGM_OOAME, "OOAME") \
- X(BGM_HIDERI, "HIDERI") \
- X(BGM_RUNECITY, "RUNECITY") \
- X(BGM_CON_K, "CON-K") \
- X(BGM_EIKOU_R, "EIKOU-R") \
- X(BGM_KARAKURI, "KARAKURI") \
- X(BGM_HUTAGO, "HUTAGO") \
- X(BGM_SITENNOU, "SITENNOU") \
- X(BGM_YAMA_EYE, "YAMA-EYE") \
- X(BGM_CONLOBBY, "CONLOBBY") \
- X(BGM_INTER_V, "INTER-V") \
- X(BGM_DAIGO, "DAIGO") \
- X(BGM_THANKFOR, "THANKFOR") \
- X(BGM_END, "END") \
- X(BGM_BATTLE27, "BATTLE27") \
- X(BGM_BATTLE31, "BATTLE31") \
- X(BGM_BATTLE20, "BATTLE20") \
- X(BGM_BATTLE32, "BATTLE32") \
- X(BGM_BATTLE33, "BATTLE33") \
- X(BGM_BATTLE36, "BATTLE36") \
- X(BGM_BATTLE34, "BATTLE34") \
- X(BGM_BATTLE35, "BATTLE35") \
- X(BGM_BATTLE38, "BATTLE38") \
- X(BGM_BATTLE30, "BATTLE30")
+ X(MUS_STOP, "STOP") \
+ X(MUS_TETSUJI, "TETSUJI") \
+ X(MUS_FIELD13, "FIELD13") \
+ X(MUS_KACHI22, "KACHI22") \
+ X(MUS_KACHI2, "KACHI2") \
+ X(MUS_KACHI3, "KACHI3") \
+ X(MUS_KACHI5, "KACHI5") \
+ X(MUS_PCC, "PCC") \
+ X(MUS_NIBI, "NIBI") \
+ X(MUS_SUIKUN, "SUIKUN") \
+ X(MUS_DOORO1, "DOORO1") \
+ X(MUS_DOORO_X1, "DOORO-X1") \
+ X(MUS_DOORO_X3, "DOORO-X3") \
+ X(MUS_MACHI_S2, "MACHI-S2") \
+ X(MUS_MACHI_S4, "MACHI-S4") \
+ X(MUS_GIM, "GIM") \
+ X(MUS_NAMINORI, "NAMINORI") \
+ X(MUS_DAN01, "DAN01") \
+ X(MUS_FANFA1, "FANFA1") \
+ X(MUS_ME_ASA, "ME-ASA") \
+ X(MUS_ME_BACHI, "ME-BACHI") \
+ X(MUS_FANFA4, "FANFA4") \
+ X(MUS_FANFA5, "FANFA5") \
+ X(MUS_ME_WAZA, "ME-WAZA") \
+ X(MUS_BIJYUTU, "BIJYUTU") \
+ X(MUS_DOORO_X4, "DOORO-X4") \
+ X(MUS_FUNE_KAN, "FUNE-KAN") \
+ X(MUS_ME_SHINKA, "ME-SHINKA") \
+ X(MUS_SHINKA, "SHINKA") \
+ X(MUS_ME_WASURE, "ME-WASURE") \
+ X(MUS_SYOUJOEYE, "SYOUJOEYE") \
+ X(MUS_BOYEYE, "BOYEYE") \
+ X(MUS_DAN02, "DAN02") \
+ X(MUS_MACHI_S3, "MACHI-S3") \
+ X(MUS_ODAMAKI, "ODAMAKI") \
+ X(MUS_B_TOWER, "B-TOWER") \
+ X(MUS_SWIMEYE, "SWIMEYE") \
+ X(MUS_DAN03, "DAN03") \
+ X(MUS_ME_KINOMI, "ME-KINOMI") \
+ X(MUS_ME_TAMA, "ME-TAMA") \
+ X(MUS_ME_B_BIG, "ME-B-BIG") \
+ X(MUS_ME_B_SMALL, "ME-B-SMALL") \
+ X(MUS_ME_ZANNEN, "ME-ZANNEN") \
+ X(MUS_BD_TIME, "BD-TIME") \
+ X(MUS_TEST1, "TEST1") \
+ X(MUS_TEST2, "TEST2") \
+ X(MUS_TEST3, "TEST3") \
+ X(MUS_TEST4, "TEST4") \
+ X(MUS_TEST, "TEST") \
+ X(MUS_GOMACHI0, "GOMACHI0") \
+ X(MUS_GOTOWN, "GOTOWN") \
+ X(MUS_POKECEN, "POKECEN") \
+ X(MUS_NEXTROAD, "NEXTROAD") \
+ X(MUS_GRANROAD, "GRANROAD") \
+ X(MUS_CYCLING, "CYCLING") \
+ X(MUS_FRIENDLY, "FRIENDLY") \
+ X(MUS_MISHIRO, "MISHIRO") \
+ X(MUS_TOZAN, "TOZAN") \
+ X(MUS_GIRLEYE, "GIRLEYE") \
+ X(MUS_MINAMO, "MINAMO") \
+ X(MUS_ASHROAD, "ASHROAD") \
+ X(MUS_EVENT0, "EVENT0") \
+ X(MUS_DEEPDEEP, "DEEPDEEP") \
+ X(MUS_KACHI1, "KACHI1") \
+ X(MUS_TITLE3, "TITLE3") \
+ X(MUS_DEMO1, "DEMO1") \
+ X(MUS_GIRL_SUP, "GIRL-SUP") \
+ X(MUS_HAGESHII, "HAGESHII") \
+ X(MUS_KAKKOII, "KAKKOII") \
+ X(MUS_KAZANBAI, "KAZANBAI") \
+ X(MUS_AQA_0, "AQA-0") \
+ X(MUS_TSURETEK, "TSURETEK") \
+ X(MUS_BOY_SUP, "BOY-SUP") \
+ X(MUS_RAINBOW, "RAINBOW") \
+ X(MUS_AYASII, "AYASII") \
+ X(MUS_KACHI4, "KACHI4") \
+ X(MUS_ROPEWAY, "ROPEWAY") \
+ X(MUS_CASINO, "CASINO") \
+ X(MUS_HIGHTOWN, "HIGHTOWN") \
+ X(MUS_SAFARI, "SAFARI") \
+ X(MUS_C_ROAD, "C-ROAD") \
+ X(MUS_AJITO, "AJITO") \
+ X(MUS_M_BOAT, "M-BOAT") \
+ X(MUS_M_DUNGON, "M-DUNGON") \
+ X(MUS_FINECITY, "FINECITY") \
+ X(MUS_MACHUPI, "MACHUPI") \
+ X(MUS_P_SCHOOL, "P-SCHOOL") \
+ X(MUS_DENDOU, "DENDOU") \
+ X(MUS_TONEKUSA, "TONEKUSA") \
+ X(MUS_MABOROSI, "MABOROSI") \
+ X(MUS_CON_FAN, "CON-FAN") \
+ X(MUS_CONTEST0, "CONTEST0") \
+ X(MUS_MGM0, "MGM0") \
+ X(MUS_T_BATTLE, "T-BATTLE") \
+ X(MUS_OOAME, "OOAME") \
+ X(MUS_HIDERI, "HIDERI") \
+ X(MUS_RUNECITY, "RUNECITY") \
+ X(MUS_CON_K, "CON-K") \
+ X(MUS_EIKOU_R, "EIKOU-R") \
+ X(MUS_KARAKURI, "KARAKURI") \
+ X(MUS_HUTAGO, "HUTAGO") \
+ X(MUS_SITENNOU, "SITENNOU") \
+ X(MUS_YAMA_EYE, "YAMA-EYE") \
+ X(MUS_CONLOBBY, "CONLOBBY") \
+ X(MUS_INTER_V, "INTER-V") \
+ X(MUS_DAIGO, "DAIGO") \
+ X(MUS_THANKFOR, "THANKFOR") \
+ X(MUS_END, "END") \
+ X(MUS_BATTLE27, "BATTLE27") \
+ X(MUS_BATTLE31, "BATTLE31") \
+ X(MUS_BATTLE20, "BATTLE20") \
+ X(MUS_BATTLE32, "BATTLE32") \
+ X(MUS_BATTLE33, "BATTLE33") \
+ X(MUS_BATTLE36, "BATTLE36") \
+ X(MUS_BATTLE34, "BATTLE34") \
+ X(MUS_BATTLE35, "BATTLE35") \
+ X(MUS_BATTLE38, "BATTLE38") \
+ X(MUS_BATTLE30, "BATTLE30")
#define SOUND_LIST_SE \
X(SE_STOP, "STOP") \
diff --git a/src/decoration.c b/src/decoration.c
index 8eff1270f..a4976932d 100644
--- a/src/decoration.c
+++ b/src/decoration.c
@@ -2271,7 +2271,7 @@ void AddDecorationIconObjectFromEventObject(struct UnkStruct_02038900 * unk_0203
sub_81008BC(unk_02038900);
sub_8100930(unk_02038900->decoration->shape);
sub_8100874(unk_02038900);
- sub_810070C(unk_02038900->palette, ((u16 *)gMapHeader.mapData->secondaryTileset->metatiles + 8 * unk_02038900->decoration->tiles[0])[7] >> 12);
+ sub_810070C(unk_02038900->palette, ((u16 *)gMapHeader.mapLayout->secondaryTileset->metatiles + 8 * unk_02038900->decoration->tiles[0])[7] >> 12);
LoadSpritePalette(&gUnknown_083EC954);
gUnknown_020391A8 = gSprites[gFieldCamera.trackedSpriteId].data[0];
gFieldCamera.trackedSpriteId = CreateSprite(&gSpriteTemplate_83EC93C, gUnknown_083EC900[unk_02038900->decoration->shape].x, gUnknown_083EC900[unk_02038900->decoration->shape].y, 0);
@@ -3206,7 +3206,7 @@ bool8 sub_810038C(u8 taskId)
{
data[1]++;
return FALSE;
- } else if (gUnknown_020391AA == DIR_NORTH && data[1] - 7 >= gMapHeader.mapData->height)
+ } else if (gUnknown_020391AA == DIR_NORTH && data[1] - 7 >= gMapHeader.mapLayout->height)
{
data[1]--;
return FALSE;
@@ -3214,7 +3214,7 @@ bool8 sub_810038C(u8 taskId)
{
data[0]++;
return FALSE;
- } else if (gUnknown_020391AA == DIR_EAST && data[0] + data[5] - 8 >= gMapHeader.mapData->width)
+ } else if (gUnknown_020391AA == DIR_EAST && data[0] + data[5] - 8 >= gMapHeader.mapLayout->width)
{
data[0]--;
return FALSE;
@@ -3336,7 +3336,7 @@ void sub_810070C(u16 *a0, u16 a1)
u16 i;
for (i=0; i<16; i++)
{
- a0[i] = ((u16 *)gMapHeader.mapData->primaryTileset->palettes)[16 * a1 + i];
+ a0[i] = ((u16 *)gMapHeader.mapLayout->primaryTileset->palettes)[16 * a1 + i];
}
}
@@ -3352,7 +3352,7 @@ void sub_8100740(u8 *dest, u16 flags)
}
for (i=0; i<32; i++)
{
- buffer[i] = ((u8 *)gMapHeader.mapData->primaryTileset->tiles)[flags * 32 + i];
+ buffer[i] = ((u8 *)gMapHeader.mapLayout->primaryTileset->tiles)[flags * 32 + i];
}
switch (mode)
{
@@ -3398,7 +3398,7 @@ void sub_8100874(struct UnkStruct_02038900 *unk_02038900)
u16 sub_810089C(u16 a0)
{
- return ((u16 *)gMapHeader.mapData->secondaryTileset->metatiles)[a0] & 0xfff;
+ return ((u16 *)gMapHeader.mapLayout->secondaryTileset->metatiles)[a0] & 0xfff;
}
const u8 Unknown_3EC660[] = {0, 1, 2, 3};
@@ -3665,7 +3665,7 @@ void sub_8100B6C(void)
{
for (k=0; k<gUnknown_020391B4[i].width; k++)
{
- MapGridSetMetatileEntryAt(x + 7 + k, y + 7 - j, ((u16 *)gMapHeader.mapData->map)[(x + k) + gMapHeader.mapData->width * (y - j)] | 0x3000);
+ MapGridSetMetatileEntryAt(x + 7 + k, y + 7 - j, ((u16 *)gMapHeader.mapLayout->map)[(x + k) + gMapHeader.mapLayout->width * (y - j)] | 0x3000);
}
}
sub_8100A60(gUnknown_020391B4[i].decorId);
diff --git a/src/evolution_scene.c b/src/evolution_scene.c
index 48d5dd82c..182f85d8d 100644
--- a/src/evolution_scene.c
+++ b/src/evolution_scene.c
@@ -567,14 +567,14 @@ static void Task_EvolutionScene(u8 taskID)
case 3: // wait for cry, play tu du SE
if (IsCryFinished())
{
- PlaySE(BGM_ME_SHINKA);
+ PlaySE(MUS_ME_SHINKA);
gTasks[taskID].tState++;
}
break;
case 4: // play evolution music and fade screen black
if (!IsSEPlaying())
{
- PlayNewMapMusic(BGM_SHINKA);
+ PlayNewMapMusic(MUS_SHINKA);
gTasks[taskID].tState++;
BeginNormalPaletteFade(0x1C, 4, 0, 16, RGB(0, 0, 0));
}
@@ -642,7 +642,7 @@ static void Task_EvolutionScene(u8 taskID)
{
StringExpandPlaceholders(gStringVar4, BattleText_FinishEvo);
Text_InitWindow8002EB0(&gUnknown_03004210, gStringVar4, 144, 2, 15);
- PlayBGM(BGM_FANFA5);
+ PlayBGM(MUS_FANFA5);
gTasks[taskID].tState++;
SetMonData(mon, MON_DATA_SPECIES, (void*)(&gTasks[taskID].tPostEvoSpecies));
CalculateMonStats(mon);
@@ -719,7 +719,7 @@ static void Task_EvolutionScene(u8 taskID)
if (gUnknown_03004210.state == 0 && !IsSEPlaying())
{
sub_8024CEC();
- PlayFanfare(BGM_FANFA1);
+ PlayFanfare(MUS_FANFA1);
StrCpyDecodeToDisplayedStringBattle(gBattleStringsTable[3]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
gTasks[taskID].tLearnsFirstMove = 0x40; // re-used as a counter
@@ -908,15 +908,15 @@ static void Task_TradeEvolutionScene(u8 taskID)
case 2:
if (IsCryFinished())
{
- m4aSongNumStop(BGM_SHINKA);
- PlaySE(BGM_ME_SHINKA);
+ m4aSongNumStop(MUS_SHINKA);
+ PlaySE(MUS_ME_SHINKA);
gTasks[taskID].tState++;
}
break;
case 3:
if (!IsSEPlaying())
{
- PlayBGM(BGM_SHINKA);
+ PlayBGM(MUS_SHINKA);
gTasks[taskID].tState++;
BeginNormalPaletteFade(0x1C, 4, 0, 16, RGB(0, 0, 0));
}
@@ -984,7 +984,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
{
StringExpandPlaceholders(gStringVar4, BattleText_FinishEvo);
Text_InitWindow8002EB0(&gUnknown_03004828->window, gStringVar4, gUnknown_03004828->textWindowBaseTileNum, 2, 15);
- PlayFanfare(BGM_FANFA5);
+ PlayFanfare(MUS_FANFA5);
gTasks[taskID].tState++;
SetMonData(mon, MON_DATA_SPECIES, (void*)(&gTasks[taskID].tPostEvoSpecies));
CalculateMonStats(mon);
@@ -1016,7 +1016,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
}
else
{
- PlayBGM(BGM_SHINKA);
+ PlayBGM(MUS_SHINKA);
Text_InitWindow8002EB0(&gUnknown_03004828->window, gOtherText_LinkStandby2, gUnknown_03004828->textWindowBaseTileNum, 2, 15);
gTasks[taskID].tState++;
}
@@ -1033,7 +1033,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
if (gUnknown_03004828->window.state == 0 && !IsSEPlaying())
{
sub_8024CEC();
- PlayFanfare(BGM_FANFA1);
+ PlayFanfare(MUS_FANFA1);
StrCpyDecodeToDisplayedStringBattle(gBattleStringsTable[3]);
Text_InitWindow8002EB0(&gUnknown_03004828->window, gDisplayedStringBattle, gUnknown_03004828->textWindowBaseTileNum, 2, 15);
gTasks[taskID].tLearnsFirstMove = 0x40; // re-used as a counter
diff --git a/src/field_camera.c b/src/field_camera.c
index efd2e2d8c..29cdf0496 100644
--- a/src/field_camera.c
+++ b/src/field_camera.c
@@ -28,14 +28,14 @@ extern struct FieldCamera gFieldCamera;
extern u16 gTotalCameraPixelOffsetY;
extern u16 gTotalCameraPixelOffsetX;
-static void RedrawMapSliceNorth(struct FieldCameraOffset*, struct MapData*);
-static void RedrawMapSliceSouth(struct FieldCameraOffset*, struct MapData*);
-static void RedrawMapSliceEast(struct FieldCameraOffset*, struct MapData*);
-static void RedrawMapSliceWest(struct FieldCameraOffset*, struct MapData*);
+static void RedrawMapSliceNorth(struct FieldCameraOffset*, struct MapLayout*);
+static void RedrawMapSliceSouth(struct FieldCameraOffset*, struct MapLayout*);
+static void RedrawMapSliceEast(struct FieldCameraOffset*, struct MapLayout*);
+static void RedrawMapSliceWest(struct FieldCameraOffset*, struct MapLayout*);
static s32 MapPosToBgTilemapOffset(struct FieldCameraOffset*, s32, s32);
-static void DrawWholeMapViewInternal(int x, int y, struct MapData*);
-static void DrawMetatileAt(struct MapData*, u16, int, int);
+static void DrawWholeMapViewInternal(int x, int y, struct MapLayout*);
+static void DrawMetatileAt(struct MapLayout*, u16, int, int);
static void DrawMetatile(s32, u16*, u16);
static void CameraPanningCB_PanAhead(void);
@@ -96,11 +96,11 @@ void sub_8057B14(u16 *a, u16 *b)
void DrawWholeMapView(void)
{
- DrawWholeMapViewInternal(gSaveBlock1.pos.x, gSaveBlock1.pos.y, gMapHeader.mapData);
+ DrawWholeMapViewInternal(gSaveBlock1.pos.x, gSaveBlock1.pos.y, gMapHeader.mapLayout);
sFieldCameraOffset.copyBGToVRAM = TRUE;
}
-static void DrawWholeMapViewInternal(int x, int y, struct MapData *mapData)
+static void DrawWholeMapViewInternal(int x, int y, struct MapLayout *mapLayout)
{
u8 i;
u8 j;
@@ -118,27 +118,27 @@ static void DrawWholeMapViewInternal(int x, int y, struct MapData *mapData)
temp = sFieldCameraOffset.xTileOffset + j;
if (temp >= 32)
temp -= 32;
- DrawMetatileAt(mapData, r6 + temp, x + j / 2, y + i / 2);
+ DrawMetatileAt(mapLayout, r6 + temp, x + j / 2, y + i / 2);
}
}
}
static void RedrawMapSlicesForCameraUpdate(struct FieldCameraOffset *cameraOffset, int x, int y)
{
- struct MapData *mapData = gMapHeader.mapData;
+ struct MapLayout *mapLayout = gMapHeader.mapLayout;
if (x > 0)
- RedrawMapSliceWest(cameraOffset, mapData);
+ RedrawMapSliceWest(cameraOffset, mapLayout);
if (x < 0)
- RedrawMapSliceEast(cameraOffset, mapData);
+ RedrawMapSliceEast(cameraOffset, mapLayout);
if (y > 0)
- RedrawMapSliceNorth(cameraOffset, mapData);
+ RedrawMapSliceNorth(cameraOffset, mapLayout);
if (y < 0)
- RedrawMapSliceSouth(cameraOffset, mapData);
+ RedrawMapSliceSouth(cameraOffset, mapLayout);
cameraOffset->copyBGToVRAM = TRUE;
}
-static void RedrawMapSliceNorth(struct FieldCameraOffset *cameraOffset, struct MapData *mapData)
+static void RedrawMapSliceNorth(struct FieldCameraOffset *cameraOffset, struct MapLayout *mapLayout)
{
u8 i;
u8 temp;
@@ -153,11 +153,11 @@ static void RedrawMapSliceNorth(struct FieldCameraOffset *cameraOffset, struct M
temp = cameraOffset->xTileOffset + i;
if (temp >= 32)
temp -= 32;
- DrawMetatileAt(mapData, r7 + temp, gSaveBlock1.pos.x + i / 2, gSaveBlock1.pos.y + 14);
+ DrawMetatileAt(mapLayout, r7 + temp, gSaveBlock1.pos.x + i / 2, gSaveBlock1.pos.y + 14);
}
}
-static void RedrawMapSliceSouth(struct FieldCameraOffset *cameraOffset, struct MapData *mapData)
+static void RedrawMapSliceSouth(struct FieldCameraOffset *cameraOffset, struct MapLayout *mapLayout)
{
u8 i;
u8 temp;
@@ -168,11 +168,11 @@ static void RedrawMapSliceSouth(struct FieldCameraOffset *cameraOffset, struct M
temp = cameraOffset->xTileOffset + i;
if (temp >= 32)
temp -= 32;
- DrawMetatileAt(mapData, r7 + temp, gSaveBlock1.pos.x + i / 2, gSaveBlock1.pos.y);
+ DrawMetatileAt(mapLayout, r7 + temp, gSaveBlock1.pos.x + i / 2, gSaveBlock1.pos.y);
}
}
-static void RedrawMapSliceEast(struct FieldCameraOffset *cameraOffset, struct MapData *mapData)
+static void RedrawMapSliceEast(struct FieldCameraOffset *cameraOffset, struct MapLayout *mapLayout)
{
u8 i;
u8 temp;
@@ -183,11 +183,11 @@ static void RedrawMapSliceEast(struct FieldCameraOffset *cameraOffset, struct Ma
temp = cameraOffset->yTileOffset + i;
if (temp >= 32)
temp -= 32;
- DrawMetatileAt(mapData, temp * 32 + r6, gSaveBlock1.pos.x, gSaveBlock1.pos.y + i / 2);
+ DrawMetatileAt(mapLayout, temp * 32 + r6, gSaveBlock1.pos.x, gSaveBlock1.pos.y + i / 2);
}
}
-static void RedrawMapSliceWest(struct FieldCameraOffset *cameraOffset, struct MapData *mapData)
+static void RedrawMapSliceWest(struct FieldCameraOffset *cameraOffset, struct MapLayout *mapLayout)
{
u8 i;
u8 temp;
@@ -200,7 +200,7 @@ static void RedrawMapSliceWest(struct FieldCameraOffset *cameraOffset, struct Ma
temp = cameraOffset->yTileOffset + i;
if (temp >= 32)
temp -= 32;
- DrawMetatileAt(mapData, temp * 32 + r5, gSaveBlock1.pos.x + 14, gSaveBlock1.pos.y + i / 2);
+ DrawMetatileAt(mapLayout, temp * 32 + r5, gSaveBlock1.pos.x + 14, gSaveBlock1.pos.y + i / 2);
}
}
@@ -210,7 +210,7 @@ void CurrentMapDrawMetatileAt(int x, int y)
if (offset >= 0)
{
- DrawMetatileAt(gMapHeader.mapData, offset, x, y);
+ DrawMetatileAt(gMapHeader.mapLayout, offset, x, y);
sFieldCameraOffset.copyBGToVRAM = TRUE;
}
}
@@ -226,7 +226,7 @@ void DrawDoorMetatileAt(int x, int y, u16 *arr)
}
}
-static void DrawMetatileAt(struct MapData *mapData, u16 offset, int x, int y)
+static void DrawMetatileAt(struct MapLayout *mapLayout, u16 offset, int x, int y)
{
u16 *metatiles;
u16 metatileId = MapGridGetMetatileIdAt(x, y);
@@ -236,11 +236,11 @@ static void DrawMetatileAt(struct MapData *mapData, u16 offset, int x, int y)
if (metatileId < 0x200)
{
- metatiles = mapData->primaryTileset->metatiles;
+ metatiles = mapLayout->primaryTileset->metatiles;
}
else
{
- metatiles = mapData->secondaryTileset->metatiles;
+ metatiles = mapLayout->secondaryTileset->metatiles;
metatileId -= 0x200;
}
diff --git a/src/field_effect.c b/src/field_effect.c
index 47698aee4..b5e2c13c6 100644
--- a/src/field_effect.c
+++ b/src/field_effect.c
@@ -918,7 +918,7 @@ void PokeballGlowEffect_1(struct Sprite *sprite)
sprite->data[3] = 0;
if (sprite->data[5])
{
- PlayFanfare(BGM_ME_ASA);
+ PlayFanfare(MUS_ME_ASA);
}
}
}
diff --git a/src/field_tasks.c b/src/field_tasks.c
index 25a4efc58..ea2058965 100644
--- a/src/field_tasks.c
+++ b/src/field_tasks.c
@@ -611,8 +611,8 @@ bool32 sub_8069D34(s16 x, s16 y)
void SetSootopolisGymCrackedIceMetatiles(void)
{
s32 x, y;
- s32 width = gMapHeader.mapData->width;
- s32 height = gMapHeader.mapData->height;
+ s32 width = gMapHeader.mapLayout->width;
+ s32 height = gMapHeader.mapLayout->height;
for (x = 0; x < width; x++)
{
for (y = 0; y < height; y++)
diff --git a/src/fieldmap.c b/src/fieldmap.c
index b819d7275..874df23b0 100644
--- a/src/fieldmap.c
+++ b/src/fieldmap.c
@@ -25,7 +25,7 @@ EWRAM_DATA struct MapHeader gMapHeader = {0};
EWRAM_DATA struct Camera gCamera = {0};
EWRAM_DATA static struct ConnectionFlags gUnknown_0202E850 = {0};
-struct BackupMapData gUnknown_03004870;
+struct BackupMapLayout gUnknown_03004870;
static const struct ConnectionFlags sDummyConnectionFlags = {0};
@@ -53,19 +53,19 @@ void sub_8055FC0(void)
void mapheader_copy_mapdata_with_padding(struct MapHeader *mapHeader)
{
- struct MapData *mapData;
+ struct MapLayout *mapLayout;
int width;
int height;
- mapData = mapHeader->mapData;
+ mapLayout = mapHeader->mapLayout;
CpuFastFill16(0x03ff, gUnknown_02029828, sizeof(gUnknown_02029828));
gUnknown_03004870.map = gUnknown_02029828;
- width = mapData->width + 15;
+ width = mapLayout->width + 15;
gUnknown_03004870.width = width;
- height = mapData->height + 14;
+ height = mapLayout->height + 14;
gUnknown_03004870.height = height;
if (width * height <= 0x2800)
{
- map_copy_with_padding(mapData->map, mapData->width, mapData->height);
+ map_copy_with_padding(mapLayout->map, mapLayout->width, mapLayout->height);
sub_80560AC(mapHeader);
}
}
@@ -129,8 +129,8 @@ void sub_8056134(int x, int y, struct MapHeader *mapHeader, int x2, int y2, int
u16 *dest;
int mapWidth;
- mapWidth = mapHeader->mapData->width;
- src = &mapHeader->mapData->map[mapWidth * y2 + x2];
+ mapWidth = mapHeader->mapLayout->width;
+ src = &mapHeader->mapLayout->map[mapWidth * y2 + x2];
dest = &gUnknown_03004870.map[gUnknown_03004870.width * y + x];
for (i = 0; i < height; i++)
@@ -150,9 +150,9 @@ void fillSouthConnection(struct MapHeader *mapHeader, struct MapHeader *connecte
if (connectedMapHeader)
{
- cWidth = connectedMapHeader->mapData->width;
+ cWidth = connectedMapHeader->mapLayout->width;
x = offset + 7;
- y = mapHeader->mapData->height + 7;
+ y = mapHeader->mapLayout->height + 7;
if (x < 0)
{
x2 = -x;
@@ -196,8 +196,8 @@ void fillNorthConnection(struct MapHeader *mapHeader, struct MapHeader *connecte
if (connectedMapHeader)
{
- cWidth = connectedMapHeader->mapData->width;
- cHeight = connectedMapHeader->mapData->height;
+ cWidth = connectedMapHeader->mapLayout->width;
+ cHeight = connectedMapHeader->mapLayout->height;
x = offset + 7;
y2 = cHeight - 7;
if (x < 0)
@@ -245,8 +245,8 @@ void fillWestConnection(struct MapHeader *mapHeader, struct MapHeader *connected
int cWidth, cHeight;
if (connectedMapHeader)
{
- cWidth = connectedMapHeader->mapData->width;
- cHeight = connectedMapHeader->mapData->height;
+ cWidth = connectedMapHeader->mapLayout->width;
+ cHeight = connectedMapHeader->mapLayout->height;
y = offset + 7;
x2 = cWidth - 7;
if (y < 0)
@@ -291,8 +291,8 @@ void fillEastConnection(struct MapHeader *mapHeader, struct MapHeader *connected
int cHeight;
if (connectedMapHeader)
{
- cHeight = connectedMapHeader->mapData->height;
- x = mapHeader->mapData->width + 7;
+ cHeight = connectedMapHeader->mapLayout->height;
+ x = mapHeader->mapLayout->width + 7;
y = offset + 7;
if (y < 0)
{
@@ -352,10 +352,10 @@ u8 MapGridGetZCoordAt(int x, int y)
}
else
{
- border = gMapHeader.mapData->border;
+ border = gMapHeader.mapLayout->border;
i = (x + 1) & 1;
i += ((y + 1) & 1) * 2;
- block = gMapHeader.mapData->border[i];
+ block = gMapHeader.mapLayout->border[i];
block |= 0xc00;
}
if (block == 0x3ff)
@@ -378,10 +378,10 @@ u8 MapGridIsImpassableAt(int x, int y)
}
else
{
- border = gMapHeader.mapData->border;
+ border = gMapHeader.mapLayout->border;
i = (x + 1) & 1;
i += ((y + 1) & 1) * 2;
- block = gMapHeader.mapData->border[i];
+ block = gMapHeader.mapLayout->border[i];
block |= 0xc00;
}
if (block == 0x3ff)
@@ -396,7 +396,7 @@ u32 MapGridGetMetatileIdAt(int x, int y)
u16 block;
int i;
int j;
- struct MapData *mapData;
+ struct MapLayout *mapLayout;
u16 *border;
u16 block2;
@@ -407,17 +407,17 @@ u32 MapGridGetMetatileIdAt(int x, int y)
}
else
{
- mapData = gMapHeader.mapData;
+ mapLayout = gMapHeader.mapLayout;
i = (x + 1) & 1;
i += ((y + 1) & 1) * 2;
- block = mapData->border[i] | 0xc00;
+ block = mapLayout->border[i] | 0xc00;
}
if (block == 0x3ff)
{
- border = gMapHeader.mapData->border;
+ border = gMapHeader.mapLayout->border;
j = (x + 1) & 1;
j += ((y + 1) & 1) * 2;
- block2 = gMapHeader.mapData->border[j];
+ block2 = gMapHeader.mapLayout->border[j];
block2 |= 0xc00;
return block2 & block;
}
@@ -465,12 +465,12 @@ u32 GetBehaviorByMetatileId(u16 metatile)
u16 *attributes;
if (metatile <= 0x1ff)
{
- attributes = gMapHeader.mapData->primaryTileset->metatileAttributes;
+ attributes = gMapHeader.mapLayout->primaryTileset->metatileAttributes;
return attributes[metatile];
}
else if (metatile <= 0x3ff)
{
- attributes = gMapHeader.mapData->secondaryTileset->metatileAttributes;
+ attributes = gMapHeader.mapLayout->secondaryTileset->metatileAttributes;
return attributes[metatile - 0x200];
}
else
@@ -600,7 +600,7 @@ void sub_80566F0(u8 a1)
int GetMapBorderIdAt(int x, int y)
{
- struct MapData *mapData;
+ struct MapLayout *mapLayout;
u16 block, block2;
int i, j;
if (x >= 0 && x < gUnknown_03004870.width
@@ -616,10 +616,10 @@ int GetMapBorderIdAt(int x, int y)
}
else
{
- mapData = gMapHeader.mapData;
+ mapLayout = gMapHeader.mapLayout;
j = (x + 1) & 1;
j += ((y + 1) & 1) * 2;
- block2 = 0xc00 | mapData->border[j];
+ block2 = 0xc00 | mapLayout->border[j];
if (block2 == 0x3ff)
{
goto fail;
@@ -696,7 +696,7 @@ void sub_8056918(struct MapConnection *connection, int direction, int x, int y)
gSaveBlock1.pos.y -= connection->offset;
break;
case CONNECTION_WEST:
- gSaveBlock1.pos.x = mapHeader->mapData->width;
+ gSaveBlock1.pos.x = mapHeader->mapLayout->width;
gSaveBlock1.pos.y -= connection->offset;
break;
case CONNECTION_SOUTH:
@@ -705,7 +705,7 @@ void sub_8056918(struct MapConnection *connection, int direction, int x, int y)
break;
case CONNECTION_NORTH:
gSaveBlock1.pos.x -= connection->offset;
- gSaveBlock1.pos.y = mapHeader->mapData->height;
+ gSaveBlock1.pos.y = mapHeader->mapLayout->height;
break;
}
}
@@ -768,10 +768,10 @@ bool8 sub_8056ABC(u8 direction, int x, int y, struct MapConnection *connection)
{
case CONNECTION_SOUTH:
case CONNECTION_NORTH:
- return sub_8056B20(x, gMapHeader.mapData->width, mapHeader->mapData->width, connection->offset);
+ return sub_8056B20(x, gMapHeader.mapLayout->width, mapHeader->mapLayout->width, connection->offset);
case CONNECTION_WEST:
case CONNECTION_EAST:
- return sub_8056B20(y, gMapHeader.mapData->height, mapHeader->mapData->height, connection->offset);
+ return sub_8056B20(y, gMapHeader.mapLayout->height, mapHeader->mapLayout->height, connection->offset);
}
return FALSE;
}
@@ -812,10 +812,10 @@ int sub_8056B60(struct MapConnection *connection, int x, int y)
{
case CONNECTION_SOUTH:
case CONNECTION_NORTH:
- return sub_8056B4C(x - connection->offset, mapHeader->mapData->width);
+ return sub_8056B4C(x - connection->offset, mapHeader->mapLayout->width);
case CONNECTION_WEST:
case CONNECTION_EAST:
- return sub_8056B4C(y - connection->offset, mapHeader->mapData->height);
+ return sub_8056B4C(y - connection->offset, mapHeader->mapLayout->height);
}
return FALSE;
}
@@ -839,9 +839,9 @@ struct MapConnection *sub_8056BA0(s16 x, s16 y)
direction = connection->direction;
if ((direction == CONNECTION_DIVE || direction == CONNECTION_EMERGE)
|| (direction == CONNECTION_NORTH && y > 6)
- || (direction == CONNECTION_SOUTH && y < gMapHeader.mapData->height + 7)
+ || (direction == CONNECTION_SOUTH && y < gMapHeader.mapLayout->height + 7)
|| (direction == CONNECTION_WEST && x > 6)
- || (direction == CONNECTION_EAST && x < gMapHeader.mapData->width + 7))
+ || (direction == CONNECTION_EAST && x < gMapHeader.mapLayout->width + 7))
{
continue;
}
@@ -916,42 +916,42 @@ void sub_8056CBC(struct Tileset *tileset, int offset, int size)
}
}
-void sub_8056D28(struct MapData *mapData)
+void sub_8056D28(struct MapLayout *mapLayout)
{
void *src = (void*)(BG_VRAM);
- sub_8056C98(mapData->primaryTileset, src);
+ sub_8056C98(mapLayout->primaryTileset, src);
}
-void sub_8056D38(struct MapData *mapData)
+void sub_8056D38(struct MapLayout *mapLayout)
{
void *src = (void*)(BG_VRAM + 0x4000);
- sub_8056C98(mapData->secondaryTileset, src);
+ sub_8056C98(mapLayout->secondaryTileset, src);
}
-void apply_map_tileset1_palette(struct MapData *mapData)
+void apply_map_tileset1_palette(struct MapLayout *mapLayout)
{
- sub_8056CBC(mapData->primaryTileset, 0, 0xc0);
+ sub_8056CBC(mapLayout->primaryTileset, 0, 0xc0);
}
-void apply_map_tileset2_palette(struct MapData *mapData)
+void apply_map_tileset2_palette(struct MapLayout *mapLayout)
{
- sub_8056CBC(mapData->secondaryTileset, 0x60, 0xc0);
+ sub_8056CBC(mapLayout->secondaryTileset, 0x60, 0xc0);
}
-void copy_map_tileset1_tileset2_to_vram(struct MapData *mapData)
+void copy_map_tileset1_tileset2_to_vram(struct MapLayout *mapLayout)
{
- if (mapData)
+ if (mapLayout)
{
- sub_8056D28(mapData);
- sub_8056D38(mapData);
+ sub_8056D28(mapLayout);
+ sub_8056D38(mapLayout);
}
}
-void apply_map_tileset1_tileset2_palette(struct MapData *mapData)
+void apply_map_tileset1_tileset2_palette(struct MapLayout *mapLayout)
{
- if (mapData)
+ if (mapLayout)
{
- apply_map_tileset1_palette(mapData);
- apply_map_tileset2_palette(mapData);
+ apply_map_tileset1_palette(mapLayout);
+ apply_map_tileset2_palette(mapLayout);
}
}
diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c
index 5bd0d229b..2536f4898 100644
--- a/src/hall_of_fame.c
+++ b/src/hall_of_fame.c
@@ -451,7 +451,7 @@ static bool8 sub_8141E64(void)
if (!gPaletteFade.active)
{
SetMainCallback2(CB2_HallOfFame);
- PlayBGM(BGM_DENDOU);
+ PlayBGM(MUS_DENDOU);
return 0;
}
break;
diff --git a/src/item_use.c b/src/item_use.c
index 926ab4876..5037fee88 100644
--- a/src/item_use.c
+++ b/src/item_use.c
@@ -384,23 +384,23 @@ bool8 sub_80C9688(struct MapConnection *connection, int x, int y)
case 2:
localOffset = connection->offset + 7;
localX = x - localOffset;
- localLength = mapHeader->mapData->height - 7;
+ localLength = mapHeader->mapLayout->height - 7;
localY = localLength + y; // additions are reversed for some reason
break;
case 1:
localOffset = connection->offset + 7;
localX = x - localOffset;
- localLength = gMapHeader.mapData->height + 7;
+ localLength = gMapHeader.mapLayout->height + 7;
localY = y - localLength;
break;
case 3:
- localLength = mapHeader->mapData->width - 7;
+ localLength = mapHeader->mapLayout->width - 7;
localX = localLength + x; // additions are reversed for some reason
localOffset = connection->offset + 7;
localY = y - localOffset;
break;
case 4:
- localLength = gMapHeader.mapData->width + 7;
+ localLength = gMapHeader.mapLayout->width + 7;
localX = x - localLength;
localOffset = connection->offset + 7;
localY = y - localOffset;
@@ -417,8 +417,8 @@ void sub_80C9720(u8 taskId)
{
s16 x, y;
s16 curX, curY;
- s16 width = gMapHeader.mapData->width + 7;
- s16 height = gMapHeader.mapData->height + 7;
+ s16 width = gMapHeader.mapLayout->width + 7;
+ s16 height = gMapHeader.mapLayout->height + 7;
PlayerGetDestCoords(&x, &y);
diff --git a/src/main_menu.c b/src/main_menu.c
index 886995b16..93d9be77a 100644
--- a/src/main_menu.c
+++ b/src/main_menu.c
@@ -774,7 +774,7 @@ static void Task_NewGameSpeech1(u8 taskId)
gTasks[taskId].data[3] = 0xFF;
gTasks[taskId].tFrameCounter = 216; //Wait 3.6 seconds (216 frames) before starting speech
- PlayBGM(BGM_DOORO_X4);
+ PlayBGM(MUS_DOORO_X4);
}
static void Task_NewGameSpeech2(u8 taskId)
diff --git a/src/mauville_man.c b/src/mauville_man.c
index e22809242..bfdfe9cf1 100644
--- a/src/mauville_man.c
+++ b/src/mauville_man.c
@@ -745,7 +745,7 @@ static void Task_BardSong(u8 taskId)
case 3:
if (gStringVar4[task->tCharIndex] == EOS)
{
- FadeInNewBGM(BGM_POKECEN, 6);
+ FadeInNewBGM(MUS_POKECEN, 6);
m4aMPlayFadeOutTemporarily(&gMPlay_SE2, 2);
EnableBothScriptContexts();
DestroyTask(taskId);
diff --git a/src/move_tutor_menu.c b/src/move_tutor_menu.c
index 7e1365391..0ecc82a72 100644
--- a/src/move_tutor_menu.c
+++ b/src/move_tutor_menu.c
@@ -602,13 +602,13 @@ static void MoveTutorMain(void)
PrintMainMoveTutorMenuText(gOtherText_ForgotOrDidNotLearnMove);
#endif
sMoveTutorMenu->state = 31;
- PlayFanfare(BGM_FANFA1);
+ PlayFanfare(MUS_FANFA1);
}
break;
case 31:
if (Menu_UpdateWindowText())
{
- PlayFanfare(BGM_FANFA1);
+ PlayFanfare(MUS_FANFA1);
sMoveTutorMenu->state = 32;
}
break;
diff --git a/src/overworld.c b/src/overworld.c
index 5bb357f8a..d993d6cac 100644
--- a/src/overworld.c
+++ b/src/overworld.c
@@ -50,9 +50,9 @@
#include "wild_encounter.h"
#ifdef SAPPHIRE
-#define LEGENDARY_MUSIC BGM_OOAME // Heavy Rain
+#define LEGENDARY_MUSIC MUS_OOAME // Heavy Rain
#else
-#define LEGENDARY_MUSIC BGM_HIDERI // Drought
+#define LEGENDARY_MUSIC MUS_HIDERI // Drought
#endif
extern u8 gUnknown_020297ED;
@@ -80,7 +80,7 @@ extern u8 TradeRoom_PromptToCancelLink[];
extern u8 TradeRoom_TerminateLink[];
extern u8 gUnknown_081A4508[];
-extern struct MapData * const gMapAttributes[];
+extern struct MapLayout * const gMapLayouts[];
extern struct MapHeader * const * const gMapGroups[];
extern s32 gMaxFlashLevel;
@@ -336,17 +336,17 @@ void Overworld_SetEventObjTemplateMovementType(u8 localId, u8 movementType)
static void mapdata_load_assets_to_gpu_and_full_redraw(void)
{
move_tilemap_camera_to_upper_left_corner();
- copy_map_tileset1_tileset2_to_vram(gMapHeader.mapData);
- apply_map_tileset1_tileset2_palette(gMapHeader.mapData);
+ copy_map_tileset1_tileset2_to_vram(gMapHeader.mapLayout);
+ apply_map_tileset1_tileset2_palette(gMapHeader.mapLayout);
DrawWholeMapView();
cur_mapheader_run_tileset_funcs_after_some_cpuset();
}
-static struct MapData *GetCurrentMapData(void)
+static struct MapLayout *GetMapLayout(void)
{
- u16 mapDataId = gSaveBlock1.mapDataId;
- if (mapDataId)
- return gMapAttributes[mapDataId - 1];
+ u16 mapLayoutId = gSaveBlock1.mapLayoutId;
+ if (mapLayoutId)
+ return gMapLayouts[mapLayoutId - 1];
return NULL;
}
@@ -395,14 +395,14 @@ struct MapHeader *const GetDestinationWarpMapHeader(void)
static void LoadCurrentMapData(void)
{
gMapHeader = *Overworld_GetMapHeaderByGroupAndId(gSaveBlock1.location.mapGroup, gSaveBlock1.location.mapNum);
- gSaveBlock1.mapDataId = gMapHeader.mapDataId;
- gMapHeader.mapData = GetCurrentMapData();
+ gSaveBlock1.mapLayoutId = gMapHeader.mapLayoutId;
+ gMapHeader.mapLayout = GetMapLayout();
}
static void LoadSaveblockMapHeader(void)
{
gMapHeader = *Overworld_GetMapHeaderByGroupAndId(gSaveBlock1.location.mapGroup, gSaveBlock1.location.mapNum);
- gMapHeader.mapData = GetCurrentMapData();
+ gMapHeader.mapLayout = GetMapLayout();
}
static void SetPlayerCoordsFromWarp(void)
@@ -419,8 +419,8 @@ static void SetPlayerCoordsFromWarp(void)
}
else
{
- gSaveBlock1.pos.x = gMapHeader.mapData->width / 2;
- gSaveBlock1.pos.y = gMapHeader.mapData->height / 2;
+ gSaveBlock1.pos.x = gMapHeader.mapLayout->width / 2;
+ gSaveBlock1.pos.y = gMapHeader.mapLayout->height / 2;
}
}
@@ -605,8 +605,8 @@ void sub_80538F0(u8 mapGroup, u8 mapNum)
Overworld_ClearSavedMusic();
mapheader_run_script_with_tag_x3();
not_trainer_hill_battle_pyramid();
- sub_8056D38(gMapHeader.mapData);
- apply_map_tileset2_palette(gMapHeader.mapData);
+ sub_8056D38(gMapHeader.mapLayout);
+ apply_map_tileset2_palette(gMapHeader.mapLayout);
for (paletteIndex = 6; paletteIndex < 12; paletteIndex++)
ApplyWeatherGammaShiftToPal(paletteIndex);
@@ -781,10 +781,10 @@ u8 Overworld_GetFlashLevel(void)
return gSaveBlock1.flashLevel;
}
-void sub_8053D14(u16 mapDataId)
+void sub_8053D14(u16 mapLayoutId)
{
- gSaveBlock1.mapDataId = mapDataId;
- gMapHeader.mapData = GetCurrentMapData();
+ gSaveBlock1.mapLayoutId = mapLayoutId;
+ gMapHeader.mapLayout = GetMapLayout();
}
static bool16 ShouldLegendaryMusicPlayAtLocation(struct WarpData *warp)
@@ -828,7 +828,7 @@ static u16 GetLocationMusic(struct WarpData *warp)
if (ShouldLegendaryMusicPlayAtLocation(warp) == TRUE)
return LEGENDARY_MUSIC;
else if (IsInfiltratedWeatherInstitute(warp) == TRUE)
- return BGM_TOZAN;
+ return MUS_TOZAN;
else
return Overworld_GetMapHeaderByGroupAndId(warp->mapGroup, warp->mapNum)->music;
}
@@ -841,7 +841,7 @@ u16 GetCurrLocationDefaultMusic(void)
if (gSaveBlock1.location.mapGroup == MAP_GROUP(ROUTE111)
&& gSaveBlock1.location.mapNum == MAP_NUM(ROUTE111)
&& GetSav1Weather() == 8)
- return BGM_ASHROAD;
+ return MUS_ASHROAD;
music = GetLocationMusic(&gSaveBlock1.location);
if (music != 0x7FFF)
@@ -851,9 +851,9 @@ u16 GetCurrLocationDefaultMusic(void)
else
{
if (gSaveBlock1.pos.x < 24)
- return BGM_DOORO_X1;
+ return MUS_DOORO_X1;
else
- return BGM_GRANROAD;
+ return MUS_GRANROAD;
}
}
@@ -868,9 +868,9 @@ u16 GetWarpDestinationMusic(void)
{
if (gSaveBlock1.location.mapGroup == MAP_GROUP(MAUVILLE_CITY)
&& gSaveBlock1.location.mapNum == MAP_NUM(MAUVILLE_CITY))
- return BGM_DOORO_X1;
+ return MUS_DOORO_X1;
else
- return BGM_GRANROAD;
+ return MUS_GRANROAD;
}
}
@@ -888,9 +888,9 @@ void Overworld_PlaySpecialMapMusic(void)
if (gSaveBlock1.savedMusic)
music = gSaveBlock1.savedMusic;
else if (Overworld_GetMapTypeOfSaveblockLocation() == MAP_TYPE_UNDERWATER)
- music = BGM_DEEPDEEP;
+ music = MUS_DEEPDEEP;
else if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING))
- music = BGM_NAMINORI;
+ music = MUS_NAMINORI;
}
if (music != GetCurrentMapMusic())
@@ -915,10 +915,10 @@ void sub_8053F0C(void)
u16 currentMusic = GetCurrentMapMusic();
if (newMusic != LEGENDARY_MUSIC)
{
- if (currentMusic == BGM_DEEPDEEP || currentMusic == BGM_NAMINORI)
+ if (currentMusic == MUS_DEEPDEEP || currentMusic == MUS_NAMINORI)
return;
if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING))
- newMusic = BGM_NAMINORI;
+ newMusic = MUS_NAMINORI;
}
if (newMusic != currentMusic)
{
@@ -1553,15 +1553,15 @@ static bool32 sub_805483C(u8 *state)
(*state)++;
break;
case 6:
- sub_8056D28(gMapHeader.mapData);
+ sub_8056D28(gMapHeader.mapLayout);
(*state)++;
break;
case 7:
- sub_8056D38(gMapHeader.mapData);
+ sub_8056D38(gMapHeader.mapLayout);
(*state)++;
break;
case 8:
- apply_map_tileset1_tileset2_palette(gMapHeader.mapData);
+ apply_map_tileset1_tileset2_palette(gMapHeader.mapLayout);
(*state)++;
break;
case 9:
@@ -1619,15 +1619,15 @@ bool32 sub_805493C(u8 *state, u32 a2)
(*state)++;
break;
case 6:
- sub_8056D28(gMapHeader.mapData);
+ sub_8056D28(gMapHeader.mapLayout);
(*state)++;
break;
case 7:
- sub_8056D38(gMapHeader.mapData);
+ sub_8056D38(gMapHeader.mapLayout);
(*state)++;
break;
case 8:
- apply_map_tileset1_tileset2_palette(gMapHeader.mapData);
+ apply_map_tileset1_tileset2_palette(gMapHeader.mapLayout);
(*state)++;
break;
case 9:
@@ -1709,15 +1709,15 @@ bool32 sub_8054A9C(u8 *state)
(*state)++;
break;
case 5:
- sub_8056D28(gMapHeader.mapData);
+ sub_8056D28(gMapHeader.mapLayout);
(*state)++;
break;
case 6:
- sub_8056D38(gMapHeader.mapData);
+ sub_8056D38(gMapHeader.mapLayout);
(*state)++;
break;
case 7:
- apply_map_tileset1_tileset2_palette(gMapHeader.mapData);
+ apply_map_tileset1_tileset2_palette(gMapHeader.mapLayout);
(*state)++;
break;
case 8:
diff --git a/src/party_menu.c b/src/party_menu.c
index a39300825..a4b7b0ffa 100644
--- a/src/party_menu.c
+++ b/src/party_menu.c
@@ -3975,7 +3975,7 @@ void Task_TeamMonTMMove3(u8 taskId)
{
if (gUnknown_0202E8F6 == 0)
{
- PlayFanfare(BGM_FANFA1);
+ PlayFanfare(MUS_FANFA1);
gTasks[taskId].func = Task_TeamMonTMMove4;
}
}
diff --git a/src/pokemon_3.c b/src/pokemon_3.c
index c6eda8bca..30e9503cd 100644
--- a/src/pokemon_3.c
+++ b/src/pokemon_3.c
@@ -1108,48 +1108,48 @@ void ClearBattleMonForms(void)
gBattleMonForms[i] = 0;
}
-u16 GetBGM_ForBattle(void)
+u16 GetMUS_ForBattle(void)
{
if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE_GROUDON)
- return BGM_BATTLE34;
+ return MUS_BATTLE34;
if (gBattleTypeFlags & BATTLE_TYPE_REGI)
- return BGM_BATTLE36;
+ return MUS_BATTLE36;
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
- return BGM_BATTLE20;
+ return MUS_BATTLE20;
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER)
{
switch (gTrainers[gTrainerBattleOpponent].trainerClass)
{
case 2:
case 0x31:
- return BGM_BATTLE30;
+ return MUS_BATTLE30;
case 3:
case 4:
case 0x32:
case 0x33:
- return BGM_BATTLE31;
+ return MUS_BATTLE31;
case 0x19:
- return BGM_BATTLE32;
+ return MUS_BATTLE32;
case 0x20:
- return BGM_BATTLE33;
+ return MUS_BATTLE33;
case 0x2E:
if (!StringCompare(gTrainers[gTrainerBattleOpponent].trainerName, BattleText_Wally))
- return BGM_BATTLE20;
- return BGM_BATTLE35;
+ return MUS_BATTLE20;
+ return MUS_BATTLE35;
case 0x18:
- return BGM_BATTLE38;
+ return MUS_BATTLE38;
default:
- return BGM_BATTLE20;
+ return MUS_BATTLE20;
}
}
- return BGM_BATTLE27;
+ return MUS_BATTLE27;
}
void sub_80408BC(void)
{
ResetMapMusic();
m4aMPlayAllStop();
- PlayBGM(GetBGM_ForBattle());
+ PlayBGM(GetMUS_ForBattle());
}
void current_map_music_set__default_for_battle(u16 song)
@@ -1159,7 +1159,7 @@ void current_map_music_set__default_for_battle(u16 song)
if (song)
PlayNewMapMusic(song);
else
- PlayNewMapMusic(GetBGM_ForBattle());
+ PlayNewMapMusic(GetMUS_ForBattle());
}
const u8 *GetMonSpritePal(struct Pokemon *mon)
diff --git a/src/region_map.c b/src/region_map.c
index 81ecd7c1b..74062f435 100644
--- a/src/region_map.c
+++ b/src/region_map.c
@@ -628,8 +628,8 @@ static void InitializeCursorPosition(void)
case 5:
gRegionMap->mapSectionId = gMapHeader.regionMapSectionId;
gRegionMap->playerIsInCave = FALSE;
- mapWidth = gMapHeader.mapData->width;
- mapHeight = gMapHeader.mapData->height;
+ mapWidth = gMapHeader.mapLayout->width;
+ mapHeight = gMapHeader.mapLayout->height;
x = gSaveBlock1.pos.x;
y = gSaveBlock1.pos.y;
if (gRegionMap->mapSectionId == MAPSEC_UNDERWATER_128)
@@ -640,8 +640,8 @@ static void InitializeCursorPosition(void)
mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1.warp4.mapGroup, gSaveBlock1.warp4.mapNum);
gRegionMap->mapSectionId = mapHeader->regionMapSectionId;
gRegionMap->playerIsInCave = TRUE;
- mapWidth = mapHeader->mapData->width;
- mapHeight = mapHeader->mapData->height;
+ mapWidth = mapHeader->mapLayout->width;
+ mapHeight = mapHeader->mapLayout->height;
x = gSaveBlock1.warp4.x;
y = gSaveBlock1.warp4.y;
break;
@@ -649,8 +649,8 @@ static void InitializeCursorPosition(void)
mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1.warp2.mapGroup, gSaveBlock1.warp2.mapNum);
gRegionMap->mapSectionId = mapHeader->regionMapSectionId;
gRegionMap->playerIsInCave = TRUE;
- mapWidth = mapHeader->mapData->width;
- mapHeight = mapHeader->mapData->height;
+ mapWidth = mapHeader->mapLayout->width;
+ mapHeight = mapHeader->mapLayout->height;
x = gSaveBlock1.warp2.x;
y = gSaveBlock1.warp2.y;
break;
@@ -671,8 +671,8 @@ static void InitializeCursorPosition(void)
gRegionMap->mapSectionId = mapHeader->regionMapSectionId;
}
gRegionMap->playerIsInCave = FALSE;
- mapWidth = mapHeader->mapData->width;
- mapHeight = mapHeader->mapData->height;
+ mapWidth = mapHeader->mapLayout->width;
+ mapHeight = mapHeader->mapLayout->height;
x = r4->x;
y = r4->y;
}
@@ -758,14 +758,14 @@ static void sub_80FB600(void)
u16 r1;
gRegionMap->mapSectionId = mapHeader->regionMapSectionId;
- r1 = mapHeader->mapData->width / gRegionMapLocations[gRegionMap->mapSectionId].width;
+ r1 = mapHeader->mapLayout->width / gRegionMapLocations[gRegionMap->mapSectionId].width;
if (r1 == 0)
r1 = 1;
x = sp2 / r1;
if (x >= gRegionMapLocations[gRegionMap->mapSectionId].width)
x = gRegionMapLocations[gRegionMap->mapSectionId].width - 1;
- r1 = mapHeader->mapData->height / gRegionMapLocations[gRegionMap->mapSectionId].height;
+ r1 = mapHeader->mapLayout->height / gRegionMapLocations[gRegionMap->mapSectionId].height;
if (r1 == 0)
r1 = 1;
y = sp4 / r1;
diff --git a/src/roulette.c b/src/roulette.c
index ab60e089a..c8804a543 100644
--- a/src/roulette.c
+++ b/src/roulette.c
@@ -1055,13 +1055,13 @@ void sub_8116638(u8 taskid)
case 0x2:
if (gTasks[taskid].data[0x2] == 0xC)
{
- PlayFanfare(BGM_ME_B_BIG);
+ PlayFanfare(MUS_ME_B_BIG);
Menu_DrawStdWindowFrame(0x0, 0xE, 0x1D, 0x13);
Menu_PrintText(&gUnknown_081C41A5, 0x1, 0xF);
}
else
{
- PlayFanfare(BGM_ME_B_SMALL);
+ PlayFanfare(MUS_ME_B_SMALL);
Menu_DrawStdWindowFrame(0x0, 0xE, 0x1D, 0x13);
Menu_PrintText(&gUnknown_081C4199, 0x1, 0xF);
}
diff --git a/src/secret_base.c b/src/secret_base.c
index 69c7171d6..632d6845e 100644
--- a/src/secret_base.c
+++ b/src/secret_base.c
@@ -241,11 +241,11 @@ void sub_80BB764(s16 *arg1, s16 *arg2, u16 arg3)
{
s16 x, y;
- for (y=0; y<gMapHeader.mapData->height; y++)
+ for (y=0; y<gMapHeader.mapLayout->height; y++)
{
- for (x=0; x<gMapHeader.mapData->width; x++)
+ for (x=0; x<gMapHeader.mapLayout->width; x++)
{
- if ((gMapHeader.mapData->map[y * gMapHeader.mapData->width + x] & 0x3ff) == arg3)
+ if ((gMapHeader.mapLayout->map[y * gMapHeader.mapLayout->width + x] & 0x3ff) == arg3)
{
*arg1 = x;
*arg2 = y;
diff --git a/src/shop.c b/src/shop.c
index 88719e25e..8a5da1117 100644
--- a/src/shop.c
+++ b/src/shop.c
@@ -409,16 +409,16 @@ static void Shop_DrawViewportTiles(void)
s32 r3 = MapGridGetMetatileLayerTypeAt(facingX + x, facingY + y);
if (metatileId < 512)
- BuyMenuDrawMapMetatile(x, y, (u16 *)gMapHeader.mapData->primaryTileset->metatiles + metatileId * 8, r3);
+ BuyMenuDrawMapMetatile(x, y, (u16 *)gMapHeader.mapLayout->primaryTileset->metatiles + metatileId * 8, r3);
else
- BuyMenuDrawMapMetatile(x, y, (u16 *)gMapHeader.mapData->secondaryTileset->metatiles + (metatileId - 512) * 8, r3);
+ BuyMenuDrawMapMetatile(x, y, (u16 *)gMapHeader.mapLayout->secondaryTileset->metatiles + (metatileId - 512) * 8, r3);
}
else
{
if (metatileId < 512)
- BuyMenuDrawMapPartialMetatile(x, y, (u16 *)gMapHeader.mapData->primaryTileset->metatiles + metatileId * 8);
+ BuyMenuDrawMapPartialMetatile(x, y, (u16 *)gMapHeader.mapLayout->primaryTileset->metatiles + metatileId * 8);
else
- BuyMenuDrawMapPartialMetatile(x, y, (u16 *)gMapHeader.mapData->secondaryTileset->metatiles + (metatileId - 512) * 8);
+ BuyMenuDrawMapPartialMetatile(x, y, (u16 *)gMapHeader.mapLayout->secondaryTileset->metatiles + (metatileId - 512) * 8);
}
if (y == 0 && x != 0 && x != 6)
diff --git a/src/slot_machine.c b/src/slot_machine.c
index ccd7e4353..3de87e0f7 100644
--- a/src/slot_machine.c
+++ b/src/slot_machine.c
@@ -927,17 +927,17 @@ bool8 sub_81020C8(struct Task *task)
}
if (eSlotMachine->matchedSymbols & ((1 << SLOT_MACHINE_MATCHED_777_BLUE) | (1 << SLOT_MACHINE_MATCHED_777_RED)))
{
- PlayFanfare(BGM_ME_B_BIG);
+ PlayFanfare(MUS_ME_B_BIG);
sub_8104CAC(6);
}
else if (eSlotMachine->matchedSymbols & (1 << SLOT_MACHINE_MATCHED_777_MIXED))
{
- PlayFanfare(BGM_ME_B_BIG);
+ PlayFanfare(MUS_ME_B_BIG);
sub_8104CAC(5);
}
else
{
- PlayFanfare(BGM_ME_B_SMALL);
+ PlayFanfare(MUS_ME_B_SMALL);
sub_8104CAC(2);
}
if (eSlotMachine->matchedSymbols & ((1 << SLOT_MACHINE_MATCHED_777_MIXED) | (1 << SLOT_MACHINE_MATCHED_777_BLUE) | (1 << SLOT_MACHINE_MATCHED_777_RED)))
@@ -2682,7 +2682,7 @@ static void sub_810437C(struct Task *task)
sub_810545C();
sub_8102680();
StopMapMusic();
- PlayNewMapMusic(BGM_BD_TIME);
+ PlayNewMapMusic(MUS_BD_TIME);
}
static void sub_81043EC(struct Task *task)
@@ -2818,7 +2818,7 @@ static void sub_81046C0(struct Task *task)
{
task->data[4] = 0xa0;
StartSpriteAnimIfDifferent(gSprites + eSlotMachine->unk3F, 5);
- PlayFanfare(BGM_ME_ZANNEN);
+ PlayFanfare(MUS_ME_ZANNEN);
}
else
{
@@ -2830,7 +2830,7 @@ static void sub_81046C0(struct Task *task)
sub_8104098();
eSlotMachine->pikaPower = 0;
}
- PlayFanfare(BGM_ME_B_SMALL);
+ PlayFanfare(MUS_ME_B_SMALL);
}
}
}
@@ -2906,7 +2906,7 @@ static void sub_81048CC(struct Task *task)
task->data[4] = 4;
task->data[5] = 0;
StopMapMusic();
- PlayFanfare(BGM_ME_ZANNEN);
+ PlayFanfare(MUS_ME_ZANNEN);
PlaySE(SE_W153);
}
diff --git a/src/sound.c b/src/sound.c
index 159ad3f70..5b41acbc6 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -44,18 +44,18 @@ extern struct ToneData voicegroup_84549C0[];
static const struct Fanfare sFanfares[] =
{
- { BGM_FANFA1, 80 },
- { BGM_FANFA4, 160 },
- { BGM_FANFA5, 220 },
- { BGM_ME_WAZA, 220 },
- { BGM_ME_ASA, 160 },
- { BGM_ME_BACHI, 340 },
- { BGM_ME_WASURE, 180 },
- { BGM_ME_KINOMI, 120 },
- { BGM_ME_TAMA, 710 },
- { BGM_ME_B_BIG, 250 },
- { BGM_ME_B_SMALL, 150 },
- { BGM_ME_ZANNEN, 160 },
+ { MUS_FANFA1, 80 },
+ { MUS_FANFA4, 160 },
+ { MUS_FANFA5, 220 },
+ { MUS_ME_WAZA, 220 },
+ { MUS_ME_ASA, 160 },
+ { MUS_ME_BACHI, 340 },
+ { MUS_ME_WASURE, 180 },
+ { MUS_ME_KINOMI, 120 },
+ { MUS_ME_TAMA, 710 },
+ { MUS_ME_B_BIG, 250 },
+ { MUS_ME_B_SMALL, 150 },
+ { MUS_ME_ZANNEN, 160 },
};
static void Task_Fanfare(u8 taskId);
diff --git a/src/tileset_anim.c b/src/tileset_anim.c
index abd38edad..25f561c96 100644
--- a/src/tileset_anim.c
+++ b/src/tileset_anim.c
@@ -518,11 +518,11 @@ static void StartTileset1Animation(void)
gTileset1AnimFrame = 0;
gTileset1AnimLength = 0;
gTileset1AnimCallback = 0;
- if (gMapHeader.mapData->primaryTileset)
+ if (gMapHeader.mapLayout->primaryTileset)
{
- if (gMapHeader.mapData->primaryTileset->callback)
+ if (gMapHeader.mapLayout->primaryTileset->callback)
{
- gMapHeader.mapData->primaryTileset->callback();
+ gMapHeader.mapLayout->primaryTileset->callback();
}
}
}
@@ -532,11 +532,11 @@ static void StartTileset2Animation(void)
gTileset2AnimFrame = 0;
gTileset2AnimLength = 0;
gTileset2AnimCallback = 0;
- if (gMapHeader.mapData->secondaryTileset)
+ if (gMapHeader.mapLayout->secondaryTileset)
{
- if (gMapHeader.mapData->secondaryTileset->callback)
+ if (gMapHeader.mapLayout->secondaryTileset->callback)
{
- gMapHeader.mapData->secondaryTileset->callback();
+ gMapHeader.mapLayout->secondaryTileset->callback();
}
}
}
diff --git a/src/trade.c b/src/trade.c
index 8d7f5b1fc..50de29b7f 100644
--- a/src/trade.c
+++ b/src/trade.c
@@ -1208,7 +1208,7 @@ static void sub_8047EC0(void)
sub_8048C70();
gMain.state ++;
nullsub_5(7, 0);
- PlayBGM(BGM_P_SCHOOL);
+ PlayBGM(MUS_P_SCHOOL);
break;
case 14:
sub_804ACF4(1);
@@ -4812,7 +4812,7 @@ static bool8 sub_804C29C(void)
gSprites[gUnknown_03004828->pokePicSpriteIdxs[0]].pos2.y = gMonFrontPicCoords[gUnknown_03004828->tradeSpecies[0]].y_offset;
gUnknown_03004828->unk_00c4 ++;
gUnknown_03004828->unk_0124 = GetCurrentMapMusic();
- PlayBGM(BGM_SHINKA);
+ PlayBGM(MUS_SHINKA);
break;
case 1:
if (gUnknown_03004828->bg2hofs > 0)
@@ -5195,7 +5195,7 @@ static bool8 sub_804C29C(void)
case 68:
if (++ gUnknown_03004828->unk_00c0 == 4)
{
- PlayFanfare(BGM_FANFA5);
+ PlayFanfare(MUS_FANFA5);
}
if (gUnknown_03004828->unk_00c0 == 0xf0)
{
diff --git a/src/wild_encounter.c b/src/wild_encounter.c
index ad11bf566..133f8b3aa 100644
--- a/src/wild_encounter.c
+++ b/src/wild_encounter.c
@@ -3725,7 +3725,7 @@ static u16 GetRoute119WaterTileNum(s16 x, s16 y, u8 section)
for (yCur = yMin; yCur <= yMax; yCur++)
{
- for (xCur = 0; xCur < gMapHeader.mapData->width; xCur++)
+ for (xCur = 0; xCur < gMapHeader.mapLayout->width; xCur++)
{
if (MetatileBehavior_IsFeebasEncounterable(MapGridGetMetatileBehaviorAt(xCur + 7, yCur + 7)) == TRUE)
{