possibility to choose angle of view
This commit is contained in:
@@ -75,7 +75,9 @@ void draw_line(t_game *game, t_vec vec, int color)
|
||||
{
|
||||
t_coord incr;
|
||||
t_coord pos;
|
||||
int cell;
|
||||
|
||||
cell = game->map.cell;
|
||||
incr.x = 0;
|
||||
pos.x = 0;
|
||||
pos.y = 0;
|
||||
@@ -85,19 +87,19 @@ void draw_line(t_game *game, t_vec vec, int color)
|
||||
while ((game->map.content)[incr.x][incr.y])
|
||||
{
|
||||
if ((game->map.content)[incr.x][incr.y] == '1' )
|
||||
draw_square(game, pos, 0x00999999, 0x00000000, CELL, 0);
|
||||
draw_square(game, pos, 0x00999999, 0x00000000, cell, 0);
|
||||
else
|
||||
draw_square(game, pos, 0x00555555, 0x00333333, CELL, 0);
|
||||
draw_square(game, pos, 0x00555555, 0x00333333, cell, 0);
|
||||
(incr.y)++;
|
||||
pos.x += CELL;
|
||||
pos.x += cell;
|
||||
}
|
||||
(incr.x)++;
|
||||
pos.x = 0;
|
||||
pos.y += CELL;
|
||||
pos.y += cell;
|
||||
}
|
||||
pos.x = game->plr.pos.x - CELL / 2;
|
||||
pos.y = game->plr.pos.y - CELL / 2;
|
||||
draw_square(game, pos, 0x00999900, 0x00330033, CELL, 1);
|
||||
pos.x = game->plr.pos.x - cell / 2;
|
||||
pos.y = game->plr.pos.y - cell / 2;
|
||||
draw_square(game, pos, 0x00999900, 0x00330033, cell, 1);
|
||||
}
|
||||
|
||||
static void draw_screen(t_game *game, t_rcast *rcast)
|
||||
|
||||
Reference in New Issue
Block a user