Finished the first pass of moving everything around and cleaning up as much as possible.
This commit is contained in:
parent
d47f6f996d
commit
adfb6367d7
9 changed files with 163 additions and 87 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <fmt/core.h>
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <SFML/Graphics/Image.hpp>
|
||||
#include <numbers>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
@ -11,38 +10,11 @@
|
|||
#include <array>
|
||||
#include "dbc.hpp"
|
||||
#include <memory>
|
||||
#include "texture.hpp"
|
||||
|
||||
using matrix::Matrix;
|
||||
|
||||
struct Sprite {
|
||||
double x;
|
||||
double y;
|
||||
int texture;
|
||||
// ZED: this should be a separate transform parameter
|
||||
double elevation=0;
|
||||
int uDiv=1;
|
||||
int vDiv=1;
|
||||
};
|
||||
|
||||
using RGBA = uint32_t;
|
||||
|
||||
struct TexturePack {
|
||||
int NUM_SPRITES=1;
|
||||
int NUM_TEXTURES=11;
|
||||
int TEXTURE_WIDTH=256; // must be power of two
|
||||
int TEXTURE_HEIGHT=256; // must be power of two
|
||||
|
||||
std::vector<std::vector<uint32_t>> images;
|
||||
std::vector<Sprite> SPRITE{{4.0, 3.55, 8}};
|
||||
const int floor = 3;
|
||||
const int ceiling = 6;
|
||||
|
||||
void load_textures();
|
||||
std::vector<uint32_t> load_image(const char *filename);
|
||||
Sprite &get_sprite(size_t sprite_num);
|
||||
std::vector<uint32_t>& get(size_t num);
|
||||
};
|
||||
|
||||
struct Raycaster {
|
||||
int PITCH=0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue