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 5, Sfx_Unknown66_Ch5
Sfx_GetCoinFromSlots:
Sfx_GetChipFromSlots:
channel_count 1
channel 5, Sfx_GetCoinFromSlots_Ch5
channel 5, Sfx_GetChipFromSlots_Ch5
Sfx_PayDay:
channel_count 2
@ -4936,7 +4936,7 @@ Sfx_Unknown66_Ch5:
square_note 8, 15, 1, 1792
sound_ret
Sfx_GetCoinFromSlots_Ch5:
Sfx_GetChipFromSlots_Ch5:
duty_cycle 2
square_note 2, 15, 1, 1792
square_note 8, 8, 1, 2016

View File

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

View File

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

View File

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

View File

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

View File

@ -103,7 +103,7 @@
const SFX_BURN ; 64
const SFX_TITLE_SCREEN_ENTRANCE ; 65
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_METRONOME ; 69
const SFX_CALL ; 6a

View File

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

View File

@ -114,7 +114,7 @@ ItemAttributes:
item_attribute 350, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
; X_SPECIAL
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
; ITEMFINDER
item_attribute 0, HELD_NONE, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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