transfered from codeberg

This commit is contained in:
2026-03-26 14:46:39 -05:00
parent 630f28bb7e
commit 5ed2173793
136 changed files with 14932 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#include "player_renderer.h"
#include "player.h"
#include "raylib.h"
/**
* Renders the third-person representation of the player character,
* including the 3D model, animations, and equipped items.
*/
void draw_player(struct player_struct *player) {
highlight_block_being_watched(player);
}
/**
* Renders a 3D wireframe or highlight effect around the voxel
* currently targeted by the player's view ray.
*/
void highlight_block_being_watched(struct player_struct *player) {
if (player->should_highlight_block)
{
DrawCubeWires(player->block_being_watched, 1.02f, 1.02f, 1.02f, BLACK);
}
}

View File

@@ -0,0 +1,18 @@
#ifndef player_renderer_h
#define player_renderer_h
struct player_struct;
/**
* Renders the third-person representation of the player character,
* including the 3D model, animations, and equipped items.
*/
void draw_player(struct player_struct *player);
/**
* Renders a 3D wireframe or highlight effect around the voxel
* currently targeted by the player's view ray.
*/
void highlight_block_being_watched(struct player_struct *player);
#endif