src/music_gui.cpp
branchnoai
changeset 9723 eee46cb39750
parent 9722 ebf0ece7d8f6
child 9724 b39bc69bb2f2
--- a/src/music_gui.cpp	Fri Nov 23 16:59:30 2007 +0000
+++ b/src/music_gui.cpp	Wed Jan 09 18:11:12 2008 +0000
@@ -6,16 +6,16 @@
 #include "openttd.h"
 #include "table/strings.h"
 #include "table/sprites.h"
-#include "strings.h"
-#include "functions.h"
 #include "fileio.h"
-#include "window.h"
-#include "gfx.h"
-#include "sound.h"
-#include "macros.h"
 #include "variables.h"
 #include "music.h"
 #include "music/music_driver.hpp"
+#include "window_gui.h"
+#include "strings_func.h"
+#include "window_func.h"
+#include "sound_func.h"
+#include "gfx_func.h"
+#include "core/math_func.hpp"
 
 static byte _music_wnd_cursong;
 static bool _song_is_active;
@@ -199,9 +199,9 @@
 		uint i;
 		int y;
 
-		SetWindowWidgetDisabledState(w, 11, msf.playlist <= 3);
-		LowerWindowWidget(w, 3);
-		LowerWindowWidget(w, 4);
+		w->SetWidgetDisabledState(11, msf.playlist <= 3);
+		w->LowerWidget(3);
+		w->LowerWidget(4);
 		DrawWindowWidgets(w);
 
 		GfxFillRect(3, 23, 3 + 177, 23 + 191, 0);
@@ -247,7 +247,7 @@
 			byte *p;
 
 			if (msf.playlist < 4) return;
-			if (!IS_INT_INSIDE(y, 0, NUM_SONGS_AVAILABLE)) return;
+			if (!IsInsideMM(y, 0, NUM_SONGS_AVAILABLE)) return;
 
 			p = _playlists[msf.playlist];
 			for (i = 0; i != NUM_SONGS_PLAYLIST - 1; i++) {
@@ -267,7 +267,7 @@
 			byte *p;
 
 			if (msf.playlist < 4) return;
-			if (!IS_INT_INSIDE(y, 0, NUM_SONGS_AVAILABLE)) return;
+			if (!IsInsideMM(y, 0, NUM_SONGS_AVAILABLE)) return;
 
 			p = _playlists[msf.playlist];
 			for (i = y; i != NUM_SONGS_PLAYLIST - 1; i++) {
@@ -342,8 +342,8 @@
 		uint i;
 		StringID str;
 
-		RaiseWindowWidget(w, 7);
-		RaiseWindowWidget(w, 9);
+		w->RaiseWidget(7);
+		w->RaiseWidget(9);
 		DrawWindowWidgets(w);
 
 		GfxFillRect(187, 16, 200, 33, 0);