This repository has been archived by the owner on Jun 5, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Can display and animate the snowfox sprite with tail
- Loading branch information
1 parent
8c0a4ea
commit be99d97
Showing
9 changed files
with
523 additions
and
34 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
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
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,41 @@ | ||
; GRAPHICS DATA | ||
SECTION "GFX",ROMX,BANK[1] | ||
gfx_start: | ||
|
||
gfx_arcticfox_standing: | ||
arcticfox_standing_tile EQU 0 | ||
incbin "gfx/bin/arcticfox-standing.png.bin" | ||
|
||
gfx_arcticfox_tail0000: | ||
arcticfox_tail_tile EQU ((gfx_arcticfox_tail0000 - gfx_arcticfox_standing) / 16) | ||
incbin "gfx/bin/arcticfox-tail0000.png.bin" | ||
|
||
gfx_arcticfox_tail0001: | ||
;arcticfox_tail0001_tile RB (gfx_arcticfox_tail0001 - gfx_arcticfox_tail0000) / 64 | ||
incbin "gfx/bin/arcticfox-tail0001.png.bin" | ||
|
||
gfx_arcticfox_tail0002: | ||
;arcticfox_tail0002_tile RB (gfx_arcticfox_tail0002 - gfx_arcticfox_tail0001) / 64 | ||
incbin "gfx/bin/arcticfox-tail0002.png.bin" | ||
|
||
gfx_arcticfox_tail0003: | ||
;arcticfox_tail0003_tile RB (gfx_arcticfox_tail0003 - gfx_arcticfox_tail0002) / 64 | ||
incbin "gfx/bin/arcticfox-tail0003.png.bin" | ||
|
||
gfx_arcticfox_thinking0000: | ||
arcticfox_thinking_tile EQU arcticfox_tail_tile + ((gfx_arcticfox_thinking0000 - gfx_arcticfox_tail0000) / 16) | ||
;arcticfox_thinking0000_tile RB (gfx_arcticfox_thinking0000 - gfx_arcticfox_tail0003) / 64 | ||
incbin "gfx/bin/arcticfox-thinking0000.png.bin" | ||
|
||
gfx_arcticfox_thinking0001: | ||
;arcticfox_thinking0001_tile RB (gfx_arcticfox_thinking0001 - gfx_arcticfox_thinking0000) / 64 | ||
incbin "gfx/bin/arcticfox-thinking0001.png.bin" | ||
|
||
gfx_gecko_standing: | ||
incbin "gfx/bin/gecko-standing.png.bin" | ||
gfx_gecko_thinking0000: | ||
incbin "gfx/bin/gecko-thinking0000.png.bin" | ||
gfx_gecko_thinking0001: | ||
incbin "gfx/bin/gecko-thinking0001.png.bin" | ||
gfx_end: | ||
SECTION "ENDGFX",ROM0 |
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
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,93 @@ | ||
; http://map.grauw.nl/articles/mult_div_shifts.php | ||
|
||
;Multiply 8-bit values | ||
;In: Multiply H with E | ||
;Out: HL = result | ||
;Clobbers: d, b, l | ||
Mult8: | ||
ld d,0 | ||
ld l,d | ||
ld b,8 | ||
Mult8_Loop: | ||
add hl,hl | ||
jr nc,Mult8_NoAdd | ||
add hl,de | ||
Mult8_NoAdd: | ||
dec b | ||
jr nz, Mult8_Loop | ||
ret | ||
|
||
|
||
; | ||
;Multiply 8-bit value with a 16-bit value | ||
;In: Multiply A with DE | ||
;Out: HL = result | ||
;Clobbers: B | ||
Mult12: ld l,0 | ||
ld b,8 | ||
Mult12_Loop: | ||
add hl,hl | ||
add a,a | ||
jr nc,Mult12_NoAdd | ||
add hl,de | ||
Mult12_NoAdd: | ||
dec b | ||
jr nz, Mult12_Loop | ||
ret | ||
|
||
|
||
; | ||
;Multiply 16-bit values (with 16-bit result) | ||
;In: Multiply BC with DE | ||
;Out: HL = result | ||
; | ||
Mult16: ld a,b | ||
ld b,16 | ||
Mult16_Loop: | ||
add hl,hl | ||
sla c | ||
rla | ||
jr nc,Mult16_NoAdd | ||
add hl,de | ||
Mult16_NoAdd: | ||
dec b | ||
jr nz, Mult16_Loop | ||
ret | ||
|
||
|
||
; | ||
;Multiply 16-bit values (with 32-bit result) | ||
;In: Multiply BC with DE | ||
;Out: BCHL = result | ||
; | ||
Mult32: ld a,c | ||
ld c,b | ||
ld hl,0 | ||
ld b,16 | ||
Mult32_Loop: | ||
add hl,hl | ||
rla | ||
rl c | ||
jr nc,Mult32_NoAdd | ||
add hl,de | ||
adc a,0 | ||
jr nc,Mult32_NoAdd | ||
inc c | ||
Mult32_NoAdd: | ||
dec b | ||
jr nz, Mult32_Loop | ||
ld b,c | ||
ld c,a | ||
ret | ||
|
||
NegateHL: MACRO | ||
ld a, 255 | ||
xor a, h | ||
ld h, a | ||
|
||
ld a, 255 | ||
xor a, l | ||
ld l, a | ||
|
||
inc hl | ||
ENDM |
Oops, something went wrong.