Need the textures for the game. NOTOWNEDBYME.
This commit is contained in:
parent
b18b27e23c
commit
1b7763167c
12 changed files with 3 additions and 11 deletions
|
@ -57,8 +57,8 @@ double planeY = 0.66;
|
|||
#define gray_color(c) rgba_color(c, c, c, 255)
|
||||
|
||||
std::vector<uint32_t> texture[8];
|
||||
#define texWidth 64
|
||||
#define texHeight 64
|
||||
#define texWidth 64 // must be power of two
|
||||
#define texHeight 64 // must be power of two
|
||||
|
||||
#define pixcoord(X, Y) ((Y) * SCREEN_HEIGHT) + (X)
|
||||
|
||||
|
@ -285,22 +285,14 @@ void ray_casting(sf::RenderWindow &window, Matrix& map) {
|
|||
}
|
||||
|
||||
void draw_ceiling_floor(sf::RenderWindow &window) {
|
||||
draw_pixel_rect(window,
|
||||
{size_t(SCREEN_WIDTH / 2), size_t(SCREEN_HEIGHT / 2)},
|
||||
{size_t(SCREEN_WIDTH / 2), size_t(SCREEN_HEIGHT / 2)},
|
||||
gray_color(200));
|
||||
|
||||
draw_pixel_rect(window,
|
||||
{size_t(SCREEN_WIDTH / 2), 0},
|
||||
{size_t(SCREEN_HEIGHT), size_t(SCREEN_HEIGHT / 2 + PITCH)},
|
||||
gray_color(100));
|
||||
}
|
||||
|
||||
void draw_everything(sf::RenderWindow &window) {
|
||||
clear(window);
|
||||
draw_map(window, MAP);
|
||||
draw_ceiling_floor(window);
|
||||
ray_casting(window, MAP);
|
||||
//ray_casting(window, MAP);
|
||||
draw_pixel_buffer(window);
|
||||
window.display();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue