|
| t_data * | cub_init (t_data *data) |
| | Initialize map and backbuffer for rendering.
|
| |
| int | cub_translate_map (t_data *data) |
| | Convert 2d map string to int vector.
|
| |
| int | cub3d_init_render (t_data *data) |
| | Init cub for rendering.
|
| |
| void | cub_render (t_data *data) |
| | Main rendering function.
|
| |
| void | cub_loop (t_data *data) |
| | Main loop function. Handles player update logic and rendering.
|
| |
| void | cub_player_update (t_data *data) |
| | Updates player based on input.
|
| |
| void | cub_render_minimap (t_data *data) |
| | Render the minimap.
|
| |
| void | draw_column (t_data *data, int x, const t_raydata *rdata) |
| | Draw a column of pixels from a raycast result.
|
| |
| void | hitwall_loop (const t_data *data, t_raydata *rdata) |
| | Check which wall will be hit.
|
| |
| t_img * | hitside_texture (t_textures *tex, int hitside, const t_pos2 *step) |
| | Function to select the texture based on the hit side and step direction.
|
| |
| void | raycalc (const t_pos2 win_size, int x, float cam_angle, t_raydata *rdata) |
| | Function to calculate rays using window size and camera angle.
|
| |
| void | cubmlx_clear (t_mlx *mlx, unsigned int color) |
| | Clear the backbuffer with a specific color.
|
| |
| void | cubmlx_putpixel (t_data *data, int x, int y, unsigned int color) |
| | Puts a pixel onto the backbuffer.
|
| |
| void | cubmlx_putvertline (t_data *data, t_pos2 pos, int len, unsigned int color) |
| | Puts a vertical line on the backbuffer. Optimized for vertical lines.
|
| |
| void | cubmlx_putrect (t_data *data, t_pos2 pos, t_pos2 size, unsigned int color) |
| | Puts a rectangle onto the backbuffer.
|
| |
| void | cubmlx_putline (t_data *data, t_pos2 p1, t_pos2 p2, unsigned int color) |
| | Puts a line onto the backbuffer.
|
| |
| void | solve_collision_x (t_data *data, float x_vel) |
| | Solver of collision on x axis.
|
| |
| void | solve_collision_y (t_data *data, float y_vel) |
| | Solver of collision on y axis.
|
| |
| void | resolve_collision_steps (t_data *data, float vel_x, float vel_y) |
| | Solver of collision on x and y using steps smaller than 1 unit, To use only when moving faster than 1 unit, when MOVEMENT_SPEED_FWD_BWD >= 1.0f or MOVEMENT_SPEED_LEFT_RIGHT >= 1.0f.
|
| |
| float | absf (float n) |
| | Returns the absolute value of a float.
|
| |
| int | abs (int n) |
| | Returns the absolute value of an int.
|
| |
| int | max (int a, int b) |
| | Returns the highest value between a and b.
|
| |
| double | mind (double a, double b) |
| | Returns the lowest value between doubles a and b.
|
| |
| t_vec2 | vec2rotate (t_vec2 vec, float angle) |
| | Returns a new vector rotated according to the angle.
|
| |