-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added background buffers, updated routines to use them
- Loading branch information
1 parent
81ec666
commit 82a0249
Showing
11 changed files
with
92 additions
and
12 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.thumb | ||
|
||
push {r4-r7} | ||
mov r7,#0 | ||
ldr r4,=bgTilemapsBuffer | ||
ldr r5,=bgTilemaps | ||
|
||
loop1: | ||
mov r6,r7 | ||
lsl r6,#2 | ||
mov r2,#0 | ||
ldr r3,=#0x5000 | ||
ldr r0,=#0x02000000 | ||
add r0,#0x10 | ||
ldrb r0,[r0,r7] | ||
cmp r0,#0 | ||
beq next | ||
ldr r0,[r4,r6] | ||
cmp r0,#0 | ||
beq next | ||
ldr r1,[r5,r6] | ||
cmp r1,#0 | ||
beq next | ||
loop2: | ||
ldr r6,[r0,r2] | ||
str r6,[r1,r2] | ||
cmp r2,r3 | ||
beq next | ||
add r2,#4 | ||
b loop2 | ||
next: | ||
add r7,#1 | ||
cmp r7,#4 | ||
beq End | ||
b loop1 | ||
|
||
End: | ||
pop {r4-r7} | ||
bx lr |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
$02000000 SHORT Snake current size | ||
$02000002 BYTE Snake facing direction | ||
$02000003 BYTE Game speed | ||
$02000004 BYTE Counter | ||
$02000005 BYTE Buttons being pressed | ||
$02000006 SHORT Egg coordinates | ||
$02000008 WORD RNG seed | ||
$0200000C BYTE This byte is set after the first time RNG is used | ||
$0200000D BYTE Game state | ||
$0200000E SHORT Snake new size | ||
$02000010 BYTE Update background map 0 flag | ||
$02000011 BYTE Update background map 1 flag | ||
$02000012 BYTE Update background map 2 flag | ||
$02000013 BYTE Update background map 3 flag | ||
... | ||
$02000020 LIST Snake body piece coordinates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters