-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Yen symbol now hugs the most significant digit.
- Loading branch information
1 parent
2b0cd69
commit e866a56
Showing
12 changed files
with
124 additions
and
66 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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
INCLUDE "game/src/common/constants.asm" | ||
INCLUDE "game/src/common/macros.asm" | ||
|
||
SECTION "Place Yen Symbol", ROM0[$2016] | ||
PlaceYenSymbolShop:: | ||
; hl is the money tile mapping address for the least significant digit. | ||
push bc | ||
ld b, h | ||
ld a, l | ||
sub 5 | ||
ld c, a | ||
xor a | ||
ld [bc], a | ||
inc c | ||
|
||
.ext | ||
call PlaceYenSymbol | ||
ld h, b | ||
ld l, c | ||
pop bc | ||
ret | ||
|
||
PlaceYenSymbolShopAlt:: | ||
; hl is the mapping address for the tile before the money tile mapping address. | ||
push bc | ||
ld b, h | ||
ld c, l | ||
xor a | ||
ld [bc], a | ||
inc c | ||
jr PlaceYenSymbolShop.ext | ||
|
||
PlaceYenSymbol:: | ||
; bc is the money tile mapping address. | ||
; Warning: This will cause an infinite loop if it can't find an empty tile to map to. | ||
push bc | ||
push de | ||
ld a, c | ||
add 3 | ||
jr .decccommon | ||
|
||
.loop | ||
di | ||
rst $20 | ||
ld a, [bc] | ||
ei | ||
or a | ||
jr z, .exit | ||
|
||
.decc | ||
ld a, c | ||
dec a | ||
|
||
.decccommon | ||
and $1F | ||
ld d, a | ||
ld a, c | ||
and $E0 | ||
add d | ||
ld c, a | ||
jr .loop | ||
|
||
.exit | ||
di | ||
rst $20 | ||
ld a, $EC | ||
ld [bc], a | ||
ei | ||
pop de | ||
pop bc | ||
ret | ||
|
||
; Free space. | ||
padend $2060 |
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
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
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