Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/events/cleanup_exit.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include "cub3d.h"

/**
* @brief Cleans up all game resources and exits program
*
* Destroys MLX resources (image, window, display) and frees game data.
* Called when user presses ESC or clicks window close button.
*
* @param game Pointer to game structure
*/
* @brief Cleans up all game resources and exits program
*
* Destroys MLX resources (image, window, display) and frees game data.
* Called when user presses ESC or clicks window close button.
*
* @param game Pointer to game structure
*/
void cleanup_exit(t_game *game)
{
if (!game)
Expand Down
32 changes: 16 additions & 16 deletions src/events/player_actions_move.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "cub3d.h"

/**
* @brief Moves player forward in current direction
*
* @param game Pointer to game structure
*/
* @brief Moves player forward in current direction
*
* @param game Pointer to game structure
*/
void move_forward(t_game *game)
{
static int frame_count = 0;
Expand All @@ -16,10 +16,10 @@ void move_forward(t_game *game)
}

/**
* @brief Moves player backward (opposite of current direction)
*
* @param game Pointer to game structure
*/
* @brief Moves player backward (opposite of current direction)
*
* @param game Pointer to game structure
*/
void move_backward(t_game *game)
{
static int frame_count = 0;
Expand All @@ -31,10 +31,10 @@ void move_backward(t_game *game)
}

/**
* @brief Strafes player to the left (perpendicular to direction)
*
* @param game Pointer to game structure
*/
* @brief Strafes player to the left (perpendicular to direction)
*
* @param game Pointer to game structure
*/
void strafe_left(t_game *game)
{
static int frame_count = 0;
Expand All @@ -46,10 +46,10 @@ void strafe_left(t_game *game)
}

/**
* @brief Strafes player to the right (perpendicular to direction)
*
* @param game Pointer to game structure
*/
* @brief Strafes player to the right (perpendicular to direction)
*
* @param game Pointer to game structure
*/
void strafe_right(t_game *game)
{
static int frame_count = 0;
Expand Down
16 changes: 8 additions & 8 deletions src/events/player_actions_rotate.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "cub3d.h"

/**
* @brief Rotates camera to the left
*
* @param game Pointer to game structure
*/
* @brief Rotates camera to the left
*
* @param game Pointer to game structure
*/
void rotate_left(t_game *game)
{
static int frame_count = 0;
Expand All @@ -16,10 +16,10 @@ void rotate_left(t_game *game)
}

/**
* @brief Rotates camera to the right
*
* @param game Pointer to game structure
*/
* @brief Rotates camera to the right
*
* @param game Pointer to game structure
*/
void rotate_right(t_game *game)
{
static int frame_count = 0;
Expand Down