1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
--- a/dialog.c
+++ b/dialog.c
@@ -581,7 +581,7 @@
/******************************************************************
draws all options for the actual page.
******************************************************************/
-inline void optwin_draw_options(int x, int y)
+void optwin_draw_options(int x, int y)
{
#define LEN_NAME 111
int i = -1, pos = 0, max = 0;
--- a/include/main.h
+++ b/include/main.h
@@ -118,7 +118,7 @@
}
_bmaptype_table;
-_bmaptype_table bmaptype_table[BMAPTABLE];
+extern _bmaptype_table bmaptype_table[BMAPTABLE];
extern int bmaptype_table_size;
@@ -306,7 +306,7 @@
double killhour;
} _statometer;
-struct statometer statometer;
+extern struct statometer statometer;
extern time_t sleeptime;
--- a/include/map.h
+++ b/include/map.h
@@ -70,7 +70,7 @@
}
_mapdata;
-struct MapCell
+typedef struct MapCell
{
short faces[MAXFACES];
short pos[MAXFACES];
@@ -85,7 +85,7 @@
}
MapCell;
-struct Map
+typedef struct Map
{
struct MapCell cells[MAP_MAX_SIZE][MAP_MAX_SIZE];
}
--- a/include/menu.h
+++ b/include/menu.h
@@ -41,15 +41,15 @@
#define MENU_ALL (MENU_NO & MENU_KEYBIND & MENU_SPELL & MENU_STATUS & MENU_OPTION & MENU_NPC & MENU_BOOK & MENU_QUEST)
#define MENU_SOUND_VOL 40
-struct _skill_list skill_list[SKILL_LIST_MAX];
+extern struct _skill_list skill_list[SKILL_LIST_MAX];
extern _dialog_list_set skill_list_set;
-struct _spell_list spell_list[SPELL_LIST_MAX]; /* skill list entries */
+extern struct _spell_list spell_list[SPELL_LIST_MAX]; /* skill list entries */
extern _dialog_list_set spell_list_set;
extern _dialog_list_set option_list_set;
-struct _bindkey_list bindkey_list[BINDKEY_LIST_MAX];
+extern struct _bindkey_list bindkey_list[BINDKEY_LIST_MAX];
extern _dialog_list_set bindkey_list_set;
extern _dialog_list_set create_list_set;
--- a/include/wrapper.h
+++ b/include/wrapper.h
@@ -118,7 +118,7 @@
extern int parse_metaserver_data(char *info);
#if defined( __WIN_32) || defined(__LINUX)
- FILE *msglog;
+ extern FILE *msglog;
#endif
#if defined(HAVE_STRNICMP)
--- a/main.c
+++ b/main.c
@@ -24,6 +24,10 @@
#include <include.h>
#include <signal.h>
+_bmaptype_table bmaptype_table[BMAPTABLE];
+
+struct statometer statometer;
+
Account account; /* account data of this player, received from the server */
_server_char *first_server_char = NULL; /* list of possible chars/race with setup when we want create a char */
@@ -33,7 +37,7 @@
SDL_Surface *ScreenSurfaceMap; /* THE map surface (backbuffer)*/
SDL_Surface *zoomed = NULL;
struct sockaddr_in insock; /* Server's attributes */
-ClientSocket csocket;
+extern ClientSocket csocket;
int SocketStatusErrorNr; /* if an socket error, this is it */
_login_step LoginInputStep;
--- a/menu.c
+++ b/menu.c
@@ -29,6 +29,7 @@
struct _spell_list spell_list[SPELL_LIST_MAX]; /* skill list entries */
struct _skill_list skill_list[SKILL_LIST_MAX]; /* skill list entries */
+struct _bindkey_list bindkey_list[BINDKEY_LIST_MAX];
struct _dialog_list_set spell_list_set;
struct _dialog_list_set skill_list_set;
--- a/wrapper.c
+++ b/wrapper.c
@@ -22,6 +22,10 @@
*/
#include <include.h>
+#if defined( __WIN_32) || defined(__LINUX)
+ FILE *msglog;
+#endif
+
/* This is because PHYSFS_isInit() was introduced in 2.0.0 and some linux
* distros are still stuck in 1.x.x. So in time we can dump this global and
* use PHYSFS_isInit(). But for now, it's a simple query we can reproduce
|