Skip to content

Commit c394751

Browse files
committed
feature: doublebuffer quickflip added
1 parent b8e079b commit c394751

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

includes/std_routines.asm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,10 +2306,6 @@ flipdisplaybuffer
23062306

23072307
jsr terminatedisplaybuffer ; terminate the working buffer before we flip
23082308

2309-
lda doublebufferstate
2310-
lsr ; /2, so we'll see 0 or 1, rather than 1 or 3
2311-
tax
2312-
23132309
; ensure we don't flip mid-display. otherwise the displayed DL will be the one the game is working on.
23142310

23152311
flipdisplaybufferwait1
@@ -2320,6 +2316,11 @@ flipdisplaybufferwait
23202316
lda visibleover
23212317
bne flipdisplaybufferwait
23222318

2319+
quickbufferflip
2320+
lda doublebufferstate
2321+
lsr ; /2, so we'll see 0 or 1, rather than 1 or 3
2322+
tax
2323+
23232324
lda doublebufferminimumframetarget
23242325
beq skipminimumframecode
23252326
lda doublebufferminimumframeindex

statements.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10686,8 +10686,8 @@ void adjustvisible (char **statement)
1068610686

1068710687
void doublebuffer (char **statement)
1068810688
{
10689-
// 1 2 3
10690-
// doublebuffer [on/off/flip] [minimumframe]
10689+
// 1 2 3
10690+
// doublebuffer [on/off/flip/quickflip] [minimumframe]
1069110691
assertminimumargs (statement, "adjustvisible", 1);
1069210692

1069310693
// enable the compile-time optional code
@@ -10714,6 +10714,10 @@ void doublebuffer (char **statement)
1071410714
{
1071510715
printf (" jsr flipdisplaybuffer\n");
1071610716
}
10717+
else if (strcmp (statement[2], "quickflip") == 0)
10718+
{
10719+
printf (" jsr quickbufferflip\n");
10720+
}
1071710721
else
1071810722
{
1071910723
prerror ("doublebuffer argument needs to be 'on' or 'off'");

0 commit comments

Comments
 (0)