Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Dec 26, 2024
1 parent 9859edc commit ee1fd9f
Show file tree
Hide file tree
Showing 12 changed files with 170 additions and 143 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ build: ## Build

configure: clean ## Configure
conan remote update conancenter --url https://center2.conan.io
conan install . --output-folder=build --build=missing --profile=webassembly --settings compiler.cppstd=20 --settings build_type=Release
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DSDL2_DIR=generators -DCMAKE_BUILD_TYPE=Release -DLOCAL=ON -DSANDBOX=OFF -DENABLE_PROFILING=ON
conan install . --output-folder=build --build=missing --profile=default --settings compiler.cppstd=20 --settings build_type=Release
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DSDL2_DIR=generators -DCMAKE_BUILD_TYPE=Release -DLOCAL=ON -DSANDBOX=ON -DENABLE_PROFILING=ON
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
conan==2.8.1
conan==2.11.0
pre-commit==4.0.1
pur==7.3.2
pur==7.3.3
2 changes: 1 addition & 1 deletion src/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ application::application(int argc, char **argv) {
int application::run() {
try {
#if SANDBOX
storage::filesystem::mount("../../sandbox", "/");
storage::filesystem::mount("../sandbox", "/");
#else
storage::filesystem::mount("bundle.7z", "/");
#endif
Expand Down
15 changes: 14 additions & 1 deletion src/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,23 @@
#define NOMINMAX
#endif

#define WEBSOCKET

#ifdef EMSCRIPTEN
#include <emscripten.h>
#ifdef WEBSOCKET
#include <emscripten/websocket.h>
#endif
#endif

#ifndef EMSCRIPTEN
#ifdef WEBSOCKET
#include <boost/asio.hpp>
#include <boost/asio/strand.hpp>
#include <boost/beast/core.hpp>
#include <boost/beast/websocket.hpp>
#endif
#endif

#ifdef STEAM
#include <steam/steam_api.h>
Expand Down Expand Up @@ -109,7 +122,7 @@ class eventmanager;
class eventreceiver;
}

namespace math {
namespace algebra {
class vector2d;
}

Expand Down
4 changes: 2 additions & 2 deletions src/entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ void entity::move(float_t x_velocity, float_t y_velocity) noexcept {
// cpBodySetVelocity(_props.body.get(), {x_velocity, y_velocity});
}

void entity::set_velocity(const math::vector2d &velocity) noexcept {
void entity::set_velocity(const algebra::vector2d &velocity) noexcept {
_props.velocity = velocity;
}

math::vector2d entity::velocity() const noexcept {
algebra::vector2d entity::velocity() const noexcept {
return _props.velocity;
}

Expand Down
4 changes: 2 additions & 2 deletions src/entity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class entity : public std::enable_shared_from_this<entity> {
int32_t y() const noexcept;

void move(float_t x_velocity, float_t y_velocity) noexcept;
void set_velocity(const math::vector2d &velocity) noexcept;
math::vector2d velocity() const noexcept;
void set_velocity(const algebra::vector2d &velocity) noexcept;
algebra::vector2d velocity() const noexcept;

void set_placement(int32_t x, int32_t y) noexcept;

Expand Down
2 changes: 1 addition & 1 deletion src/entityprops.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct entityprops {
geometry::point pivot{};
geometry::size size{};
float_t scale{1.0f};
math::vector2d velocity{};
algebra::vector2d velocity{};
std::string kind{};
std::string action{};
graphics::reflection reflection{graphics::reflection::none};
Expand Down
Loading

0 comments on commit ee1fd9f

Please sign in to comment.