summaryrefslogtreecommitdiff
path: root/misc_cmd.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 /misc_cmd.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 'misc_cmd.c')
-rw-r--r--misc_cmd.c6
1 files changed, 3 insertions, 3 deletions
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);
}