Generate local IDs from map.json files

This commit is contained in:
GriffinR
2024-10-11 21:30:52 -04:00
parent 6518f1e3ff
commit 9f31b0fe90
146 changed files with 878 additions and 833 deletions

View File

@@ -1,6 +1,9 @@
#ifndef GUARD_CONSTANTS_EVENT_OBJECTS_H
#define GUARD_CONSTANTS_EVENT_OBJECTS_H
#include "constants/global.h"
#include "constants/map_event_ids.h"
#define OBJ_EVENT_GFX_BRENDAN_NORMAL 0
#define OBJ_EVENT_GFX_BRENDAN_MACH_BIKE 1
#define OBJ_EVENT_GFX_BRENDAN_SURFING 2
@@ -291,38 +294,14 @@
#define OBJ_KIND_NORMAL 0
#define OBJ_KIND_CLONE 255 // Exclusive to FRLG
// Special object event local ids
#define OBJ_EVENT_ID_PLAYER 0xFF
#define OBJ_EVENT_ID_CAMERA 0x7F
// 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
#define LOCALID_SLATEPORT_ENERGY_GURU 25
// Each object event template gets an ID that can be used to refer to it in scripts and elsewhere.
// This is referred to as the "local id" (and it's really just 1 + its index in the templates array).
// There are a few special IDs reserved for objects that don't have a templates in the map data -- one for the player
// in regular offline play, five for linked players while playing Berry Blender, and one for an invisible object that
// can be spawned for the camera to track instead of the player. Additionally, the value 0 is reserved as an "empty" indicator.
#define LOCALID_NONE 0
#define OBJ_EVENT_ID_CAMERA 127
#define LOCALID_BERRY_BLENDER_PLAYER_END 240 // This will use 5 (MAX_RFU_PLAYERS) IDs ending at 240, i.e. 236-240
#define OBJ_EVENT_ID_PLAYER 255
#endif // GUARD_CONSTANTS_EVENT_OBJECTS_H