mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-11 16:07:36 +01:00
Speed up asteroid generation a bunch (#2872)
Shaves 10-20 seconds off of asteroid generation time, bringing it down to 20 seconds, as well as renames some macros so their function is more clear.
This commit is contained in:
@@ -21,9 +21,11 @@
|
||||
#define ARTIFACT_TURF_CHAR 6
|
||||
#define ARTIFACT_CHAR 7
|
||||
|
||||
#define GET_MAP_CELL(X,Y) ((((Y) - 1) * limit_x) + (X))
|
||||
#define PREPARE_CELL(X,Y) \
|
||||
tmp_cell = GET_MAP_CELL(X,Y);\
|
||||
if (tmp_cell < 1 || tmp_cell > map.len) {\
|
||||
#define TRANSLATE_COORD(X,Y) ((((Y) - 1) * limit_x) + (X))
|
||||
#define TRANSLATE_AND_VERIFY_COORD(X,Y) TRANSLATE_AND_VERIFY_COORD_MLEN(X,Y,map.len)
|
||||
|
||||
#define TRANSLATE_AND_VERIFY_COORD_MLEN(X,Y,LEN) \
|
||||
tmp_cell = TRANSLATE_COORD(X,Y);\
|
||||
if (tmp_cell < 1 || tmp_cell > LEN) {\
|
||||
tmp_cell = null;\
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user