Merge pull request #1755 from GriffinRichards/map-dynamic

Rename special map constants, treat warp ids as strings
This commit is contained in:
GriffinR
2022-10-18 22:45:56 -04:00
committed by GitHub
448 changed files with 1367 additions and 1364 deletions

View File

@@ -3,14 +3,17 @@
#include "map_groups.h"
#define MAP_NONE (0x7F | (0x7F << 8))
// Warps using this map will instead use the warp data stored in gSaveBlock1Ptr->dynamicWarp.
// Used for warps that need to change destinations, e.g. when stepping off an elevator.
#define MAP_DYNAMIC (0x7F | (0x7F << 8))
#define MAP_UNDEFINED (0xFF | (0xFF << 8))
#define MAP_GROUP(map) (MAP_##map >> 8)
#define MAP_NUM(map) (MAP_##map & 0xFF)
// IDs for dynamic warps. Both are used in the dest_warp_id field for warp events, but they
// are never read in practice. A dest_map of MAP_NONE is used to indicate that a
// are never read in practice. A dest_map of MAP_DYNAMIC is used to indicate that a
// dynamic warp should be used, at which point the warp id is ignored. It can be passed to
// SetDynamicWarp/SetDynamicWarpWithCoords as the first argument, but this argument is unused.
// As only one dynamic warp is saved at a time there's no need to distinguish between them.