Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Nov 24, 2024
1 parent ef501ee commit e1b5fd4
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/engine.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "engine.hpp"

#include "audiodevice.hpp"
#include "entity.hpp"
#include "entitymanager.hpp"
#include "eventmanager.hpp"
#include "framerate.hpp"
Expand Down Expand Up @@ -170,7 +169,7 @@ void engine::_loop() noexcept {
_overlay->update(delta);
_entitymanager->update(delta);

for (auto &loopable : _loopables) {
for (const auto &loopable : _loopables) {
loopable->loop(delta);
}

Expand Down
2 changes: 0 additions & 2 deletions src/entity.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#pragma once

#include "anchor.hpp"
#include "common.hpp"
#include "entitymanager.hpp"
#include "entityprops.hpp"
#include "flip.hpp"
#include "resourcemanager.hpp"
#include "vector2d.hpp"

namespace framework {
Expand Down
2 changes: 1 addition & 1 deletion src/fontfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ std::shared_ptr<font> fontfactory::get(const std::string &name) {
if (added) {
std::cout << "[fontfactory] cache miss: " << name << std::endl;

const auto buffer = storage::io::read(name);
const auto buffer = storage::io::read(fmt::format("fonts/{}.json", name));
const auto j = json::parse(buffer);
const auto alphabet = j["alphabet"].get<std::string>();

Expand Down
2 changes: 1 addition & 1 deletion src/label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void label::update(float_t delta) noexcept {
}

void label::draw() const noexcept {
if (!_font || _text.empty()) {
if (!_font || _text.empty()) [[unlikely]] {
return;
}

Expand Down
1 change: 0 additions & 1 deletion src/overlay.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "common.hpp"
#include "fontfactory.hpp"
#include "widget.hpp"

namespace graphics {
Expand Down

0 comments on commit e1b5fd4

Please sign in to comment.