Remove debug text from weather

This commit is contained in:
Tyler Perkins 2021-12-19 19:20:03 -05:00
parent 0758fbdbee
commit 0f85ff6b53

View File

@ -35,8 +35,6 @@ weather::~weather(){
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
void weather::draw(){ void weather::draw(){
std::cerr << "WEATHER::DRAW\n";
//create the texture if this is the first time running draw //create the texture if this is the first time running draw
if(_texture == nullptr) if(_texture == nullptr)
initTexture(); initTexture();
@ -44,7 +42,6 @@ void weather::draw(){
//check if its time to update //check if its time to update
if((std::chrono::high_resolution_clock::now() - _last_update) if((std::chrono::high_resolution_clock::now() - _last_update)
> _update_interval){ > _update_interval){
std::cerr << "UPDATING WEATHER IF STATEMENT\n";
//TODO multithread this //TODO multithread this
update(); update();
@ -80,11 +77,7 @@ void weather::update() {
void weather::update_texture(){ void weather::update_texture(){
std::cerr << "WEATHER::UPDATE_TEXTURE\n"; std::cerr << "WEATHER::UPDATE_TEXTURE\n";
int ret = SDL_SetRenderTarget(board::getRenderer(), _texture); SDL_SetRenderTarget(board::getRenderer(), _texture);
std::cerr << "ret : " << ret << "\n";
std::cerr << "Renderer : " << board::getRenderer() << "\n";
if(ret != 0)
SDL_Log("ERROR : %s\n", SDL_GetError());
SDL_Rect tgt; SDL_Rect tgt;
@ -96,17 +89,10 @@ void weather::update_texture(){
_rss.getTitle().c_str(), _rss.getTitle().c_str(),
&tgt.w, &tgt.h); &tgt.w, &tgt.h);
std::cerr << "tgt.w : " << tgt.w << "\n"; SDL_RenderCopy(board::getRenderer(),
std::cerr << "tgt.h : " << tgt.h << "\n";
std::cerr << "board::getString : " << board::getString(_rss.getTitle(),{ "Roboto_Mono/RobotoMono-Medium.ttf", 24 }) << "\n";
ret = SDL_RenderCopy(board::getRenderer(),
//board::getString(_rss.getTitle(),
board::getString(_rss.getTitle(), board::getString(_rss.getTitle(),
{ "Roboto_Mono/RobotoMono-Medium.ttf", 24 }), NULL, &tgt); { "Roboto_Mono/RobotoMono-Medium.ttf", 24 }), NULL, &tgt);
std::cerr << "ret : " << ret << "\n";
SDL_SetRenderTarget(board::getRenderer(), NULL); SDL_SetRenderTarget(board::getRenderer(), NULL);
} }