From: Lukas Krickl Date: Wed, 24 Sep 2025 09:20:14 +0000 (+0200) Subject: video: fixed oam flickering when frame is skipped X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=a3491697a5b59c74fcc33159a31ce3d32c595691;p=gbrg%2F.git video: fixed oam flickering when frame is skipped --- diff --git a/src/defs.s b/src/defs.s index 235030b..5a722cc 100644 --- a/src/defs.s +++ b/src/defs.s @@ -13,9 +13,9 @@ #define NULL 0 -#define ACTS_MAX 32 +#define ACTS_MAX 12 #define MAP_OBJ_MAX 32 -#define RECT_MAX 32 +#define RECT_MAX 12 #define MAP_ROW_H 16 ; pixels per row diff --git a/src/video.s b/src/video.s index ec390d0..833dafb 100644 --- a/src/video.s +++ b/src/video.s @@ -5,19 +5,20 @@ ; vblank handler vblank: push_all + + ; enable objects + ld a, [RLCD] + or a, LCDCF_OBJON + ld [RLCD], a - ; get inputs - call poll_inputs ; skip if update has not yet finished ld a, [frame_ready] cp a, 1 jp z, @skip_rest - ; enable objects - ld a, [RLCD] - or a, LCDCF_OBJON - ld [RLCD], a + ; get inputs + call poll_inputs call video_map_perform_scroll