Ya se dibuja correctamente el gif en la pantalla

This commit is contained in:
2024-02-07 17:45:22 +01:00
parent 7cd5fec3f8
commit 250efd69bf
3 changed files with 12 additions and 10 deletions

View File

@@ -13,9 +13,9 @@ static jSurface jScreen;
static jSurface jDestSurf;
static jSurface jSourceSurf = NULL;
static Uint32 paleta[256];
static int jWidth = 320;
static int jHeight = 240;
static int transparentColor = 0;
static int jWidth = 256;
static int jHeight = 128;
static int transparentColor = 255;
void pInit(SDL_Renderer *renderer, int w, int h)
{
@@ -140,8 +140,8 @@ void pFlip(SDL_Renderer *renderer)
for (int i = 0; i < jWidth * jHeight; ++i)
pixels[i] = paleta[jScreen->data[i]];
SDL_UnlockTexture(jTex);
SDL_RenderCopy(renderer, jTex, NULL, NULL);
//SDL_RenderPresent(jRen);
SDL_Rect rect = {0,64,256,128};
SDL_RenderCopy(renderer, jTex, NULL, &rect);
}
void pPutPixel(int x, int y, Uint8 color)