Add support for local IDs in map.json
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef GUARD_CONSTANTS_EVENT_OBJECTS_H
|
||||
#define GUARD_CONSTANTS_EVENT_OBJECTS_H
|
||||
|
||||
#include "constants/map_event_ids.h"
|
||||
|
||||
#define OBJ_EVENT_GFX_RED_NORMAL 0
|
||||
#define OBJ_EVENT_GFX_RED_BIKE 1
|
||||
#define OBJ_EVENT_GFX_RED_SURF 2
|
||||
@@ -192,9 +194,19 @@
|
||||
#define OBJ_KIND_NORMAL 0
|
||||
#define OBJ_KIND_CLONE 255
|
||||
|
||||
// Special object event local ids
|
||||
#define OBJ_EVENT_ID_PLAYER 0xFF
|
||||
#define OBJ_EVENT_ID_CAMERA 0x7F
|
||||
// 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 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 LOCALID_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 LOCALID_PLAYER 255
|
||||
|
||||
// Aliases for old names. "object event id" normally refers to an index into gObjectEvents, which these are not.
|
||||
#define OBJ_EVENT_ID_CAMERA LOCALID_CAMERA
|
||||
#define OBJ_EVENT_ID_PLAYER LOCALID_PLAYER
|
||||
|
||||
// Object event local ids referenced in C files
|
||||
#define LOCALID_UNION_ROOM_PLAYER_4 2
|
||||
|
||||
Reference in New Issue
Block a user