He posat punteros dobles i tampoc va res

This commit is contained in:
2025-03-05 12:31:54 +01:00
parent 33038e8509
commit d41b0cb31c
11 changed files with 151 additions and 144 deletions

View File

@@ -33,7 +33,7 @@ Title::Title()
pLoadPal(Asset::get()->get("loading_screen_color.gif").c_str());
pSetSource(loading_screen_);
//title_logo_surface_->setSurfaceDataDest(bg_surface_->getSurfaceData());
//title_logo_surface_->setSurfaceDataDestRaw(bg_surface_->getSurfaceData());
// Inicializa variables
state_ = options.section.subsection == Subsection::TITLE_WITH_LOADING_SCREEN ? TitleState::SHOW_LOADING_SCREEN : TitleState::SHOW_MENU;
@@ -373,7 +373,8 @@ void Title::createCheevosTexture()
cheevoColor = cheevo.completed ? CHEEVO_UNLOCKED_COLOR : CHEEVO_LOCKED_COLOR;
pos += CHEEVOS_PADDING;
constexpr int HALF = CHEEVOS_PADDING / 2;
cheevos_surface_->drawLine(Screen::get()->getRenderSurfaceData(), LINE_X1, pos - HALF - 1, LINE_X2, pos - HALF - 1, cheevoColor);
auto surface_data = *(Screen::get()->getRenderSurfaceData());
cheevos_surface_->drawLine(surface_data, LINE_X1, pos - HALF - 1, LINE_X2, pos - HALF - 1, cheevoColor);
TEXT->writeDX(TEXT_CENTER | TEXT_COLOR, CHEEVOS_TEXTURE_WIDTH / 2, pos, cheevo.caption, 1, cheevoColor);
pos += TEXT->getCharacterSize() + 1;
TEXT->writeDX(TEXT_CENTER | TEXT_COLOR, CHEEVOS_TEXTURE_WIDTH / 2, pos, cheevo.description, 1, cheevoColor);