CMakeLists.txt: don't precompile stb_ds.h, precompile SDL.h
This commit is contained in:
parent
1a7322dccf
commit
f96d521af2
@ -133,7 +133,7 @@ set_target_properties(${TWN_TARGET} PROPERTIES
|
||||
# precompile commonly used not-so-small headers
|
||||
target_precompile_headers(${TWN_TARGET} PRIVATE
|
||||
$<$<NOT:$<BOOL:${EMSCRIPTEN}>>:third-party/glad/include/glad/glad.h>
|
||||
third-party/stb/stb_ds.h)
|
||||
${SDL2_INCLUDE_DIR}/SDL.h)
|
||||
|
||||
|
||||
function(give_options_without_warnings target)
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "twn_text_c.h"
|
||||
|
||||
#include <glad/glad.h>
|
||||
#include <stb_ds.h>
|
||||
|
||||
|
||||
/* interleaved vertex array data */
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "twn_engine_context_c.h"
|
||||
|
||||
#include <stb_truetype.h>
|
||||
|
||||
#include <stb_ds.h>
|
||||
|
||||
#define ASCII_START 32
|
||||
#define ASCII_END 128
|
||||
|
@ -125,7 +125,6 @@ int clampi(int i, int min, int max) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
int64_t file_to_bytes(const char *path, unsigned char **buf_out) {
|
||||
SDL_RWops *handle = PHYSFSRWOPS_openRead(path);
|
||||
|
||||
@ -272,10 +271,12 @@ void tick_timer(int *value) {
|
||||
*value = MAX(*value - 1, 0);
|
||||
}
|
||||
|
||||
|
||||
void tick_ftimer(float *value) {
|
||||
*value = MAX(*value - ((float)ctx.delta_time / (float)ctx.clocks_per_second), 0.0f);
|
||||
}
|
||||
|
||||
|
||||
bool repeat_ftimer(float *value, float at) {
|
||||
*value -= (float)ctx.delta_time / (float)ctx.clocks_per_second;
|
||||
if (*value < 0.0f) {
|
||||
|
Loading…
Reference in New Issue
Block a user