diff options
author | tron <tron@openttd.org> | 2004-12-02 22:53:07 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2004-12-02 22:53:07 +0000 |
commit | fdb447ac55fc7faffe6b7477a4ecfa7733b9a03d (patch) | |
tree | 822a14c0bf1d92e45c85d4ce62bc58b7b6cef6c7 /disaster_cmd.c | |
parent | 2c88f958edc2ad87c92ac23b727e27e2ddbe710b (diff) | |
download | openttd-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 'disaster_cmd.c')
-rw-r--r-- | disaster_cmd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/disaster_cmd.c b/disaster_cmd.c index fed34fd5c..6d9b7646e 100644 --- a/disaster_cmd.c +++ b/disaster_cmd.c @@ -168,7 +168,7 @@ static void DisasterTick_Zeppeliner(Vehicle *v) v->next_order = 1; v->age = 0; - SET_DPARAM16(0, _map2[tile]); + SetDParam(0, _map2[tile]); AddNewsItem(STR_B000_ZEPPELIN_DISASTER_AT, NEWS_FLAGS(NM_THIN, NF_VIEWPORT|NF_VEHICLE, NT_ACCIDENT, 0), v->index, @@ -372,7 +372,7 @@ static void DisasterTick_2(Vehicle *v) i = DEREF_INDUSTRY(v->dest_tile); DestructIndustry(i); - SET_DPARAM16(0, i->town->index); + SetDParam(0, i->town->index); AddNewsItem(STR_B002_OIL_REFINERY_EXPLOSION, NEWS_FLAGS(NM_THIN,NF_VIEWPORT|NF_TILE,NT_ACCIDENT,0), i->xy, 0); SndPlayTileFx(0x10, i->xy); } @@ -442,7 +442,7 @@ static void DisasterTick_3(Vehicle *v) i = DEREF_INDUSTRY(v->dest_tile); DestructIndustry(i); - SET_DPARAM16(0, i->town->index); + SetDParam(0, i->town->index); AddNewsItem(STR_B003_FACTORY_DESTROYED_IN_SUSPICIOUS, NEWS_FLAGS(NM_THIN,NF_VIEWPORT|NF_TILE,NT_ACCIDENT,0), i->xy, 0); SndPlayTileFx(0x10, i->xy); } @@ -525,7 +525,7 @@ static void DisasterTick_4(Vehicle *v) } t = ClosestTownFromTile(v->dest_tile, (uint)-1); - SET_DPARAM16(0, t->index); + SetDParam(0, t->index); AddNewsItem(STR_B004_UFO_LANDS_NEAR, NEWS_FLAGS(NM_THIN, NF_VIEWPORT|NF_TILE, NT_ACCIDENT, 0), v->tile, @@ -894,7 +894,7 @@ static void Disaster7_Init() for(i=_industries; i != endof(_industries); i++) { if (i->xy != 0 && i->type == IT_COAL_MINE && --index < 0) { - SET_DPARAM16(0, i->town->index); + SetDParam(0, i->town->index); AddNewsItem(STR_B005_COAL_MINE_SUBSIDENCE_LEAVES, NEWS_FLAGS(NM_THIN,NF_VIEWPORT|NF_TILE,NT_ACCIDENT,0), i->xy + TILE_XY(1,1), 0); |