Debug visualization and information tools. More...
#include <debug.h>#include <app.h>#include <colliders.h>#include <interactable.h>#include <stdio.h>#include <UI_text.h>#include <camera.h>#include <maps.h>#include <player.h>Macros | |
| #define | PLAYER_HITBOX_COLOR 0, 255, 0, 255 |
| Color constants for hitbox visualization. | |
| #define | WALL_HITBOX_COLOR 255, 255, 0, 255 |
| #define | ENEMY_HITBOX_COLOR 255, 0, 0, 255 |
| #define | ITEM_HITBOX_COLOR 0, 255, 255, 255 |
| #define | ENEMY_PROJECTILE_HITBOX_COLOR 255, 0, 255, 255 |
| #define | PLAYER_PROJECTILE_HITBOX_COLOR 0, 0, 255, 255 |
Functions | |
| void | Debug_RenderHitboxes () |
| [Render] Renders all active hitboxes when debug mode is enabled | |
| void | Debug_RenderFPSCount () |
| [Render] Renders the current FPS counter in the top-left corner | |
| void | Debug_RenderSpikeCount () |
| [Render] Renders a counter of frame spikes (frames exceeding target time) | |
| void | Debug_RenderCurrentChunk () |
| [Render] Renders information about the current chunk the player is in | |
Debug visualization and information tools.
Provides functionality for rendering debug information like hitboxes, FPS counters, and other metrics when debug mode is enabled.
| #define ENEMY_HITBOX_COLOR 255, 0, 0, 255 |
| #define ENEMY_PROJECTILE_HITBOX_COLOR 255, 0, 255, 255 |
| #define ITEM_HITBOX_COLOR 0, 255, 255, 255 |
| #define PLAYER_HITBOX_COLOR 0, 255, 0, 255 |
Color constants for hitbox visualization.
| #define PLAYER_PROJECTILE_HITBOX_COLOR 0, 0, 255, 255 |
| #define WALL_HITBOX_COLOR 255, 255, 0, 255 |
| void Debug_RenderCurrentChunk | ( | ) |
[Render] Renders information about the current chunk the player is in
Renders information about the current chunk.
Shows the coordinates of the current chunk and the next chunk in the main path.
| void Debug_RenderFPSCount | ( | ) |
[Render] Renders the current FPS counter in the top-left corner
Renders the current FPS count.
Creates and updates a text element showing the current frames per second.
| void Debug_RenderHitboxes | ( | ) |
[Render] Renders all active hitboxes when debug mode is enabled
Renders the hitboxes of game objects.
Iterates through all registered colliders and draws their hitboxes with different colors based on their collision layer.
| void Debug_RenderSpikeCount | ( | ) |
[Render] Renders a counter of frame spikes (frames exceeding target time)
Renders the current spike count.
Tracks and displays the number of frames that took longer than the target frame time (frames with fps below 30).