- [NEW] Projecte ficat al dia

This commit is contained in:
2025-10-16 16:56:02 +02:00
parent cbe7d36299
commit 4695a8e8a5
6 changed files with 26 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
#include "grafix.h"
#include <SDL2/SDL.h>
#include "gif.c"
#include "gif.h"
#include "crt.h"
namespace draw
@@ -15,7 +15,7 @@ namespace draw
void init(const char* titol, const uint16_t width, const uint16_t height, const uint8_t zoom)
{
// Inicialització de les estructures de SDL
sdl_window = SDL_CreateWindow(titol, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width * zoom, height * zoom, SDL_WINDOW_SHOWN);
sdl_window = SDL_CreateWindow(titol, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width * zoom, height * zoom, SDL_WINDOW_SHOWN);
sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0);
sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, width, height);