make baby windows work again

This commit is contained in:
veclavtalica 2024-09-18 20:36:00 +03:00
parent cf72287659
commit 8effcc0421
6 changed files with 22 additions and 10 deletions

View File

@ -49,13 +49,22 @@ add_subdirectory(third-party/libxm SYSTEM)
if(LINUX)
set(SYSTEM_SOURCE_FILES
src/system/linux/twn_elf.c
set(SYSTEM_SOURCE_FILES src/system/linux/twn_elf.c)
else()
set(SYSTEM_SOURCE_FILES)
endif()
if(EMSCRIPTEN)
set(TWN_RENDERING_API WEBGL1)
else()
set(TWN_RENDERING_API OPENGL_15)
endif()
if(TWN_RENDERING_API MATCHES OPENGL_15)
set(SYSTEM_SOURCE_FILES ${SYSTEM_SOURCE_FILES}
src/rendering/twn_gl_any_rendering.c
src/rendering/twn_gl_15_rendering.c
src/rendering/twn_gl_15_gpu_texture.c)
else()
set(SYSTEM_SOURCE_FILES)
endif()
set(TWN_THIRD_PARTY_SOURCE_FILES

View File

@ -1,5 +1,5 @@
#include "townengine/twn_game_object.h"
#include "townengine/game_api.h"
#include "twn_game_object_c.h"
#include "twn_game_api.h"
void game_object_load(void) {

View File

@ -1,5 +1,5 @@
#include "townengine/twn_game_object.h"
#include "townengine/context.h"
#include "twn_game_object_c.h"
#include "twn_engine_context_c.h"
#include <errhandlingapi.h>
#include <libloaderapi.h>
@ -48,7 +48,7 @@ static void load_game_object(void) {
handle = new_handle;
if (ctx.tick_count != 0)
if (ctx.game.tick_count != 0)
log_info("Game object was reloaded\n");
return;

View File

@ -1,6 +1,7 @@
#include "twn_util.h"
#include "twn_engine_context_c.h"
#include "twn_rendering_c.h"
#include "twn_rendering.h"
#include <SDL2/SDL.h>
#include <stb_ds.h>

View File

@ -1,3 +1,4 @@
#include "twn_rendering.h"
#include "twn_rendering_c.h"
#include "twn_engine_context_c.h"
#include "twn_textures_c.h"

View File

@ -3,6 +3,7 @@
#include "twn_context.h"
#include "twn_textures_c.h"
#include "twn_engine_api.h"
#include "twn_input.h"
#include "rendering/twn_rendering_c.h"
@ -47,6 +48,6 @@ typedef struct engine_context {
bool was_successful;
} t_engine_ctx;
extern t_engine_ctx ctx;
TWN_API extern t_engine_ctx ctx;
#endif