null check to squash bug. some gfx

This commit is contained in:
t. boddy 2026-02-15 15:57:58 -05:00
parent 19258268b0
commit a3f0474ec9
11 changed files with 60 additions and 42 deletions

View file

@ -5,7 +5,7 @@
#define PLAYER_ACCEL PLAYER_SPEED >> 3
#define PLAYER_ACCEL_FOCUS PLAYER_SPEED_FOCUS >> 3
#define PLAYER_OFF 16
#define PLAYER_OFF 24
#define PLAYER_BOUND_Y FIX32(PLAYER_OFF)
#define PLAYER_BOUND_H FIX32(224 - PLAYER_OFF)
@ -84,6 +84,8 @@ static void boundsPlayer(){
player.camera += GAME_WRAP;
}
player.yCamera = (fix32ToInt(player.pos.y) - FIX16(112)) >> 2;
}
static void cameraPlayer(){
@ -120,6 +122,7 @@ void loadPlayer(){
fix32ToInt(player.pos.x) - PLAYER_OFF,
fix32ToInt(player.pos.y) - PLAYER_OFF,
TILE_ATTR(PAL0, 0, 0, 0));
player.yCamera = (fix32ToInt(player.pos.y) - FIX16(112)) >> 2;
}
void updatePlayer(){
@ -134,5 +137,5 @@ void updatePlayer(){
SPR_setPosition(player.image, sx - PLAYER_OFF, sy - PLAYER_OFF);
intToStr(fix32ToInt(player.pos.x), debugStr, 1);
// intToStr(fix32ToInt(player.pos.x), debugStr, 1);
}