Updating the app to use QT

This commit is contained in:
Anonymus Raccoon
2020-02-16 01:57:38 +01:00
20 changed files with 264 additions and 122 deletions

View File

@@ -12,18 +12,22 @@
namespace ComSquare::Renderer
{
SFRenderer::SFRenderer(unsigned int height, unsigned int width, int maxFPS)
SFRenderer::SFRenderer(unsigned int height, unsigned int width)
{
sf::Image icon;
this->shouldExit = false;
this->_videoMode = {width, height, 32};
this->_texture.create(width, height);
this->_sprite.setTexture(this->_texture);
this->_pixelBuffer = new sf::Color[height * width];
}
void SFRenderer::createWindow(SNES &, int maxFPS)
{
sf::Image icon;
this->_window.create(this->_videoMode, "ComSquare Emulator", sf::Style::Default);
if (icon.loadFromFile("../ressources/Logo.png"))
this->_window.setIcon(314, 314, icon.getPixelsPtr());
this->_window.setFramerateLimit(maxFPS);
this->_texture.create(width, height);
this->_sprite.setTexture(this->_texture);
this->_pixelBuffer = new sf::Color[height * width];
}
SFRenderer::~SFRenderer()
@@ -31,7 +35,6 @@ namespace ComSquare::Renderer
delete [] this->_pixelBuffer;
}
void SFRenderer::setWindowName(std::string newWindowName)
{
this->_window.setTitle(newWindowName + " - ComSquare");
@@ -70,5 +73,4 @@ namespace ComSquare::Renderer
}
}
}
}