summaryrefslogtreecommitdiff
path: root/network_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2004-12-02 22:53:07 +0000
committertron <tron@openttd.org>2004-12-02 22:53:07 +0000
commitfdb447ac55fc7faffe6b7477a4ecfa7733b9a03d (patch)
tree822a14c0bf1d92e45c85d4ce62bc58b7b6cef6c7 /network_gui.c
parent2c88f958edc2ad87c92ac23b727e27e2ddbe710b (diff)
downloadopenttd-fdb447ac55fc7faffe6b7477a4ecfa7733b9a03d.tar.xz
(svn r901) Small step in the process to clean up the DPARAM mess:
- reduce to 2 sizes (*DParam64 for 64bit values, *DParam for the rest) - use inline functions instead of macros - add assert()s to check for buffer overruns
Diffstat (limited to 'network_gui.c')
-rw-r--r--network_gui.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/network_gui.c b/network_gui.c
index 6f2e3ad1b..e924e8b72 100644
--- a/network_gui.c
+++ b/network_gui.c
@@ -47,8 +47,8 @@ static void NetworkGameWindowWndProc(Window *w, WindowEvent *e)
switch(e->event) {
case WE_PAINT: {
- SET_DPARAM16(0, 0x00);
- SET_DPARAM16(2, STR_NETWORK_LAN + _network_connection);
+ SetDParam(0, 0x00);
+ SetDParam(2, STR_NETWORK_LAN + _network_connection);
DrawWindowWidgets(w);
DrawEditBox(w, 6);
@@ -70,8 +70,8 @@ static void NetworkGameWindowWndProc(Window *w, WindowEvent *e)
DoDrawString(cur_item->item.server_name, 15, y, 16); // server name
- SET_DPARAM8(0, cur_item->item.players_on);
- SET_DPARAM8(1, cur_item->item.players_max);
+ SetDParam(0, cur_item->item.players_on);
+ SetDParam(1, cur_item->item.players_max);
DrawString(238, y, STR_NETWORK_PLAYERS_VAL, 2); // #/#
DoDrawString(cur_item->item.map_name, 288, y, 16); // map size
@@ -268,7 +268,7 @@ static void NetworkStartServerWindowWndProc(Window *w, WindowEvent *e)
switch(e->event) {
case WE_PAINT: {
- SET_DPARAM16(7, STR_NETWORK_2_PLAYERS + _players_max);
+ SetDParam(7, STR_NETWORK_2_PLAYERS + _players_max);
DrawWindowWidgets(w);
GfxFillRect(11, 63, 237, 168, 0xD7);
@@ -389,7 +389,7 @@ static void NetworkLobbyWindowWndProc(Window *w, WindowEvent *e)
switch(e->event) {
case WE_PAINT: {
- SET_DPARAM16(7, STR_NETWORK_2_PLAYERS + _opt_mod_ptr->road_side);
+ SetDParam(7, STR_NETWORK_2_PLAYERS + _opt_mod_ptr->road_side);
DrawWindowWidgets(w);
GfxFillRect( 11, 31, 239, 239, 0xD7);