Atrinik Server  4.0
map.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Atrinik, a Multiplayer Online Role Playing Game *
3  * *
4  * Copyright (C) 2009-2014 Alex Tokar and Atrinik Development Team *
5  * *
6  * Fork from Crossfire (Multiplayer game for X-windows). *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the Free Software *
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21  * *
22  * The author can be reached at admin@atrinik.org *
23  ************************************************************************/
24 
31 #ifndef MAP_H
32 #define MAP_H
33 
34 #include <decls.h>
35 
37 #define MAX_DARKNESS 7
38 
40 #define MAP_PLAYER_MAP 1
41 
47 #define LAYER_SYS 0
48 
49 #define LAYER_FLOOR 1
50 
51 #define LAYER_FMASK 2
52 
53 #define LAYER_ITEM 3
54 
55 #define LAYER_ITEM2 4
56 
57 #define LAYER_WALL 5
58 
59 #define LAYER_LIVING 6
60 
61 #define LAYER_EFFECT 7
62 
67 #define NUM_LAYERS 7
68 
71 #define NUM_SUB_LAYERS 7
72 
75 #define NUM_REAL_LAYERS (NUM_LAYERS * NUM_SUB_LAYERS)
76 
84 #define MAP_WHEN_RESET(m) ((m)->reset_time)
85 
86 #define MAP_RESET_TIMEOUT(m) ((m)->reset_timeout)
87 
88 #define MAP_DIFFICULTY(m) ((m)->difficulty)
89 
90 #define MAP_TIMEOUT(m) ((m)->timeout)
91 
92 #define MAP_SWAP_TIME(m) ((m)->swap_time)
93 
94 #define MAP_OUTDOORS(m) ((m)->map_flags & MAP_FLAG_OUTDOOR)
95 
96 #define MAP_UNIQUE(m) ((m)->map_flags & MAP_FLAG_UNIQUE)
97 
98 #define MAP_FIXED_RESETTIME(m) ((m)->map_flags & MAP_FLAG_FIXED_RTIME)
99 
100 #define MAP_NOSAVE(m) ((m)->map_flags & MAP_FLAG_NO_SAVE)
101 
102 #define MAP_NOMAGIC(m) ((m)->map_flags & MAP_FLAG_NOMAGIC)
103 /*
104  * Height difference will be taken into account when rendering the map.
105  */
106 #define MAP_HEIGHT_DIFF(m) ((m)->map_flags & MAP_FLAG_HEIGHT_DIFF)
107 
108 #define MAP_NOHARM(m) ((m)->map_flags & MAP_FLAG_NOHARM)
109 
110 #define MAP_NOSUMMON(m) ((m)->map_flags & MAP_FLAG_NOSUMMON)
111 
112 #define MAP_FIXEDLOGIN(m) ((m)->map_flags & MAP_FLAG_FIXED_LOGIN)
113 
114 #define MAP_PLAYER_NO_SAVE(m) ((m)->map_flags & MAP_FLAG_PLAYER_NO_SAVE)
115 
116 #define MAP_PVP(m) ((m)->map_flags & MAP_FLAG_PVP)
117 
118 #define MAP_DARKNESS(m) (m)->darkness
119 
120 #define MAP_WIDTH(m) (m)->width
121 
122 #define MAP_HEIGHT(m) (m)->height
123 
127 #define MAP_SIZE(m) ((m)->width * (m)->height)
128 
129 #define MAP_ENTER_X(m) (m)->enter_x
130 
131 #define MAP_ENTER_Y(m) (m)->enter_y
132 
144 #define MAP_FLUSH 1
145 
149 #define MAP_PLAYER_UNIQUE 2
150 
151 #define MAP_BLOCK 4
152 
153 #define MAP_STYLE 8
154 
155 #define MAP_ARTIFACT 16
156 
157 #define MAP_NAME_SHARED 32
158 
159 #define MAP_ORIGINAL 64
160 
161 #define MAP_NO_DYNAMIC 128
162 
170 #define MAP_IN_MEMORY 1
171 
172 #define MAP_SWAPPED 2
173 
174 #define MAP_LOADING 3
175 
176 #define MAP_SAVING 4
177 
179 /* new macros for map layer system */
180 #define GET_MAP_SPACE_PTR(M_, X_, Y_) \
181  (&((M_)->spaces[(X_) + (M_)->width * (Y_)]))
182 
183 #define GET_MAP_SPACE_FIRST(M_) \
184  ((M_)->first)
185 #define GET_MAP_SPACE_LAST(M_) \
186  ((M_)->last)
187 #define GET_MAP_SPACE_LAYER(M_, L_, SL_) \
188  ((M_)->layer[NUM_LAYERS * (SL_) + (L_) -1])
189 
190 #define SET_MAP_SPACE_FIRST(M_, O_) \
191  ((M_)->first = (O_))
192 #define SET_MAP_SPACE_LAST(M_, O_) \
193  ((M_)->last = (O_))
194 #define SET_MAP_SPACE_LAYER(M_, L_, SL_, O_) \
195  ((M_)->layer[NUM_LAYERS * (SL_) + (L_) -1] = (O_))
196 
197 #define GET_MAP_UPDATE_COUNTER(M, X, Y) \
198  ((M)->spaces[(X) + (M)->width * (Y)].update_tile)
199 
200 #define INC_MAP_UPDATE_COUNTER(M, X, Y) \
201  ((M)->spaces[((X) + (M)->width * (Y))].update_tile++)
202 
203 #define GET_MAP_MOVE_FLAGS(M, X, Y) \
204  ((M)->spaces[(X) + (M)->width * (Y)].move_flags)
205 #define SET_MAP_MOVE_FLAGS(M, X, Y, C) \
206  ((M)->spaces[(X) + (M)->width * (Y)].move_flags = C)
207 #define GET_MAP_FLAGS(M, X, Y) \
208  ((M)->spaces[(X) + (M)->width * (Y)].flags)
209 #define SET_MAP_FLAGS(M, X, Y, C) \
210  ((M)->spaces[(X) + (M)->width * (Y)].flags = C)
211 #define GET_MAP_LIGHT(M, X, Y) \
212  ((M)->spaces[(X) + (M)->width * (Y)].light_value)
213 #define SET_MAP_LIGHT(M, X, Y, L) \
214  ((M)->spaces[(X) + (M)->width * (Y)].light_value = L)
215 
216 #define GET_MAP_OB(M, X, Y) \
217  ((M)->spaces[(X) + (M)->width * (Y)].first)
218 #define GET_MAP_OB_LAST(M, X, Y) \
219  ((M)->spaces[(X) + (M)->width * (Y)].last)
220 #define GET_MAP_OB_LAYER(_M_, _X_, _Y_, _Z_, _SL_) \
221  ((_M_)->spaces[(_X_) + (_M_)->width * (_Y_)].layer[NUM_LAYERS * (_SL_) + (_Z_) -1])
222 
223 #define SET_MAP_DAMAGE(M, X, Y, SUB_LAYER, tmp) \
224  ((M)->spaces[(X) + (M)->width * (Y)].last_damage[(SUB_LAYER)] = (int16_t) (tmp))
225 #define GET_MAP_DAMAGE(M, X, Y, SUB_LAYER) \
226  ((M)->spaces[(X) + (M)->width * (Y)].last_damage[(SUB_LAYER)])
227 
228 #define SET_MAP_RTAG(M, X, Y, SUB_LAYER, tmp) \
229  ((M)->spaces[(X) + (M)->width * (Y)].round_tag[(SUB_LAYER)] = (uint32_t) (tmp))
230 #define GET_MAP_RTAG(M, X, Y, SUB_LAYER) \
231  ((M)->spaces[(X) + (M)->width * (Y)].round_tag[(SUB_LAYER)])
232 
233 #define GET_BOTTOM_MAP_OB(O) ((O)->map ? GET_MAP_OB((O)->map, (O)->x, (O)->y) : NULL)
234 
240 #define OUT_OF_MAP(M, X, Y) \
241  ((X) < 0 || (Y) < 0 || (X) >= (M)->width || (Y) >= (M)->height)
242 
250 #define P_BLOCKSVIEW 0x01
251 
252 #define P_NO_MAGIC 0x02
253 
254 #define P_NO_PASS 0x04
255 
256 #define P_IS_PLAYER 0x08
257 
258 #define P_IS_MONSTER 0x10
259 
260 #define P_IS_EXIT 0x20
261 
267 #define P_PLAYER_ONLY 0x40
268 
272 #define P_DOOR_CLOSED 0x80
273 
276 #define P_CHECK_INV 0x100
277 
280 #define P_NO_PVP 0x200
281 
288 #define P_PASS_THRU 0x400
289 
290 #define P_WALK_ON 0x1000
291 
292 #define P_WALK_OFF 0x2000
293 
294 #define P_FLY_OFF 0x4000
295 
296 #define P_FLY_ON 0x8000
297 
298 #define P_MAGIC_MIRROR 0x10000
299 
300 #define P_OUTDOOR 0x20000
301 
305 #define P_OUT_OF_MAP 0x4000000
306 
307 #define P_NEED_UPDATE 0x40000000
308 
312 #define P_NO_TERRAIN 0x80000000
313 
320 #define MSP_EXTRA_NO_HARM 1
321 
322 #define MSP_EXTRA_NO_PVP 2
323 
324 #define MSP_EXTRA_NO_MAGIC 4
325 
326 #define MSP_EXTRA_IS_BUILDING 8
327 
328 #define MSP_EXTRA_IS_BALCONY 16
329 
330 #define MSP_EXTRA_IS_OVERLOOK 32
331 
334 typedef struct MapSpace_s {
336  object *first;
337 
340 
342  object *last;
343 
345  object *map_info;
346 
348  object *sound_ambient;
349 
352 
355 
358 
361 
364 
366  uint32_t update_tile;
367 
369  int32_t light_source;
370 
375  int32_t light_value;
376 
381  int flags;
382 
385 
387  uint16_t move_flags;
388 
390  uint8_t extra_flags;
391 } MapSpace;
392 
398 #define MAP_FLAG_OUTDOOR 1
399 
400 #define MAP_FLAG_UNIQUE 2
401 
405 #define MAP_FLAG_FIXED_RTIME 4
406 
407 #define MAP_FLAG_NOMAGIC 8
408 
411 #define MAP_FLAG_HEIGHT_DIFF 16
412 
413 #define MAP_FLAG_NOHARM 32
414 
417 #define MAP_FLAG_NOSUMMON 64
418 
423 #define MAP_FLAG_FIXED_LOGIN 128
424 
425 #define MAP_FLAG_PLAYER_NO_SAVE 256
426 
427 #define MAP_FLAG_UNUSED2 1024
428 
429 #define MAP_FLAG_UNUSED3 2048
430 
431 #define MAP_FLAG_PVP 4096
432 
433 #define MAP_FLAG_NO_SAVE 8192
434 
442 #define MAP_DEFAULT_DARKNESS 0
443 
451 typedef struct region_struct {
454 
461 
463  char *name;
464 
472  char *parent_name;
473 
478  char *longname;
479 
481  char *msg;
482 
484  char *jailmap;
485 
487  char *map_first;
488 
490  char *map_bg;
491 
493  int16_t jailx;
494 
496  int16_t jaily;
497 
498  bool child_maps:1;
499 } region_struct;
500 
504 typedef struct map_event {
506  struct map_event *next;
507 
509  object *event;
510 
515 } map_event;
516 
517 typedef struct map_exit {
518  struct map_exit *next;
519 
520  struct map_exit *prev;
521 
522  object *obj;
523 } map_exit_t;
524 
525 struct path_node;
526 
536 typedef struct mapdef {
541  struct mapdef *next;
542 
547  struct mapdef *prev;
548 
551 
553  shstr *name;
554 
556  shstr *bg_music;
557 
559  shstr *weather;
560 
562  char *tmpname;
563 
565  char *msg;
566 
568  shstr *path;
569 
572 
575 
578 
581 
583  struct map_event *events;
584 
585  map_exit_t *exits;
586 
589 
592 
594  object *player_first;
595 
597  uint32_t *bitmap;
598 
600  uint32_t pathfinding_id;
601 
602  struct path_node **path_nodes;
603 
605  uint32_t map_flags;
606 
608  uint32_t reset_time;
609 
614  uint32_t reset_timeout;
615 
617  int32_t timeout;
618 
620  uint32_t swap_time;
621 
627  uint32_t in_memory;
628 
630  uint32_t traversed;
631 
638  int darkness;
639 
645 
651 
653  int height;
654 
656  int width;
657 
666  int enter_x;
667 
676  int enter_y;
677 
678  int16_t coords[3];
679 
680  int8_t level_min;
681 
682  int8_t level_max;
683 
685 
686  tag_t count;
687 } mapstruct;
688 
696 #define MAP_TILE_IS_SAME_LEVEL(_m, _z) \
697  ((_m)->coords[2] + (_z) >= (_m)->level_min && \
698  (_m)->coords[2] + (_z) <= (_m)->level_max)
699 
700 #define MAP_TILES_WALK_INTERNAL(_m, _fnc, ...) \
701  if (__ret == 0) { \
702  __ret = (_fnc)((_m), (_m), ##__VA_ARGS__); \
703  } \
704 \
705  for (__idx = 0; __ret == 0 && __idx < TILED_NUM_DIR; __idx++) { \
706  if ((_m)->tile_map[__idx] == NULL || \
707  (_m)->tile_map[__idx]->in_memory != MAP_IN_MEMORY) { \
708  continue; \
709  } \
710 \
711  __ret = (_fnc)((_m)->tile_map[__idx], (_m), ##__VA_ARGS__); \
712  }
713 
733 #define MAP_TILES_WALK_START(_m, _fnc, ...) \
734 { \
735  int __ret, __idx, __tile_id, __z; \
736  mapstruct *__tile; \
737 \
738  __ret = 0; \
739 \
740  if ((_m)->in_memory == MAP_IN_MEMORY) { \
741  MAP_TILES_WALK_INTERNAL(_m, _fnc, ##__VA_ARGS__); \
742  } \
743 \
744  for (__tile_id = TILED_UP; \
745  __ret == 0 && __tile_id <= TILED_DOWN; \
746  __tile_id++) { \
747  for (__tile = (_m)->tile_map[__tile_id], \
748  __z = __tile_id == TILED_UP ? 1 : -1; \
749  __ret == 0 && __tile != NULL && \
750  __tile->in_memory == MAP_IN_MEMORY && \
751  MAP_TILE_IS_SAME_LEVEL(_m, __z); \
752  __tile = __tile->tile_map[__tile_id], \
753  __z += __tile_id == TILED_UP ? 1 : -1) { \
754  MAP_TILES_WALK_INTERNAL(__tile, _fnc, ##__VA_ARGS__); \
755  } \
756  }
757 
761 #define MAP_TILES_WALK_RETVAL __ret
762 
766 #define MAP_TILES_WALK_END \
767 }
768 
773 typedef struct rv_vector_s {
775  unsigned int distance;
776 
779 
782 
785 
788 
790  object *part;
791 } rv_vector;
792 
801 #define RV_MANHATTAN_DISTANCE 0x00
802 
805 #define RV_EUCLIDIAN_DISTANCE 0x01
806 
809 #define RV_DIAGONAL_DISTANCE 0x02
810 
813 #define RV_NO_DISTANCE (RV_EUCLIDIAN_DISTANCE | RV_DIAGONAL_DISTANCE)
814 
819 #define RV_IGNORE_MULTIPART 0x04
820 
825 #define RV_RECURSIVE_SEARCH 0x08
826 
829 #define RV_NO_LOAD 0x10
830 
837 #define NORTH 1
838 
839 #define NORTHEAST 2
840 
841 #define EAST 3
842 
843 #define SOUTHEAST 4
844 
845 #define SOUTH 5
846 
847 #define SOUTHWEST 6
848 
849 #define WEST 7
850 
851 #define NORTHWEST 8
852 
853 #define NUM_DIRECTION 8
854 
857 #define OBJECT_IS_HIDDEN(pl, ob) (HAS_EVENT((ob), EVENT_ASK_SHOW) && trigger_event(EVENT_ASK_SHOW, (pl), (ob), NULL, NULL, 0, 0, 0, 0) == 1)
858 
862 #define MAP_BUILDING_DARKNESS_WALL 4
863 
866 #define MAP_BUILDING_DARKNESS 3
867 
868 /* Prototypes */
869 
870 extern int global_darkness_table[MAX_DARKNESS + 1];
871 extern int map_tiled_reverse[TILED_NUM];
872 
873 void
874 map_init(void);
875 mapstruct *
876 has_been_loaded_sh(shstr *name);
877 char *
878 create_pathname(const char *name);
879 int
880 wall(mapstruct *m, int x, int y);
881 int
882 blocks_view(mapstruct *m, int x, int y);
883 int
884 blocks_magic(mapstruct *m, int x, int y);
885 int
886 blocked(object *op, mapstruct *m, int x, int y, int terrain);
887 int
888 blocked_tile(object *op, mapstruct *m, int x, int y);
889 int
890 arch_blocked(struct archetype *at, object *op, mapstruct *m, int x, int y);
891 void
892 set_map_darkness(mapstruct *m, int value);
893 mapstruct *
894 get_linked_map(void);
895 mapstruct *
896 get_empty_map(int sizex, int sizey);
897 void
898 map_set_tile(mapstruct *m, int tile, const char *pathname);
899 mapstruct *
900 load_original_map(const char *filename, mapstruct *originator, int flags);
901 int
902 new_save_map(mapstruct *m, int flag);
903 void
904 free_map(mapstruct *m, int flag);
905 void
907 mapstruct *
908 ready_map_name(const char *name, mapstruct *originator, int flags);
909 void
911 void
912 free_all_maps(void);
913 void
914 update_position(mapstruct *m, int x, int y);
915 void
917 mapstruct *
918 get_map_from_tiled(mapstruct *m, int tiled);
919 mapstruct *
920 get_map_from_coord(mapstruct *m, int *x, int *y);
921 mapstruct *
922 get_map_from_coord2(mapstruct *m, int *x, int *y);
923 int
924 get_rangevector(object *op1, object *op2, rv_vector *retval, int flags);
925 int
926 get_rangevector_from_mapcoords(mapstruct *map1, int x, int y, mapstruct *map2, int x2, int y2, rv_vector *retval, int flags);
927 int
928 on_same_map(object *op1, object *op2);
929 int
931 int
932 wall_blocked(mapstruct *m, int x, int y);
933 int
934 map_get_darkness(mapstruct *m, int x, int y, object **mirror);
935 int
936 map_path_isabs(const char *path);
937 char *
938 map_get_path(mapstruct *m, const char *path, uint8_t unique, const char *name);
939 mapstruct *
941 void
942 map_redraw(mapstruct *m, int x, int y, int layer, int sub_layer);
943 object *
944 map_find_arch(mapstruct *m, int x, int y, archetype_t *at);
945 object *
946 map_find_type(mapstruct *m, int x, int y, uint8_t type);
947 int
949  int x,
950  int y,
951  int start,
952  int stop,
953  archetype_t *at,
954  object *op);
955 int
957  int x,
958  int y,
959  archetype_t *at,
960  object *op);
961 
962 #endif
int arch_blocked(struct archetype *at, object *op, mapstruct *m, int x, int y)
Definition: map.c:728
char * parent_name
Definition: map.h:472
Definition: object.h:94
uint32_t traversed
Definition: map.h:630
tag_t count
Unique identifier for the map.
Definition: map.h:686
MapSpace * spaces
Definition: map.h:574
shstr * name
Definition: map.h:553
uint32_t swap_time
Definition: map.h:620
struct mapdef mapstruct
char * msg
Definition: map.h:481
int get_rangevector(object *op1, object *op2, rv_vector *retval, int flags)
Definition: map.c:2238
int direction
Definition: map.h:787
Definition: object.h:488
int blocks_view(mapstruct *m, int x, int y)
Definition: map.c:507
struct region_struct * next
Definition: map.h:453
unsigned int distance
Definition: map.h:775
int map_tiled_reverse[TILED_NUM]
Definition: map.c:52
Definition: map.h:504
int darkness
Definition: map.h:638
mapstruct * get_map_from_coord2(mapstruct *m, int *x, int *y)
Definition: map.c:2000
uint8_t type
One of operation types.
Definition: sound_ambient.c:45
char * map_bg
Definition: map.h:490
objectlink * linked_spawn_points
Definition: map.h:591
struct map_event map_event
shstr * path
Definition: map.h:568
int32_t light_value
Definition: map.h:375
mapstruct * get_map_from_coord(mapstruct *m, int *x, int *y)
Definition: map.c:1869
mapstruct * get_linked_map(void)
Definition: map.c:948
uint32_t in_memory
Definition: map.h:627
object * layer[NUM_REAL_LAYERS]
Definition: map.h:339
int distance_x
Definition: map.h:778
MapSpace * first_light
Definition: map.h:577
uint32_t reset_time
Definition: map.h:608
int blocked(object *op, mapstruct *m, int x, int y, int terrain)
Definition: map.c:598
int wall(mapstruct *m, int x, int y)
Definition: map.c:486
object * map_find_arch(mapstruct *m, int x, int y, archetype_t *at)
Definition: map.c:2856
int height
Definition: map.h:653
int enter_x
Definition: map.h:666
int blocked_tile(object *op, mapstruct *m, int x, int y)
Definition: map.c:676
int new_save_map(mapstruct *m, int flag)
Definition: map.c:1363
int map_free_spot(mapstruct *m, int x, int y, int start, int stop, archetype_t *at, object *op)
Definition: map.c:2942
void delete_map(mapstruct *m)
Definition: map.c:1555
char * jailmap
Definition: map.h:484
mapstruct * load_original_map(const char *filename, mapstruct *originator, int flags)
Definition: map.c:1055
void free_map(mapstruct *m, int flag)
Definition: map.c:1493
int distance_y
Definition: map.h:781
void update_position(mapstruct *m, int x, int y)
Definition: map.c:1706
int16_t jailx
Definition: map.h:493
struct rv_vector_s rv_vector
Definition: arch.h:40
struct region_struct * parent
Definition: map.h:460
object * map_find_type(mapstruct *m, int x, int y, uint8_t type)
Definition: map.c:2891
uint32_t map_flags
Definition: map.h:605
int32_t light_source
Definition: map.h:369
object * map_info
Definition: map.h:345
int16_t jaily
Definition: map.h:496
shstr * bg_music
Definition: map.h:556
int enter_y
Definition: map.h:676
struct MapSpace_s MapSpace
tag_t sound_ambient_count
Definition: map.h:363
char * msg
Definition: map.h:565
void free_all_maps(void)
Definition: map.c:1677
objectlink * buttons
Definition: map.h:588
shstr * tile_path[TILED_NUM]
Definition: map.h:571
struct mapdef * tile_map[TILED_NUM]
Definition: map.h:550
mapstruct * get_empty_map(int sizex, int sizey)
Definition: map.c:985
object * first
Definition: map.h:336
uint32_t round_tag[NUM_SUB_LAYERS]
Definition: map.h:357
int flags
Definition: map.h:381
struct map_event * next
Definition: map.h:506
struct region_struct region_struct
bool child_maps
If true, map of this region has all the children.
Definition: map.h:498
shstr * weather
Definition: map.h:559
int blocks_magic(mapstruct *m, int x, int y)
Definition: map.c:529
#define TILED_NUM
Definition: global.h:208
char * map_first
Definition: map.h:487
#define NUM_SUB_LAYERS
Definition: map.h:71
char * tmpname
Definition: map.h:562
struct map_event * events
Definition: map.h:583
int32_t timeout
Definition: map.h:617
char * longname
Definition: map.h:478
void map_redraw(mapstruct *m, int x, int y, int layer, int sub_layer)
Definition: map.c:2824
int difficulty
Definition: map.h:650
struct atrinik_plugin * plugin
Definition: map.h:514
int on_same_map(object *op1, object *op2)
Definition: map.c:2414
bool global_removed
If true, the map was removed from the global list.
Definition: map.h:684
#define NUM_REAL_LAYERS
Definition: map.h:75
struct MapSpace_s * next_light
Definition: map.h:354
uint32_t update_tile
Definition: map.h:366
region_struct * region
Definition: map.h:580
int8_t level_max
Maximum level offset that is part of this map.
Definition: map.h:682
int get_rangevector_from_mapcoords(mapstruct *map1, int x, int y, mapstruct *map2, int x2, int y2, rv_vector *retval, int flags)
Definition: map.c:2297
tag_t map_info_count
Definition: map.h:360
object * last
Definition: map.h:342
int distance_z
Definition: map.h:784
int light_value
Definition: map.h:644
uint32_t pathfinding_id
Definition: map.h:600
mapstruct * map_force_reset(mapstruct *m)
Definition: map.c:2691
void map_init(void)
Definition: map.c:148
uint32_t reset_timeout
Definition: map.h:614
int wall_blocked(mapstruct *m, int x, int y)
Definition: map.c:2479
struct MapSpace_s * prev_light
Definition: map.h:351
int players_on_map(mapstruct *m)
Definition: map.c:2455
uint8_t extra_flags
Definition: map.h:390
object * part
Definition: map.h:790
void set_map_darkness(mapstruct *m, int value)
Definition: map.c:933
char * name
Definition: map.h:463
mapstruct * has_been_loaded_sh(shstr *name)
Definition: map.c:389
object * player_first
Definition: map.h:594
int16_t coords[3]
X, Y and Z coordinates.
Definition: map.h:678
char * create_pathname(const char *name)
Definition: map.c:422
#define MAX_DARKNESS
Definition: map.h:37
int map_free_spot_first(mapstruct *m, int x, int y, archetype_t *at, object *op)
Definition: map.c:3009
mapstruct * ready_map_name(const char *name, mapstruct *originator, int flags)
Definition: map.c:1584
object * sound_ambient
Definition: map.h:348
uint16_t move_flags
Definition: map.h:387
Definition: map.h:536
Definition: map.h:517
int width
Definition: map.h:656
int16_t last_damage[NUM_SUB_LAYERS]
Definition: map.h:384
void clean_tmp_map(mapstruct *m)
Definition: map.c:1662
mapstruct * get_map_from_tiled(mapstruct *m, int tiled)
Definition: map.c:1838
uint32_t * bitmap
Definition: map.h:597
object * event
Definition: map.h:509
void set_map_reset_time(mapstruct *map)
Definition: map.c:1814
int8_t level_min
Minimum level offset that is part of this map.
Definition: map.h:680