- Reestructuració masiva del codi

- afegit el WAD del Doom 1
- Ja llegim FLATS i TEXTURES del WAD, falten els PATCH
This commit is contained in:
2026-02-26 17:15:52 +01:00
parent 7102535deb
commit 8dbcd4fcb7
13 changed files with 525 additions and 216 deletions

32
draw.h Normal file
View File

@@ -0,0 +1,32 @@
#pragma once
#include <stdint.h>
// Funcions de pintat
namespace draw
{
struct surface_t
{
uint8_t *pixels;
uint16_t w, h;
};
void init();
surface_t *newsurf(int w, int h);
surface_t *loadgif(const char* filename);
uint32_t *loadpal(const char* filename);
void setpal(uint32_t* pal);
void putp(int x, int y, uint8_t color);
void putpd(int x, int y, uint8_t color, float depth);
void putps(int x, int y, uint8_t color, float depth);
uint8_t getp(surface_t *surf, int x, int y);
void line(int x1, int y1, int x2, int y2, uint8_t color);
void render();
void flip();
namespace map
{
void putp(int x, int y, uint8_t color);
void line(int x1, int y1, int x2, int y2, uint8_t color);
}
}