summaryrefslogtreecommitdiff
path: root/music_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 /music_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 'music_gui.c')
-rw-r--r--music_gui.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/music_gui.c b/music_gui.c
index 7994b4d65..3d1edc258 100644
--- a/music_gui.c
+++ b/music_gui.c
@@ -204,13 +204,13 @@ static void MusicTrackSelectionWndProc(Window *w, WindowEvent *e)
DrawStringCentered(92, 15, STR_01EE_TRACK_INDEX, 0);
- SET_DPARAM16(0, STR_01D5_ALL + msf.playlist);
+ SetDParam(0, STR_01D5_ALL + msf.playlist);
DrawStringCentered(340, 15, STR_01EF_PROGRAM, 0);
for(i=1; (uint)i <= NUM_SONGS_AVAILABLE; i++) {
- SET_DPARAM16(0, i);
- SET_DPARAM16(2, i);
- SET_DPARAM16(1, SPECSTR_SONGNAME);
+ SetDParam(0, i);
+ SetDParam(2, i);
+ SetDParam(1, SPECSTR_SONGNAME);
DrawString(4, 23+(i-1)*6, (i < 10) ? STR_01EC_0 : STR_01ED, 0);
}
@@ -223,9 +223,9 @@ static void MusicTrackSelectionWndProc(Window *w, WindowEvent *e)
y = 23;
for(p = _playlists[msf.playlist],i=0; (i=*p) != 0; p++) {
- SET_DPARAM16(0, i);
- SET_DPARAM16(2, i);
- SET_DPARAM16(1, SPECSTR_SONGNAME);
+ SetDParam(0, i);
+ SetDParam(2, i);
+ SetDParam(1, SPECSTR_SONGNAME);
DrawString(252, y, (i < 10) ? STR_01EC_0 : STR_01ED, 0);
y += 6;
}
@@ -333,7 +333,7 @@ static void MusicWindowWndProc(Window *w, WindowEvent *e)
str = STR_01E3;
if (_song_is_active != 0 && _music_wnd_cursong != 0) {
str = STR_01E4_0;
- SET_DPARAM8(0, _music_wnd_cursong);
+ SetDParam(0, _music_wnd_cursong);
if (_music_wnd_cursong >= 10)
str = STR_01E5;
}
@@ -342,8 +342,8 @@ static void MusicWindowWndProc(Window *w, WindowEvent *e)
str = STR_01E6;
if (_song_is_active != 0 && _music_wnd_cursong != 0) {
str = STR_01E7;
- SET_DPARAM16(0, SPECSTR_SONGNAME);
- SET_DPARAM16(1, _music_wnd_cursong);
+ SetDParam(0, SPECSTR_SONGNAME);
+ SetDParam(1, _music_wnd_cursong);
}
DrawStringCentered(155, 46, str, 0);