Skip to content

Commit efc8c50

Browse files
committed
no weird max frames pls, also do actually create somethign to link
1 parent 60901ea commit efc8c50

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/core/entry/entry_point.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,9 @@ int main(int argc, char** argv)
4242

4343
program.initialize();
4444

45-
int maxFrames = 1000;
46-
int count = 0;
47-
4845
while (program.isRunning())
4946
{
5047
program.update();
51-
count++;
52-
if (count >= maxFrames)
53-
program.stop();
5448
}
5549

5650
program.shutdown();

src/core/program/program.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include "program.hpp"
2+
3+
namespace rythe::core
4+
{
5+
void Engine::setup(Program* ptr)
6+
{
7+
rsl::log::debug("Engine[{}] Instance initialized", engineId);
8+
programPtr = ptr;
9+
}
10+
} // namespace rythe::core

src/core/program/program.hpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ namespace rythe::core
1818
public:
1919
Engine(rsl::id_type id) : engineId(id) {}
2020

21-
void setup(Program* ptr)
22-
{
23-
rsl::log::debug("Engine[{}] Instance initialized", engineId);
24-
programPtr = ptr;
25-
}
21+
void setup(Program* ptr);
2622

2723
void update()
2824
{
@@ -81,9 +77,9 @@ namespace rythe::core
8177
m_running = false;
8278
}
8379

84-
void addEngineInstance()
80+
Engine& addEngineInstance()
8581
{
86-
m_engines.emplace(m_lastIdx, std::make_unique<Engine>(Engine{ m_lastIdx++}));
82+
return *(m_engines.emplace(m_lastIdx, std::make_unique<Engine>(Engine{ m_lastIdx++})).first->second);
8783
}
8884
};
8985
}

0 commit comments

Comments
 (0)