some renames, nothing much

This commit is contained in:
Priec
2025-11-14 19:39:19 +01:00
parent b9ca8df59b
commit 4ed4452fae
6 changed files with 39 additions and 38 deletions

View File

@@ -3,26 +3,26 @@
#include "player_mask.h"
#include <cstdio>
void draw_player(int x, int y, PlayerFrame frame) {
void draw_character(int x, int y, CharacterFrame frame) {
int frame_index = static_cast<int>(frame);
if (frame_index < 0 || frame_index >= PLAYER_FRAME_COUNT)
if (frame_index < 0 || frame_index >= CHARACTER_FRAME_COUNT)
frame_index = 0; // fallback safety
const char **character = PLAYER_FRAMES[frame_index];
int character_height = 0;
switch (frame) {
case PlayerFrame::Walk1:
character_height = PLAYER_MASK_LINES_FRAME_1;
case CharacterFrame::Walk1:
character_height = CHARACTER_HEIGHT_1;
break;
case PlayerFrame::Walk2:
character_height = PLAYER_MASK_LINES_FRAME_2;
case CharacterFrame::Walk2:
character_height = CHARACTER_HEIGHT_2;
break;
case PlayerFrame::Crawl1:
character_height = PLAYER_MASK_LINES_FRAME_3;
case CharacterFrame::Crawl1:
character_height = CHARACTER_HEIGHT_3;
break;
default:
character_height = PLAYER_MASK_LINES_FRAME_1;
character_height = CHARACTER_HEIGHT_1;
break;
}