diff options
Diffstat (limited to 'src/map/map.h')
-rw-r--r-- | src/map/map.h | 48 |
1 files changed, 16 insertions, 32 deletions
diff --git a/src/map/map.h b/src/map/map.h index 4bee9c8ea..d372a68b6 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -1,8 +1,10 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams + #ifndef _MAP_H_ #define _MAP_H_ + #include "../common/cbasetypes.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/mmo.h" @@ -11,14 +13,17 @@ #include "../config/core.h" #include "atcommand.h" #include <stdarg.h> + struct npc_data; struct item_data; struct hChSysCh; + enum E_MAPSERVER_ST { MAPSERVER_ST_RUNNING = CORE_ST_LAST, MAPSERVER_ST_SHUTDOWN, MAPSERVER_ST_LAST }; + #define MAX_NPC_PER_MAP 512 #define AREA_SIZE battle_config.area_size #define DAMAGELOG_SIZE 30 @@ -34,6 +39,7 @@ enum E_MAPSERVER_ST { #define MAX_IGNORE_LIST 20 // official is 14 #define MAX_VENDING 12 #define MAX_MAP_SIZE 512*512 // Wasn't there something like this already? Can't find it.. [Shinryo] + // Added definitions for WoESE objects. [L0ne_W0lf] enum MOBID { MOBID_EMPERIUM = 1288, @@ -51,6 +57,7 @@ enum MOBID { MOBID_SILVERSNIPER = 2042, MOBID_MAGICDECOY_WIND = 2046, }; + // The following system marks a different job ID system used by the map server, // which makes a lot more sense than the normal one. [Skotlex] // These marks the "level" of the job. @@ -193,6 +200,7 @@ enum { MAPID_BABY_GENETIC, MAPID_BABY_CHASER, }; + // Max size for inputs to Graffiti, Talkie Box and Vending text prompts #define MESSAGE_SIZE (79 + 1) // String length you can write in the 'talking box' @@ -296,7 +304,6 @@ struct block_list { enum bl_type type; }; - // Mob List Held in memory for Dynamic Mobs [Wizputer] // Expanded to specify all mob-related spawn data by [Skotlex] struct spawn_data { @@ -449,8 +456,7 @@ typedef enum { } cell_chk; -struct mapcell -{ +struct mapcell { // terrain flags unsigned char walkable : 1, @@ -517,7 +523,10 @@ struct map_zone_skill_damage_cap_entry { #define MAP_ZONE_BG_NAME "Battlegrounds" #define MAP_ZONE_PK_NAME "PK Mode" #define MAP_ZONE_MAPFLAG_LENGTH 50 + +//TODO place it in iMap DBMap *zone_db;/* string => struct map_zone_data */ + struct map_zone_data { char name[MAP_ZONE_NAME_LENGTH];/* 20'd */ struct map_zone_disabled_skill_entry **disabled_skills; @@ -541,7 +550,6 @@ struct map_drop_list { int drop_per; }; - struct map_data { char name[MAP_NAME_LENGTH]; uint16 index; // The map index used by the mapindex* functions. @@ -691,26 +699,6 @@ struct map_data_other_server { struct map_data *map; - - - - - -//int map_foreachinrange(int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int type, ...); -//int map_foreachinshootrange(int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int type, ...); -//int map_foreachinarea(int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int type, ...); -//int map_forcountinrange(int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int count, int type, ...); -//int map_forcountinarea(int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int count, int type, ...); -//int map_foreachinmovearea(int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int16 dx, int16 dy, int type, ...); -//int map_foreachincell(int (*func)(struct block_list*,va_list), int16 m, int16 x, int16 y, int type, ...); -//int map_foreachinpath(int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int16 range, int length, int type, ...); -//int map_foreachinmap(int (*func)(struct block_list*,va_list), int16 m, int type, ...); -//int map_foreachininstance(int (*func)(struct block_list*,va_list), int16 instance_id, int type,...); -// - - - - #define map_id2index(id) map[(id)].index /// Bitfield of flags for the iterator. @@ -718,7 +706,9 @@ enum e_mapitflags { MAPIT_NORMAL = 0, // MAPIT_PCISPLAYING = 1,// Unneeded as pc_db/id_db will only hold auth'ed, active players. }; + struct s_mapiterator; + /* temporary until the map.c "Hercules Renewal Phase One" design is complete. */ struct mapit_interface { struct s_mapiterator* (*alloc) (enum e_mapitflags flags, enum bl_type types); @@ -729,19 +719,15 @@ struct mapit_interface { struct block_list* (*prev) (struct s_mapiterator* mapit); bool (*exists) (struct s_mapiterator* mapit); } mapit_s; + struct mapit_interface *mapit; + #define mapit_getallusers() mapit->alloc(MAPIT_NORMAL,BL_PC) #define mapit_geteachpc() mapit->alloc(MAPIT_NORMAL,BL_PC) #define mapit_geteachmob() mapit->alloc(MAPIT_NORMAL,BL_MOB) #define mapit_geteachnpc() mapit->alloc(MAPIT_NORMAL,BL_NPC) #define mapit_geteachiddb() mapit->alloc(MAPIT_NORMAL,BL_ALL) - - - - - - //Useful typedefs from jA [Skotlex] typedef struct map_session_data TBL_PC; typedef struct npc_data TBL_NPC; @@ -763,8 +749,6 @@ typedef struct elemental_data TBL_ELEM; extern Sql* mmysql_handle; extern Sql* logmysql_handle; - - /*===================================== * Interface : map.h * Generated by HerculesInterfaceMaker |