Files
Bubberstation/code/__DEFINES/directional.dm
SkyratBot ec6ddbe758 [MIRROR] Remove code/__DEFINES/misc.dm [MDB IGNORE] (#10945)
* Remove code/__DEFINES/misc.dm

* agagagagagaga

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-01-27 02:40:25 +00:00

36 lines
924 B
Plaintext

// Byond direction defines, because I want to put them somewhere.
// #define NORTH 1
// #define SOUTH 2
// #define EAST 4
// #define WEST 8
/// North direction as a string "[1]"
#define TEXT_NORTH "[NORTH]"
/// South direction as a string "[2]"
#define TEXT_SOUTH "[SOUTH]"
/// East direction as a string "[4]"
#define TEXT_EAST "[EAST]"
/// West direction as a string "[8]"
#define TEXT_WEST "[WEST]"
/// Inverse direction, taking into account UP|DOWN if necessary.
#define REVERSE_DIR(dir) ( ((dir & 85) << 1) | ((dir & 170) >> 1) )
/// Create directional subtypes for a path to simplify mapping.
#define MAPPING_DIRECTIONAL_HELPERS(path, offset) ##path/directional/north {\
dir = NORTH; \
pixel_y = offset; \
} \
##path/directional/south {\
dir = SOUTH; \
pixel_y = -offset; \
} \
##path/directional/east {\
dir = EAST; \
pixel_x = offset; \
} \
##path/directional/west {\
dir = WEST; \
pixel_x = -offset; \
}