Rename the concept of Coins to Chips (#7)

This commit is contained in:
xCrystal 2023-09-02 18:23:25 +02:00
parent ea31d254fb
commit 98fa7a9538
29 changed files with 225 additions and 225 deletions

View File

@ -225,9 +225,9 @@ Sfx_Unknown66:
channel_count 1 channel_count 1
channel 5, Sfx_Unknown66_Ch5 channel 5, Sfx_Unknown66_Ch5
Sfx_GetCoinFromSlots: Sfx_GetChipFromSlots:
channel_count 1 channel_count 1
channel 5, Sfx_GetCoinFromSlots_Ch5 channel 5, Sfx_GetChipFromSlots_Ch5
Sfx_PayDay: Sfx_PayDay:
channel_count 2 channel_count 2
@ -4936,7 +4936,7 @@ Sfx_Unknown66_Ch5:
square_note 8, 15, 1, 1792 square_note 8, 15, 1, 1792
sound_ret sound_ret
Sfx_GetCoinFromSlots_Ch5: Sfx_GetChipFromSlots_Ch5:
duty_cycle 2 duty_cycle 2
square_note 2, 15, 1, 1792 square_note 2, 15, 1, 1792
square_note 8, 8, 1, 2016 square_note 8, 8, 1, 2016

View File

@ -104,7 +104,7 @@ SFX:
dba Sfx_Burn dba Sfx_Burn
dba Sfx_TitleScreenEntrance dba Sfx_TitleScreenEntrance
dba Sfx_Unknown66 dba Sfx_Unknown66
dba Sfx_GetCoinFromSlots dba Sfx_GetChipFromSlots
dba Sfx_PayDay dba Sfx_PayDay
dba Sfx_Metronome dba Sfx_Metronome
dba Sfx_Call dba Sfx_Call

View File

@ -59,7 +59,7 @@
const X_DEFEND ; 33 const X_DEFEND ; 33
const X_SPEED ; 34 const X_SPEED ; 34
const X_SPECIAL ; 35 const X_SPECIAL ; 35
const COIN_CASE ; 36 const CHIP_CASE ; 36
const ITEMFINDER ; 37 const ITEMFINDER ; 37
const POKE_FLUTE ; 38 const POKE_FLUTE ; 38
const EXP_SHARE ; 39 const EXP_SHARE ; 39

View File

@ -38,7 +38,7 @@ DEF MAX_DAYS EQU 36 * 7 ; 252
DEF START_MONEY EQU 3000 DEF START_MONEY EQU 3000
DEF MOM_MONEY EQU 2300 DEF MOM_MONEY EQU 2300
DEF MAX_MONEY EQU 999999 DEF MAX_MONEY EQU 999999
DEF MAX_COINS EQU 9999 DEF MAX_CHIPS EQU 9999
; link record ; link record
DEF MAX_LINK_RECORD EQU 9999 DEF MAX_LINK_RECORD EQU 9999

View File

@ -16,7 +16,7 @@ DEF STRING_BUFFER_LENGTH EQU 19
const YOUR_MONEY ; 0 const YOUR_MONEY ; 0
const MOMS_MONEY ; 1 const MOMS_MONEY ; 1
; checkmoney/checkcoins return values ; checkmoney/checkchips return values
const_def const_def
const HAVE_MORE ; 0 const HAVE_MORE ; 0
const HAVE_AMOUNT ; 1 const HAVE_AMOUNT ; 1

View File

@ -103,7 +103,7 @@
const SFX_BURN ; 64 const SFX_BURN ; 64
const SFX_TITLE_SCREEN_ENTRANCE ; 65 const SFX_TITLE_SCREEN_ENTRANCE ; 65
const SFX_UNKNOWN_66 ; 66 const SFX_UNKNOWN_66 ; 66
const SFX_GET_COIN_FROM_SLOTS ; 67 const SFX_GET_CHIP_FROM_SLOTS ; 67
const SFX_PAY_DAY ; 68 const SFX_PAY_DAY ; 68
const SFX_METRONOME ; 69 const SFX_METRONOME ; 69
const SFX_CALL ; 6a const SFX_CALL ; 6a

View File

@ -84,8 +84,8 @@ SpecialsPointers::
add_special ReturnShuckie add_special ReturnShuckie
add_special BillsGrandfather add_special BillsGrandfather
add_special CheckPokerus add_special CheckPokerus
add_special DisplayCoinCaseBalance add_special DisplayChipCaseBalance
add_special DisplayMoneyAndCoinBalance add_special DisplayMoneyAndChipBalance
add_special PlaceMoneyTopRight add_special PlaceMoneyTopRight
add_special CheckForLuckyNumberWinners add_special CheckForLuckyNumberWinners
add_special CheckLuckyNumberShowFlag add_special CheckLuckyNumberShowFlag

View File

@ -114,7 +114,7 @@ ItemAttributes:
item_attribute 350, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE item_attribute 350, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
; X_SPECIAL ; X_SPECIAL
item_attribute 350, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE item_attribute 350, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
; COIN_CASE ; CHIP_CASE
item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
; ITEMFINDER ; ITEMFINDER
item_attribute 0, HELD_NONE, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE item_attribute 0, HELD_NONE, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE

View File

@ -54,7 +54,7 @@ ItemDescriptions:
dw XDefendDesc dw XDefendDesc
dw XSpeedDesc dw XSpeedDesc
dw XSpecialDesc dw XSpecialDesc
dw CoinCaseDesc dw ChipCaseDesc
dw ItemfinderDesc dw ItemfinderDesc
dw TeruSama5Desc dw TeruSama5Desc
dw ExpShareDesc dw ExpShareDesc
@ -467,9 +467,9 @@ XSpecialDesc:
db "Raises SPECIAL" db "Raises SPECIAL"
next "ATTACK. (1 BTL)@" next "ATTACK. (1 BTL)@"
CoinCaseDesc: ChipCaseDesc:
db "Holds up to 9,999" db "Holds up to 9,999"
next "game coins.@" next "game chips.@"
ItemfinderDesc: ItemfinderDesc:
db "Checks for unseen" db "Checks for unseen"

View File

@ -53,7 +53,7 @@ ItemNames::
li "X DEFEND" li "X DEFEND"
li "X SPEED" li "X SPEED"
li "X SPECIAL" li "X SPECIAL"
li "COIN CASE" li "CHIP CASE"
li "ITEMFINDER" li "ITEMFINDER"
li "TERU-SAMA" li "TERU-SAMA"
li "EXP.SHARE" li "EXP.SHARE"

View File

@ -845,8 +845,8 @@ WasDisabledText:
cont "DISABLED!" cont "DISABLED!"
prompt prompt
CoinsScatteredText: ChipsScatteredText:
text "Coins scattered" text "Chips scattered"
line "everywhere!" line "everywhere!"
prompt prompt

View File

@ -1351,13 +1351,13 @@ _ReceiveItemText::
text_end ; unreferenced text_end ; unreferenced
_NoCoinsText:: _NoChipsText::
text "You have no coins." text "You have no chips."
prompt prompt
_NoCoinCaseText:: _NoChipCaseText::
text "You don't have a" text "You don't have a"
line "COIN CASE." line "CHIP CASE."
prompt prompt
_NPCTradeCableText:: _NPCTradeCableText::

View File

@ -576,23 +576,23 @@ _MartBoughtText::
text "(S)." text "(S)."
done done
_SlotsBetHowManyCoinsText:: _SlotsBetHowManyChipsText::
text "Bet how many" text "Bet how many"
line "coins?" line "chips?"
done done
_SlotsStartText:: _SlotsStartText::
text "Start!" text "Start!"
done done
_SlotsNotEnoughCoinsText:: _SlotsNotEnoughChipsText::
text "Not enough" text "Not enough"
line "coins." line "chips."
prompt prompt
_SlotsRanOutOfCoinsText:: _SlotsRanOutOfChipsText::
text "Darn… Ran out of" text "Darn… Ran out of"
line "coins…" line "chips…"
done done
_SlotsPlayAgainText:: _SlotsPlayAgainText::
@ -603,7 +603,7 @@ _SlotsLinedUpText::
text "lined up!" text "lined up!"
line "Won @" line "Won @"
text_ram wStringBuffer2 text_ram wStringBuffer2
text " coins!" text " chips!"
done done
_SlotsDarnText:: _SlotsDarnText::
@ -760,13 +760,13 @@ _MoveCantForgetHMText::
line "forgotten now." line "forgotten now."
prompt prompt
_CardFlipPlayWithThreeCoinsText:: _CardFlipPlayWithThreeChipsText::
text "Play with three" text "Play with three"
line "coins?" line "chips?"
done done
_CardFlipNotEnoughCoinsText:: _CardFlipNotEnoughChipsText::
text "Not enough coins…" text "Not enough chips…"
prompt prompt
_CardFlipChooseACardText:: _CardFlipChooseACardText::
@ -1047,10 +1047,10 @@ _BlueCardBalanceText::
text " points." text " points."
done done
_CoinCaseCountText:: _ChipCaseCountText::
text "Coins:" text "Chips:"
line "@" line "@"
text_decimal wCoins, 2, 4 text_decimal wChips, 2, 4
text_end text_end
text_end ; unreferenced text_end ; unreferenced

View File

@ -298,51 +298,51 @@ GymStatue_WinningTrainersText:
line "<PLAYER>" line "<PLAYER>"
done done
CoinVendor_WelcomeText: ChipVendor_WelcomeText:
text "Welcome to the" text "Welcome to the"
line "GAME CORNER." line "GAME CORNER."
done done
CoinVendor_NoCoinCaseText: ChipVendor_NoChipCaseText:
text "Do you need game" text "Do you need game"
line "coins?" line "chips?"
para "Oh, you don't have" para "Oh, you don't have"
line "a COIN CASE for" line "a CHIP CASE for"
cont "your coins." cont "your chips."
done done
CoinVendor_IntroText: ChipVendor_IntroText:
text "Do you need some" text "Do you need some"
line "game coins?" line "game chips?"
para "It costs ¥1000 for" para "It costs ¥1000 for"
line "50 coins. Do you" line "50 chips. Do you"
cont "want some?" cont "want some?"
done done
CoinVendor_Buy50CoinsText: ChipVendor_Buy50ChipsText:
text "Thank you!" text "Thank you!"
line "Here are 50 coins." line "Here are 50 chips."
done done
CoinVendor_Buy500CoinsText: ChipVendor_Buy500ChipsText:
text "Thank you! Here" text "Thank you! Here"
line "are 500 coins." line "are 500 chips."
done done
CoinVendor_NotEnoughMoneyText: ChipVendor_NotEnoughMoneyText:
text "You don't have" text "You don't have"
line "enough money." line "enough money."
done done
CoinVendor_CoinCaseFullText: ChipVendor_ChipCaseFullText:
text "Whoops! Your COIN" text "Whoops! Your CHIP"
line "CASE is full." line "CASE is full."
done done
CoinVendor_CancelText: ChipVendor_CancelText:
text "No coins for you?" text "No chips for you?"
line "Come again!" line "Come again!"
done done

View File

@ -2055,7 +2055,7 @@ Most of the NPCs in [maps/NationalParkBugContest.asm](https://github.com/pret/po
and $7 and $7
- ret z - ret z
+ ret nz + ret nz
ld de, SFX_GET_COIN_FROM_SLOTS ld de, SFX_GET_CHIP_FROM_SLOTS
call PlaySFX call PlaySFX
ret ret
``` ```

View File

@ -132,13 +132,13 @@ Until this document is filled out, the [G/S Scripting Compendium](https://hax.ii
## `$24`: <code>checkmoney <i>account</i>, <i>value</i></code> ## `$24`: <code>checkmoney <i>account</i>, <i>value</i></code>
## `$25`: <code>givecoins <i>value</i></code> ## `$25`: <code>givechips <i>value</i></code>
## `$26`: <code>takecoins <i>value</i></code> ## `$26`: <code>takechips <i>value</i></code>
## `$27`: <code>checkcoins <i>value</i></code> ## `$27`: <code>checkchips <i>value</i></code>
## `$28`: <code>addcellnum <i>contact_id</i></code> ## `$28`: <code>addcellnum <i>contact_id</i></code>
@ -209,9 +209,9 @@ Until this document is filled out, the [G/S Scripting Compendium](https://hax.ii
<code>GetStringBuffer(<i>string_buffer</i>) = PrintNum(GetMoneyAccount(<i>account</i>))</code> <code>GetStringBuffer(<i>string_buffer</i>) = PrintNum(GetMoneyAccount(<i>account</i>))</code>
## `$3E`: <code>getcoins <i>string_buffer</i></code> ## `$3E`: <code>getchips <i>string_buffer</i></code>
<code>GetStringBuffer(<i>string_buffer</i>) = PrintNum([wCoins])</code> <code>GetStringBuffer(<i>string_buffer</i>) = PrintNum([wChips])</code>
## `$3F`: <code>getnum <i>string_buffer</i></code> ## `$3F`: <code>getnum <i>string_buffer</i></code>

View File

@ -20,5 +20,5 @@ BattleCommand_PayDay:
jr nz, .done jr nz, .done
inc [hl] inc [hl]
.done .done
ld hl, CoinsScatteredText ld hl, ChipsScatteredText
jp StdBattleTextbox jp StdBattleTextbox

View File

@ -162,15 +162,15 @@ AddFunds:
pop hl pop hl
ret ret
GiveCoins:: GiveChips::
ld a, 2 ld a, 2
ld de, wCoins ld de, wChips
call AddFunds call AddFunds
ld a, 2 ld a, 2
ld bc, .maxcoins ld bc, .maxchips
call CompareFunds call CompareFunds
jr c, .not_maxed jr c, .not_maxed
ld hl, .maxcoins ld hl, .maxchips
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
inc de inc de
@ -183,15 +183,15 @@ GiveCoins::
and a and a
ret ret
.maxcoins .maxchips
bigdw MAX_COINS bigdw MAX_CHIPS
TakeCoins:: TakeChips::
ld a, 2 ld a, 2
ld de, wCoins ld de, wChips
call SubtractFunds call SubtractFunds
jr nc, .okay jr nc, .okay
; leave with 0 coins ; leave with 0 chips
xor a xor a
ld [de], a ld [de], a
inc de inc de
@ -203,7 +203,7 @@ TakeCoins::
and a and a
ret ret
CheckCoins:: CheckChips::
ld a, 2 ld a, 2
ld de, wCoins ld de, wChips
jp CompareFunds jp CompareFunds

View File

@ -143,7 +143,7 @@ UnownPuzzle:
ret ret
SlotMachine: SlotMachine:
call CheckCoinsAndCoinCase call CheckChipsAndChipCase
ret c ret c
ld a, BANK(_SlotMachine) ld a, BANK(_SlotMachine)
ld hl, _SlotMachine ld hl, _SlotMachine
@ -151,7 +151,7 @@ SlotMachine:
ret ret
CardFlip: CardFlip:
call CheckCoinsAndCoinCase call CheckChipsAndChipCase
ret c ret c
ld a, BANK(_CardFlip) ld a, BANK(_CardFlip)
ld hl, _CardFlip ld hl, _CardFlip
@ -159,7 +159,7 @@ CardFlip:
ret ret
UnusedMemoryGame: UnusedMemoryGame:
call CheckCoinsAndCoinCase call CheckChipsAndChipCase
ret c ret c
ld a, BANK(_MemoryGame) ld a, BANK(_MemoryGame)
ld hl, _MemoryGame ld hl, _MemoryGame
@ -180,37 +180,37 @@ StartGameCornerGame:
call ExitAllMenus call ExitAllMenus
ret ret
CheckCoinsAndCoinCase: CheckChipsAndChipCase:
ld hl, wCoins ld hl, wChips
ld a, [hli] ld a, [hli]
or [hl] or [hl]
jr z, .no_coins jr z, .no_chips
ld a, COIN_CASE ld a, CHIP_CASE
ld [wCurItem], a ld [wCurItem], a
ld hl, wNumItems ld hl, wNumItems
call CheckItem call CheckItem
jr nc, .no_coin_case jr nc, .no_chip_case
and a and a
ret ret
.no_coins .no_chips
ld hl, .NoCoinsText ld hl, .NoChipsText
jr .print jr .print
.no_coin_case .no_chip_case
ld hl, .NoCoinCaseText ld hl, .NoChipCaseText
.print .print
call PrintText2bpp call PrintText2bpp
scf scf
ret ret
.NoCoinsText: .NoChipsText:
text_far _NoCoinsText text_far _NoChipsText
text_end text_end
.NoCoinCaseText: .NoChipCaseText:
text_far _NoCoinCaseText text_far _NoChipCaseText
text_end text_end
ClearBGPalettesBufferScreen: ClearBGPalettesBufferScreen:

View File

@ -54,7 +54,7 @@ StdScripts::
add_stdscript ReceiveItemScript add_stdscript ReceiveItemScript
add_stdscript ReceiveTogepiEggScript add_stdscript ReceiveTogepiEggScript
add_stdscript PCScript add_stdscript PCScript
add_stdscript GameCornerCoinVendorScript add_stdscript GameCornerChipVendorScript
add_stdscript HappinessCheckScript add_stdscript HappinessCheckScript
PokecenterNurseScript: PokecenterNurseScript:
@ -763,23 +763,23 @@ ReceiveTogepiEggScript:
waitsfx waitsfx
end end
GameCornerCoinVendorScript: GameCornerChipVendorScript:
faceplayer faceplayer
opentext opentext
farwritetext CoinVendor_WelcomeText farwritetext ChipVendor_WelcomeText
promptbutton promptbutton
checkitem COIN_CASE checkitem CHIP_CASE
iftrue CoinVendor_IntroScript iftrue ChipVendor_IntroScript
farwritetext CoinVendor_NoCoinCaseText farwritetext ChipVendor_NoChipCaseText
waitbutton waitbutton
closetext closetext
end end
CoinVendor_IntroScript: ChipVendor_IntroScript:
farwritetext CoinVendor_IntroText farwritetext ChipVendor_IntroText
.loop .loop
special DisplayMoneyAndCoinBalance special DisplayMoneyAndChipBalance
loadmenu .MenuHeader loadmenu .MenuHeader
verticalmenu verticalmenu
closewindow closewindow
@ -788,45 +788,45 @@ CoinVendor_IntroScript:
sjump .Cancel sjump .Cancel
.Buy50: .Buy50:
checkcoins MAX_COINS - 50 checkchips MAX_CHIPS - 50
ifequal HAVE_MORE, .CoinCaseFull ifequal HAVE_MORE, .ChipCaseFull
checkmoney YOUR_MONEY, 1000 checkmoney YOUR_MONEY, 1000
ifequal HAVE_LESS, .NotEnoughMoney ifequal HAVE_LESS, .NotEnoughMoney
givecoins 50 givechips 50
takemoney YOUR_MONEY, 1000 takemoney YOUR_MONEY, 1000
waitsfx waitsfx
playsound SFX_TRANSACTION playsound SFX_TRANSACTION
farwritetext CoinVendor_Buy50CoinsText farwritetext ChipVendor_Buy50ChipsText
waitbutton waitbutton
sjump .loop sjump .loop
.Buy500: .Buy500:
checkcoins MAX_COINS - 500 checkchips MAX_CHIPS - 500
ifequal HAVE_MORE, .CoinCaseFull ifequal HAVE_MORE, .ChipCaseFull
checkmoney YOUR_MONEY, 10000 checkmoney YOUR_MONEY, 10000
ifequal HAVE_LESS, .NotEnoughMoney ifequal HAVE_LESS, .NotEnoughMoney
givecoins 500 givechips 500
takemoney YOUR_MONEY, 10000 takemoney YOUR_MONEY, 10000
waitsfx waitsfx
playsound SFX_TRANSACTION playsound SFX_TRANSACTION
farwritetext CoinVendor_Buy500CoinsText farwritetext ChipVendor_Buy500ChipsText
waitbutton waitbutton
sjump .loop sjump .loop
.NotEnoughMoney: .NotEnoughMoney:
farwritetext CoinVendor_NotEnoughMoneyText farwritetext ChipVendor_NotEnoughMoneyText
waitbutton waitbutton
closetext closetext
end end
.CoinCaseFull: .ChipCaseFull:
farwritetext CoinVendor_CoinCaseFullText farwritetext ChipVendor_ChipCaseFullText
waitbutton waitbutton
closetext closetext
end end
.Cancel: .Cancel:
farwritetext CoinVendor_CancelText farwritetext ChipVendor_CancelText
waitbutton waitbutton
closetext closetext
end end

View File

@ -80,7 +80,7 @@ _CardFlip:
.Jumptable: .Jumptable:
dw .AskPlayWithThree dw .AskPlayWithThree
dw .DeductCoins dw .DeductChips
dw .ChooseACard dw .ChooseACard
dw .PlaceYourBet dw .PlaceYourBet
dw .CheckTheCard dw .CheckTheCard
@ -94,8 +94,8 @@ _CardFlip:
ret ret
.AskPlayWithThree: .AskPlayWithThree:
ld hl, .CardFlipPlayWithThreeCoinsText ld hl, .CardFlipPlayWithThreeChipsText
call CardFlip_UpdateCoinBalanceDisplay call CardFlip_UpdateChipBalanceDisplay
call YesNoBox call YesNoBox
jr c, .SaidNo jr c, .SaidNo
call CardFlip_ShuffleDeck call CardFlip_ShuffleDeck
@ -107,23 +107,23 @@ _CardFlip:
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
.CardFlipPlayWithThreeCoinsText: .CardFlipPlayWithThreeChipsText:
text_far _CardFlipPlayWithThreeCoinsText text_far _CardFlipPlayWithThreeChipsText
text_end text_end
.DeductCoins: .DeductChips:
ld a, [wCoins] ld a, [wChips]
ld h, a ld h, a
ld a, [wCoins + 1] ld a, [wChips + 1]
ld l, a ld l, a
ld a, h ld a, h
and a and a
jr nz, .deduct ; You have at least 256 coins. jr nz, .deduct ; You have at least 256 chips.
ld a, l ld a, l
cp 3 cp 3
jr nc, .deduct ; You have at least 3 coins. jr nc, .deduct ; You have at least 3 chips.
ld hl, .CardFlipNotEnoughCoinsText ld hl, .CardFlipNotEnoughChipsText
call CardFlip_UpdateCoinBalanceDisplay call CardFlip_UpdateChipBalanceDisplay
ld a, 7 ld a, 7
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
@ -132,22 +132,22 @@ _CardFlip:
ld de, -3 ld de, -3
add hl, de add hl, de
ld a, h ld a, h
ld [wCoins], a ld [wChips], a
ld a, l ld a, l
ld [wCoins + 1], a ld [wChips + 1], a
ld de, SFX_TRANSACTION ld de, SFX_TRANSACTION
call PlaySFX call PlaySFX
xor a xor a
ldh [hBGMapMode], a ldh [hBGMapMode], a
call CardFlip_PrintCoinBalance call CardFlip_PrintChipBalance
ld a, $1 ld a, $1
ldh [hBGMapMode], a ldh [hBGMapMode], a
call WaitSFX call WaitSFX
call .Increment call .Increment
ret ret
.CardFlipNotEnoughCoinsText: .CardFlipNotEnoughChipsText:
text_far _CardFlipNotEnoughCoinsText text_far _CardFlipNotEnoughChipsText
text_end text_end
.ChooseACard: .ChooseACard:
@ -175,7 +175,7 @@ _CardFlip:
call PlaceCardFaceDown call PlaceCardFaceDown
call WaitBGMap call WaitBGMap
ld hl, .CardFlipChooseACardText ld hl, .CardFlipChooseACardText
call CardFlip_UpdateCoinBalanceDisplay call CardFlip_UpdateChipBalanceDisplay
xor a xor a
ld [wCardFlipWhichCard], a ld [wCardFlipWhichCard], a
.loop .loop
@ -228,7 +228,7 @@ _CardFlip:
.PlaceYourBet: .PlaceYourBet:
ld hl, .CardFlipPlaceYourBetText ld hl, .CardFlipPlaceYourBetText
call CardFlip_UpdateCoinBalanceDisplay call CardFlip_UpdateChipBalanceDisplay
.betloop .betloop
call JoyTextDelay call JoyTextDelay
ldh a, [hJoyLast] ldh a, [hJoyLast]
@ -285,7 +285,7 @@ _CardFlip:
.PlayAgain: .PlayAgain:
call ClearSprites call ClearSprites
ld hl, .CardFlipPlayAgainText ld hl, .CardFlipPlayAgainText
call CardFlip_UpdateCoinBalanceDisplay call CardFlip_UpdateChipBalanceDisplay
call YesNoBox call YesNoBox
jr nc, .Continue jr nc, .Continue
call .Increment call .Increment
@ -470,7 +470,7 @@ CardFlip_DisplayCardFaceUp:
db "5", $4e, "5", $57, "5", $69, "5", $60 db "5", $4e, "5", $57, "5", $69, "5", $60
db "6", $4e, "6", $57, "6", $69, "6", $60 db "6", $4e, "6", $57, "6", $69, "6", $60
CardFlip_UpdateCoinBalanceDisplay: CardFlip_UpdateChipBalanceDisplay:
push hl push hl
hlcoord 0, 12 hlcoord 0, 12
ld b, 4 ld b, 4
@ -478,25 +478,25 @@ CardFlip_UpdateCoinBalanceDisplay:
call Textbox1bpp call Textbox1bpp
pop hl pop hl
call PrintTextboxText call PrintTextboxText
call CardFlip_PrintCoinBalance call CardFlip_PrintChipBalance
ret ret
CardFlip_PrintCoinBalance: CardFlip_PrintChipBalance:
hlcoord 9, 15 hlcoord 9, 15
ld b, 1 ld b, 1
ld c, 9 ld c, 9
call Textbox1bpp call Textbox1bpp
hlcoord 10, 16 hlcoord 10, 16
ld de, .CoinStr ld de, .ChipStr
call PlaceString call PlaceString
hlcoord 15, 16 hlcoord 15, 16
ld de, wCoins ld de, wChips
lb bc, PRINTNUM_LEADINGZEROS | 2, 4 lb bc, PRINTNUM_LEADINGZEROS | 2, 4
call PrintNum call PrintNum
ret ret
.CoinStr: .ChipStr:
db "COIN@" db "CHIP@"
CardFlip_InitTilemap: CardFlip_InitTilemap:
xor a xor a
@ -1067,7 +1067,7 @@ CardFlip_CheckWinCondition:
ld de, SFX_WRONG ld de, SFX_WRONG
call PlaySFX call PlaySFX
ld hl, .CardFlipDarnText ld hl, .CardFlipDarnText
call CardFlip_UpdateCoinBalanceDisplay call CardFlip_UpdateChipBalanceDisplay
call WaitSFX call WaitSFX
ret ret
@ -1075,19 +1075,19 @@ CardFlip_CheckWinCondition:
push bc push bc
push de push de
ld hl, .CardFlipYeahText ld hl, .CardFlipYeahText
call CardFlip_UpdateCoinBalanceDisplay call CardFlip_UpdateChipBalanceDisplay
pop de pop de
call PlaySFX call PlaySFX
call WaitSFX call WaitSFX
pop bc pop bc
.loop .loop
push bc push bc
call .IsCoinCaseFull call .IsChipCaseFull
jr c, .full jr c, .full
call .AddCoinPlaySFX call .AddChipPlaySFX
.full .full
call CardFlip_PrintCoinBalance call CardFlip_PrintChipBalance
ld c, 2 ld c, 2
call DelayFrames call DelayFrames
pop bc pop bc
@ -1103,30 +1103,30 @@ CardFlip_CheckWinCondition:
text_far _CardFlipDarnText text_far _CardFlipDarnText
text_end text_end
.AddCoinPlaySFX: .AddChipPlaySFX:
ld a, [wCoins] ld a, [wChips]
ld h, a ld h, a
ld a, [wCoins + 1] ld a, [wChips + 1]
ld l, a ld l, a
inc hl inc hl
ld a, h ld a, h
ld [wCoins], a ld [wChips], a
ld a, l ld a, l
ld [wCoins + 1], a ld [wChips + 1], a
ld de, SFX_PAY_DAY ld de, SFX_PAY_DAY
call PlaySFX call PlaySFX
ret ret
.IsCoinCaseFull: .IsChipCaseFull:
ld a, [wCoins] ld a, [wChips]
cp HIGH(MAX_COINS) cp HIGH(MAX_CHIPS)
jr c, .less jr c, .less
jr z, .check_low jr z, .check_low
jr .more jr .more
.check_low .check_low
ld a, [wCoins + 1] ld a, [wChips + 1]
cp LOW(MAX_COINS) cp LOW(MAX_CHIPS)
jr c, .less jr c, .less
.more .more

View File

@ -45,7 +45,7 @@ DEF REEL_STOP_DELAY rb ; 15
const SLOTS_NEXT_0B const SLOTS_NEXT_0B
const SLOTS_FLASH_IF_WIN const SLOTS_FLASH_IF_WIN
const SLOTS_FLASH_SCREEN const SLOTS_FLASH_SCREEN
const SLOTS_GIVE_EARNED_COINS const SLOTS_GIVE_EARNED_CHIPS
const SLOTS_PAYOUT_TEXT_AND_ANIM const SLOTS_PAYOUT_TEXT_AND_ANIM
const SLOTS_PAYOUT_ANIM const SLOTS_PAYOUT_ANIM
const SLOTS_RESTART_OF_QUIT const SLOTS_RESTART_OF_QUIT
@ -184,7 +184,7 @@ SlotsLoop:
xor a xor a
ld [wCurSpriteOAMAddr], a ld [wCurSpriteOAMAddr], a
callfar DoNextFrameForFirst16Sprites callfar DoNextFrameForFirst16Sprites
call .PrintCoinsAndPayout call .PrintChipsAndPayout
call .Stubbed_AlternateMatchingSevensPalette call .Stubbed_AlternateMatchingSevensPalette
call DelayFrame call DelayFrame
and a and a
@ -219,9 +219,9 @@ SlotsLoop:
call DmgToCgbBGPals call DmgToCgbBGPals
ret ret
.PrintCoinsAndPayout: .PrintChipsAndPayout:
hlcoord 5, 1 hlcoord 5, 1
ld de, wCoins ld de, wChips
lb bc, PRINTNUM_LEADINGZEROS | 2, 4 lb bc, PRINTNUM_LEADINGZEROS | 2, 4
call PrintNum call PrintNum
hlcoord 11, 1 hlcoord 11, 1
@ -285,7 +285,7 @@ SlotsJumptable:
dw SlotsAction_Next ; 0b dw SlotsAction_Next ; 0b
dw SlotsAction_FlashIfWin ; 0c dw SlotsAction_FlashIfWin ; 0c
dw SlotsAction_FlashScreen ; 0d dw SlotsAction_FlashScreen ; 0d
dw SlotsAction_GiveEarnedCoins ; 0e dw SlotsAction_GiveEarnedChips ; 0e
dw SlotsAction_PayoutTextAndAnim ; 0f dw SlotsAction_PayoutTextAndAnim ; 0f
dw SlotsAction_PayoutAnim ; 10 dw SlotsAction_PayoutAnim ; 10
dw SlotsAction_RestartOrQuit ; 11 dw SlotsAction_RestartOrQuit ; 11
@ -440,7 +440,7 @@ SlotsAction_FlashScreen:
call SlotsAction_Next call SlotsAction_Next
ret ret
SlotsAction_GiveEarnedCoins: SlotsAction_GiveEarnedChips:
xor a xor a
ld [wFirstTwoReelsMatching], a ld [wFirstTwoReelsMatching], a
ld [wFirstTwoReelsMatchingSevens], a ld [wFirstTwoReelsMatchingSevens], a
@ -471,11 +471,11 @@ SlotsAction_PayoutAnim:
ld [hl], e ld [hl], e
dec hl dec hl
ld [hl], d ld [hl], d
ld hl, wCoins ld hl, wChips
ld d, [hl] ld d, [hl]
inc hl inc hl
ld e, [hl] ld e, [hl]
call Slots_CheckCoinCaseFull call Slots_CheckChipCaseFull
jr c, .okay jr c, .okay
inc de inc de
.okay .okay
@ -486,7 +486,7 @@ SlotsAction_PayoutAnim:
ld a, [wSlotsDelay] ld a, [wSlotsDelay]
and $7 and $7
ret z ret z
ld de, SFX_GET_COIN_FROM_SLOTS ld de, SFX_GET_CHIP_FROM_SLOTS
call PlaySFX call PlaySFX
ret ret
@ -527,12 +527,12 @@ Slots_LoadReelState:
ld [de], a ld [de], a
ret ret
Slots_CheckCoinCaseFull: Slots_CheckChipCaseFull:
ld a, d ld a, d
cp HIGH(MAX_COINS) cp HIGH(MAX_CHIPS)
jr c, .not_full jr c, .not_full
ld a, e ld a, e
cp LOW(MAX_COINS) cp LOW(MAX_CHIPS)
jr c, .not_full jr c, .not_full
scf scf
ret ret
@ -569,7 +569,7 @@ Slots_StopReel1:
Slots_StopReel2: Slots_StopReel2:
; As long as, the following three meet, there's a 31.25% chance ; As long as, the following three meet, there's a 31.25% chance
; to set action REEL_ACTION_SET_UP_REEL2_SKIP_TO_7: ; to set action REEL_ACTION_SET_UP_REEL2_SKIP_TO_7:
; - Bet is >= 2 coins ; - Bet is >= 2 chips
; - There's a 7 symbol visible in reel #1 ; - There's a 7 symbol visible in reel #1
; - Current spin isn't biased or is biased towards SEVEN ; - Current spin isn't biased or is biased towards SEVEN
; In any other case, REEL_ACTION_STOP_REEL2 is set. ; In any other case, REEL_ACTION_STOP_REEL2 is set.
@ -1716,7 +1716,7 @@ Slots_TurnLightsOnOrOff:
Slots_AskBet: Slots_AskBet:
.loop .loop
ld hl, .SlotsBetHowManyCoinsText ld hl, .SlotsBetHowManyChipsText
call PrintText1bpp call PrintText1bpp
ld hl, .MenuHeader ld hl, .MenuHeader
call LoadMenuHeader call LoadMenuHeader
@ -1728,7 +1728,7 @@ Slots_AskBet:
ld a, 4 ld a, 4
sub b sub b
ld [wSlotBet], a ld [wSlotBet], a
ld hl, wCoins ld hl, wChips
ld c, a ld c, a
ld a, [hli] ld a, [hli]
and a and a
@ -1736,12 +1736,12 @@ Slots_AskBet:
ld a, [hl] ld a, [hl]
cp c cp c
jr nc, .Start jr nc, .Start
ld hl, .SlotsNotEnoughCoinsText ld hl, .SlotsNotEnoughChipsText
call PrintText1bpp call PrintText1bpp
jr .loop jr .loop
.Start: .Start:
ld hl, wCoins + 1 ld hl, wChips + 1
ld a, [hl] ld a, [hl]
sub c sub c
ld [hld], a ld [hld], a
@ -1756,16 +1756,16 @@ Slots_AskBet:
and a and a
ret ret
.SlotsBetHowManyCoinsText: .SlotsBetHowManyChipsText:
text_far _SlotsBetHowManyCoinsText text_far _SlotsBetHowManyChipsText
text_end text_end
.SlotsStartText: .SlotsStartText:
text_far _SlotsStartText text_far _SlotsStartText
text_end text_end
.SlotsNotEnoughCoinsText: .SlotsNotEnoughChipsText:
text_far _SlotsNotEnoughCoinsText text_far _SlotsNotEnoughChipsText
text_end text_end
.MenuHeader: .MenuHeader:
@ -1782,17 +1782,17 @@ Slots_AskBet:
db " 1@" db " 1@"
Slots_AskPlayAgain: Slots_AskPlayAgain:
ld hl, wCoins ld hl, wChips
ld a, [hli] ld a, [hli]
or [hl] or [hl]
jr nz, .you_have_coins jr nz, .you_have_chips
ld hl, .SlotsRanOutOfCoinsText ld hl, .SlotsRanOutOfChipsText
call PrintText1bpp call PrintText1bpp
ld c, 60 ld c, 60
call DelayFrames call DelayFrames
jr .exit_slots jr .exit_slots
.you_have_coins .you_have_chips
ld hl, .SlotsPlayAgainText ld hl, .SlotsPlayAgainText
call PrintText1bpp call PrintText1bpp
call LoadMenuTextbox call LoadMenuTextbox
@ -1810,8 +1810,8 @@ Slots_AskPlayAgain:
scf scf
ret ret
.SlotsRanOutOfCoinsText: .SlotsRanOutOfChipsText:
text_far _SlotsRanOutOfCoinsText text_far _SlotsRanOutOfChipsText
text_end text_end
.SlotsPlayAgainText: .SlotsPlayAgainText:

View File

@ -67,7 +67,7 @@ ItemEffects:
dw XItemEffect ; X_DEFEND dw XItemEffect ; X_DEFEND
dw XItemEffect ; X_SPEED dw XItemEffect ; X_SPEED
dw XItemEffect ; X_SPECIAL dw XItemEffect ; X_SPECIAL
dw CoinCaseEffect ; COIN_CASE dw ChipCaseEffect ; CHIP_CASE
dw ItemfinderEffect ; ITEMFINDER dw ItemfinderEffect ; ITEMFINDER
dw PokeFluteEffect ; POKE_FLUTE dw PokeFluteEffect ; POKE_FLUTE
dw NoEffect ; EXP_SHARE dw NoEffect ; EXP_SHARE
@ -2253,12 +2253,12 @@ BlueCardEffect:
text_far _BlueCardBalanceText text_far _BlueCardBalanceText
text_end text_end
CoinCaseEffect: ChipCaseEffect:
ld hl, .CoinCaseCountText ld hl, .ChipCaseCountText
jp MenuTextboxWaitButton jp MenuTextboxWaitButton
.CoinCaseCountText: .ChipCaseCountText:
text_far _CoinCaseCountText text_far _ChipCaseCountText
text_end text_end
OldRodEffect: OldRodEffect:

View File

@ -157,8 +157,8 @@ _ResetWRAM:
ld [wJohtoBadges], a ld [wJohtoBadges], a
ld [wKantoBadges], a ld [wKantoBadges], a
ld [wCoins], a ld [wChips], a
ld [wCoins + 1], a ld [wChips + 1], a
if START_MONEY >= $10000 if START_MONEY >= $10000
ld a, HIGH(START_MONEY >> 8) ld a, HIGH(START_MONEY >> 8)

View File

@ -64,25 +64,25 @@ MoneyBottomLeftMenuHeader:
dw NULL dw NULL
db 1 ; default option db 1 ; default option
DisplayCoinCaseBalance: DisplayChipCaseBalance:
; Place a text box of size 1x7 at 11, 0. ; Place a text box of size 1x7 at 11, 0.
hlcoord 11, 0 hlcoord 11, 0
ld b, 1 ld b, 1
ld c, 7 ld c, 7
call Textbox1bpp call Textbox1bpp
hlcoord 12, 0 hlcoord 12, 0
ld de, CoinString ld de, ChipString
call PlaceString call PlaceString
hlcoord 17, 1 hlcoord 17, 1
ld de, ShowMoney_TerminatorString ld de, ShowMoney_TerminatorString
call PlaceString call PlaceString
ld de, wCoins ld de, wChips
lb bc, 2, 4 lb bc, 2, 4
hlcoord 13, 1 hlcoord 13, 1
call PrintNum call PrintNum
ret ret
DisplayMoneyAndCoinBalance: DisplayMoneyAndChipBalance:
hlcoord 5, 0 hlcoord 5, 0
ld b, 3 ld b, 3
ld c, 13 ld c, 13
@ -95,18 +95,18 @@ DisplayMoneyAndCoinBalance:
lb bc, PRINTNUM_MONEY | 3, 6 lb bc, PRINTNUM_MONEY | 3, 6
call PrintNum call PrintNum
hlcoord 6, 3 hlcoord 6, 3
ld de, CoinString ld de, ChipString
call PlaceString call PlaceString
hlcoord 15, 3 hlcoord 15, 3
ld de, wCoins ld de, wChips
lb bc, 2, 4 lb bc, 2, 4
call PrintNum call PrintNum
ret ret
MoneyString: MoneyString:
db "MONEY@" db "MONEY@"
CoinString: ChipString:
db "COIN@" db "CHIP@"
ShowMoney_TerminatorString: ShowMoney_TerminatorString:
db "@" db "@"

View File

@ -101,9 +101,9 @@ ScriptCommandTable:
dw Script_givemoney ; 22 dw Script_givemoney ; 22
dw Script_takemoney ; 23 dw Script_takemoney ; 23
dw Script_checkmoney ; 24 dw Script_checkmoney ; 24
dw Script_givecoins ; 25 dw Script_givechips ; 25
dw Script_takecoins ; 26 dw Script_takechips ; 26
dw Script_checkcoins ; 27 dw Script_checkchips ; 27
dw Script_addcellnum ; 28 dw Script_addcellnum ; 28
dw Script_delcellnum ; 29 dw Script_delcellnum ; 29
dw Script_checkcellnum ; 2a dw Script_checkcellnum ; 2a
@ -126,7 +126,7 @@ ScriptCommandTable:
dw Script_blackoutmod ; 3b dw Script_blackoutmod ; 3b
dw Script_warp ; 3c dw Script_warp ; 3c
dw Script_getmoney ; 3d dw Script_getmoney ; 3d
dw Script_getcoins ; 3e dw Script_getchips ; 3e
dw Script_getnum ; 3f dw Script_getnum ; 3f
dw Script_getmonname ; 40 dw Script_getmonname ; 40
dw Script_getitemname ; 41 dw Script_getitemname ; 41
@ -1659,10 +1659,10 @@ Script_getmoney:
ld de, wStringBuffer1 ld de, wStringBuffer1
jp GetStringBuffer jp GetStringBuffer
Script_getcoins: Script_getchips:
call ResetStringBuffer1 call ResetStringBuffer1
ld hl, wStringBuffer1 ld hl, wStringBuffer1
ld de, wCoins ld de, wChips
lb bc, PRINTNUM_LEFTALIGN | 2, 6 lb bc, PRINTNUM_LEFTALIGN | 2, 6
call PrintNum call PrintNum
ld de, wStringBuffer1 ld de, wStringBuffer1
@ -1824,22 +1824,22 @@ LoadMoneyAmountToMem:
pop bc pop bc
ret ret
Script_givecoins: Script_givechips:
call LoadCoinAmountToMem call LoadChipAmountToMem
farcall GiveCoins farcall GiveChips
ret ret
Script_takecoins: Script_takechips:
call LoadCoinAmountToMem call LoadChipAmountToMem
farcall TakeCoins farcall TakeChips
ret ret
Script_checkcoins: Script_checkchips:
call LoadCoinAmountToMem call LoadChipAmountToMem
farcall CheckCoins farcall CheckChips
jr CompareMoneyAction jr CompareMoneyAction
LoadCoinAmountToMem: LoadChipAmountToMem:
call GetScriptByte call GetScriptByte
ldh [hMoneyTemp + 1], a ldh [hMoneyTemp + 1], a
call GetScriptByte call GetScriptByte

View File

@ -160,7 +160,7 @@ DEF MEM_BUFFER_2 EQUS "STRING_BUFFER_5"
DEF vartomem EQUS "getnum" DEF vartomem EQUS "getnum"
DEF mapnametotext EQUS "getcurlandmarkname" DEF mapnametotext EQUS "getcurlandmarkname"
DEF readcoins EQUS "getcoins" DEF readchips EQUS "getchips"
MACRO pokenamemem MACRO pokenamemem
getmonname \2, \1 getmonname \2, \1
@ -397,7 +397,7 @@ DEF gymstatue2 EQUS "GymStatue2Script"
DEF receiveitem EQUS "ReceiveItemScript" DEF receiveitem EQUS "ReceiveItemScript"
DEF receivetogepiegg EQUS "ReceiveTogepiEggScript" DEF receivetogepiegg EQUS "ReceiveTogepiEggScript"
DEF pcscript EQUS "PCScript" DEF pcscript EQUS "PCScript"
DEF gamecornercoinvendor EQUS "GameCornerCoinVendorScript" DEF gamecornerchipvendor EQUS "GameCornerChipVendorScript"
DEF happinesschecknpc EQUS "HappinessCheckScript" DEF happinesschecknpc EQUS "HappinessCheckScript"
; constants/sprite_constants.asm ; constants/sprite_constants.asm

View File

@ -246,22 +246,22 @@ MACRO checkmoney
dt \2 ; money dt \2 ; money
ENDM ENDM
const givecoins_command ; $25 const givechips_command ; $25
MACRO givecoins MACRO givechips
db givecoins_command db givechips_command
dw \1 ; coins dw \1 ; chips
ENDM ENDM
const takecoins_command ; $26 const takechips_command ; $26
MACRO takecoins MACRO takechips
db takecoins_command db takechips_command
dw \1 ; coins dw \1 ; chips
ENDM ENDM
const checkcoins_command ; $27 const checkchips_command ; $27
MACRO checkcoins MACRO checkchips
db checkcoins_command db checkchips_command
dw \1 ; coins dw \1 ; chips
ENDM ENDM
const addcellnum_command ; $28 const addcellnum_command ; $28
@ -414,9 +414,9 @@ MACRO getmoney
db \1 ; string_buffer db \1 ; string_buffer
ENDM ENDM
const getcoins_command ; $3e const getchips_command ; $3e
MACRO getcoins MACRO getchips
db getcoins_command db getchips_command
db \1 ; string_buffer db \1 ; string_buffer
ENDM ENDM

View File

@ -2339,7 +2339,7 @@ wMomSavingMoney::
; bit 7: active ; bit 7: active
db db
wCoins:: dw wChips:: dw
wBadges:: wBadges::
wJohtoBadges:: flag_array NUM_JOHTO_BADGES wJohtoBadges:: flag_array NUM_JOHTO_BADGES