-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completed basic sprite system; removed redundant documents
- Loading branch information
Showing
6 changed files
with
91 additions
and
31 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -50,7 +50,9 @@ PUB main | |
DAT | ||
org 0 | ||
|
||
tester mov temp, par | ||
tester mov time, cnt | ||
add time, delay | ||
loop mov temp, par | ||
wrlong satt0, temp | ||
add temp, #4 | ||
wrlong satt1, temp | ||
|
@@ -66,20 +68,46 @@ tester mov temp, par | |
wrlong satt6, temp | ||
add temp, #4 | ||
wrlong satt7, temp | ||
loop jmp #loop | ||
|
||
waitcnt time, delay | ||
mov temp, satt2 | ||
shr temp, #7 | ||
and temp, #255 | ||
add temp, #1 | ||
and temp, #255 | ||
shl temp, #7 | ||
and satt2, ymask | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
cspang1
Author
Owner
|
||
or satt2, temp | ||
|
||
mov temp, satt5 | ||
shr temp, #15 ' Shift horizontal position to LSB | ||
and temp, #511 ' Mask out horizontal position | ||
add temp, #3 | ||
and temp, #511 | ||
shl temp, #15 | ||
and satt5, xmask | ||
This comment has been minimized.
Sorry, something went wrong. |
||
or satt5, temp | ||
|
||
jmp #loop | ||
|
||
' sprite x position y position color v h size | ||
' |<------------->|<--------------->|<------------->|<--->|-|-|<->| | ||
' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | ||
satt0 long %0_0_0_0_0_0_0_0_1_0_1_0_0_0_0_0_0_1_0_0_0_0_0_0_0_0_0_0_0_0_0_0 | ||
satt1 long %0_0_0_0_0_0_0_0_1_0_1_0_0_0_0_0_0_0_1_0_0_0_0_0_0_0_0_0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_1_1_1_0_0_0_0_0_0_0 | ||
|
||
ymask long %1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_0_0_0_0_0_0_0_0_1_1_1_1_1_1_1 | ||
xmask long %1_1_1_1_1_1_1_1_0_0_0_0_0_0_0_0_0_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1 | ||
|
||
delay long 1500000 | ||
|
||
time res 1 | ||
temp res 1 | ||
|
||
fit | ||
|
@@ -200,11 +228,11 @@ sprite_ship long $0_0_0_0_1_0_0_0 ' Sprite 0 | |
|
||
sprite_color_palettes | ||
' Sprite color palettes | ||
s_palette0 byte %00000011,%11000011,%00001111,%11111111 ' Tile color palette 0 | ||
s_palette0 byte %00000000,%00110011,%11000011,%11111111 ' Tile color palette 0 | ||
byte %11110011,%00111111,%11001111,%11000011 | ||
byte %11010011,%00110111,%01001111,%01111011 | ||
byte %11010111,%01110111,%01011111,%00000011 | ||
s_palette1 byte %00000011,%00110011,%11111111,%11000011 ' Tile color palette 1 | ||
s_palette1 byte %00000000,%00110011,%11111111,%11000011 ' Tile color palette 1 | ||
byte %00000011,%00110011,%11111111,%11000011 | ||
byte %00000011,%00110011,%11111111,%11000011 | ||
byte %00000011,%00110011,%11111111,%11000011 |
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
You might want to shorten that: