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 --- misc_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'misc_cmd.c') diff --git a/misc_cmd.c b/misc_cmd.c index f907df5c0..e62a98741 100644 --- a/misc_cmd.c +++ b/misc_cmd.c @@ -60,7 +60,7 @@ int32 CmdIncreaseLoan(int x, int y, uint32 flags, uint32 p1, uint32 p2) p = DEREF_PLAYER(p1); if (p->current_loan >= _economy.max_loan) { - SET_DPARAM32(0, _economy.max_loan); + SetDParam(0, _economy.max_loan); return_cmd_error(STR_702B_MAXIMUM_PERMITTED_LOAN); } @@ -106,7 +106,7 @@ int32 CmdDecreaseLoan(int x, int y, uint32 flags, uint32 p1, uint32 p2) } if (p->player_money < size) { - SET_DPARAM32(0, size); + SetDParam(0, size); return_cmd_error(STR_702E_REQUIRED); } @@ -174,7 +174,7 @@ int32 CmdChangePresidentName(int x, int y, uint32 flags, uint32 p1, uint32 p2) static void UpdateSignVirtCoords(SignStruct *ss) { Point pt = RemapCoords(ss->x, ss->y, ss->z); - SET_DPARAM16(0, ss->str); + SetDParam(0, ss->str); UpdateViewportSignPos(&ss->sign, pt.x, pt.y - 6, STR_2806); } -- cgit v1.2.3-54-g00ecf