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

@@ -4,20 +4,20 @@
#include <cstdio>
// Convert a pivot coordinate (bottom-left) to the top-left draw position
PlayerPosition get_aligned_frame_position(PlayerPosition base, PlayerFrame frame) {
CharacterPosition get_aligned_frame_position(CharacterPosition base, 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;
int character_height = 0;
if (frame_index == 0)
character_height = PLAYER_MASK_LINES_FRAME_1;
character_height = CHARACTER_HEIGHT_1;
else if (frame_index == 1)
character_height = PLAYER_MASK_LINES_FRAME_2;
character_height = CHARACTER_HEIGHT_2;
else
character_height = PLAYER_MASK_LINES_FRAME_3;
character_height = CHARACTER_HEIGHT_3;
PlayerPosition draw_pos;
CharacterPosition draw_pos;
draw_pos.x = base.x;
draw_pos.y = (VIEW_HEIGHT - base.y) - character_height;