#include #include #include "BuzzerSDL.hpp" #include "DisplaySDL.hpp" #include "Peripherals.hpp" int main(int argc, char* args[]) { if (SDL_Init(SDL_INIT_EVERYTHING) < 0) { std::cerr << "Couldn't initialize SDL: " << SDL_GetError() << '\n'; return 1; } class DisplayTest : public DisplaySDL { public: DisplayTest() : DisplaySDL(1280, 640, 0xff0000, 0x00ff00) { for(int i = 0; i < chocochip8::gcHeight; i+=2) { mpFramebuffer->at(i).set(); } } }; BuzzerSDL buzzer(440); //buzzer.on(); DisplayTest display; SDL_Event event; while(SDL_WaitEvent(&event) && event.type != SDL_QUIT) { display.updateWindow(); } buzzer.off(); SDL_Quit(); return 0; }