Compare commits
2 Commits
85b7140f11
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 63b53f0cdd | |||
| 3fd1903147 |
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
||||
[submodule "3rd/SDL"]
|
||||
path = 3rd/SDL
|
||||
url = https://github.com/libsdl-org/SDL.git
|
||||
[submodule "hiload"]
|
||||
path = hiload
|
||||
url = git@git.kitemoonsche.me:schme/hiload.git
|
||||
|
||||
@@ -5,12 +5,10 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
add_subdirectory(3rd/SDL EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(hiload)
|
||||
add_subdirectory(hiisi)
|
||||
|
||||
# target_link_options(SDL3-shared PRIVATE -Wl,-z,nodelete)
|
||||
|
||||
add_executable(hiisi-run
|
||||
hiisi/main.cpp)
|
||||
|
||||
target_link_libraries(hiisi-run hiisi-engine)
|
||||
# target_link_libraries(hiisi-run hiload)
|
||||
target_link_libraries(hiisi-run hiisi-engine hiload)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "hiisi.h"
|
||||
|
||||
#include "hiload.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <atomic>
|
||||
#include <dlfcn.h>
|
||||
@@ -10,13 +12,26 @@
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
/* Hiload hotreloader is compiled as a shared library, these are the
|
||||
* only required changes for the code to successfully reload */
|
||||
|
||||
// Init hiload
|
||||
const char *himodules[] = {"", "libhiisi-engine.so"};
|
||||
hi_init(2, himodules);
|
||||
|
||||
HiisiEngine hiisi;
|
||||
|
||||
hiisi.init(argc, argv);
|
||||
while (hiisi.event()) {
|
||||
hiisi.iterate();
|
||||
|
||||
// Reload changes
|
||||
hi_reload();
|
||||
}
|
||||
|
||||
hiisi.quit();
|
||||
|
||||
// Deinit hiload
|
||||
hi_deinit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
1
hiload
Submodule
1
hiload
Submodule
Submodule hiload added at c7ff4f8813
Reference in New Issue
Block a user