Browse Source

Make it work a bit better with win32

git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@366 54d463be-8e91-2dee-dedb-b68131a5f0ec
amber 20 năm trước cách đây
mục cha
commit
1bb5e58ee2
6 tập tin đã thay đổi với 14 bổ sung14 xóa
  1. 2 2
      src/map/Makefile.win32
  2. 6 6
      src/map/atcommand.c
  3. 1 1
      src/map/atcommand.h
  4. 1 1
      src/map/clif.c
  5. 1 1
      src/map/map.h
  6. 3 3
      src/map/skill.c

+ 2 - 2
src/map/Makefile.win32

@@ -15,8 +15,8 @@ txtobj:
 sqlobj:
 	mkdir sqlobj
 
-ZLIBDIR = C:/athena/zlib122
-PACKETDEF = -DPACKETVER=5 -DNEW_006b
+ZLIBDIR = C:/eathena/zlib122
+PACKETDEF = -DPACKETVER=5 -DNEW_006b -D__WIN32
 # OPT = /MDd /D_DEBUG
 OPT = 
 LINKOPT = /debug /SUBSYSTEM:CONSOLE

+ 6 - 6
src/map/atcommand.c

@@ -568,10 +568,10 @@ char * job_name(int class) {
 }
 
 /*==========================================
- * str_lower (replace strlwr, non ANSI function that doesn't exist in all C compilator)
+ * estr_lower (replace strlwr, non ANSI function that doesn't exist in all C compilator)
  *------------------------------------------
  */
-char *str_lower(char *str)
+char *estr_lower(char *str)
 {
 	int i;
 
@@ -7570,7 +7570,7 @@ atcommand_uptime(
 	minutes = seconds/minute;
 	seconds -= (seconds/minute>0)?(seconds/minute)*minute:0;
 	
-    snprintf(output, sizeof(output), msg_table[245], days, hours, minutes, seconds);
+        snprintf(output, sizeof(output), msg_table[245], days, hours, minutes, seconds);
 	clif_displaymessage(fd,output);
 	return 0;
 }
@@ -7654,14 +7654,14 @@ atcommand_petid(const int fd, struct map_session_data* sd,
 		return -1;
 	if (sscanf(message, "%99s", searchtext) < 1)
 		return -1;
-	str_lower(searchtext);
+	estr_lower(searchtext);
 	snprintf(temp0, sizeof(temp0), "Search results for: %s", searchtext);
 	clif_displaymessage(fd,temp0);
 	while (i < MAX_PET_DB) {
 		strcpy(temp1,pet_db[i].name);
-		strcpy(temp1, str_lower(temp1));
+		strcpy(temp1, estr_lower(temp1));
 		strcpy(temp0,pet_db[i].jname);
-		strcpy(temp0, str_lower(temp1));
+		strcpy(temp0, estr_lower(temp1));
 		if (strstr(temp1, searchtext) || strstr(temp0, searchtext) ) {
   			snprintf(temp0, sizeof(temp0), "ID: %i -- Name: %s", pet_db[i].class,
      			pet_db[i].jname);

+ 1 - 1
src/map/atcommand.h

@@ -249,7 +249,7 @@ int atcommand_recall(const int fd, struct map_session_data* sd, const char* comm
 int atcommand_config_read(const char *cfgName);
 int msg_config_read(const char *cfgName);
 
-char *str_lower(char *str);
+char *estr_lower(char *str);
 
 char * job_name(int class);
 int e_mail_check(unsigned char *email);

+ 1 - 1
src/map/clif.c

@@ -6,12 +6,12 @@
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 #include <stdarg.h>
 #ifdef __WIN32
 #define __USE_W32_SOCKETS
 #include <windows.h>
 #else
+#include <unistd.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>

+ 1 - 1
src/map/map.h

@@ -154,7 +154,7 @@ struct map_session_data {
 		unsigned infinite_autospell : 1;
 	} special_state;
 	int char_id, login_id1, login_id2, sex;
-	int packet_ver; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04 (by [Yor])
+	int packet_ver;  // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
 	struct mmo_charstatus status;
 	struct item_data *inventory_data[MAX_INVENTORY];
 	short equip_index[11];

+ 3 - 3
src/map/skill.c

@@ -4529,6 +4529,9 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
 		break;
 	case GD_EMERGENCYCALL:
 		{
+			int dx[9]={-1, 1, 0, 0,-1, 1,-1, 1, 0};
+			int dy[9]={ 0, 0, 1,-1, 1,-1,-1, 1, 0};
+			int c, j = 0;
 			struct guild *g = NULL;
 			// Only usable during WoE
 			if (!agit_flag) {
@@ -4537,9 +4540,6 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
 				return 0;
 			}
 			// i don't know if it actually summons in a circle, but oh well. ;P
-			int dx[9]={-1, 1, 0, 0,-1, 1,-1, 1, 0};
-			int dy[9]={ 0, 0, 1,-1, 1,-1,-1, 1, 0};
-			int c, j = 0;
 			if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) &&
 				strcmp(sd->status.name,g->master)==0) {
 				for(i = 0; i < g->max_member; i++, j++) {