symlinking library headers for better portability
This commit is contained in:
parent
d04b700809
commit
55b9b9d4fa
28 changed files with 645 additions and 0 deletions
19
games/endlauncher/CMakeLists.txt
Normal file
19
games/endlauncher/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-std=c++17 -g -Wno-error -O0")
|
||||
file(GLOB_RECURSE ENDLAUNCHER "src/*.cpp")
|
||||
add_executable(endlauncher ${ENDLAUNCHER})
|
||||
|
||||
set_target_properties(endlauncher PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/built/launcher/${PLATFORM_DIR}"
|
||||
)
|
||||
target_link_directories(
|
||||
endlauncher PUBLIC
|
||||
"${CMAKE_SOURCE_DIR}/link")
|
||||
target_link_libraries(endlauncher PRIVATE
|
||||
"${CMAKE_SOURCE_DIR}/link/libenginend.so"
|
||||
curl zip
|
||||
)
|
||||
target_include_directories(endlauncher PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
)
|
||||
22
games/forespend/CMakeLists.txt
Normal file
22
games/forespend/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-std=c++17 -Wno-error")
|
||||
file(GLOB_RECURSE FORESPEND_SOURCES CONFIGURE_DEPENDS "src/*.cpp")
|
||||
add_executable(forespend ${FORESPEND_SOURCES})
|
||||
if(NOT DEFINED ${ARCH})
|
||||
set(ARCH "linux-64")
|
||||
endif(NOT DEFINED ${ARCH})
|
||||
set_target_properties(forespend PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/built/forespend/${PLATFORM_DIR}/bin"
|
||||
)
|
||||
|
||||
target_link_directories(
|
||||
forespend PUBLIC
|
||||
"${CMAKE_SOURCE_DIR}/link")
|
||||
target_link_libraries(forespend PRIVATE
|
||||
"${CMAKE_SOURCE_DIR}/link/libenginend.so"
|
||||
"${CMAKE_SOURCE_DIR}/lib/raylib/${ARCH}/raylib/libraylib.a"
|
||||
)
|
||||
target_include_directories(forespend PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
)
|
||||
33
games/forespend/src/client/client.cpp
Normal file
33
games/forespend/src/client/client.cpp
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#include "client.h"
|
||||
|
||||
#include "scenes/mainmenu.h"
|
||||
|
||||
client::client() {
|
||||
|
||||
}
|
||||
void client::boot() {
|
||||
this->framerate=60;
|
||||
this->tickrate=20;
|
||||
// SetConfigFlags();
|
||||
InitWindow(380,240,"forespend - 0.03h");
|
||||
initconfigmenu();
|
||||
this->currentscene=new mainmenu();
|
||||
this->currentscene->boot();
|
||||
target=LoadRenderTexture(380,240);
|
||||
}
|
||||
void client::draw() {
|
||||
BeginDrawing();
|
||||
ClearBackground(rl::WHITE);
|
||||
this->currentscene->draw();
|
||||
EndDrawing();
|
||||
}
|
||||
void client::exit() {
|
||||
this->currentscene->exit();
|
||||
delete this->currentscene;
|
||||
}
|
||||
void client::tick() {
|
||||
this->currentscene->tick();
|
||||
}
|
||||
|
||||
|
||||
|
||||
40
games/forespend/src/client/scenes/configmenu.cpp
Normal file
40
games/forespend/src/client/scenes/configmenu.cpp
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#include "configmenu.h"
|
||||
|
||||
#include <enginend/scenes/node2d.h>
|
||||
Font forefont;
|
||||
int configmenupage=0; // 0 is before the mainpage is showing. aka pause menu/main menu when start game
|
||||
enginend::group mainpage= enginend::group(
|
||||
{
|
||||
new enginend::nodes::labeledbutton("video",nullptr,{255,127,0,255},{0,0,0,0},100,100,0,0,std::function<void()>([]() {
|
||||
|
||||
}),forefont,32),
|
||||
new enginend::nodes::labeledbutton("sound",nullptr,{255,127,0,255},{0,0,0,0},100,100,0,0,std::function<void()>([]() {
|
||||
|
||||
}),forefont,32),
|
||||
new enginend::nodes::labeledbutton("input",nullptr,{255,127,0,255},{0,0,0,0},100,100,0,0,std::function<void()>([]() {
|
||||
|
||||
}),forefont,32),
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
enginend::group graphics= enginend::group(
|
||||
{
|
||||
new enginend::nodes::labeledbutton("fullscreen",nullptr,{255,127,0,255},{0,0,0,0},100,100,0,0,std::function<void()>([]() {
|
||||
|
||||
}),forefont,32),
|
||||
}
|
||||
);
|
||||
enginend::group sound= enginend::group(
|
||||
{
|
||||
|
||||
}
|
||||
);
|
||||
enginend::group controls= enginend::group(
|
||||
{
|
||||
|
||||
}
|
||||
);
|
||||
void initconfigmenu() {
|
||||
forefont=LoadFont(AT("res/fonts/dos.fnt"));
|
||||
}
|
||||
11
games/forespend/src/client/scenes/configmenu.h
Normal file
11
games/forespend/src/client/scenes/configmenu.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
#include <incmgr.h>
|
||||
|
||||
extern Font forefont;
|
||||
extern enginend::group maincfgpage;
|
||||
extern enginend::group graphics;
|
||||
extern enginend::group sound;
|
||||
extern enginend::group controls;
|
||||
extern int configmenupage;
|
||||
void initconfigmenu();
|
||||
4
games/forespend/src/common/themes.cpp
Normal file
4
games/forespend/src/common/themes.cpp
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#include "themes.h"
|
||||
|
||||
enginend::theme clienttheme;
|
||||
enginend::theme servertheme;
|
||||
5
games/forespend/src/common/themes.h
Normal file
5
games/forespend/src/common/themes.h
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#pragma once
|
||||
#include <enginend/scenes/nodes.h>
|
||||
|
||||
extern enginend::theme clienttheme;
|
||||
extern enginend::theme servertheme;
|
||||
Loading…
Add table
Add a link
Reference in a new issue