1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00
cnc-ddraw/inc/debug.h

35 lines
665 B
C
Raw Normal View History

2017-11-26 08:49:30 +01:00
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
2018-05-31 03:38:33 +02:00
void CounterStart();
double CounterStop();
2017-11-26 08:49:30 +01:00
void DebugPrint(const char *format, ...);
2018-10-02 11:38:38 +02:00
void DrawFrameInfoStart();
void DrawFrameInfoEnd();
2019-04-14 07:28:06 +02:00
int dprintf(const char *fmt, ...);
2018-10-02 11:38:38 +02:00
extern double DebugFrameTime;
extern DWORD DebugFrameCount;
2017-11-26 08:49:30 +01:00
//#define _DEBUG 1
//use OutputDebugStringA rather than printf
2018-05-06 10:52:06 +02:00
#define _DEBUG_S 1
2017-11-26 08:49:30 +01:00
//log everything (slow)
2017-11-26 09:09:38 +01:00
//#define _DEBUG_X 1
2017-11-26 08:49:30 +01:00
#ifdef _DEBUG
2017-11-26 09:09:38 +01:00
#ifdef _DEBUG_S
2017-11-26 08:49:30 +01:00
#define printf(format, ...) DebugPrint("xDBG " format, ##__VA_ARGS__)
2019-04-14 07:28:06 +02:00
#else
#define printf(format, ...) dprintf(format, ##__VA_ARGS__)
2017-11-26 08:49:30 +01:00
#endif
#else
#define printf(format, ...)
#endif