Handle optional arguments for warp commands, add WARP_ID_NONE

This commit is contained in:
GriffinR
2021-11-15 12:04:54 -05:00
parent c1130592fa
commit 04cc923d6c
145 changed files with 342 additions and 352 deletions

View File

@@ -15,4 +15,16 @@
#define MAP_GROUP_SPECIAL_MONS_1 MAP_GROUP(METEOR_FALLS_1F_1R)
#define MAP_GROUP_SPECIAL_MONS_2 MAP_GROUP(SAFARI_ZONE_NORTHWEST)
// 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
// 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.
#define WARP_ID_SECRET_BASE 0x7E
#define WARP_ID_DYNAMIC 0x7F
// Used to indicate an invalid warp id, for dummy warps or when a warp should
// use the given coordinates rather than the coordinates of a target warp.
#define WARP_ID_NONE (-1)
#endif // GUARD_CONSTANTS_MAPS_H

View File

@@ -10,6 +10,7 @@
#include "constants/vars.h"
#include "constants/species.h"
#include "constants/berry.h"
#include "constants/maps.h"
// Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm("");