Add local id constants for C

This commit is contained in:
GriffinR 2021-07-05 13:54:43 -04:00
parent 10886a586b
commit 0f538102d9
12 changed files with 109 additions and 77 deletions

View File

@ -563,7 +563,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_AddSemifinalAudience:: @ 824C594
createvobject OBJ_EVENT_GFX_HEX_MANIAC, 28, 5, 2, 3, DIR_SOUTH
createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1, 3, DIR_SOUTH
createvobject OBJ_EVENT_GFX_MART_EMPLOYEE, 30, 6, 2, 3, DIR_SOUTH
createvobject OBJ_EVENT_GFX_WOMAN_5, 31, 8, 2, 3, 1
createvobject OBJ_EVENT_GFX_WOMAN_5, 31, 8, 2, 3, DIR_SOUTH
return
BattleFrontier_BattleDomeBattleRoom_EventScript_AddFinalAudience:: @ 824C652

View File

@ -3,6 +3,8 @@
.set LOCALID_ATTENDANT_MULTIS, 8
.set LOCALID_ATTENDANT_LINK_MULTIS, 9
@ Note: LOCALID_BATTLE_TOWER_LOBBY_REPORTER is a local id for this map used elsewhere. It's defined in event_objects.h
BattleFrontier_BattleTowerLobby_MapScripts:: @ 823E67B
map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleTowerLobby_OnResume
map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleTowerLobby_OnTransition

View File

@ -1,6 +1,7 @@
.set LOCALID_DEOXYS_ROCK, 1
.set LOCALID_DEOXYS, 2
@ Note: LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK is a local id for this map used elsewhere. It's defined in event_objects.h
BirthIsland_Exterior_MapScripts:: @ 8267F15
map_script MAP_SCRIPT_ON_TRANSITION, BirthIsland_Exterior_OnTransition
map_script MAP_SCRIPT_ON_RESUME, BirthIsland_Exterior_OnResume
@ -68,9 +69,9 @@ BirthIsland_Exterior_EventScript_NotSolved3:: @ 8267FBF
BirthIsland_Exterior_EventScript_Deoxys:: @ 8267FC1
waitse
setfieldeffectargument 0, LOCALID_DEOXYS_ROCK
setfieldeffectargument 1, 58
setfieldeffectargument 2, 26
setfieldeffectargument 0, LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK
setfieldeffectargument 1, MAP_NUM(BIRTH_ISLAND_EXTERIOR)
setfieldeffectargument 2, MAP_GROUP(BIRTH_ISLAND_EXTERIOR)
dofieldeffect FLDEFF_DESTROY_DEOXYS_ROCK
playbgm MUS_RG_ENCOUNTER_DEOXYS, 0
waitfieldeffect FLDEFF_DESTROY_DEOXYS_ROCK

View File

@ -1,4 +1,4 @@
.set LOCALID_MEW, 1
@ Note: LOCALID_FARAWAY_ISLAND_MEW is a local id for this map used elsewhere. It's defined in event_objects.h
FarawayIsland_Interior_MapScripts:: @ 8267CFA
map_script MAP_SCRIPT_ON_RESUME, FarawayIsland_Interior_OnResume
@ -58,13 +58,13 @@ FarawayIsland_Interior_OnFrame: @ 8267D98
FarawayIsland_Interior_EventScript_FindMew:: @ 8267DA2
lockall
playse SE_PIN
applymovement LOCALID_MEW, Common_Movement_ExclamationMark
applymovement LOCALID_FARAWAY_ISLAND_MEW, Common_Movement_ExclamationMark
waitmovement 0
applymovement LOCALID_MEW, Common_Movement_Delay48
applymovement LOCALID_FARAWAY_ISLAND_MEW, Common_Movement_Delay48
waitmovement 0
applymovement LOCALID_MEW, FarawayIsland_Interior_Movement_MewMoveAndHide
applymovement LOCALID_FARAWAY_ISLAND_MEW, FarawayIsland_Interior_Movement_MewMoveAndHide
waitmovement 0
copyobjectxytoperm LOCALID_MEW
copyobjectxytoperm LOCALID_FARAWAY_ISLAND_MEW
setvar VAR_TEMP_1, 1
releaseall
end
@ -120,7 +120,7 @@ FarawayIsland_Interior_Movement_MewFloatUpEast: @ 8267DEB
FarawayIsland_Interior_EventScript_Mew:: @ 8267DF2
lock
faceplayer
applymovement LOCALID_MEW, FarawayIsland_Interior_Movement_MewAppear
applymovement LOCALID_FARAWAY_ISLAND_MEW, FarawayIsland_Interior_Movement_MewAppear
waitmovement 0
setvar VAR_0x8004, 0
special SetMewAboveGrass
@ -171,22 +171,22 @@ FarawayIsland_Interior_EventScript_PlayerOrMewRan:: @ 8267EA4
end
FarawayIsland_Interior_EventScript_FoundMewNorth:: @ 8267EAF
applymovement LOCALID_MEW, FarawayIsland_Interior_Movement_MewFloatUpNorth
applymovement LOCALID_FARAWAY_ISLAND_MEW, FarawayIsland_Interior_Movement_MewFloatUpNorth
waitmovement 0
return
FarawayIsland_Interior_EventScript_FoundMewSouth:: @ 8267EBA
applymovement LOCALID_MEW, FarawayIsland_Interior_Movement_MewFloatUpSouth
applymovement LOCALID_FARAWAY_ISLAND_MEW, FarawayIsland_Interior_Movement_MewFloatUpSouth
waitmovement 0
return
FarawayIsland_Interior_EventScript_FoundMewWest:: @ 8267EC5
applymovement LOCALID_MEW, FarawayIsland_Interior_Movement_MewFloatUpWest
applymovement LOCALID_FARAWAY_ISLAND_MEW, FarawayIsland_Interior_Movement_MewFloatUpWest
waitmovement 0
return
FarawayIsland_Interior_EventScript_FoundMewEast:: @ 8267ED0
applymovement LOCALID_MEW, FarawayIsland_Interior_Movement_MewFloatUpEast
applymovement LOCALID_FARAWAY_ISLAND_MEW, FarawayIsland_Interior_Movement_MewFloatUpEast
waitmovement 0
return
@ -194,7 +194,7 @@ FarawayIsland_Interior_EventScript_HideMewWhenGrassCut:: @ 8267EDB
lockall
fadescreenswapbuffers FADE_TO_BLACK
setflag FLAG_HIDE_MEW
removeobject LOCALID_MEW
removeobject LOCALID_FARAWAY_ISLAND_MEW
fadescreenswapbuffers FADE_FROM_BLACK
msgbox FarawayIsland_Interior_Text_TheFeelingOfBeingWatchedFaded, MSGBOX_DEFAULT
closemessage

View File

@ -4,7 +4,7 @@
.set LOCALID_VICKY, 4
.set LOCALID_ROCK_SMASH_MAN, 46
@ Note: LOCALID_ROUTE111_PLAYER_FALLING is used in mirage_tower.c, and is defined in event_objects.h
@ Note: LOCALID_ROUTE111_PLAYER_FALLING is a local id for this map used elsewhere. It's defined in event_objects.h
Route111_MapScripts:: @ 81F0CA7
map_script MAP_SCRIPT_ON_LOAD, Route111_OnLoad

View File

@ -1,11 +1,4 @@
.set LOCALID_UR_PLAYER_4, 2
.set LOCALID_UR_PLAYER_8, 3
.set LOCALID_UR_PLAYER_7, 4
.set LOCALID_UR_PLAYER_6, 5
.set LOCALID_UR_PLAYER_5, 6
.set LOCALID_UR_PLAYER_3, 7
.set LOCALID_UR_PLAYER_2, 8
.set LOCALID_UR_PLAYER_1, 9
@ Note: LOCALID_UNION_ROOM_PLAYER_# are local ids for this map used elsewhere. They're defined in event_objects.h
UnionRoom_MapScripts:: @ 823D1A6
map_script MAP_SCRIPT_ON_RESUME, UnionRoom_OnResume
@ -21,14 +14,14 @@ UnionRoom_OnResume: @ 823D1B1
setflag FLAG_HIDE_UNION_ROOM_PLAYER_6
setflag FLAG_HIDE_UNION_ROOM_PLAYER_7
setflag FLAG_HIDE_UNION_ROOM_PLAYER_8
removeobject LOCALID_UR_PLAYER_1
removeobject LOCALID_UR_PLAYER_2
removeobject LOCALID_UR_PLAYER_3
removeobject LOCALID_UR_PLAYER_4
removeobject LOCALID_UR_PLAYER_5
removeobject LOCALID_UR_PLAYER_6
removeobject LOCALID_UR_PLAYER_7
removeobject LOCALID_UR_PLAYER_8
removeobject LOCALID_UNION_ROOM_PLAYER_1
removeobject LOCALID_UNION_ROOM_PLAYER_2
removeobject LOCALID_UNION_ROOM_PLAYER_3
removeobject LOCALID_UNION_ROOM_PLAYER_4
removeobject LOCALID_UNION_ROOM_PLAYER_5
removeobject LOCALID_UNION_ROOM_PLAYER_6
removeobject LOCALID_UNION_ROOM_PLAYER_7
removeobject LOCALID_UNION_ROOM_PLAYER_8
special RunUnionRoom
end

View File

@ -285,5 +285,31 @@
// Object event local ids referenced in C files
#define LOCALID_ROUTE111_PLAYER_FALLING 45
#define LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK 1
#define LOCALID_FARAWAY_ISLAND_MEW 1
#define LOCALID_UNION_ROOM_PLAYER_4 2
#define LOCALID_UNION_ROOM_PLAYER_8 3
#define LOCALID_UNION_ROOM_PLAYER_7 4
#define LOCALID_UNION_ROOM_PLAYER_6 5
#define LOCALID_UNION_ROOM_PLAYER_5 6
#define LOCALID_UNION_ROOM_PLAYER_3 7
#define LOCALID_UNION_ROOM_PLAYER_2 8
#define LOCALID_UNION_ROOM_PLAYER_1 9
#define LOCALID_BATTLE_TOWER_LOBBY_REPORTER 5
#define LOCALID_TRUCK_BOX_TOP 1
#define LOCALID_TRUCK_BOX_BOTTOM_L 2
#define LOCALID_TRUCK_BOX_BOTTOM_R 3
#define LOCALID_OLDALE_MART_CLERK 1
#define LOCALID_LAVARIDGE_MART_CLERK 1
#define LOCALID_FALLARBOR_MART_CLERK 1
#define LOCALID_VERDANTURF_MART_CLERK 1
#define LOCALID_PETALBURG_MART_CLERK 1
#define LOCALID_SLATEPORT_MART_CLERK 1
#define LOCALID_MAUVILLE_MART_CLERK 1
#define LOCALID_RUSTBORO_MART_CLERK 1
#define LOCALID_FORTREE_MART_CLERK 1
#define LOCALID_MOSSDEEP_MART_CLERK 1
#define LOCALID_SOOTOPOLIS_MART_CLERK 1
#define LOCALID_BATTLE_FRONTIER_MART_CLERK 1
#endif // GUARD_CONSTANTS_EVENT_OBJECTS_H

View File

@ -38,7 +38,7 @@ static const s16 sFarawayIslandRockCoords[4][2] =
static u8 GetMewObjectEventId(void)
{
u8 objectEventId;
TryGetObjectEventIdByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectEventId);
TryGetObjectEventIdByLocalIdAndMap(LOCALID_FARAWAY_ISLAND_MEW, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectEventId);
return objectEventId;
}

View File

@ -72,12 +72,12 @@ void Task_Truck1(u8 taskId)
s16 cameraXpan = 0, cameraYpan = 0;
s16 box1, box2, box3;
box1 = GetTruckBoxMovement(data[0] + 30) * 4; // top box.
SetObjectEventSpritePosByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, box1 + 3);
box2 = GetTruckBoxMovement(data[0]) * 2; // bottom left box.
SetObjectEventSpritePosByLocalIdAndMap(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, box2 - 3);
box3 = GetTruckBoxMovement(data[0]) * 4; // bottom right box.
SetObjectEventSpritePosByLocalIdAndMap(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, box3);
box1 = GetTruckBoxMovement(data[0] + 30) * 4;
SetObjectEventSpritePosByLocalIdAndMap(LOCALID_TRUCK_BOX_TOP, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, box1 + 3);
box2 = GetTruckBoxMovement(data[0]) * 2;
SetObjectEventSpritePosByLocalIdAndMap(LOCALID_TRUCK_BOX_BOTTOM_L, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, box2 - 3);
box3 = GetTruckBoxMovement(data[0]) * 4;
SetObjectEventSpritePosByLocalIdAndMap(LOCALID_TRUCK_BOX_BOTTOM_R, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, box3);
if (++data[0] == SECONDS(500)) // this will never run
data[0] = 0; // reset the timer if it gets stuck.
@ -116,11 +116,11 @@ void Task_Truck2(u8 taskId)
cameraYpan = GetTruckCameraBobbingY(data[2]);
SetCameraPanning(cameraXpan, cameraYpan);
box1 = GetTruckBoxMovement(data[2] + 30) * 4;
SetObjectEventSpritePosByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, box1 + 3);
SetObjectEventSpritePosByLocalIdAndMap(LOCALID_TRUCK_BOX_TOP, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, box1 + 3);
box2 = GetTruckBoxMovement(data[2]) * 2;
SetObjectEventSpritePosByLocalIdAndMap(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, box2 - 3);
SetObjectEventSpritePosByLocalIdAndMap(LOCALID_TRUCK_BOX_BOTTOM_L, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, box2 - 3);
box3 = GetTruckBoxMovement(data[2]) * 4;
SetObjectEventSpritePosByLocalIdAndMap(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, box3);
SetObjectEventSpritePosByLocalIdAndMap(LOCALID_TRUCK_BOX_BOTTOM_R, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, box3);
}
}
@ -147,9 +147,9 @@ static void Task_Truck3(u8 taskId)
cameraXpan = gTruckCamera_HorizontalTable[data[1]];
cameraYpan = 0;
SetCameraPanning(cameraXpan, 0);
SetObjectEventSpritePosByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, cameraYpan + 3);
SetObjectEventSpritePosByLocalIdAndMap(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, cameraYpan - 3);
SetObjectEventSpritePosByLocalIdAndMap(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, cameraYpan);
SetObjectEventSpritePosByLocalIdAndMap(LOCALID_TRUCK_BOX_TOP, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, cameraYpan + 3);
SetObjectEventSpritePosByLocalIdAndMap(LOCALID_TRUCK_BOX_BOTTOM_L, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, cameraYpan - 3);
SetObjectEventSpritePosByLocalIdAndMap(LOCALID_TRUCK_BOX_BOTTOM_R, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, cameraYpan);
}
}
@ -242,9 +242,9 @@ void EndTruckSequence(u8 taskId)
{
if (!FuncIsActiveTask(Task_HandleTruckSequence))
{
SetObjectEventSpritePosByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3, 3);
SetObjectEventSpritePosByLocalIdAndMap(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 0, -3);
SetObjectEventSpritePosByLocalIdAndMap(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3, 0);
SetObjectEventSpritePosByLocalIdAndMap(LOCALID_TRUCK_BOX_TOP, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3, 3);
SetObjectEventSpritePosByLocalIdAndMap(LOCALID_TRUCK_BOX_BOTTOM_L, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 0, -3);
SetObjectEventSpritePosByLocalIdAndMap(LOCALID_TRUCK_BOX_BOTTOM_R, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3, 0);
}
}

View File

@ -3430,7 +3430,7 @@ static void ChangeDeoxysRockLevel(u8 rockLevel)
{
u8 objectEventId;
LoadPalette(&sDeoxysRockPalettes[rockLevel], 0x1A0, 8);
TryGetObjectEventIdByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectEventId);
TryGetObjectEventIdByLocalIdAndMap(LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectEventId);
if (rockLevel == 0)
PlaySE(SE_M_CONFUSE_RAY);
@ -3438,9 +3438,9 @@ static void ChangeDeoxysRockLevel(u8 rockLevel)
PlaySE(SE_RG_DEOXYS_MOVE);
CreateTask(WaitForDeoxysRockMovement, 8);
gFieldEffectArguments[0] = 1;
gFieldEffectArguments[1] = 58;
gFieldEffectArguments[2] = 26;
gFieldEffectArguments[0] = LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK;
gFieldEffectArguments[1] = MAP_NUM(BIRTH_ISLAND_EXTERIOR);
gFieldEffectArguments[2] = MAP_GROUP(BIRTH_ISLAND_EXTERIOR);
gFieldEffectArguments[3] = sDeoxysRockCoords[rockLevel][0];
gFieldEffectArguments[4] = sDeoxysRockCoords[rockLevel][1];
@ -3687,18 +3687,18 @@ u32 GetMartEmployeeObjectEventId(void)
{
static const u8 sPokeMarts[][3] =
{
{ MAP_GROUP(OLDALE_TOWN_MART), MAP_NUM(OLDALE_TOWN_MART), 1 },
{ MAP_GROUP(LAVARIDGE_TOWN_MART), MAP_NUM(LAVARIDGE_TOWN_MART), 1 },
{ MAP_GROUP(FALLARBOR_TOWN_MART), MAP_NUM(FALLARBOR_TOWN_MART), 1 },
{ MAP_GROUP(VERDANTURF_TOWN_MART), MAP_NUM(VERDANTURF_TOWN_MART), 1 },
{ MAP_GROUP(PETALBURG_CITY_MART), MAP_NUM(PETALBURG_CITY_MART), 1 },
{ MAP_GROUP(SLATEPORT_CITY_MART), MAP_NUM(SLATEPORT_CITY_MART), 1 },
{ MAP_GROUP(MAUVILLE_CITY_MART), MAP_NUM(MAUVILLE_CITY_MART), 1 },
{ MAP_GROUP(RUSTBORO_CITY_MART), MAP_NUM(RUSTBORO_CITY_MART), 1 },
{ MAP_GROUP(FORTREE_CITY_MART), MAP_NUM(FORTREE_CITY_MART), 1 },
{ MAP_GROUP(MOSSDEEP_CITY_MART), MAP_NUM(MOSSDEEP_CITY_MART), 1 },
{ MAP_GROUP(SOOTOPOLIS_CITY_MART), MAP_NUM(SOOTOPOLIS_CITY_MART), 1 },
{ MAP_GROUP(BATTLE_FRONTIER_MART), MAP_NUM(BATTLE_FRONTIER_MART), 1 }
{ MAP_GROUP(OLDALE_TOWN_MART), MAP_NUM(OLDALE_TOWN_MART), LOCALID_OLDALE_MART_CLERK },
{ MAP_GROUP(LAVARIDGE_TOWN_MART), MAP_NUM(LAVARIDGE_TOWN_MART), LOCALID_LAVARIDGE_MART_CLERK },
{ MAP_GROUP(FALLARBOR_TOWN_MART), MAP_NUM(FALLARBOR_TOWN_MART), LOCALID_FALLARBOR_MART_CLERK },
{ MAP_GROUP(VERDANTURF_TOWN_MART), MAP_NUM(VERDANTURF_TOWN_MART), LOCALID_VERDANTURF_MART_CLERK },
{ MAP_GROUP(PETALBURG_CITY_MART), MAP_NUM(PETALBURG_CITY_MART), LOCALID_PETALBURG_MART_CLERK },
{ MAP_GROUP(SLATEPORT_CITY_MART), MAP_NUM(SLATEPORT_CITY_MART), LOCALID_SLATEPORT_MART_CLERK },
{ MAP_GROUP(MAUVILLE_CITY_MART), MAP_NUM(MAUVILLE_CITY_MART), LOCALID_MAUVILLE_MART_CLERK },
{ MAP_GROUP(RUSTBORO_CITY_MART), MAP_NUM(RUSTBORO_CITY_MART), LOCALID_RUSTBORO_MART_CLERK },
{ MAP_GROUP(FORTREE_CITY_MART), MAP_NUM(FORTREE_CITY_MART), LOCALID_FORTREE_MART_CLERK },
{ MAP_GROUP(MOSSDEEP_CITY_MART), MAP_NUM(MOSSDEEP_CITY_MART), LOCALID_MOSSDEEP_MART_CLERK },
{ MAP_GROUP(SOOTOPOLIS_CITY_MART), MAP_NUM(SOOTOPOLIS_CITY_MART), LOCALID_SOOTOPOLIS_MART_CLERK },
{ MAP_GROUP(BATTLE_FRONTIER_MART), MAP_NUM(BATTLE_FRONTIER_MART), LOCALID_BATTLE_FRONTIER_MART_CLERK }
};
u8 i;

View File

@ -36,6 +36,7 @@
#include "data.h"
#include "constants/battle_frontier.h"
#include "constants/contest.h"
#include "constants/event_objects.h"
#include "constants/items.h"
#include "constants/layouts.h"
#include "constants/lilycove_lady.h"
@ -3586,7 +3587,7 @@ void GetMomOrDadStringForTVMessage(void)
void HideBattleTowerReporter(void)
{
VarSet(VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0);
RemoveObjectEventByLocalIdAndMap(5, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
RemoveObjectEventByLocalIdAndMap(LOCALID_BATTLE_TOWER_LOBBY_REPORTER, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
FlagSet(FLAG_HIDE_BATTLE_TOWER_REPORTER);
}

View File

@ -77,18 +77,27 @@ static const u8 sNextFacingDirection[] = {
[DIR_EAST] = DIR_NORTH
};
// Local id 1 is the Nurse/Attendant, 2-9 are link players
static const u8 sUnionRoomLocalIds[] = { 9, 8, 7, 2, 6, 5, 4, 3 };
static const u8 sUnionRoomLocalIds[] = {
LOCALID_UNION_ROOM_PLAYER_1,
LOCALID_UNION_ROOM_PLAYER_2,
LOCALID_UNION_ROOM_PLAYER_3,
LOCALID_UNION_ROOM_PLAYER_4,
LOCALID_UNION_ROOM_PLAYER_5,
LOCALID_UNION_ROOM_PLAYER_6,
LOCALID_UNION_ROOM_PLAYER_7,
LOCALID_UNION_ROOM_PLAYER_8
};
static const u16 sUnknown[] = {
0x2BF,
0x2C0,
0x2C1,
0x2C2,
0x2C3,
0x2C4,
0x2C5,
0x2C6
// Unused
static const u16 sHidePlayerFlags[] = {
FLAG_HIDE_UNION_ROOM_PLAYER_1,
FLAG_HIDE_UNION_ROOM_PLAYER_2,
FLAG_HIDE_UNION_ROOM_PLAYER_3,
FLAG_HIDE_UNION_ROOM_PLAYER_4,
FLAG_HIDE_UNION_ROOM_PLAYER_5,
FLAG_HIDE_UNION_ROOM_PLAYER_6,
FLAG_HIDE_UNION_ROOM_PLAYER_7,
FLAG_HIDE_UNION_ROOM_PLAYER_8
};
static const u8 sMovement_UnionPlayerExit[2] = {