From fdb447ac55fc7faffe6b7477a4ecfa7733b9a03d Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 2 Dec 2004 22:53:07 +0000 Subject: (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 --- network_gui.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'network_gui.c') 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); -- cgit v1.2.3-54-g00ecf