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

@@ -408,13 +408,14 @@ void Resource::renderProgress()
Screen::get()->clearSurface();
auto surface = std::make_shared<Surface>(Screen::get()->getRenderSurfaceData(), 1, 1);
auto surface_data = *(Screen::get()->getRenderSurfaceData());
const int wired_bar_width = options.game.width - (X_PADDING * 2);
SDL_Rect rect_wired = {X_PADDING, bar_position, wired_bar_width, X_PADDING};
surface->fillRect(Screen::get()->getRenderSurfaceData(), &rect_wired, stringToColor("blue"));
surface->fillRect(surface_data, &rect_wired, stringToColor("blue"));
const int full_bar_width = wired_bar_width * count_.getPercentage();
SDL_Rect rect_full = {X_PADDING, bar_position, full_bar_width, X_PADDING};
surface->fillRect(Screen::get()->getRenderSurfaceData(), &rect_full, stringToColor("white"));
surface->fillRect(surface_data, &rect_full, stringToColor("white"));
Screen::get()->renderWithoutNotifier();
}