| 1 |
/* |
| 2 |
Copyright (c) 2009 Peter "Corsix" Cawley |
| 3 |
|
| 4 |
Permission is hereby granted, free of charge, to any person obtaining a copy of |
| 5 |
this software and associated documentation files (the "Software"), to deal in |
| 6 |
the Software without restriction, including without limitation the rights to |
| 7 |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies |
| 8 |
of the Software, and to permit persons to whom the Software is furnished to do |
| 9 |
so, subject to the following conditions: |
| 10 |
|
| 11 |
The above copyright notice and this permission notice shall be included in all |
| 12 |
copies or substantial portions of the Software. |
| 13 |
|
| 14 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 15 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 17 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 18 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 19 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 20 |
SOFTWARE. |
| 21 |
*/ |
| 22 |
|
| 23 |
#ifndef CORSIX_TH_CONFIG_H_ |
| 24 |
#define CORSIX_TH_CONFIG_H_ |
| 25 |
|
| 26 |
/** Interpreter script searching options **/ |
| 27 |
// Whether to search in some possible local dirs according to a fixed list, |
| 28 |
// relative to current working dir or program dir |
| 29 |
#cmakedefine CORSIX_TH_SEARCH_LOCAL_DATADIRS |
| 30 |
|
| 31 |
// Name of the script, usually 'CorsixTH.lua' |
| 32 |
#cmakedefine CORSIX_TH_INTERPRETER_NAME "@CORSIX_TH_INTERPRETER_NAME@" |
| 33 |
|
| 34 |
// A final path (with file name) to search |
| 35 |
#cmakedefine CORSIX_TH_INTERPRETER_PATH "@CORSIX_TH_INTERPRETER_PATH@" |
| 36 |
|
| 37 |
/** Windows Platform SDK usage **/ |
| 38 |
// When compiling on Windows, the platform SDK should be used. However, when |
| 39 |
// using the SDL rendering engine, the platform SDK is not used for anything |
| 40 |
// critical, and so its use can be avoided if necessary. |
| 41 |
#ifdef _WIN32 |
| 42 |
#define CORSIX_TH_USE_WIN32_SDK |
| 43 |
#endif |
| 44 |
|
| 45 |
/** Movie options **/ |
| 46 |
// FFmpeg |
| 47 |
// If this library is not present on your system, then you can comment out the |
| 48 |
// next line and the game will not have movies. |
| 49 |
#cmakedefine CORSIX_TH_USE_FFMPEG |
| 50 |
|
| 51 |
/** Update check options **/ |
| 52 |
// If defined then an http request will be made using libcurl to check to see |
| 53 |
// if the current version is the latest. |
| 54 |
#cmakedefine WITH_UPDATE_CHECK |
| 55 |
|
| 56 |
/** MIDI device support **/ |
| 57 |
// If defined then support playing MIDI on attached MIDI devices. |
| 58 |
#cmakedefine WITH_MIDI_DEVICE |
| 59 |
|
| 60 |
/** Lua modules options */ |
| 61 |
// If defined then lua modules are considered to have been linked into the |
| 62 |
// binary instead of loaded at runtime. |
| 63 |
#cmakedefine CORSIX_TH_LINK_LUA_MODULES |
| 64 |
|
| 65 |
//* Tracy profiler linked */ |
| 66 |
// If defined then the Tracy profiler is linked. |
| 67 |
#cmakedefine WITH_TRACY |
| 68 |
|
| 69 |
// Stubs for macros provided by Tracy when not linked. |
| 70 |
#ifndef WITH_TRACY |
| 71 |
#define FrameMark |
| 72 |
#define ZoneScoped |
| 73 |
#define ZoneScopedN(x) |
| 74 |
#define ZoneText(x,y) |
| 75 |
#define ZoneTextV(x,y,z) |
| 76 |
#define ZoneTextF(x,...) |
| 77 |
#define ZoneTextVF(x,y,...) |
| 78 |
#define ZoneName(x,y) |
| 79 |
#define ZoneNameV(x,y,z) |
| 80 |
#define ZoneNameF(x,...) |
| 81 |
#define ZoneNameVF(x,y,...) |
| 82 |
#endif |
| 83 |
|
| 84 |
#ifdef _MSC_VER |
| 85 |
#define CORSIX_TH_USE_PACK_PRAGMAS 1 |
| 86 |
#define CORSIX_TH_PACKED_FLAGS |
| 87 |
#else |
| 88 |
#define CORSIX_TH_USE_PACK_PRAGMAS 0 |
| 89 |
#define CORSIX_TH_PACKED_FLAGS __attribute__((__packed__)) |
| 90 |
#endif |
| 91 |
|
| 92 |
/** Standard includes **/ |
| 93 |
#include <cstddef> // IWYU pragma: export |
| 94 |
#include <cstdint> // IWYU pragma: export |
| 95 |
|
| 96 |
// We bring in the most common stddef and stdint types to avoid typing |
| 97 |
// clang-format off |
| 98 |
using std::int8_t; |
| 99 |
using std::int16_t; |
| 100 |
using std::int32_t; |
| 101 |
using std::int64_t; |
| 102 |
using std::size_t; |
| 103 |
using std::uint8_t; |
| 104 |
using std::uint16_t; |
| 105 |
using std::uint32_t; |
| 106 |
using std::uint64_t; |
| 107 |
// clang-format on |
| 108 |
|
| 109 |
/** Report operating system **/ |
| 110 |
#cmakedefine CORSIX_TH_OS "@CORSIX_TH_OS@" |
| 111 |
|
| 112 |
/** Report system architecture **/ |
| 113 |
#cmakedefine CORSIX_TH_ARCH "@CORSIX_TH_ARCH@" |
| 114 |
|
| 115 |
/** Set default value of font file **/ |
| 116 |
#cmakedefine CORSIX_TH_FONT "@CORSIX_TH_FONT@" |
| 117 |
|
| 118 |
#endif // CORSIX_TH_CONFIG_H_ |