restore c++ backend using swift 6's improved interop

This commit is contained in:
2024-09-22 00:59:58 +10:00
parent 93d3feca7e
commit 77603b582c
9 changed files with 35 additions and 26 deletions

View File

@ -30,6 +30,8 @@ void Ball::update(float deltaTime) noexcept {
}
BallWorld::BallWorld() noexcept : balls() {}
void BallWorld::add(Ball::vec2f pos, float angle, float ballSize) noexcept {
balls.emplace_back(Ball{ pos, angle, ballSize });
}

View File

@ -34,6 +34,9 @@ public:
struct BallWorld {
std::vector<Ball> balls;
BallWorld() noexcept;
virtual ~BallWorld() noexcept = default;
void add(Ball::vec2f pos, float angle, float ballSize) noexcept;
void update(float deltaTime) noexcept;
};