Have we fixed the formatting properly?

This commit is contained in:
Reece Mackie 2019-04-27 16:45:47 +01:00
parent 4e512b44c3
commit 4ae5ead3f8
3 changed files with 634 additions and 729 deletions

1305
src/core.c

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,7 @@
// Check if config flags have been externally provided on compilation line // Check if config flags have been externally provided on compilation line
#if !defined(EXTERNAL_CONFIG_FLAGS) #if !defined(EXTERNAL_CONFIG_FLAGS)
#include "config.h" // Defines module configuration flags #include "config.h" // Defines module configuration flags
#endif #endif
#include "utils.h" #include "utils.h"
@ -102,7 +102,7 @@ void SetTraceLogCallback(TraceLogCallback callback)
} }
// Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG) // Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG)
void TraceLog(int logType, const char* text, ...) void TraceLog(int logType, const char *text, ...)
{ {
#if defined(SUPPORT_TRACELOG) #if defined(SUPPORT_TRACELOG)
// Message has level below current threshold, don't emit // Message has level below current threshold, don't emit
@ -130,23 +130,17 @@ void TraceLog(int logType, const char* text, ...)
default: break; default: break;
} }
#else #else
char buffer[MAX_TRACELOG_BUFFER_SIZE] = {0}; char buffer[MAX_TRACELOG_BUFFER_SIZE] = { 0 };
switch (logType) switch (logType)
{ {
case LOG_TRACE: strcpy(buffer, "TRACE: "); case LOG_TRACE: strcpy(buffer, "TRACE: "); break;
break; case LOG_DEBUG: strcpy(buffer, "DEBUG: "); break;
case LOG_DEBUG: strcpy(buffer, "DEBUG: "); case LOG_INFO: strcpy(buffer, "INFO: "); break;
break; case LOG_WARNING: strcpy(buffer, "WARNING: "); break;
case LOG_INFO: strcpy(buffer, "INFO: "); case LOG_ERROR: strcpy(buffer, "ERROR: "); break;
break; case LOG_FATAL: strcpy(buffer, "FATAL: "); break;
case LOG_WARNING: strcpy(buffer, "WARNING: "); default: break;
break;
case LOG_ERROR: strcpy(buffer, "ERROR: ");
break;
case LOG_FATAL: strcpy(buffer, "FATAL: ");
break;
default: break;
} }
strcat(buffer, text); strcat(buffer, text);

View File

@ -72,28 +72,18 @@ typedef enum
HideMouse, HideMouse,
LockMouse, LockMouse,
UnlockMouse, UnlockMouse,
SetMouseLocation, SetMouseLocation, //Vector0 (pos)
//Vector0 (pos)
//Recieve (Into C) //Recieve (Into C)
RegisterKey, RegisterKey, //Int0 (key), Char0 (status)
//Int0 (key), Char0 (status) RegisterClick, //Int0 (button), Char0 (status)
RegisterClick, ScrollWheelUpdate, //Int0 (delta)
//Int0 (button), Char0 (status) UpdateMouseLocation, //Vector0 (pos)
ScrollWheelUpdate, MarkGamepadActive, //Int0 (gamepad), Bool0 (active or not)
//Int0 (delta) MarkGamepadButton, //Int0 (gamepad), Int1 (button), Char0 (status)
UpdateMouseLocation, MarkGamepadAxis,//Int0 (gamepad), int1 (axis), Float0 (value)
//Vector0 (pos) SetDisplayDims, //Vector0 (display dimensions)
MarkGamepadActive, HandleResize, //Vector0 (new dimensions) - Onresized event
//Int0 (gamepad), Bool0 (active or not)
MarkGamepadButton,
//Int0 (gamepad), Int1 (button), Char0 (status)
MarkGamepadAxis,
//Int0 (gamepad), int1 (axis), Float0 (value)
SetDisplayDims,
//Vector0 (display dimensions)
HandleResize,
//Vector0 (new dimensions) - Onresized event
} UWPMessageType; } UWPMessageType;
typedef struct UWPMessage typedef struct UWPMessage