win fixes
parent
8a12661689
commit
fd1ea14de5
|
@ -8,6 +8,10 @@ function(link_system_libs target_name)
|
||||||
elseif (UNIX)
|
elseif (UNIX)
|
||||||
target_link_libraries(${target_name} pthread m dl atomic)
|
target_link_libraries(${target_name} pthread m dl atomic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (NOT WIN32)
|
||||||
|
target_compile_options(${target_name} PRIVATE -Werror -Wall -Wextra -Wno-unused-function -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-parameter)
|
||||||
|
endif ()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
macro(use_cxx11)
|
macro(use_cxx11)
|
||||||
|
|
|
@ -44,6 +44,5 @@ add_library(eco2d-foundation STATIC
|
||||||
target_compile_definitions(eco2d-foundation PRIVATE CLIENT)
|
target_compile_definitions(eco2d-foundation PRIVATE CLIENT)
|
||||||
include_directories(src ../modules ../../art/gen)
|
include_directories(src ../modules ../../art/gen)
|
||||||
target_link_libraries(eco2d-foundation raylib cwpack flecs-bundle vendors-bundle)
|
target_link_libraries(eco2d-foundation raylib cwpack flecs-bundle vendors-bundle)
|
||||||
target_compile_options(eco2d-foundation PRIVATE -Werror -Wall -Wextra -Wno-unused-function -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-parameter)
|
|
||||||
|
|
||||||
link_system_libs(eco2d-foundation)
|
link_system_libs(eco2d-foundation)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "core/rules.h"
|
#include "core/rules.h"
|
||||||
|
|
||||||
game_rulesdef game_rules = (game_rulesdef){
|
game_rulesdef game_rules = {
|
||||||
.phy_walk_drag = 4.23f,
|
.phy_walk_drag = 4.23f,
|
||||||
.demo_npc_move_speed = 500,
|
.demo_npc_move_speed = 500,
|
||||||
.demo_npc_steer_speed = 300,
|
.demo_npc_steer_speed = 300,
|
||||||
|
|
|
@ -23,7 +23,7 @@ size_t pkt_send_librg_update_encode(void *data, int32_t data_length, uint8_t lay
|
||||||
#define NUM_SAMPLES 128
|
#define NUM_SAMPLES 128
|
||||||
|
|
||||||
static float smooth_time(float time) {
|
static float smooth_time(float time) {
|
||||||
static float time_samples[NUM_SAMPLES] = {};
|
static float time_samples[NUM_SAMPLES] = {0};
|
||||||
static int32_t curr_index = 0;
|
static int32_t curr_index = 0;
|
||||||
|
|
||||||
time_samples[curr_index] = time;
|
time_samples[curr_index] = time;
|
||||||
|
|
|
@ -9,6 +9,5 @@ add_executable(minimal
|
||||||
target_compile_definitions(minimal PRIVATE CLIENT)
|
target_compile_definitions(minimal PRIVATE CLIENT)
|
||||||
include_directories(src ../../foundation/src ../../../art/gen)
|
include_directories(src ../../foundation/src ../../../art/gen)
|
||||||
target_link_libraries(minimal eco2d-foundation)
|
target_link_libraries(minimal eco2d-foundation)
|
||||||
target_compile_options(minimal PRIVATE -Werror -Wall -Wextra -Wno-unused-function -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-parameter)
|
|
||||||
|
|
||||||
link_system_libs(minimal)
|
link_system_libs(minimal)
|
||||||
|
|
|
@ -9,6 +9,5 @@ add_executable(eco2d
|
||||||
target_compile_definitions(eco2d PRIVATE CLIENT)
|
target_compile_definitions(eco2d PRIVATE CLIENT)
|
||||||
include_directories(src ../../foundation/src ../../../art/gen)
|
include_directories(src ../../foundation/src ../../../art/gen)
|
||||||
target_link_libraries(eco2d eco2d-foundation)
|
target_link_libraries(eco2d eco2d-foundation)
|
||||||
target_compile_options(eco2d PRIVATE -Werror -Wall -Wextra -Wno-unused-function -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-parameter)
|
|
||||||
|
|
||||||
link_system_libs(eco2d)
|
link_system_libs(eco2d)
|
||||||
|
|
|
@ -7,4 +7,7 @@ file(GLOB SRCS *.h
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(flecs-bundle STATIC ${SRCS})
|
add_library(flecs-bundle STATIC ${SRCS})
|
||||||
target_compile_options(flecs-bundle PRIVATE "-Wno-enum-constexpr-conversion")
|
|
||||||
|
if (NOT WIN32)
|
||||||
|
target_compile_options(flecs-bundle PRIVATE "-Wno-enum-constexpr-conversion")
|
||||||
|
endif()
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
where /q cl
|
||||||
|
IF %ERRORLEVEL% == 0 (EXIT /b)
|
||||||
|
|
||||||
|
SET "LIB="
|
||||||
|
|
||||||
|
|
||||||
|
SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0
|
||||||
|
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\vcvarsall.bat" %1))
|
||||||
|
|
||||||
|
SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 13.0
|
||||||
|
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\vcvarsall.bat" %1))
|
||||||
|
|
||||||
|
SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 12.0
|
||||||
|
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\vcvarsall.bat" %1))
|
||||||
|
|
||||||
|
SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 11.0
|
||||||
|
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\vcvarsall.bat" %1))
|
||||||
|
|
||||||
|
SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0
|
||||||
|
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\vcvarsall.bat" %1))
|
||||||
|
|
||||||
|
SET VC_PATH=C:\Program Files\Microsoft Visual Studio\2022\Community
|
||||||
|
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" %1))
|
||||||
|
|
||||||
|
SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
|
||||||
|
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" %1))
|
||||||
|
|
||||||
|
SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
|
||||||
|
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\Common7\Tools\VsDevCmd.bat"))
|
||||||
|
|
||||||
|
SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
|
||||||
|
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" %1))
|
||||||
|
|
||||||
|
SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
|
||||||
|
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" %1))
|
||||||
|
|
||||||
|
SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools
|
||||||
|
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" %1))
|
Loading…
Reference in New Issue