From ecb493f9c890de715cef1f9b9e278bc93c063d1e Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Wed, 19 Feb 2025 12:45:13 +0100 Subject: [PATCH] - [CHG] surface.cls(color) ompli del color especificat tota la surface --- mini.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mini.cpp b/mini.cpp index f30f443..966c3cf 100644 --- a/mini.cpp +++ b/mini.cpp @@ -499,12 +499,13 @@ void simple_pset(int x, int y, uint8_t color) { void cls(uint8_t color) { const uint8_t col = ds::draw_palette[color]; - for (int y=ds::clip[1]; y<=ds::clip[3];++y) { + /*for (int y=ds::clip[1]; y<=ds::clip[3];++y) { for (int x=ds::clip[0]; x<=ds::clip[2];++x) { simple_pset(x,y,col); } - } - //SDL_memset(dest_surface->p, color, dest_surface->size); + }*/ + + SDL_memset(dest_surface->p, color, dest_surface->size); } void color(uint8_t color) {