Moviendo estado a un objeto separado
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "Graphics.h"
|
||||
|
||||
#include <array>
|
||||
#include <iostream>
|
||||
|
||||
void SDLWindowDestroyer::operator()(SDL_Window* window) const {
|
||||
@@ -50,7 +51,7 @@ bool Graphics::init() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Graphics::draw(std::bitset<2048> display, std::string info) {
|
||||
void Graphics::draw(std::array<bool, 2048> display, std::string info) {
|
||||
SDL_SetRenderDrawColor(renderer.get(), 0, 0, 0, SDL_ALPHA_OPAQUE);
|
||||
SDL_RenderClear(renderer.get());
|
||||
|
||||
@@ -60,7 +61,7 @@ void Graphics::draw(std::bitset<2048> display, std::string info) {
|
||||
SDL_RenderPresent(renderer.get());
|
||||
}
|
||||
|
||||
void Graphics::draw_display(std::bitset<2048> display) {
|
||||
void Graphics::draw_display(std::array<bool, 2048> display) {
|
||||
SDL_Surface* surface = nullptr;
|
||||
|
||||
if (SDL_LockTextureToSurface(texture.get(), nullptr, &surface)) {
|
||||
|
||||
Reference in New Issue
Block a user