mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-09 20:41:38 +12:00
Initial commit (I really need to remove Boost)
This commit is contained in:
commit
b5371dc66c
3226 changed files with 668081 additions and 0 deletions
35
src/emulator.cpp
Normal file
35
src/emulator.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include "emulator.hpp"
|
||||
|
||||
void Emulator::reset() {}
|
||||
|
||||
void Emulator::step() {}
|
||||
|
||||
void Emulator::render() {
|
||||
|
||||
}
|
||||
|
||||
void Emulator::run() {
|
||||
while (window.isOpen()) {
|
||||
runFrame();
|
||||
OpenGL::setClearColor(1.0, 0.0, 0.0, 1.0);
|
||||
OpenGL::setViewport(400, 240 * 2);
|
||||
OpenGL::disableScissor();
|
||||
OpenGL::clearColor();
|
||||
|
||||
sf::Event event;
|
||||
while (window.pollEvent(event)) {
|
||||
if (event.type == sf::Event::Closed) {
|
||||
Helpers::panic("Bye :(");
|
||||
}
|
||||
}
|
||||
|
||||
window.display();
|
||||
}
|
||||
}
|
||||
|
||||
void Emulator::runFrame() {
|
||||
constexpr u32 freq = 268 * 1024 * 1024;
|
||||
for (u32 i = 0; i < freq; i += 2) {
|
||||
step();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue