flatten 20260225

This commit is contained in:
Timothy Prepscius
2026-02-25 12:43:06 -05:00
commit 996151a56a
521 changed files with 46722 additions and 0 deletions

17
tjp/core/system/Debug.h Normal file
View File

@@ -0,0 +1,17 @@
// License: Modified MIT (NON-AI)
// See the LICENSE file in the root directory for license information.
// Copyright 2025 Timothy Prepscius
#pragma once
#ifdef _DEBUG
#ifndef DEBUG
#define DEBUG
#endif
#endif
#ifdef DEBUG
#ifndef _DEBUG
#define _DEBUG
#endif
#endif

View File

@@ -0,0 +1,12 @@
// License: Modified MIT (NON-AI)
// See the LICENSE file in the root directory for license information.
// Copyright 2025 Timothy Prepscius
#if defined COMPILER_LLVM
#pragma GCC diagnostic pop
#endif
#if defined COMPILER_GCC
#pragma GCC diagnostic pop
#endif

View File

@@ -0,0 +1,16 @@
// License: Modified MIT (NON-AI)
// See the LICENSE file in the root directory for license information.
// Copyright 2025 Timothy Prepscius
#include "System.h"
#if defined COMPILER_LLVM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weverything"
#endif
#if defined COMPILER_GCC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
#endif

View File

@@ -0,0 +1,14 @@
// License: Modified MIT (NON-AI)
// See the LICENSE file in the root directory for license information.
// Copyright 2025 Timothy Prepscius
#if defined __GNUC__
#pragma GCC diagnostic pop
#elif defined __SUNPRO_CC
# pragma enable_warn
#elif defined _MSC_VER
# pragma warning(pop)
#endif

View File

@@ -0,0 +1,28 @@
// License: Modified MIT (NON-AI)
// See the LICENSE file in the root directory for license information.
// Copyright 2025 Timothy Prepscius
#if defined __GNUC__
#pragma GCC diagnostic push
//#pragma GCC diagnostic ignored "-Wcomma"
//#pragma GCC diagnostic ignored "-Wdocumentation"
//#pragma GCC diagnostic ignored "-Wshorten-64-to-32"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
//#pragma GCC diagnostic ignored "-W#pragma-messages"
#pragma clang diagnostic ignored "-Wcomma"
#pragma clang diagnostic ignored "-Wdocumentation"
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma clang diagnostic ignored "-W#pragma-messages"
#pragma clang diagnostic ignored "-Wdocumentation"
#elif defined __SUNPRO_CC
# pragma disable_warn
#elif defined _MSC_VER
//# pragma warning(push, 0)
# pragma warning(push)
# pragma warning(disable : 4800)
//# pragma warning(disable : ...)
#endif

View File

@@ -0,0 +1,26 @@
// License: Modified MIT (NON-AI)
// See the LICENSE file in the root directory for license information.
// Copyright 2025 Timothy Prepscius
#pragma once
#include "System.h"
#ifdef COMPILER_LLVM
#define LLVM_NO_OPTIMIZATION_FUNCTION __attribute__ ((optnone))
#else
#define LLVM_NO_OPTIMIZATION_FUNCTION
#endif
#ifdef COMPILER_GCC
#define GCC_NO_OPTIMIZATION_BLOCK_BEGIN \
#pragma GCC push_options \
#pragma GCC optimize ("O0") \
#define GCC_NO_OPTIMIZATION_BLOCK_END \
#pragma GCC pop_options
#else
#define GCC_NO_OPTIMIZATION_BLOCK_BEGIN
#define GCC_NO_OPTIMIZATION_BLOCK_END
#endif

54
tjp/core/system/System.h Normal file
View File

@@ -0,0 +1,54 @@
// License: Modified MIT (NON-AI)
// See the LICENSE file in the root directory for license information.
// Copyright 2025 Timothy Prepscius
#pragma once
#if !defined(SYS_LINUX) && !defined(SYS_WINDOWS) && !defined(SYS_IOS) && !defined(SYS_ANDROID)
#ifdef __llvm__
#define COMPILER_LLVM
#elif defined __GNUC__
#define COMPILER_GCC
#endif
#ifdef _WIN32
//define something for Windows (32-bit and 64-bit, this part is common)
#ifdef _WIN64
#define SYS_WINDOWS
//define something for Windows (64-bit only)
#else
#define SYS_WINDOWS
//define something for Windows (32-bit only)
#endif
#elif __APPLE__
#define SYS_APPLE
#include "TargetConditionals.h"
#if TARGET_IPHONE_SIMULATOR
#define SYS_IOS
#define SYS_IOS_SIMULATOR
// iOS Simulator
#elif TARGET_OS_IPHONE
#define SYS_IOS
// iOS device
#elif TARGET_OS_MAC
#define SYS_MAC
// Other kinds of Mac OS
#else
# error "Unknown Apple platform"
#endif
#elif __linux__
#define SYS_LINUX
// linux
#elif __unix__ // all unices not caught above
#define SYS_LINUX
// Unix
#elif defined(_POSIX_VERSION)
#define SYS_LINUX
// POSIX
#else
# error "Unknown system"
#endif
#endif