AppleWin/source/frontends/retro/game.h
Andrea Odetti c2f4d8ed34 Bite the bullet and flip the video buffer in software.
Until a better solution is found.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2020-12-12 19:27:28 +00:00

30 lines
638 B
C++

#pragma once
#include "frontends/common2/speed.h"
class Game
{
public:
Game();
~Game();
bool loadGame(const char * path);
void executeOneFrame();
void processInputEvents();
void drawVideoBuffer();
static void keyboardCallback(bool down, unsigned keycode, uint32_t character, uint16_t key_modifiers);
private:
Speed mySpeed; // fixed speed
const size_t myHeight;
const size_t myWidth;
static void processKeyDown(unsigned keycode, uint32_t character, uint16_t key_modifiers);
static void processKeyUp(unsigned keycode, uint32_t character, uint16_t key_modifiers);
std::vector<uint8_t> myVideoBuffer;
};