changed rgb deal, and improve memorybook with 2d

This commit is contained in:
hugogogo
2022-05-01 22:55:00 +02:00
parent 43852938c4
commit eb5f2db7fa
9 changed files with 60 additions and 54 deletions

View File

@@ -1,6 +1,6 @@
#include "cube3d.h"
void draw_floor_ceiling(t_game *game, t_rcast *rcast)
void draw_floor_ceiling(t_game *game, t_rcast *rcast, t_txt *txt)
{
t_vec plan;
@@ -10,20 +10,20 @@ void draw_floor_ceiling(t_game *game, t_rcast *rcast)
{
plan.start.y = rcast->screen_height;
plan.end.y = rcast->wall.start.y;
draw_line(&game->img, &plan, 0x00FF0000);
draw_line(&game->img, &plan, txt->rgb_floor);
}
if (rcast->wall.start.y < rcast->screen_height)
{
plan.start.y = rcast->wall.end.y;
plan.end.y = 0;
draw_line(&game->img, &plan, 0x000000FF);
draw_line(&game->img, &plan, txt->rgb_ceiling);
}
}
void draw_column(t_game *game, t_rcast *rcast)
{
int color;
draw_floor_ceiling(game, rcast);
draw_floor_ceiling(game, rcast, &game->txt);
color = 0x00FF00FF;
if (rcast->is_x)
color = 0x00EE00EE;