mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-30 11:32:20 +00:00
* Adds a helper for base_pixel sets in typepaths that ensures the offset is autoapplied to pixel_x/y (#72309) ## About The Pull Request This was an issue on wallening and I figured I should fix it at the root Look ma I'm upstreaming * Adds a helper for base_pixel sets in typepaths that ensures the offset is autoapplied to pixel_x/y * update modular Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
16 lines
638 B
Plaintext
16 lines
638 B
Plaintext
/// Use this to set the base and ACTUAL pixel offsets of an object at the same time
|
|
/// You should always use this for pixel setting in typepaths, unless you want the map display to look different from in game
|
|
#define SET_BASE_PIXEL(x, y) \
|
|
pixel_x = x; \
|
|
base_pixel_x = x; \
|
|
pixel_y = y; \
|
|
base_pixel_y = y;
|
|
|
|
/// Helper define, sets JUST base pixel offsets
|
|
#define _SET_BASE_PIXEL_NO_OFFSET(x, y) \
|
|
base_pixel_x = x; \
|
|
base_pixel_y = y;
|
|
|
|
/// Much like [SET_BASE_PIXEL], except it will not effect pixel offsets in mapping programs
|
|
#define SET_BASE_PIXEL_NOMAP(x, y) MAP_SWITCH(SET_BASE_PIXEL(x, y), _SET_BASE_PIXEL_NO_OFFSET(x, y))
|