diff --git a/CMakeLists.txt b/CMakeLists.txt index 78f276f50..6d008e130 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,13 +54,13 @@ endif() if(UNIX AND NOT APPLE) message("Building for Linux") - add_definitions( -D_DEBUG -D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -D__32BIT__ -DHAVEALLOCA_H -D_USE_OGL_ACTIVE_TEXTURES) + add_definitions( -D_DEBUG -D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -D__32BIT__ -DHAVEALLOCA_H -D_USE_OGL_ACTIVE_TEXTURES -DLOGGER) set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR}) endif() if(APPLE) message("Building for MAC OSX") - add_definitions(-D_DEBUG -D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -DMACOSX=1 -D_USE_OGL_ACTIVE_TEXTURES) + add_definitions(-D_DEBUG -D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -DMACOSX=1 -D_USE_OGL_ACTIVE_TEXTURES -DLOGGER) set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR} "/usr/X11/include") endif() diff --git a/lib/mono.h b/lib/mono.h index c5b657072..3b0799b40 100644 --- a/lib/mono.h +++ b/lib/mono.h @@ -1,5 +1,5 @@ /* -* Descent 3 +* Descent 3 * Copyright (C) 2024 Parallax Software * * This program is free software: you can redistribute it and/or modify @@ -66,12 +66,13 @@ #include "debug.h" void nw_InitTCPLogging(char *ip, unsigned short port); void nw_TCPPrintf(int n, char *format, ...); -#if (!defined(RELEASE)) && defined(MONO) +#if (!defined(RELEASE)) && (defined(MONO) || defined(LOGGER)) extern bool Debug_print_block; // Prints a formatted string to the debug window #define mprintf(args) Debug_ConsolePrintf args // Prints a formatted string on window n at row, col. -#define mprintf_at(args) Debug_ConsolePrintf args +#define mprintf_at(args) Debug_ConsolePrintfAt args +#define mprintf_at(args) #define DebugBlockPrint(args) \ do { \ if (Debug_print_block) \ diff --git a/linux/lnxmono.cpp b/linux/lnxmono.cpp index 8ebf1ac6a..d25c437e7 100644 --- a/linux/lnxmono.cpp +++ b/linux/lnxmono.cpp @@ -1,5 +1,5 @@ /* -* Descent 3 +* Descent 3 * Copyright (C) 2024 Parallax Software * * This program is free software: you can redistribute it and/or modify @@ -554,7 +554,7 @@ void Debug_ConsolePrintf(int n, char *format, ...) { } } -void Debug_ConsolePrintf(int n, int row, int col, char *format, ...) { +void Debug_ConsolePrintfAt(int n, int row, int col, char *format, ...) { if (!Mono_initialized) return;