mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Began picking through the old logic
This commit is contained in:
10
source/toy.h
Normal file
10
source/toy.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
//general utilities
|
||||
#include "toy_common.h"
|
||||
|
||||
//building blocks
|
||||
//
|
||||
|
||||
//pipeline
|
||||
//
|
||||
8
source/toy_common.c
Normal file
8
source/toy_common.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include "toy_common.h"
|
||||
|
||||
//defined separately, as compilation can take several seconds, invalidating the comparisons of __TIME__
|
||||
static const char* build = __DATE__ " " __TIME__ ";development branch";
|
||||
|
||||
const char* Toy_private_version_build() {
|
||||
return build;
|
||||
}
|
||||
37
source/toy_common.h
Normal file
37
source/toy_common.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
//for specified type sizes
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
//TOY_API is platform-dependant, and marks publicly usable API functions
|
||||
#if defined(__linux__) || defined(__MINGW32__) || defined(__GNUC__)
|
||||
|
||||
//GCC support
|
||||
#define TOY_API extern
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
|
||||
//MSVC support
|
||||
#ifndef TOY_EXPORT
|
||||
#define TOY_API __declspec(dllimport)
|
||||
#else
|
||||
#define TOY_API __declspec(dllexport)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
//generic
|
||||
#define TOY_API extern
|
||||
|
||||
#endif
|
||||
|
||||
//bytecode version specifiers
|
||||
#define TOY_VERSION_MAJOR 2
|
||||
#define TOY_VERSION_MINOR 0
|
||||
#define TOY_VERSION_PATCH 0
|
||||
#define TOY_VERSION_BUILD Toy_private_version_build()
|
||||
TOY_API const char* Toy_private_version_build();
|
||||
|
||||
Reference in New Issue
Block a user