1 #include "main.h" 2 #include "char.h" 3 4 #define TOP 90 5 6 #define MAP_W 40 7 #define MAP_H 25 8 9 typedef enum SPOT SPOT; 10 11 enum SPOT 12 { 13 SPOT_VOID = 0, 14 SPOT_FLOOR, 15 SPOT_WALL, 16 SPOT_UP, 17 SPOT_DOWN, 18 SPOT_TEMPLE, 19 SPOT_GOLD, 20 SPOT_PIT, 21 SPOT_ROPE, 22 SPOT_BEACON, 23 SPOT_TREASURE, 24 SPOT_CEILING, 25 SPOT_SWORD, 26 SPOT_STASH, 27 SPOT_MARKER = 256 28 }; 29 30 31 extern int tw, th; 32 extern int swordlev; 33 34 extern int spawnpoints; 35 extern int spawnx[5]; 36 extern int spawny[5]; 37 38 extern int temple_x; 39 extern int temple_y; 40 41 void map_put_spot (int x, int y, SPOT s); 42 void map_put_char (int x, int y, int id); 43 void map_put_info (int x, int y, int info); 44 45 SPOT map_get_spot (int x, int y); 46 int map_get_char (int x, int y); 47 int map_get_info (int x, int y); 48 49 void map_enter (SPOT what, int whereto); 50 void map_draw (void); 51 void map_init (void); 52 53 void map_seen (int x, int y, int r); 54 void map_hide_completely (void); 55 56 void map_crash (void); 57 58 void DR_add (int l, int t, int r, int b); 59 void map_blit_DRs (void); 60 int map_check_DRs (int l, int t, int r, int b); 61 extern int DR_n; 62 63 void map_load (PACKFILE *file); 64 void map_save (PACKFILE *file); 65