27 #include "eng3d/state.hpp"
28 #include "eng3d/string.hpp"
29 #include "eng3d/event.hpp"
30 #include "eng3d/profiler.hpp"
31 #include "eng3d/interface.hpp"
32 #include "eng3d/ui/ui.hpp"
33 #include "eng3d/ui/components.hpp"
34 #include "eng3d/pyvm.hpp"
37 GameState(
const std::vector<std::string>& pkg_paths)
54 if(this->profiler_view) {
55 this->profiler_view->
kill();
66 int main(
int argc,
char** argv) {
67 std::vector<std::string> pkg_paths;
68 for(
int i = 1; i < argc; i++) {
69 std::string arg = std::string(argv[i]);
74 arg = std::string(argv[i]);
75 pkg_paths.push_back(arg);
82 #ifdef E3D_FEATURE_PYTHON
87 gs.
do_run([&gs]() {
return gs.
run ==
true; },
99 std::cout <<
"Test passed" << std::endl;
std::shared_ptr< Eng3D::IO::Asset::Base > get_unique(const Eng3D::IO::Path &path)
Obtaining an unique asset means the "first-found" policy applies.
void run_string(const std::string_view name, const std::string_view path)
State(const std::vector< std::string > &pkg_paths)
void do_run(std::function< bool(void)> cond, std::function< void(void)> event, std::function< void(void)> render)
Perform the main game loop.
std::atomic< bool > run
Variable telling if the game should quit, honored by most event loops but should be used explicitly i...
Eng3D::IO::PackageManager package_man
UI::Widget * profiler_view
GameState(const std::vector< std::string > &pkg_paths)
void handle_key(const Eng3D::Event::Key &e) override
std::string translate(const std::string_view str)
int main(int argc, char **argv)
Eng3D::Event::Key::Type type
bool hold
Whetever the key is being held.
void stop(const std::string &name)
void start(const std::string &name)
#define CXX_THROW(class,...)