diff options
Diffstat (limited to 'src/map')
49 files changed, 160 insertions, 160 deletions
diff --git a/src/map/HPMmap.h b/src/map/HPMmap.h index f291575fb..99c4224ff 100644 --- a/src/map/HPMmap.h +++ b/src/map/HPMmap.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#ifndef _MAP_HPMMAP_H_ -#define _MAP_HPMMAP_H_ +#ifndef MAP_HPMMAP_H +#define MAP_HPMMAP_H #include "../common/cbasetypes.h" #include "../map/atcommand.h" @@ -26,4 +26,4 @@ bool HPM_map_DataCheck(struct s_HPMDataCheck *src, unsigned int size, char *name void HPM_map_do_init(void); -#endif /* _MAP_HPMMAP_H_ */ +#endif /* MAP_HPMMAP_H */ diff --git a/src/map/atcommand.c b/src/map/atcommand.c index d36e98c41..e22e2101c 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -8434,7 +8434,7 @@ ACMD(set) { if( is_str ) script->set_var(sd, reg, (void*) val); else - script->set_var(sd, reg, (void*)__64BPTRSIZE((atoi(val)))); + script->set_var(sd, reg, (void*)h64BPTRSIZE((atoi(val)))); } diff --git a/src/map/atcommand.h b/src/map/atcommand.h index c8a1863af..356487bd1 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_ATCOMMAND_H_ -#define _MAP_ATCOMMAND_H_ +#ifndef MAP_ATCOMMAND_H +#define MAP_ATCOMMAND_H #include "pc_groups.h" #include "../common/conf.h" @@ -121,4 +121,4 @@ void atcommand_defaults(void); /* stay here */ #define ACMD(x) static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info) -#endif /* _MAP_ATCOMMAND_H_ */ +#endif /* MAP_ATCOMMAND_H */ diff --git a/src/map/battle.c b/src/map/battle.c index e40d44549..7610d97b2 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -6357,7 +6357,7 @@ bool battle_check_range(struct block_list *src, struct block_list *bl, int range return path->search_long(NULL,src->m,src->x,src->y,bl->x,bl->y,CELL_CHKWALL); } -static const struct _battle_data { +static const struct battle_data { const char* str; int* val; int defval; diff --git a/src/map/battle.h b/src/map/battle.h index fc916597d..aab94420a 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_BATTLE_H_ -#define _MAP_BATTLE_H_ +#ifndef MAP_BATTLE_H +#define MAP_BATTLE_H #include "map.h" //ELE_MAX #include "../common/cbasetypes.h" @@ -603,4 +603,4 @@ struct battle_interface { struct battle_interface *battle; void battle_defaults(void); -#endif /* _MAP_BATTLE_H_ */ +#endif /* MAP_BATTLE_H */ diff --git a/src/map/battleground.h b/src/map/battleground.h index ec0a86f14..c1d3be054 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_BATTLEGROUND_H_ -#define _MAP_BATTLEGROUND_H_ +#ifndef MAP_BATTLEGROUND_H +#define MAP_BATTLEGROUND_H #include "clif.h" #include "guild.h" @@ -122,4 +122,4 @@ struct battleground_interface *bg; void battleground_defaults(void); -#endif /* _MAP_BATTLEGROUND_H_ */ +#endif /* MAP_BATTLEGROUND_H */ diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h index 914631872..c981cc444 100644 --- a/src/map/buyingstore.h +++ b/src/map/buyingstore.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_BUYINGSTORE_H_ -#define _MAP_BUYINGSTORE_H_ +#ifndef MAP_BUYINGSTORE_H +#define MAP_BUYINGSTORE_H #include "../common/cbasetypes.h" #include "../common/mmo.h" // MAX_SLOTS @@ -75,4 +75,4 @@ struct buyingstore_interface *buyingstore; void buyingstore_defaults (void); -#endif // _MAP_BUYINGSTORE_H_ +#endif // MAP_BUYINGSTORE_H diff --git a/src/map/chat.h b/src/map/chat.h index 6e4fae1c0..e055c04ed 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_CHAT_H_ -#define _MAP_CHAT_H_ +#ifndef MAP_CHAT_H +#define MAP_CHAT_H #include "map.h" // struct block_list, CHATROOM_TITLE_SIZE #include "../common/cbasetypes.h" @@ -60,4 +60,4 @@ struct chat_interface *chat; void chat_defaults(void); -#endif /* _MAP_CHAT_H_ */ +#endif /* MAP_CHAT_H */ diff --git a/src/map/chrif.h b/src/map/chrif.h index 51ab0e9b9..11baaf5ff 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_CHRIF_H_ -#define _MAP_CHRIF_H_ +#ifndef MAP_CHRIF_H +#define MAP_CHRIF_H #include <time.h> @@ -154,4 +154,4 @@ void chrif_defaults(void); // There's no need for another function when a simple macro can do exactly the same effect #define chrif_char_offline(x) chrif->char_offline_nsd((x)->status.account_id,(x)->status.char_id) -#endif /* _MAP_CHRIF_H_ */ +#endif /* MAP_CHRIF_H */ diff --git a/src/map/clif.c b/src/map/clif.c index 750689816..9e105e4a9 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5651,7 +5651,7 @@ void clif_displaymessage_sprintf(const int fd, const char* mes, ...) { if( map->cpsd_active && fd == 0 ) { ShowInfo("HCP: "); va_start(ap,mes); - _vShowMessage(MSG_NONE,mes,ap); + vShowMessage_(MSG_NONE,mes,ap); va_end(ap); ShowMessage("\n"); } else if ( fd > 0 ) { diff --git a/src/map/clif.h b/src/map/clif.h index e1af44881..48316427f 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_CLIF_H_ -#define _MAP_CLIF_H_ +#ifndef MAP_CLIF_H +#define MAP_CLIF_H #include <stdarg.h> @@ -1290,4 +1290,4 @@ struct clif_interface *clif; void clif_defaults(void); -#endif /* _MAP_CLIF_H_ */ +#endif /* MAP_CLIF_H */ diff --git a/src/map/date.h b/src/map/date.h index b3ed59b2f..c3f353f64 100644 --- a/src/map/date.h +++ b/src/map/date.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _MAP_DATE_H_ -#define _MAP_DATE_H_ +#ifndef MAP_DATE_H +#define MAP_DATE_H #include "../common/cbasetypes.h" @@ -17,4 +17,4 @@ bool is_day_of_sun(void); bool is_day_of_moon(void); bool is_day_of_star(void); -#endif /* _MAP_DATE_H_ */ +#endif /* MAP_DATE_H */ diff --git a/src/map/duel.h b/src/map/duel.h index 91dfa8f83..de2bd1bf6 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_DUEL_H_ -#define _MAP_DUEL_H_ +#ifndef MAP_DUEL_H +#define MAP_DUEL_H #include "../common/cbasetypes.h" @@ -46,4 +46,4 @@ struct duel_interface *duel; void duel_defaults(void); -#endif /* _MAP_DUEL_H_ */ +#endif /* MAP_DUEL_H */ diff --git a/src/map/elemental.h b/src/map/elemental.h index beddd3ea1..0c8fff8b3 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_ELEMENTAL_H_ -#define _MAP_ELEMENTAL_H_ +#ifndef MAP_ELEMENTAL_H +#define MAP_ELEMENTAL_H #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data @@ -121,4 +121,4 @@ struct elemental_interface *elemental; void elemental_defaults(void); -#endif /* _MAP_ELEMENTAL_H_ */ +#endif /* MAP_ELEMENTAL_H */ diff --git a/src/map/guild.c b/src/map/guild.c index 642c8993c..af29dc64e 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2015,8 +2015,8 @@ int guild_castledatasave(int castle_id, int index, int value) void guild_castle_reconnect_sub(void *key, void *data, va_list ap) { - int castle_id = GetWord((int)__64BPTRSIZE(key), 0); - int index = GetWord((int)__64BPTRSIZE(key), 1); + int castle_id = GetWord((int)h64BPTRSIZE(key), 0); + int index = GetWord((int)h64BPTRSIZE(key), 1); intif->guild_castle_datasave(castle_id, index, *(int *)data); aFree(data); } @@ -2037,7 +2037,7 @@ void guild_castle_reconnect(int castle_id, int index, int value) int *data; CREATE(data, int, 1); *data = value; - linkdb_replace(&gc_save_pending, (void*)__64BPTRSIZE((MakeDWord(castle_id, index))), data); + linkdb_replace(&gc_save_pending, (void*)h64BPTRSIZE((MakeDWord(castle_id, index))), data); } } diff --git a/src/map/guild.h b/src/map/guild.h index f9d97241d..126325eef 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_GUILD_H_ -#define _MAP_GUILD_H_ +#ifndef MAP_GUILD_H +#define MAP_GUILD_H #include "map.h" // EVENT_NAME_LENGTH, TBL_PC #include "../common/cbasetypes.h" @@ -167,4 +167,4 @@ struct guild_interface *guild; void guild_defaults(void); -#endif /* _MAP_GUILD_H_ */ +#endif /* MAP_GUILD_H */ diff --git a/src/map/homunculus.h b/src/map/homunculus.h index 9eef6af5b..25ccabf48 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_HOMUNCULUS_H_ -#define _MAP_HOMUNCULUS_H_ +#ifndef MAP_HOMUNCULUS_H +#define MAP_HOMUNCULUS_H #include "pc.h" #include "status.h" // struct status_data, struct status_change @@ -148,4 +148,4 @@ struct homunculus_interface *homun; void homunculus_defaults(void); -#endif /* _MAP_HOMUNCULUS_H_ */ +#endif /* MAP_HOMUNCULUS_H */ diff --git a/src/map/instance.h b/src/map/instance.h index ae649eda7..2ee77d3e3 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_INSTANCE_H_ -#define _MAP_INSTANCE_H_ +#ifndef MAP_INSTANCE_H +#define MAP_INSTANCE_H #include "script.h" // struct reg_db #include "../common/cbasetypes.h" @@ -88,4 +88,4 @@ struct instance_interface *instance; void instance_defaults(void); -#endif /* _MAP_INSTANCE_H_ */ +#endif /* MAP_INSTANCE_H */ diff --git a/src/map/intif.c b/src/map/intif.c index 4dd0fa448..432154f04 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1067,7 +1067,7 @@ void intif_parse_Registers(int fd) ival = RFIFOL(fd, cursor); cursor += 4; - script->set_reg(NULL,sd,reference_uid(script->add_str(key), index), key, (void*)__64BPTRSIZE(ival), NULL); + script->set_reg(NULL,sd,reference_uid(script->add_str(key), index), key, (void*)h64BPTRSIZE(ival), NULL); } } diff --git a/src/map/intif.h b/src/map/intif.h index 42a38ad41..fe47d6537 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_INTIF_H_ -#define _MAP_INTIF_H_ +#ifndef MAP_INTIF_H +#define MAP_INTIF_H #include "../common/cbasetypes.h" @@ -186,4 +186,4 @@ struct intif_interface *intif; void intif_defaults(void); -#endif /* _MAP_INTIF_H_ */ +#endif /* MAP_INTIF_H */ diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h index 60f03fca5..0c26c3cd8 100644 --- a/src/map/irc-bot.h +++ b/src/map/irc-bot.h @@ -3,8 +3,8 @@ // Base Author: shennetsind @ http://hercules.ws -#ifndef _MAP_IRC_BOT_H_ -#define _MAP_IRC_BOT_H_ +#ifndef MAP_IRC_BOT_H +#define MAP_IRC_BOT_H #include "../common/cbasetypes.h" @@ -63,4 +63,4 @@ struct irc_bot_interface *ircbot; void ircbot_defaults(void); -#endif /* _MAP_IRC_BOT_H_ */ +#endif /* MAP_IRC_BOT_H */ diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 246ca1f54..2ad596ce1 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_ITEMDB_H_ -#define _MAP_ITEMDB_H_ +#ifndef MAP_ITEMDB_H +#define MAP_ITEMDB_H #include "map.h" #include "../common/cbasetypes.h" @@ -609,4 +609,4 @@ struct itemdb_interface *itemdb; void itemdb_defaults(void); -#endif /* _MAP_ITEMDB_H_ */ +#endif /* MAP_ITEMDB_H */ diff --git a/src/map/log.h b/src/map/log.h index ecfedeac2..6ab142f87 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_LOG_H_ -#define _MAP_LOG_H_ +#ifndef MAP_LOG_H +#define MAP_LOG_H #include "../common/cbasetypes.h" #include "../common/sql.h" @@ -133,4 +133,4 @@ struct log_interface *logs; void log_defaults(void); -#endif /* _MAP_LOG_H_ */ +#endif /* MAP_LOG_H */ diff --git a/src/map/mail.h b/src/map/mail.h index 30b032ef4..64b0f9779 100644 --- a/src/map/mail.h +++ b/src/map/mail.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_MAIL_H_ -#define _MAP_MAIL_H_ +#ifndef MAP_MAIL_H +#define MAP_MAIL_H #include "../common/cbasetypes.h" @@ -27,4 +27,4 @@ struct mail_interface *mail; void mail_defaults(void); -#endif /* _MAP_MAIL_H_ */ +#endif /* MAP_MAIL_H */ diff --git a/src/map/map.h b/src/map/map.h index 38167597a..35fe0d7e1 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_MAP_H_ -#define _MAP_MAP_H_ +#ifndef MAP_MAP_H +#define MAP_MAP_H #include <stdarg.h> @@ -342,7 +342,7 @@ struct flooritem_data { struct item item_data; }; -enum _sp { +enum status_point_types { SP_SPEED,SP_BASEEXP,SP_JOBEXP,SP_KARMA,SP_MANNER,SP_HP,SP_MAXHP,SP_SP, // 0-7 SP_MAXSP,SP_STATUSPOINT,SP_0a,SP_BASELEVEL,SP_SKILLPOINT,SP_STR,SP_AGI,SP_VIT, // 8-15 SP_INT,SP_DEX,SP_LUK,SP_CLASS,SP_ZENY,SP_SEX,SP_NEXTBASEEXP,SP_NEXTJOBEXP, // 16-23 @@ -415,7 +415,7 @@ enum _sp { SP_LAST_KNOWN, }; -enum _look { +enum look { LOOK_BASE, LOOK_HAIR, LOOK_WEAPON, @@ -1071,4 +1071,4 @@ struct map_interface *map; void map_defaults(void); -#endif /* _MAP_MAP_H_ */ +#endif /* MAP_MAP_H */ diff --git a/src/map/mapreg.h b/src/map/mapreg.h index 2aa2943a2..59d226cda 100644 --- a/src/map/mapreg.h +++ b/src/map/mapreg.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_MAPREG_H_ -#define _MAP_MAPREG_H_ +#ifndef MAP_MAPREG_H +#define MAP_MAPREG_H #include "script.h" // struct reg_db #include "../common/cbasetypes.h" @@ -50,4 +50,4 @@ struct mapreg_interface *mapreg; void mapreg_defaults(void); -#endif /* _MAP_MAPREG_H_ */ +#endif /* MAP_MAPREG_H */ diff --git a/src/map/mercenary.h b/src/map/mercenary.h index 22399e289..270245e96 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_MERCENARY_H_ -#define _MAP_MERCENARY_H_ +#ifndef MAP_MERCENARY_H +#define MAP_MERCENARY_H #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data @@ -99,4 +99,4 @@ struct mercenary_interface *mercenary; void mercenary_defaults(void); -#endif /* _MAP_MERCENARY_H_ */ +#endif /* MAP_MERCENARY_H */ diff --git a/src/map/mob.h b/src/map/mob.h index 7e222fa74..c8d43dbb2 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_MOB_H_ -#define _MAP_MOB_H_ +#ifndef MAP_MOB_H +#define MAP_MOB_H #include "map.h" // struct status_data, struct view_data, struct mob_skill #include "status.h" // struct status_data, struct status_change @@ -363,4 +363,4 @@ struct mob_interface *mob; void mob_defaults(void); -#endif /* _MAP_MOB_H_ */ +#endif /* MAP_MOB_H */ diff --git a/src/map/npc.c b/src/map/npc.c index bfac2b9d5..417aa6c61 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3368,7 +3368,7 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c } } - script->setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)__64BPTRSIZE(j), NULL); + script->setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)h64BPTRSIZE(j), NULL); aFree(temp); script->run_main(st); diff --git a/src/map/npc.h b/src/map/npc.h index 06a9312b5..4c904e1ac 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_NPC_H_ -#define _MAP_NPC_H_ +#ifndef MAP_NPC_H +#define MAP_NPC_H #include "map.h" // struct block_list #include "status.h" // struct status_change @@ -347,4 +347,4 @@ struct pcre_interface *libpcre; void npc_chat_defaults(void); #endif -#endif /* _MAP_NPC_H_ */ +#endif /* MAP_NPC_H */ diff --git a/src/map/packets.h b/src/map/packets.h index e995643d4..810f341d4 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -3,8 +3,8 @@ //Included directly by clif.h in packet_loaddb() -#ifndef _MAP_PACKETS_H_ -#define _MAP_PACKETS_H_ +#ifndef MAP_PACKETS_H +#define MAP_PACKETS_H #ifndef packet #define packet(a,b,...) @@ -3002,4 +3002,4 @@ packet(0x020d,-1); packetKeys(OBFUSCATIONKEY1,OBFUSCATIONKEY2,OBFUSCATIONKEY3); #endif -#endif /* _MAP_PACKETS_H_ */ +#endif /* MAP_PACKETS_H */ diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 403ab6fa3..55ab0c66a 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -3,8 +3,8 @@ /* Hercules Renewal: Phase Two http://hercules.ws/board/topic/383-hercules-renewal-phase-two/ */ -#ifndef _MAP_PACKETS_STRUCT_H_ -#define _MAP_PACKETS_STRUCT_H_ +#ifndef MAP_PACKETS_STRUCT_H +#define MAP_PACKETS_STRUCT_H #include "../common/mmo.h" @@ -962,4 +962,4 @@ struct packet_wis_end { #pragma pack(pop) #endif // not NetBSD < 6 / Solaris -#endif /* _MAP_PACKETS_STRUCT_H_ */ +#endif /* MAP_PACKETS_STRUCT_H */ diff --git a/src/map/party.h b/src/map/party.h index 1c58301d1..d62db23a7 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_PARTY_H_ -#define _MAP_PARTY_H_ +#ifndef MAP_PARTY_H +#define MAP_PARTY_H #include <stdarg.h> @@ -143,4 +143,4 @@ struct party_interface *party; void party_defaults(void); -#endif /* _MAP_PARTY_H_ */ +#endif /* MAP_PARTY_H */ diff --git a/src/map/path.h b/src/map/path.h index b48ff05fb..8d02e6558 100644 --- a/src/map/path.h +++ b/src/map/path.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_PATH_H_ -#define _MAP_PATH_H_ +#ifndef MAP_PATH_H +#define MAP_PATH_H #include "map.h" // enum cell_chk #include "../common/cbasetypes.h" @@ -47,4 +47,4 @@ struct path_interface *path; void path_defaults(void); -#endif /* _MAP_PATH_H_ */ +#endif /* MAP_PATH_H */ diff --git a/src/map/pc.c b/src/map/pc.c index b8b6cda46..104a3cde0 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6230,7 +6230,7 @@ int pc_maxparameterincrease(struct map_session_data* sd, int type) { * Subtracts status points according to the cost of the increased stat points. * * @param sd The target character. - * @param type The stat to change (see enum _sp) + * @param type The stat to change (see enum status_point_types) * @param increase The stat increase (strictly positive) amount. * @retval true if the stat was increased by any amount. * @retval false if there were no changes. @@ -6289,7 +6289,7 @@ bool pc_statusup(struct map_session_data* sd, int type, int increase) { * Does not subtract status points for the cost of the modified stat points. * * @param sd The target character. - * @param type The stat to change (see enum _sp) + * @param type The stat to change (see enum status_point_types) * @param val The stat increase (or decrease) amount. * @return the stat increase amount. * @retval 0 if no changes were made. diff --git a/src/map/pc.h b/src/map/pc.h index 1789a8a7b..f33127036 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_PC_H_ -#define _MAP_PC_H_ +#ifndef MAP_PC_H +#define MAP_PC_H #include "../config/core.h" // AUTOLOOTITEM_SIZE, RENEWAL, SECURE_NPCTIMEOUT @@ -1026,4 +1026,4 @@ struct pc_interface *pc; void pc_defaults(void); -#endif /* _MAP_PC_H_ */ +#endif /* MAP_PC_H */ diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 7c8cdd82a..f52e2ba22 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_PC_GROUPS_H_ -#define _MAP_PC_GROUPS_H_ +#ifndef MAP_PC_GROUPS_H +#define MAP_PC_GROUPS_H #include "../common/cbasetypes.h" #include "../common/conf.h" @@ -96,4 +96,4 @@ struct pc_groups_interface *pcg; void pc_groups_defaults(void); -#endif /* _MAP_PC_GROUPS_H_ */ +#endif /* MAP_PC_GROUPS_H */ diff --git a/src/map/pet.h b/src/map/pet.h index 8dde0fac2..5c890ef85 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_PET_H_ -#define _MAP_PET_H_ +#ifndef MAP_PET_H +#define MAP_PET_H #include "map.h" // struct block_list #include "status.h" // enum sc_type @@ -158,4 +158,4 @@ struct pet_interface *pet; void pet_defaults(void); -#endif /* _MAP_PET_H_ */ +#endif /* MAP_PET_H */ diff --git a/src/map/quest.h b/src/map/quest.h index 87894d639..9d617e369 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_QUEST_H_ -#define _MAP_QUEST_H_ +#ifndef MAP_QUEST_H +#define MAP_QUEST_H #include "map.h" // TBL_PC #include "../common/cbasetypes.h" @@ -52,4 +52,4 @@ struct quest_interface *quest; void quest_defaults(void); -#endif /* _MAP_QUEST_H_ */ +#endif /* MAP_QUEST_H */ diff --git a/src/map/script.c b/src/map/script.c index c7e1dc1d2..8fb3975f8 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -1502,9 +1502,9 @@ const char* parse_syntax(const char* p) script->set_label(l,script->pos,p); } // check duplication of case label [Rayce] - if(linkdb_search(&script->syntax.curly[pos].case_label, (void*)__64BPTRSIZE(v)) != NULL) + if(linkdb_search(&script->syntax.curly[pos].case_label, (void*)h64BPTRSIZE(v)) != NULL) disp_error_message("parse_syntax: dup 'case'",p); - linkdb_insert(&script->syntax.curly[pos].case_label, (void*)__64BPTRSIZE(v), (void*)1); + linkdb_insert(&script->syntax.curly[pos].case_label, (void*)h64BPTRSIZE(v), (void*)1); sprintf(label,"set $@__SW%x_VAL,0;",script->syntax.curly[pos].index); script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL; @@ -2627,7 +2627,7 @@ void* get_val2(struct script_state* st, int64 uid, struct reg_db *ref) { script->push_val(st->stack, C_NAME, uid, ref); data = script_getdatatop(st, -1); script->get_val(st, data); - return (data->type == C_INT ? (void*)__64BPTRSIZE((int32)data->u.num) : (void*)__64BPTRSIZE(data->u.str)); // u.num is int32 because it comes from script->get_val + return (data->type == C_INT ? (void*)h64BPTRSIZE((int32)data->u.num) : (void*)h64BPTRSIZE(data->u.str)); // u.num is int32 because it comes from script->get_val } /** * Because, currently, array members with key 0 are indifferenciable from normal variables, we should ensure its actually in @@ -2648,7 +2648,7 @@ void script_array_ensure_zero(struct script_state *st, struct map_session_data * insert = true; script_removetop(st, -1, 0); } else { - int32 num = (int32)__64BPTRSIZE(script->get_val2(st, uid, ref)); + int32 num = (int32)h64BPTRSIZE(script->get_val2(st, uid, ref)); if( num ) insert = true; script_removetop(st, -1, 0); @@ -2917,7 +2917,7 @@ int set_reg(struct script_state* st, TBL_PC* sd, int64 num, const char* name, co } else {// integer variable // FIXME: This isn't safe, in 32bits systems we're converting a 64bit pointer // to a 32bit int, this will lead to overflows! [Panikon] - int val = (int)__64BPTRSIZE(value); + int val = (int)h64BPTRSIZE(value); if(script->str_data[script_getvarid(num)].type == C_PARAM) { if( pc->setparam(sd, script->str_data[script_getvarid(num)].val, val) == 0 ) { @@ -5665,7 +5665,7 @@ BUILDIN(input) else { int amount = sd->npc_amount; - script->set_reg(st, sd, uid, name, (void*)__64BPTRSIZE(cap_value(amount,min,max)), script_getref(st,2)); + script->set_reg(st, sd, uid, name, (void*)h64BPTRSIZE(cap_value(amount,min,max)), script_getref(st,2)); script_pushint(st, (amount > max ? 1 : amount < min ? -1 : 0)); } st->state = RUN; @@ -5753,7 +5753,7 @@ BUILDIN(setr) { if( is_string_variable(name) ) script->set_reg(st,sd,num,name,(void*)script_getstr(st,3),script_getref(st,2)); else - script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(script_getnum(st,3)),script_getref(st,2)); + script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(script_getnum(st,3)),script_getref(st,2)); return true; } @@ -5808,7 +5808,7 @@ BUILDIN(setarray) else {// int array for( i = 3; start < end; ++start, ++i ) - script->set_reg(st, sd, reference_uid(id, start), name, (void*)__64BPTRSIZE(script_getnum(st,i)), reference_getref(data)); + script->set_reg(st, sd, reference_uid(id, start), name, (void*)h64BPTRSIZE(script_getnum(st,i)), reference_getref(data)); } return true; } @@ -5850,7 +5850,7 @@ BUILDIN(cleararray) if( is_string_variable(name) ) v = (void*)script_getstr(st, 3); else - v = (void*)__64BPTRSIZE(script_getnum(st, 3)); + v = (void*)h64BPTRSIZE(script_getnum(st, 3)); end = start + script_getnum(st, 4); if( end > SCRIPT_MAX_ARRAYSIZE ) @@ -6425,9 +6425,9 @@ BUILDIN(checkweight2) slots = pc->inventoryblank(sd); for(i=0; i<nb_it; i++) { - nameid = (int32)__64BPTRSIZE(script->get_val2(st,reference_uid(id_it,idx_it+i),reference_getref(data_it))); + nameid = (int32)h64BPTRSIZE(script->get_val2(st,reference_uid(id_it,idx_it+i),reference_getref(data_it))); script_removetop(st, -1, 0); - amount = (int32)__64BPTRSIZE(script->get_val2(st,reference_uid(id_nb,idx_nb+i),reference_getref(data_nb))); + amount = (int32)h64BPTRSIZE(script->get_val2(st,reference_uid(id_nb,idx_nb+i),reference_getref(data_nb))); script_removetop(st, -1, 0); if(fail) continue; //cpntonie to depop rest @@ -12412,18 +12412,18 @@ BUILDIN(undisguise) } /*========================================== - * Transform a bl to another _class, + * Transform a bl to another class, * @type unused *------------------------------------------*/ BUILDIN(classchange) { - int _class,type; + int class_,type; struct block_list *bl=map->id2bl(st->oid); if(bl==NULL) return true; - _class=script_getnum(st,2); + class_=script_getnum(st,2); type=script_getnum(st,3); - clif->class_change(bl,_class,type); + clif->class_change(bl,class_,type); return true; } @@ -13439,7 +13439,7 @@ BUILDIN(getmapxy) sd=script->rid2sd(st); else sd=NULL; - script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(x),script_getref(st,3)); + script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(x),script_getref(st,3)); //Set MapY num=st->stack->stack_data[st->start+4].u.num; @@ -13450,7 +13450,7 @@ BUILDIN(getmapxy) sd=script->rid2sd(st); else sd=NULL; - script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(y),script_getref(st,4)); + script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(y),script_getref(st,4)); //Return Success value script_pushint(st,0); @@ -13476,7 +13476,7 @@ BUILDIN(logmes) BUILDIN(summon) { - int _class, timeout=0; + int class_, timeout=0; const char *str,*event=""; TBL_PC *sd; struct mob_data *md; @@ -13486,7 +13486,7 @@ BUILDIN(summon) if (!sd) return true; str = script_getstr(st,2); - _class = script_getnum(st,3); + class_ = script_getnum(st,3); if( script_hasdata(st,4) ) timeout=script_getnum(st,4); if( script_hasdata(st,5) ) { @@ -13496,7 +13496,7 @@ BUILDIN(summon) clif->skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick); - md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, _class, event, SZ_MEDIUM, AI_NONE); + md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, class_, event, SZ_MEDIUM, AI_NONE); if (md) { md->master_id=sd->bl.id; md->special_state.ai = AI_ATTACK; @@ -14400,7 +14400,7 @@ BUILDIN(sscanf) { if(sscanf(str, buf, &ref_int)==0) { break; } - script->set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)__64BPTRSIZE(ref_int), reference_getref(data)); + script->set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)h64BPTRSIZE(ref_int), reference_getref(data)); } arg++; @@ -14767,7 +14767,7 @@ BUILDIN(setd) if( is_string_variable(varname) ) { script->setd_sub(st, sd, varname, elem, (void *)script_getstr(st, 3), NULL); } else { - script->setd_sub(st, sd, varname, elem, (void *)__64BPTRSIZE(script_getnum(st, 3)), NULL); + script->setd_sub(st, sd, varname, elem, (void *)h64BPTRSIZE(script_getnum(st, 3)), NULL); } return true; @@ -14841,7 +14841,7 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle) if( is_string_variable(name) ) script->setd_sub(st, sd, name, i, (void *)(str?str:""), reference_getref(data)); else - script->setd_sub(st, sd, name, i, (void *)__64BPTRSIZE((str?atoi(str):0)), reference_getref(data)); + script->setd_sub(st, sd, name, i, (void *)h64BPTRSIZE((str?atoi(str):0)), reference_getref(data)); } } if( i == max_rows && max_rows < SQL->NumRows(handle) ) { @@ -15395,7 +15395,7 @@ BUILDIN(searchitem) for( i = 0; i < count; ++start, ++i ) {// Set array - void* v = (void*)__64BPTRSIZE((int)items[i]->nameid); + void* v = (void*)h64BPTRSIZE((int)items[i]->nameid); script->set_reg(st, sd, reference_uid(id, start), name, v, reference_getref(data)); } diff --git a/src/map/script.h b/src/map/script.h index bb6cd6e11..48abf1487 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_SCRIPT_H_ -#define _MAP_SCRIPT_H_ +#ifndef MAP_SCRIPT_H +#define MAP_SCRIPT_H #include <errno.h> #include <setjmp.h> @@ -715,4 +715,4 @@ struct script_interface *script; void script_defaults(void); -#endif /* _MAP_SCRIPT_H_ */ +#endif /* MAP_SCRIPT_H */ diff --git a/src/map/searchstore.h b/src/map/searchstore.h index c9b93ba54..d8abde615 100644 --- a/src/map/searchstore.h +++ b/src/map/searchstore.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_SEARCHSTORE_H_ -#define _MAP_SEARCHSTORE_H_ +#ifndef MAP_SEARCHSTORE_H +#define MAP_SEARCHSTORE_H #include <time.h> @@ -99,4 +99,4 @@ struct searchstore_interface *searchstore; void searchstore_defaults (void); -#endif /* _MAP_SEARCHSTORE_H_ */ +#endif /* MAP_SEARCHSTORE_H */ diff --git a/src/map/skill.h b/src/map/skill.h index 6666fbbf2..70e5f4911 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_SKILL_H_ -#define _MAP_SKILL_H_ +#ifndef MAP_SKILL_H +#define MAP_SKILL_H #include "../config/core.h" // RENEWAL_CAST @@ -2021,4 +2021,4 @@ struct skill_interface *skill; void skill_defaults(void); -#endif /* _MAP_SKILL_H_ */ +#endif /* MAP_SKILL_H */ diff --git a/src/map/status.h b/src/map/status.h index 13d0a7841..bed0d9fbf 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_STATUS_H_ -#define _MAP_STATUS_H_ +#ifndef MAP_STATUS_H +#define MAP_STATUS_H #include "../config/core.h" // defType, RENEWAL, RENEWAL_ASPD @@ -2047,4 +2047,4 @@ struct status_interface *status; void status_defaults(void); -#endif /* _MAP_STATUS_H_ */ +#endif /* MAP_STATUS_H */ diff --git a/src/map/storage.c b/src/map/storage.c index f2f0d8986..217f14a3a 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -31,10 +31,10 @@ struct guild_storage_interface gstorage_s; /*========================================== * Sort items in the warehouse *------------------------------------------*/ -int storage_comp_item(const void *_i1, const void *_i2) +int storage_comp_item(const void *i1_, const void *i2_) { - struct item *i1 = (struct item *)_i1; - struct item *i2 = (struct item *)_i2; + struct item *i1 = (struct item *)i1_; + struct item *i2 = (struct item *)i2_; if (i1->nameid == i2->nameid) return 0; diff --git a/src/map/storage.h b/src/map/storage.h index 5edb68cfc..186f21263 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_STORAGE_H_ -#define _MAP_STORAGE_H_ +#ifndef MAP_STORAGE_H +#define MAP_STORAGE_H #include "../common/cbasetypes.h" #include "../common/db.h" @@ -25,7 +25,7 @@ struct storage_interface { int (*gettocart) (struct map_session_data *sd,int index,int amount); void (*close) (struct map_session_data *sd); void (*pc_quit) (struct map_session_data *sd, int flag); - int (*comp_item) (const void *_i1, const void *_i2); + int (*comp_item) (const void *i1_, const void *i2_); void (*sortitem) (struct item* items, unsigned int size); int (*reconnect_sub) (DBKey key, DBData *data, va_list ap); }; @@ -60,4 +60,4 @@ struct guild_storage_interface *gstorage; void storage_defaults(void); void gstorage_defaults(void); -#endif /* _MAP_STORAGE_H_ */ +#endif /* MAP_STORAGE_H */ diff --git a/src/map/trade.h b/src/map/trade.h index 143f26d74..f91ccd4a2 100644 --- a/src/map/trade.h +++ b/src/map/trade.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_TRADE_H_ -#define _MAP_TRADE_H_ +#ifndef MAP_TRADE_H +#define MAP_TRADE_H //Max distance from traders to enable a trade to take place. //TODO: battle_config candidate? @@ -27,4 +27,4 @@ struct trade_interface *trade; void trade_defaults(void); -#endif /* _MAP_TRADE_H_ */ +#endif /* MAP_TRADE_H */ diff --git a/src/map/unit.h b/src/map/unit.h index f29a6903a..9b95bae41 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_UNIT_H_ -#define _MAP_UNIT_H_ +#ifndef MAP_UNIT_H +#define MAP_UNIT_H #include "clif.h" // clr_type #include "path.h" // struct walkpath_data @@ -124,4 +124,4 @@ struct unit_interface *unit; void unit_defaults(void); -#endif /* _MAP_UNIT_H_ */ +#endif /* MAP_UNIT_H */ diff --git a/src/map/vending.h b/src/map/vending.h index b65e888e3..63cb632a9 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_VENDING_H_ -#define _MAP_VENDING_H_ +#ifndef MAP_VENDING_H +#define MAP_VENDING_H #include "../common/cbasetypes.h" #include "../common/db.h" @@ -36,4 +36,4 @@ struct vending_interface *vending; void vending_defaults(void); -#endif /* _MAP_VENDING_H_ */ +#endif /* MAP_VENDING_H */ |