-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stack overflow causing fps counter to go wild.
- Loading branch information
1 parent
2b091df
commit d6074e4
Showing
3 changed files
with
23 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
/* ************************************************************************** */ | ||
/**/ | ||
/* :::::::: */ | ||
/* */ | ||
/* :::::::: */ | ||
/* meta.h :+: :+: */ | ||
/*+:+ */ | ||
/* By: jboeve <[email protected]>+#+ */ | ||
/* +#+ */ | ||
/* Created: 2023/11/01 20:07:37 by jboeve#+##+# */ | ||
/* Updated: 2024/01/29 15:27:32 by yesimzaim ######## odam.nl */ | ||
/**/ | ||
/* +:+ */ | ||
/* By: joppe <[email protected]> +#+ */ | ||
/* +#+ */ | ||
/* Created: 2024/02/05 14:01:44 by joppe #+# #+# */ | ||
/* Updated: 2024/02/05 14:01:52 by joppe ######## odam.nl */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
||
|
||
#ifndef META_H | ||
#define META_H | ||
|
||
|
@@ -232,12 +234,12 @@ typedef struct s_meta { | |
t_timer update_timer; | ||
t_minimap minimap; | ||
t_timer fps_timer; | ||
t_player player; | ||
uint32_t fps; | ||
t_map map; | ||
t_attr attributes; | ||
const char *scene_name; | ||
t_flag *elements; | ||
t_player player; | ||
} t_meta; | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: yzaim <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/01/08 15:27:23 by yzaim #+# #+# */ | ||
/* Updated: 2024/01/25 16:02:17 by jboeve ######## odam.nl */ | ||
/* Updated: 2024/02/05 14:03:01 by joppe ######## odam.nl */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -115,8 +115,8 @@ void player_raycast(t_player *p) | |
ray_start = vec2d_add(p->direction, vec2d_scalar_product(p->cam_plane, camera_x)); | ||
p->rays[col] = raycaster_cast(p->position, ray_start, bound_check, p->meta); | ||
// printf("wall x: %f\n", p->rays[col].wall_x); | ||
col++; | ||
p->z_buffer[col] = p->rays[col].length; | ||
col++; | ||
} | ||
|
||
sprite_calculate(p); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters