From 1442bf79a2008a5e7f6a72138a29bbe4354a28e3 Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Tue, 7 Jul 2026 01:11:34 -0500 Subject: [PATCH] Working on performance. Still. --- stRender.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stRender.c b/stRender.c index bdab0cf..250f080 100644 --- a/stRender.c +++ b/stRender.c @@ -107,7 +107,8 @@ #define ST_PASSENGER_CEL_BOARD0 2 /* maps to C64 ptr $C6 */ #define ST_PASSENGER_CEL_SPARKLE 8 /* C64 ptr $D9 -- 3rd sparkle cel */ -#define ST_SPRITE_BACKUP_BYTES (((ST_TAXI_W_PX >> 1) + 4) * ST_TAXI_H_PX) +// Library-wide worst case (16-px-group window on planar ports). +#define ST_SPRITE_BACKUP_BYTES JOEY_SPRITE_BACKUP_BYTES(ST_TAXI_W_PX / 8, ST_TAXI_H_PX / 8) typedef struct { @@ -119,16 +120,16 @@ typedef struct { jlSpriteT *warpCels[ST_WARP_CEL_COUNT]; jlSpriteT *flameCels[ST_FLAME_CEL_COUNT]; jlSpriteBackupT flameBackup; - uint8_t flameBackupMem[ST_SPRITE_BACKUP_BYTES]; + uint8_t flameBackupMem[ST_SPRITE_BACKUP_BYTES] __attribute__((aligned(2))); bool flameHasBackup; jlSpriteT *passengerCels[ST_PASSENGER_CEL_COUNT]; jlSurfaceT *fontSurface; // glyph surface, built from font.tbk at load uint16_t asciiMap[128]; bool fontReady; jlSpriteBackupT taxiBackup; - uint8_t taxiBackupMem[ST_SPRITE_BACKUP_BYTES]; + uint8_t taxiBackupMem[ST_SPRITE_BACKUP_BYTES] __attribute__((aligned(2))); jlSpriteBackupT passengerBackup[ST_MAX_PASSENGERS]; - uint8_t passengerBackupMem[ST_MAX_PASSENGERS][ST_SPRITE_BACKUP_BYTES]; + uint8_t passengerBackupMem[ST_MAX_PASSENGERS][ST_SPRITE_BACKUP_BYTES] __attribute__((aligned(2))); bool taxiHasBackup; bool passengerHasBackup[ST_MAX_PASSENGERS]; // Tilemap repaint gating: the static playfield art only needs to