summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-18 21:59:20 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-18 21:59:20 +0000
commitf26dbc30528f8627310fa03f46cefd940ee40588 (patch)
treeed89bb354699d2a5fb34b3b7022f37bc2b68b375 /src
parent2bc59ef9db7a86d0c483e3848ead57d6d691e6a3 (diff)
downloadhercules-f26dbc30528f8627310fa03f46cefd940ee40588.tar.gz
hercules-f26dbc30528f8627310fa03f46cefd940ee40588.tar.bz2
hercules-f26dbc30528f8627310fa03f46cefd940ee40588.tar.xz
hercules-f26dbc30528f8627310fa03f46cefd940ee40588.zip
Fixed some gcc-specific stuff, silenced some more warnings
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11515 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/login/login.c4
-rw-r--r--src/login_sql/login.c4
-rw-r--r--src/map/battle.h7
-rw-r--r--src/map/clif.c12
-rw-r--r--src/map/clif.h2
-rw-r--r--src/map/map.h7
-rw-r--r--src/map/skill.c4
-rw-r--r--src/map/unit.c6
-rw-r--r--src/map/unit.h6
9 files changed, 26 insertions, 26 deletions
diff --git a/src/login/login.c b/src/login/login.c
index 8acc10d73..311f34327 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -32,7 +32,7 @@ struct Login_Config {
// bool case_sensitive; // are logins case sensitive ?
bool use_md5_passwds; // work with password hashes instead of plaintext passwords?
// bool login_gm_read; // should the login server handle info about gm accounts?
- uint8 min_level_to_connect; // minimum level of player/GM (0: player, 1-99: GM) to connect
+ int min_level_to_connect; // minimum level of player/GM (0: player, 1-99: GM) to connect
bool online_check; // reject incoming players that are already registered as online ?
bool check_client_version; // check the clientversion set in the clientinfo ?
unsigned int client_version_to_connect; // the client version needed to connect (if checking is enabled)
@@ -3622,7 +3622,7 @@ int login_config_read(const char* cfgName)
else if(!strcmpi(w1, "use_MD5_passwords"))
login_config.use_md5_passwds = (bool)config_switch(w2);
else if(!strcmpi(w1, "min_level_to_connect"))
- login_config.min_level_to_connect = (uint8)atoi(w2);
+ login_config.min_level_to_connect = atoi(w2);
else if(!strcmpi(w1, "date_format"))
safestrncpy(login_config.date_format, w2, sizeof(login_config.date_format));
else if(!strcmpi(w1, "console"))
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index d40cfcdf5..b45ec0119 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -32,7 +32,7 @@ struct Login_Config {
bool case_sensitive; // are logins case sensitive ?
bool use_md5_passwds; // work with password hashes instead of plaintext passwords?
bool login_gm_read; // should the login server handle info about gm accounts?
- uint8 min_level_to_connect; // minimum level of player/GM (0: player, 1-99: GM) to connect
+ int min_level_to_connect; // minimum level of player/GM (0: player, 1-99: GM) to connect
bool online_check; // reject incoming players that are already registered as online ?
bool check_client_version; // check the clientversion set in the clientinfo ?
unsigned int client_version_to_connect; // the client version needed to connect (if checking is enabled)
@@ -1774,7 +1774,7 @@ int login_config_read(const char* cfgName)
else if(!strcmpi(w1, "use_MD5_passwords"))
login_config.use_md5_passwds = (bool)config_switch(w2);
else if(!strcmpi(w1, "min_level_to_connect"))
- login_config.min_level_to_connect = (uint8)atoi(w2);
+ login_config.min_level_to_connect = atoi(w2);
else if(!strcmpi(w1, "date_format"))
safestrncpy(login_config.date_format, w2, sizeof(login_config.date_format));
else if(!strcmpi(w1, "console"))
diff --git a/src/map/battle.h b/src/map/battle.h
index e7d385b3c..f82e8a3de 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -4,6 +4,13 @@
#ifndef _BATTLE_H_
#define _BATTLE_H_
+// state of a single attack attempt; used in flee/def penalty calculations when mobbed
+enum damage_lv {
+ ATK_LUCKY=1, // attack was lucky-dodged
+ ATK_FLEE, // attack was dodged
+ ATK_DEF // attack connected
+};
+
// ダメージ
struct Damage {
int damage,damage2;
diff --git a/src/map/clif.c b/src/map/clif.c
index b67e2cd87..54812fd05 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4569,7 +4569,7 @@ void clif_skill_warppoint(struct map_session_data* sd, short skill_num, short sk
WFIFOW(fd,0) = 0x11c;
WFIFOW(fd,2) = skill_num;
memset(WFIFOP(fd,4), 0x00, 4*MAP_NAME_LENGTH_EXT);
- if (map1 == -1) strcpy((char*)WFIFOP(fd,4), "Random");
+ if (map1 == (unsigned short)-1) strcpy((char*)WFIFOP(fd,4), "Random");
if (map1 > 0) mapindex_getmapname_ext(mapindex_id2name(map1), (char*)WFIFOP(fd,4));
if (map2 > 0) mapindex_getmapname_ext(mapindex_id2name(map2), (char*)WFIFOP(fd,20));
if (map3 > 0) mapindex_getmapname_ext(mapindex_id2name(map3), (char*)WFIFOP(fd,36));
@@ -7628,9 +7628,9 @@ void clif_feel_hate_reset(struct map_session_data *sd)
/// Returns true if the packet was parsed successfully.
/// Formats: 0 - <packet id>.w <packet len>.w (<name> : <message>).?B 00
/// 1 - <packet id>.w <packet len>.w <name>.24B <message>.?B 00
-static bool clif_process_message(struct map_session_data* sd, int format, const char** name_, int* namelen_, const char** message_, int* messagelen_)
+static bool clif_process_message(struct map_session_data* sd, int format, char** name_, int* namelen_, char** message_, int* messagelen_)
{
- const char *text, *name, *message;
+ char *text, *name, *message;
unsigned int packetlen, textlen, namelen, messagelen;
int fd = sd->fd;
@@ -8240,7 +8240,7 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
const char* text = (char*)RFIFOP(fd,4);
int textlen = RFIFOW(fd,2) - 4;
- const char *name, *message;
+ char *name, *message;
int namelen, messagelen;
// validate packet and retrieve name and message
@@ -9955,7 +9955,7 @@ void clif_parse_PartyMessage(int fd, struct map_session_data* sd)
const char* text = (char*)RFIFOP(fd,4);
int textlen = RFIFOW(fd,2) - 4;
- const char *name, *message;
+ char *name, *message;
int namelen, messagelen;
// validate packet and retrieve name and message
@@ -10228,7 +10228,7 @@ void clif_parse_GuildMessage(int fd, struct map_session_data* sd)
const char* text = (char*)RFIFOP(fd,4);
int textlen = RFIFOW(fd,2) - 4;
- const char *name, *message;
+ char *name, *message;
int namelen, messagelen;
// validate packet and retrieve name and message
diff --git a/src/map/clif.h b/src/map/clif.h
index 3310769a8..543a17da1 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -203,7 +203,7 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int
int clif_skill_nodamage(struct block_list *src,struct block_list *dst,int skill_id,int heal,int fail);
int clif_skill_poseffect(struct block_list *src,int skill_id,int val,int x,int y,int tick);
int clif_skill_estimation(struct map_session_data *sd,struct block_list *dst);
-void clif_skill_warppoint(struct map_session_data* sd, int skill_num, int skill_lv, unsigned short map1, unsigned short map2, unsigned short map3, unsigned short map4);
+void clif_skill_warppoint(struct map_session_data* sd, short skill_num, short skill_lv, unsigned short map1, unsigned short map2, unsigned short map3, unsigned short map4);
int clif_skill_memo(struct map_session_data *sd,int flag);
int clif_skill_teleportmessage(struct map_session_data *sd,int flag);
int clif_skill_produce_mix_list(struct map_session_data *sd, int trigger);
diff --git a/src/map/map.h b/src/map/map.h
index a5f4a6357..6eb92530e 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -1023,13 +1023,6 @@ struct pet_data {
struct map_session_data *msd;
};
-// state of a single attack attempt; used in flee/def penalty calculations when mobbed
-enum damage_lv {
- ATK_LUCKY=1, // attack was lucky-dodged
- ATK_FLEE, // attack was dodged
- ATK_DEF // attack connected
-};
-
struct map_data {
char name[MAP_NAME_LENGTH];
unsigned short index; // The map index used by the mapindex* functions.
diff --git a/src/map/skill.c b/src/map/skill.c
index a1f5c8b05..2db05ed82 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4565,12 +4565,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
if(skilllv == 1) {
// possibility to skip menu [LuzZza]
if(!battle_config.skip_teleport_lv1_menu && sd->skillitem != AL_TELEPORT)
- clif_skill_warppoint(sd,skillid,skilllv, -1,0,0,0);
+ clif_skill_warppoint(sd,skillid,skilllv, (unsigned short)-1,0,0,0);
else
pc_randomwarp(sd,3);
} else {
if (sd->skillitem != AL_TELEPORT)
- clif_skill_warppoint(sd,skillid,skilllv, -1,sd->status.save_point.map,0,0);
+ clif_skill_warppoint(sd,skillid,skilllv, (unsigned short)-1,sd->status.save_point.map,0,0);
else //Autocasted Teleport level 2??
pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,3);
}
diff --git a/src/map/unit.c b/src/map/unit.c
index 5621eedc2..616781b7a 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -550,7 +550,7 @@ uint8 unit_getdir(struct block_list *bl)
//Warps a unit/ud to a given map/position.
//In the case of players, pc_setpos is used.
//it respects the no warp flags, so it is safe to call this without doing nowarpto/nowarp checks.
-int unit_warp(struct block_list *bl,short m,short x,short y,uint8 type)
+int unit_warp(struct block_list *bl,short m,short x,short y,int type)
{
struct unit_data *ud;
nullpo_retr(0, bl);
@@ -1605,7 +1605,7 @@ int unit_changeviewsize(struct block_list *bl,short size)
* Otherwise it is assumed bl is being warped.
* On-Kill specific stuff is not performed here, look at status_damage for that.
*------------------------------------------*/
-int unit_remove_map(struct block_list *bl, uint8 clrtype)
+int unit_remove_map(struct block_list *bl, int clrtype)
{
struct unit_data *ud = unit_bl2ud(bl);
struct status_change *sc = status_get_sc(bl);
@@ -1753,7 +1753,7 @@ int unit_remove_map(struct block_list *bl, uint8 clrtype)
* If clrtype is <0, no saving is performed. This is only for non-authed
* objects that shouldn't be on a map yet.
*------------------------------------------*/
-int unit_free(struct block_list *bl, uint8 clrtype)
+int unit_free(struct block_list *bl, int clrtype)
{
struct unit_data *ud = unit_bl2ud( bl );
nullpo_retr(0, ud);
diff --git a/src/map/unit.h b/src/map/unit.h
index 1880b3b99..6c6124f5c 100644
--- a/src/map/unit.h
+++ b/src/map/unit.h
@@ -29,7 +29,7 @@ int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int
int unit_escape(struct block_list *bl, struct block_list *target, short dist);
// 位置の強制移動(吹き飛ばしなど)
int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath);
-int unit_warp(struct block_list *bl, short map, short x, short y, uint8 type);
+int unit_warp(struct block_list *bl, short map, short x, short y, int type);
int unit_setdir(struct block_list *bl,unsigned char dir);
uint8 unit_getdir(struct block_list *bl);
@@ -61,8 +61,8 @@ void unit_dataset(struct block_list *bl);
int unit_fixdamage(struct block_list *src,struct block_list *target,unsigned int tick,int sdelay,int ddelay,int damage,int div,int type,int damage2);
// その他
struct unit_data* unit_bl2ud(struct block_list *bl);
-int unit_remove_map(struct block_list *bl, uint8 clrtype);
-int unit_free(struct block_list *bl, uint8 clrtype);
+int unit_remove_map(struct block_list *bl, int clrtype);
+int unit_free(struct block_list *bl, int clrtype);
int unit_changeviewsize(struct block_list *bl,short size);
// 初期化ルーチン