Ya gestiona correctamente los datos online para diferentes usuarios

This commit is contained in:
2023-10-09 22:20:34 +02:00
parent 9b265c6cca
commit c835f943b5
12 changed files with 151 additions and 61 deletions

View File

@@ -1,7 +1,7 @@
#include "title.h"
// Constructor
Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, Online *online, options_t *options, section_t *section)
{
// Copia la dirección de los objetos
this->resource = resource;
@@ -9,12 +9,13 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *
this->screen = screen;
this->asset = asset;
this->input = input;
this->online = online;
this->options = options;
this->section = section;
// Reserva memoria para los punteros
eventHandler = new SDL_Event();
cheevos = new Cheevos(screen, options, asset->get("cheevos.bin"));
cheevos = new Cheevos(screen, options, asset->get("cheevos.bin"), online);
if (options->palette == p_zxspectrum)
{
texture = resource->getTexture("loading_screen_color.png");
@@ -118,6 +119,7 @@ void Title::checkEvents()
case SDL_SCANCODE_3:
runEnterID();
cheevos->reload();
fillTexture();
createCheevosTexture();
break;