a bunch of shit

This commit is contained in:
2026-02-13 22:53:09 +01:00
parent 0c1541e98c
commit 7c03b1b81d
11 changed files with 242 additions and 40 deletions
-1
View File
@@ -2,7 +2,6 @@
#define DELTA_ENTITY
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "renderer/camera.hpp"
#include "math.hpp"
+3 -3
View File
@@ -1,8 +1,8 @@
#ifndef DELTA_GLOBALS
#define DELTA_GLOBALS
const int SIMULATED_WIDTH = 1200;
const int SIMULATED_HEIGHT = 800;
const int FOCAL = 200;
const int SIMULATED_WIDTH = 1920;
const int SIMULATED_HEIGHT = 1080;
const int FOCAL = 300;
#endif
+6
View File
@@ -37,4 +37,10 @@ class DeltaVector3 {
float getDeterminant(const DeltaVector2 &pointA, const DeltaVector2 &pointB, const DeltaVector2 &candidate);
struct DeltaTriangle {
DeltaVector3 a, b, c;
};
uint32_t SDLColorToUint32(SDL_Color color);
#endif
-1
View File
@@ -2,7 +2,6 @@
#define DELTA_PLAYER
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "renderer/camera.hpp"
#include "entity.hpp"
+3 -1
View File
@@ -6,5 +6,7 @@
#include "math.hpp"
void rasterizeTriangle(SDL_Renderer *renderer, const DeltaVector2 &a, const DeltaVector2 &b, const DeltaVector2 &c);
void rasterizeTriangleFast(SDL_Surface* surface, const DeltaVector2& v0, const DeltaVector2& v1, const DeltaVector2& v2, uint32_t color);
void rasterizeTriangleSurface(SDL_Surface* surface, const DeltaVector2& a, const DeltaVector2& b, const DeltaVector2& c, uint32_t color);
void setPixel(SDL_Surface* surface, int x, int y, uint32_t color);
#endif