summaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-12-26 17:36:18 +0000
committerDarkvater <darkvater@openttd.org>2006-12-26 17:36:18 +0000
commit073e0eb3c9148d6dd8b2c9ce788843b8180351cb (patch)
tree8dae47833ded5c522ac7a89f69f10fc0c2530e90 /video
parent2e0bbe540383c96f4356dd75e70bb1fa5c8e95be (diff)
downloadopenttd-073e0eb3c9148d6dd8b2c9ce788843b8180351cb.tar.xz
(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.
Diffstat (limited to 'video')
-rw-r--r--video/dedicated_v.c10
-rw-r--r--video/sdl_v.c8
2 files changed, 9 insertions, 9 deletions
diff --git a/video/dedicated_v.c b/video/dedicated_v.c
index e0124e02c..c4a74e902 100644
--- a/video/dedicated_v.c
+++ b/video/dedicated_v.c
@@ -92,7 +92,7 @@ static void CreateWindowsConsoleThread(void)
_hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)CheckForConsoleInput, NULL, 0, &dwThreadId);
if (_hThread == NULL) error("Cannot create console thread!");
- DEBUG(driver, 1) ("Windows console thread started...");
+ DEBUG(driver, 2, "Windows console thread started");
}
static void CloseWindowsConsoleThread(void)
@@ -100,7 +100,7 @@ static void CloseWindowsConsoleThread(void)
CloseHandle(_hThread);
CloseHandle(_hInputReady);
CloseHandle(_hWaitForInputHandling);
- DEBUG(driver, 1) ("Windows console thread shut down...");
+ DEBUG(driver, 2, "Windows console thread shut down");
}
#endif
@@ -133,7 +133,7 @@ static const char *DedicatedVideoStart(const char * const *parm)
OS2_SwitchToConsoleMode();
#endif
- DEBUG(driver, 1)("Loading dedicated server...");
+ DEBUG(driver, 1, "Loading dedicated server");
return NULL;
}
@@ -253,7 +253,7 @@ static void DedicatedVideoMainLoop(void)
* intro game... */
if (!SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_NORMAL)) {
/* Loading failed, pop out.. */
- DEBUG(net, 0)("Loading requested map failed. Aborting.");
+ DEBUG(net, 0, "Loading requested map failed, aborting");
_networking = false;
} else {
/* We can load this game, so go ahead */
@@ -264,7 +264,7 @@ static void DedicatedVideoMainLoop(void)
// Done loading, start game!
if (!_networking) {
- DEBUG(net, 1)("Dedicated server could not be launched. Aborting.");
+ DEBUG(net, 0, "Dedicated server could not be started, aborting");
return;
}
diff --git a/video/sdl_v.c b/video/sdl_v.c
index b0a25a9d7..77d7a1e53 100644
--- a/video/sdl_v.c
+++ b/video/sdl_v.c
@@ -175,7 +175,7 @@ static bool CreateMainSurface(int w, int h)
GetAvailableVideoMode(&w, &h);
- DEBUG(driver, 1) ("sdl: using mode %dx%d", w, h);
+ DEBUG(driver, 1, "SDL: using mode %dx%d", w, h);
/* Give the application an icon */
icon = SDL_CALL SDL_LoadBMP(ICON_DIR PATHSEP "openttd.32.bmp");
@@ -295,8 +295,8 @@ static uint32 ConvertSdlKeyIntoMy(SDL_keysym *sym)
if (sym->mod & KMOD_ALT) key |= WKC_ALT;
// these two lines really help porting hotkey combos. Uncomment to use -- Bjarni
#if 0
- DEBUG(driver, 0) ("scancode character pressed %u", sym->scancode);
- DEBUG(driver, 0) ("unicode character pressed %u", sym->unicode);
+ DEBUG(driver, 0, "Scancode character pressed %u", sym->scancode);
+ DEBUG(driver, 0, "Unicode character pressed %u", sym->unicode);
#endif
return (key << 16) + sym->unicode;
}
@@ -404,7 +404,7 @@ static const char *SdlVideoStart(const char * const *parm)
if (s != NULL) return s;
SDL_CALL SDL_VideoDriverName(buf, 30);
- DEBUG(driver, 1) ("sdl: using driver '%s'", buf);
+ DEBUG(driver, 1, "SDL: using driver '%s'", buf);
GetVideoModes();
CreateMainSurface(_cur_resolution[0], _cur_resolution[1]);