From 073e0eb3c9148d6dd8b2c9ce788843b8180351cb Mon Sep 17 00:00:00 2001 From: Darkvater Date: Tue, 26 Dec 2006 17:36:18 +0000 Subject: (svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate debugging levels to use in debug.h. grfmsg() is now used as a specific debug-function for grf. --- openttd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'openttd.c') diff --git a/openttd.c b/openttd.c index 4fcc78e70..8b825966a 100644 --- a/openttd.c +++ b/openttd.c @@ -429,7 +429,7 @@ int ttd_main(int argc, char *argv[]) AI_Initialize(); // Sample catalogue - DEBUG(misc, 1) ("Loading sound effects..."); + DEBUG(misc, 1, "Loading sound effects..."); MxInitialize(11025); SoundInitialize("sample.cat"); @@ -442,7 +442,7 @@ int ttd_main(int argc, char *argv[]) /* Initialize game palette */ GfxInitPalettes(); - DEBUG(driver, 1) ("Loading drivers..."); + DEBUG(driver, 1, "Loading drivers..."); LoadDriver(SOUND_DRIVER, _ini_sounddriver); LoadDriver(MUSIC_DRIVER, _ini_musicdriver); LoadDriver(VIDEO_DRIVER, _ini_videodriver); // load video last, to prevent an empty window while sound and music loads @@ -653,7 +653,7 @@ static void StartScenario(void) // invalid type if (_file_to_saveload.mode == SL_INVALID) { - DEBUG(misc, 0) ("[Sl] Savegame is obsolete or invalid format: %s", _file_to_saveload.name); + DEBUG(sl, 0, "Savegame is obsolete or invalid format: '%s'", _file_to_saveload.name); ShowErrorMessage(INVALID_STRING_ID, STR_4009_GAME_LOAD_FAILED, 0, 0); _game_mode = GM_MENU; return; @@ -912,7 +912,7 @@ static void DoAutosave(void) } } - DEBUG(misc, 2) ("Autosaving to %s", buf); + DEBUG(sl, 2, "Autosaving to '%s'", buf); if (SaveOrLoad(buf, SL_SAVE) != SL_OK) ShowErrorMessage(INVALID_STRING_ID, STR_AUTOSAVE_FAILED, 0, 0); } @@ -1124,7 +1124,6 @@ static inline RailType UpdateRailType(RailType rt, RailType min) return rt >= min ? (RailType)(rt + 1): rt; } - bool AfterLoadGame(void) { Window *w; -- cgit v1.2.3-70-g09d2