mirror of
https://github.com/kevinbentley/Descent3.git
synced 2026-04-05 05:00:06 -04:00
Enable console logging if MONO or LOGGER is defined
Re-enable console logging on linux and mac builds with the -DMONO option. Rename overloaded Debug_ConsolePrintf function to Debug_ConsolePrintfAt to fix macro expansion. Adds -DLOGGER alias for -DMONO. Implements #157
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -166,7 +166,7 @@ bool Debug_ConsoleInit();
|
||||
void Debug_ConsoleOpen(int n, int row, int col, int width, int height, char *title);
|
||||
void Debug_ConsoleClose(int n);
|
||||
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, ...);
|
||||
void Debug_ConsoleRedirectMessages(int virtual_window, int physical_window);
|
||||
// DEBUGGING MACROS
|
||||
// Break into the debugger, if this feature was enabled in Debug_init()
|
||||
|
||||
@@ -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,12 @@
|
||||
#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 DebugBlockPrint(args) \
|
||||
do { \
|
||||
if (Debug_print_block) \
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user