Improve asteroid generation performance

This commit is contained in:
Lohikar
2017-03-04 15:45:01 -06:00
parent 76a891930e
commit 4aeab0d6ce
8 changed files with 172 additions and 80 deletions
+8 -1
View File
@@ -19,4 +19,11 @@
#define ROOM_TEMP_CHAR 4
#define MONSTER_CHAR 5
#define ARTIFACT_TURF_CHAR 6
#define ARTIFACT_CHAR 7
#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) {\
tmp_cell = null;\
}