updating raylib
This commit is contained in:
parent
d8407ece03
commit
5e815bbf1e
6 changed files with 14 additions and 12 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
project(games)
|
project(games)
|
||||||
set(CMAKE_CXX_FLAGS "-std=c++17 -Wno-error")
|
set(CMAKE_CXX_FLAGS "-std=c++17 -Wno-error ")
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(PLATFORM_DIR "windows")
|
set(PLATFORM_DIR "windows")
|
||||||
else()
|
else()
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/force_rebuild"
|
||||||
COMMAND rm -f "${CMAKE_SOURCE_DIR}/link/libenginend.so"
|
COMMAND rm -f "${CMAKE_SOURCE_DIR}/link/libenginend.so"
|
||||||
COMMAND rm -rf "${CMAKE_SOURCE_DIR}/include/enginend"
|
COMMAND rm -rf "${CMAKE_SOURCE_DIR}/include/enginend"
|
||||||
)
|
)
|
||||||
add_library(enginend SHARED ${ENGINE_SOURCES} "${CMAKE_BINARY_DIR}/force_rebuild")
|
add_library(enginend SHARED ${ENGINE_SOURCES} "${CMAKE_BINARY_DIR}/force_rebuild"
|
||||||
|
../include/json.h)
|
||||||
target_link_directories(
|
target_link_directories(
|
||||||
enginend PUBLIC
|
enginend PUBLIC
|
||||||
"${CMAKE_SOURCE_DIR}/link")
|
"${CMAKE_SOURCE_DIR}/link")
|
||||||
|
|
@ -48,9 +49,10 @@ target_link_libraries(test PRIVATE
|
||||||
)
|
)
|
||||||
target_include_directories(test PUBLIC
|
target_include_directories(test PUBLIC
|
||||||
${CMAKE_SOURCE_DIR}/include
|
${CMAKE_SOURCE_DIR}/include
|
||||||
${CMAKE_SOURCE_DIR}/lib/raylib/build/raylib/include
|
${CMAKE_SOURCE_DIR}/lib/raylib/linux-64/raylib/include
|
||||||
)
|
)
|
||||||
target_include_directories(enginend PUBLIC
|
target_include_directories(enginend PUBLIC
|
||||||
${CMAKE_SOURCE_DIR}/lib/raylib/build/raylib/include
|
${CMAKE_SOURCE_DIR}/include
|
||||||
|
${CMAKE_SOURCE_DIR}/lib/raylib/linux-64/raylib/include
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace enginend {
|
||||||
}
|
}
|
||||||
virtual void draw() {
|
virtual void draw() {
|
||||||
|
|
||||||
ClearBackground(BLANK);
|
ClearBackground(rl::BLANK);
|
||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
for (enginend::nodes::node* n : nodes) {
|
for (enginend::nodes::node* n : nodes) {
|
||||||
n->draw();
|
n->draw();
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,11 @@ target_link_directories(
|
||||||
"${CMAKE_SOURCE_DIR}/link")
|
"${CMAKE_SOURCE_DIR}/link")
|
||||||
target_link_libraries(endlauncher PRIVATE
|
target_link_libraries(endlauncher PRIVATE
|
||||||
"${CMAKE_SOURCE_DIR}/link/libenginend.so"
|
"${CMAKE_SOURCE_DIR}/link/libenginend.so"
|
||||||
"${CMAKE_SOURCE_DIR}/link/libdesktopraylib.so"
|
"${CMAKE_SOURCE_DIR}/link/liblinux64raylib.so"
|
||||||
curl zip
|
curl zip
|
||||||
)
|
)
|
||||||
target_include_directories(endlauncher PUBLIC
|
target_include_directories(endlauncher PUBLIC
|
||||||
${CMAKE_SOURCE_DIR}/include
|
${CMAKE_SOURCE_DIR}/include
|
||||||
${CMAKE_SOURCE_DIR}/lib/raylib/build/raylib/include
|
${CMAKE_SOURCE_DIR}/lib/raylib/linux-64/raylib/include
|
||||||
${CMAKE_SOURCE_DIR}/engine/include
|
${CMAKE_SOURCE_DIR}/engine/include
|
||||||
)
|
)
|
||||||
|
|
@ -124,7 +124,7 @@ public:
|
||||||
SetConfigFlags(FLAG_WINDOW_UNDECORATED|FLAG_WINDOW_TRANSPARENT|FLAG_WINDOW_TOPMOST);
|
SetConfigFlags(FLAG_WINDOW_UNDECORATED|FLAG_WINDOW_TRANSPARENT|FLAG_WINDOW_TOPMOST);
|
||||||
tiny::error("is transparent lol");
|
tiny::error("is transparent lol");
|
||||||
InitWindow(600,300,"test");target=LoadRenderTexture(600, 300);
|
InitWindow(600,300,"test");target=LoadRenderTexture(600, 300);
|
||||||
img=GenImageColor(600, 300, BLANK);
|
img=GenImageColor(600, 300, rl::BLANK);
|
||||||
SetTargetFPS(GetMonitorRefreshRate(GetCurrentMonitor()));
|
SetTargetFPS(GetMonitorRefreshRate(GetCurrentMonitor()));
|
||||||
this->tickrate=GetMonitorRefreshRate(GetCurrentMonitor());
|
this->tickrate=GetMonitorRefreshRate(GetCurrentMonitor());
|
||||||
bg=LoadTexture("res/launcher.png");
|
bg=LoadTexture("res/launcher.png");
|
||||||
|
|
@ -243,8 +243,8 @@ public:
|
||||||
currentscene->draw();
|
currentscene->draw();
|
||||||
EndTextureMode();
|
EndTextureMode();
|
||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
ClearBackground(BLANK);
|
ClearBackground(rl::BLANK);
|
||||||
DrawTexturePro(target.texture, {0, 0, 600, -300}, {0, 0, 600, 300}, {0, 0}, 0, WHITE);
|
DrawTexturePro(target.texture, {0, 0, 600, -300}, {0, 0, 600, 300}, {0, 0}, 0, rl::WHITE);
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
Vector2 mp=Vector2(GetMousePositionDesktop());
|
Vector2 mp=Vector2(GetMousePositionDesktop());
|
||||||
Vector2 wp=GetWindowPosition();
|
Vector2 wp=GetWindowPosition();
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5936a41af9da7013b93d6e3c0cd48f07ea8d9782
|
Subproject commit 5e614e814bf88c22a2f3795358513a700d3a77d0
|
||||||
Loading…
Add table
Add a link
Reference in a new issue