Amit's code mostly converted to use the new texture.hpp but there's an error on line amt/pixel.hpp:472
This commit is contained in:
parent
c91e8fc543
commit
4d31a4daf2
9 changed files with 98 additions and 92 deletions
|
@ -10,40 +10,12 @@
|
|||
#include <cstdlib>
|
||||
#include <array>
|
||||
#include "dbc.hpp"
|
||||
#include "pixel.hpp"
|
||||
#include "amt/pixel.hpp"
|
||||
#include "amt/texture.hpp"
|
||||
#include <memory>
|
||||
|
||||
using Matrix = amt::Matrix<int>;
|
||||
|
||||
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<amt::PixelBuf> images;
|
||||
std::vector<Sprite> SPRITE{{4.0, 3.55, 8}};
|
||||
const int floor = 3;
|
||||
const int ceiling = 6;
|
||||
|
||||
void load_textures();
|
||||
amt::PixelBuf load_image(const char *filename);
|
||||
Sprite &get_sprite(size_t sprite_num);
|
||||
amt::PixelBuf& get(size_t num);
|
||||
};
|
||||
|
||||
struct Raycaster {
|
||||
int PITCH=0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue