mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Rename the concept of Money to Coins (#7)
This commit is contained in:
parent
5d95ff952a
commit
eb728d5151
@ -11,8 +11,8 @@
|
|||||||
const ENGINE_DAY_CARE_MAN_HAS_MON
|
const ENGINE_DAY_CARE_MAN_HAS_MON
|
||||||
; wDayCareLady
|
; wDayCareLady
|
||||||
const ENGINE_DAY_CARE_LADY_HAS_MON
|
const ENGINE_DAY_CARE_LADY_HAS_MON
|
||||||
; wMomSavingMoney
|
; wMomSavingCoins
|
||||||
const ENGINE_MOM_SAVING_MONEY
|
const ENGINE_MOM_SAVING_COINS
|
||||||
const ENGINE_MOM_ACTIVE
|
const ENGINE_MOM_ACTIVE
|
||||||
; wStatusFlags
|
; wStatusFlags
|
||||||
const ENGINE_POKEDEX
|
const ENGINE_POKEDEX
|
||||||
|
@ -34,10 +34,10 @@ DEF NOON_HOUR EQU 12 ; 12 PM
|
|||||||
|
|
||||||
DEF MAX_DAYS EQU 36 * 7 ; 252
|
DEF MAX_DAYS EQU 36 * 7 ; 252
|
||||||
|
|
||||||
; significant money values
|
; significant coins values
|
||||||
DEF START_MONEY EQU 3000
|
DEF START_COINS EQU 3000
|
||||||
DEF MOM_MONEY EQU 2300
|
DEF MOM_COINS EQU 2300
|
||||||
DEF MAX_MONEY EQU 999999
|
DEF MAX_COINS EQU 999999
|
||||||
DEF MAX_CHIPS EQU 9999
|
DEF MAX_CHIPS EQU 9999
|
||||||
|
|
||||||
; link record
|
; link record
|
||||||
|
@ -11,12 +11,12 @@ DEF NUM_STRING_BUFFERS EQU const_value
|
|||||||
|
|
||||||
DEF STRING_BUFFER_LENGTH EQU 19
|
DEF STRING_BUFFER_LENGTH EQU 19
|
||||||
|
|
||||||
; checkmoney/takemoney accounts
|
; checkcoins/takecoins accounts
|
||||||
const_def
|
const_def
|
||||||
const YOUR_MONEY ; 0
|
const YOUR_COINS ; 0
|
||||||
const MOMS_MONEY ; 1
|
const MOMS_COINS ; 1
|
||||||
|
|
||||||
; checkmoney/checkchips return values
|
; checkcoins/checkchips return values
|
||||||
const_def
|
const_def
|
||||||
const HAVE_MORE ; 0
|
const HAVE_MORE ; 0
|
||||||
const HAVE_AMOUNT ; 1
|
const HAVE_AMOUNT ; 1
|
||||||
|
@ -36,12 +36,12 @@ DEF OW_TEXTBOX_FRAME_TILES EQU 14
|
|||||||
|
|
||||||
; PrintNum bit flags
|
; PrintNum bit flags
|
||||||
const_def 5
|
const_def 5
|
||||||
const PRINTNUM_MONEY_F ; 5
|
const PRINTNUM_COINS_F ; 5
|
||||||
const PRINTNUM_LEFTALIGN_F ; 6
|
const PRINTNUM_LEFTALIGN_F ; 6
|
||||||
const PRINTNUM_LEADINGZEROS_F ; 7
|
const PRINTNUM_LEADINGZEROS_F ; 7
|
||||||
|
|
||||||
; PrintNum arguments (see engine/math/print_num.asm)
|
; PrintNum arguments (see engine/math/print_num.asm)
|
||||||
DEF PRINTNUM_MONEY EQU 1 << PRINTNUM_MONEY_F
|
DEF PRINTNUM_COINS EQU 1 << PRINTNUM_COINS_F
|
||||||
DEF PRINTNUM_LEFTALIGN EQU 1 << PRINTNUM_LEFTALIGN_F
|
DEF PRINTNUM_LEFTALIGN EQU 1 << PRINTNUM_LEFTALIGN_F
|
||||||
DEF PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F
|
DEF PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
rsreset
|
rsreset
|
||||||
DEF TRNATTR_ITEM1 rb ; 0
|
DEF TRNATTR_ITEM1 rb ; 0
|
||||||
DEF TRNATTR_ITEM2 rb ; 1
|
DEF TRNATTR_ITEM2 rb ; 1
|
||||||
DEF TRNATTR_BASEMONEY rb ; 2
|
DEF TRNATTR_BASECOINS rb ; 2
|
||||||
DEF TRNATTR_AI_MOVE_WEIGHTS rw ; 3
|
DEF TRNATTR_AI_MOVE_WEIGHTS rw ; 3
|
||||||
DEF TRNATTR_AI_ITEM_SWITCH rw ; 5
|
DEF TRNATTR_AI_ITEM_SWITCH rw ; 5
|
||||||
DEF NUM_TRAINER_ATTRIBUTES EQU _RS
|
DEF NUM_TRAINER_ATTRIBUTES EQU _RS
|
||||||
|
@ -212,13 +212,13 @@ DEF SPAWN_RED EQU 2
|
|||||||
const STATUSFLAGS2_REACHED_GOLDENROD_F ; 6
|
const STATUSFLAGS2_REACHED_GOLDENROD_F ; 6
|
||||||
const STATUSFLAGS2_ROCKETS_IN_MAHOGANY_F ; 7
|
const STATUSFLAGS2_ROCKETS_IN_MAHOGANY_F ; 7
|
||||||
|
|
||||||
; wMomSavingMoney::
|
; wMomSavingCoins::
|
||||||
DEF MOM_SAVING_SOME_MONEY_F EQU 0
|
DEF MOM_SAVING_SOME_COINS_F EQU 0
|
||||||
DEF MOM_SAVING_HALF_MONEY_F EQU 1
|
DEF MOM_SAVING_HALF_COINS_F EQU 1
|
||||||
DEF MOM_SAVING_ALL_MONEY_F EQU 2
|
DEF MOM_SAVING_ALL_COINS_F EQU 2
|
||||||
DEF MOM_ACTIVE_F EQU 7
|
DEF MOM_ACTIVE_F EQU 7
|
||||||
|
|
||||||
DEF MOM_SAVING_MONEY_MASK EQU (1 << MOM_SAVING_SOME_MONEY_F) | (1 << MOM_SAVING_HALF_MONEY_F) | (1 << MOM_SAVING_ALL_MONEY_F)
|
DEF MOM_SAVING_COINS_MASK EQU (1 << MOM_SAVING_SOME_COINS_F) | (1 << MOM_SAVING_HALF_COINS_F) | (1 << MOM_SAVING_ALL_COINS_F)
|
||||||
|
|
||||||
; wJohtoBadges::
|
; wJohtoBadges::
|
||||||
const_def
|
const_def
|
||||||
|
@ -20,8 +20,8 @@ EngineFlags:
|
|||||||
engine_flag wDayCareMan, DAYCAREMAN_HAS_MON_F
|
engine_flag wDayCareMan, DAYCAREMAN_HAS_MON_F
|
||||||
engine_flag wDayCareLady, DAYCARELADY_HAS_MON_F
|
engine_flag wDayCareLady, DAYCARELADY_HAS_MON_F
|
||||||
|
|
||||||
engine_flag wMomSavingMoney, MOM_SAVING_SOME_MONEY_F
|
engine_flag wMomSavingCoins, MOM_SAVING_SOME_COINS_F
|
||||||
engine_flag wMomSavingMoney, MOM_ACTIVE_F
|
engine_flag wMomSavingCoins, MOM_ACTIVE_F
|
||||||
|
|
||||||
engine_flag wStatusFlags, STATUSFLAGS_POKEDEX_F
|
engine_flag wStatusFlags, STATUSFLAGS_POKEDEX_F
|
||||||
engine_flag wStatusFlags, STATUSFLAGS_UNOWN_DEX_F
|
engine_flag wStatusFlags, STATUSFLAGS_UNOWN_DEX_F
|
||||||
|
@ -85,8 +85,8 @@ SpecialsPointers::
|
|||||||
add_special BillsGrandfather
|
add_special BillsGrandfather
|
||||||
add_special CheckPokerus
|
add_special CheckPokerus
|
||||||
add_special DisplayChipCaseBalance
|
add_special DisplayChipCaseBalance
|
||||||
add_special DisplayMoneyAndChipBalance
|
add_special DisplayCoinsAndChipBalance
|
||||||
add_special PlaceMoneyTopRight
|
add_special PlaceCoinsTopRight
|
||||||
add_special CheckForLuckyNumberWinners
|
add_special CheckForLuckyNumberWinners
|
||||||
add_special CheckLuckyNumberShowFlag
|
add_special CheckLuckyNumberShowFlag
|
||||||
add_special ResetLuckyNumberShowFlag
|
add_special ResetLuckyNumberShowFlag
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
MACRO momitem
|
MACRO momitem
|
||||||
; money to trigger, cost, kind, item
|
; coins to trigger, cost, kind, item
|
||||||
dt \1
|
dt \1
|
||||||
dt \2
|
dt \2
|
||||||
db \3, \4
|
db \3, \4
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
BattleText:: ; used only for BANK(BattleText)
|
BattleText:: ; used only for BANK(BattleText)
|
||||||
|
|
||||||
BattleText_PlayerPickedUpPayDayMoney:
|
BattleText_PlayerPickedUpPayDayCoins:
|
||||||
text "<PLAYER> picked up"
|
text "<PLAYER> picked up"
|
||||||
line "<COIN>@"
|
line "<COIN>@"
|
||||||
text_decimal wPayDayMoney, 3, 6
|
text_decimal wPayDayCoins, 3, 6
|
||||||
text "!"
|
text "!"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ BattleText_EnemyMonFainted:
|
|||||||
line "fainted!"
|
line "fainted!"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
GotMoneyForWinningText:
|
GotCoinsForWinningText:
|
||||||
text "<PLAYER> got <COIN>@"
|
text "<PLAYER> got <COIN>@"
|
||||||
text_decimal wBattleReward, 3, 6
|
text_decimal wBattleReward, 3, 6
|
||||||
text_start
|
text_start
|
||||||
|
@ -359,9 +359,9 @@ _MomFoundAnItemText::
|
|||||||
line "item shopping, so"
|
line "item shopping, so"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
_MomBoughtWithYourMoneyText::
|
_MomBoughtWithYourCoinsText::
|
||||||
text "I bought it with"
|
text "I bought it with"
|
||||||
line "your money. Sorry!"
|
line "your coins. Sorry!"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
_MomItsInPCText::
|
_MomItsInPCText::
|
||||||
@ -1553,18 +1553,19 @@ _MomLeavingText1::
|
|||||||
line "for you?"
|
line "for you?"
|
||||||
|
|
||||||
para "I know! I'll save"
|
para "I know! I'll save"
|
||||||
line "money for you."
|
line "coins for you."
|
||||||
|
|
||||||
para "On a long journey,"
|
para "On a long journey,"
|
||||||
line "money's important."
|
line "coins are"
|
||||||
|
cont "important."
|
||||||
|
|
||||||
para "Do you want me to"
|
para "Do you want me to"
|
||||||
line "save your money?"
|
line "save your coins?"
|
||||||
done
|
done
|
||||||
|
|
||||||
_MomLeavingText2::
|
_MomLeavingText2::
|
||||||
text "OK, I'll take care"
|
text "OK, I'll take care"
|
||||||
line "of your money."
|
line "of your coins."
|
||||||
|
|
||||||
para "<……><……><……>"
|
para "<……><……><……>"
|
||||||
prompt
|
prompt
|
||||||
@ -1579,7 +1580,7 @@ _MomLeavingText3::
|
|||||||
para "Now, go on!"
|
para "Now, go on!"
|
||||||
done
|
done
|
||||||
|
|
||||||
_MomIsThisAboutYourMoneyText::
|
_MomIsThisAboutYourCoinsText::
|
||||||
text "Hi! Welcome home!"
|
text "Hi! Welcome home!"
|
||||||
line "You're trying very"
|
line "You're trying very"
|
||||||
cont "hard, I see."
|
cont "hard, I see."
|
||||||
@ -1588,7 +1589,7 @@ _MomIsThisAboutYourMoneyText::
|
|||||||
line "room tidy."
|
line "room tidy."
|
||||||
|
|
||||||
para "Or is this about"
|
para "Or is this about"
|
||||||
line "your money?"
|
line "your coins?"
|
||||||
done
|
done
|
||||||
|
|
||||||
_MomBankWhatDoYouWantToDoText::
|
_MomBankWhatDoYouWantToDoText::
|
||||||
@ -1596,19 +1597,19 @@ _MomBankWhatDoYouWantToDoText::
|
|||||||
line "to do?"
|
line "to do?"
|
||||||
done
|
done
|
||||||
|
|
||||||
_MomStoreMoneyText::
|
_MomStoreCoinsText::
|
||||||
text "How much do you"
|
text "How much do you"
|
||||||
line "want to save?"
|
line "want to save?"
|
||||||
done
|
done
|
||||||
|
|
||||||
_MomTakeMoneyText::
|
_MomTakeCoinsText::
|
||||||
text "How much do you"
|
text "How much do you"
|
||||||
line "want to take?"
|
line "want to take?"
|
||||||
done
|
done
|
||||||
|
|
||||||
_MomSaveMoneyText::
|
_MomSaveCoinsText::
|
||||||
text "Do you want to"
|
text "Do you want to"
|
||||||
line "save some money?"
|
line "save some coins?"
|
||||||
done
|
done
|
||||||
|
|
||||||
_MomHaventSavedThatMuchText::
|
_MomHaventSavedThatMuchText::
|
||||||
@ -1631,20 +1632,21 @@ _MomNotEnoughRoomInBankText::
|
|||||||
line "that much."
|
line "that much."
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
_MomStartSavingMoneyText::
|
_MomStartSavingCoinsText::
|
||||||
text "OK, I'll save your"
|
text "OK, I'll save your"
|
||||||
line "money. Trust me!"
|
line "coins. Trust me!"
|
||||||
|
|
||||||
para "<PLAYER>, stick"
|
para "<PLAYER>, stick"
|
||||||
line "with it!"
|
line "with it!"
|
||||||
done
|
done
|
||||||
|
|
||||||
_MomStoredMoneyText::
|
_MomStoredCoinsText::
|
||||||
text "Your money's safe"
|
text "Your coins are"
|
||||||
line "here! Get going!"
|
line "safe here! Get"
|
||||||
|
cont "going!"
|
||||||
done
|
done
|
||||||
|
|
||||||
_MomTakenMoneyText::
|
_MomTakenCoinsText::
|
||||||
text "<PLAYER>, don't"
|
text "<PLAYER>, don't"
|
||||||
line "give up!"
|
line "give up!"
|
||||||
done
|
done
|
||||||
@ -1804,9 +1806,9 @@ _HaveNoRoomText::
|
|||||||
line "for it."
|
line "for it."
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
_NotEnoughMoneyText::
|
_NotEnoughCoinsText::
|
||||||
text "You don't have"
|
text "You don't have"
|
||||||
line "enough money."
|
line "enough coins."
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
_OhFineThenText::
|
_OhFineThenText::
|
||||||
|
@ -380,7 +380,7 @@ _MartFinalPriceText::
|
|||||||
text_ram wStringBuffer2
|
text_ram wStringBuffer2
|
||||||
text "(S)"
|
text "(S)"
|
||||||
line "will be <COIN>@"
|
line "will be <COIN>@"
|
||||||
text_decimal hMoneyTemp, 3, 6
|
text_decimal hCoinsTemp, 3, 6
|
||||||
text "."
|
text "."
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -409,7 +409,7 @@ _HerbalLadyFinalPriceText::
|
|||||||
text_ram wStringBuffer2
|
text_ram wStringBuffer2
|
||||||
text "(S)"
|
text "(S)"
|
||||||
line "will be <COIN>@"
|
line "will be <COIN>@"
|
||||||
text_decimal hMoneyTemp, 3, 6
|
text_decimal hCoinsTemp, 3, 6
|
||||||
text "."
|
text "."
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -423,9 +423,9 @@ _HerbalLadyPackFullText::
|
|||||||
line "full, dear."
|
line "full, dear."
|
||||||
done
|
done
|
||||||
|
|
||||||
_HerbalLadyNoMoneyText::
|
_HerbalLadyNoCoinsText::
|
||||||
text "Hehehe… You don't"
|
text "Hehehe… You don't"
|
||||||
line "have the money."
|
line "have the coins."
|
||||||
done
|
done
|
||||||
|
|
||||||
_HerbalLadyComeAgainText::
|
_HerbalLadyComeAgainText::
|
||||||
@ -448,7 +448,7 @@ _BargainShopFinalPriceText::
|
|||||||
text_ram wStringBuffer2
|
text_ram wStringBuffer2
|
||||||
text " costs"
|
text " costs"
|
||||||
line "<COIN>@"
|
line "<COIN>@"
|
||||||
text_decimal hMoneyTemp, 3, 6
|
text_decimal hCoinsTemp, 3, 6
|
||||||
text ". Want it?"
|
text ". Want it?"
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -492,7 +492,7 @@ _PharmacyFinalPriceText::
|
|||||||
text_ram wStringBuffer2
|
text_ram wStringBuffer2
|
||||||
text "(S)"
|
text "(S)"
|
||||||
line "will cost <COIN>@"
|
line "will cost <COIN>@"
|
||||||
text_decimal hMoneyTemp, 3, 6
|
text_decimal hCoinsTemp, 3, 6
|
||||||
text "."
|
text "."
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -505,9 +505,9 @@ _PharmacyPackFullText::
|
|||||||
line "more space."
|
line "more space."
|
||||||
done
|
done
|
||||||
|
|
||||||
_PharmacyNoMoneyText::
|
_PharmacyNoCoinsText::
|
||||||
text "Huh? That's not"
|
text "Huh? That's not"
|
||||||
line "enough money."
|
line "enough coins."
|
||||||
done
|
done
|
||||||
|
|
||||||
_PharmacyComeAgainText::
|
_PharmacyComeAgainText::
|
||||||
@ -527,7 +527,7 @@ _MartSellHowManyText::
|
|||||||
_MartSellPriceText::
|
_MartSellPriceText::
|
||||||
text "I can pay you"
|
text "I can pay you"
|
||||||
line "<COIN>@"
|
line "<COIN>@"
|
||||||
text_decimal hMoneyTemp, 3, 6
|
text_decimal hCoinsTemp, 3, 6
|
||||||
text "."
|
text "."
|
||||||
|
|
||||||
para "Is that OK?"
|
para "Is that OK?"
|
||||||
@ -543,9 +543,9 @@ _MartThanksText::
|
|||||||
line "Thank you!"
|
line "Thank you!"
|
||||||
done
|
done
|
||||||
|
|
||||||
_MartNoMoneyText::
|
_MartNoCoinsText::
|
||||||
text "You don't have"
|
text "You don't have"
|
||||||
line "enough money."
|
line "enough coins."
|
||||||
done
|
done
|
||||||
|
|
||||||
_MartPackFullText::
|
_MartPackFullText::
|
||||||
@ -569,7 +569,7 @@ _MartAskMoreText::
|
|||||||
|
|
||||||
_MartBoughtText::
|
_MartBoughtText::
|
||||||
text "Got <COIN>@"
|
text "Got <COIN>@"
|
||||||
text_decimal hMoneyTemp, 3, 6
|
text_decimal hCoinsTemp, 3, 6
|
||||||
text " for"
|
text " for"
|
||||||
line "@"
|
line "@"
|
||||||
text_ram wStringBuffer2
|
text_ram wStringBuffer2
|
||||||
|
@ -331,9 +331,9 @@ ChipVendor_Buy500ChipsText:
|
|||||||
line "are 500 chips."
|
line "are 500 chips."
|
||||||
done
|
done
|
||||||
|
|
||||||
ChipVendor_NotEnoughMoneyText:
|
ChipVendor_NotEnoughCoinsText:
|
||||||
text "You don't have"
|
text "You don't have"
|
||||||
line "enough money."
|
line "enough coins."
|
||||||
done
|
done
|
||||||
|
|
||||||
ChipVendor_ChipCaseFullText:
|
ChipVendor_ChipCaseFullText:
|
||||||
|
@ -123,13 +123,13 @@ Until this document is filled out, the [G/S Scripting Compendium](https://hax.ii
|
|||||||
## `$21`: <code>checkitem <i>item_id</i></code>
|
## `$21`: <code>checkitem <i>item_id</i></code>
|
||||||
|
|
||||||
|
|
||||||
## `$22`: <code>givemoney <i>account</i>, <i>value</i></code>
|
## `$22`: <code>givecoins <i>account</i>, <i>value</i></code>
|
||||||
|
|
||||||
|
|
||||||
## `$23`: <code>takemoney <i>account</i>, <i>value</i></code>
|
## `$23`: <code>takecoins <i>account</i>, <i>value</i></code>
|
||||||
|
|
||||||
|
|
||||||
## `$24`: <code>checkmoney <i>account</i>, <i>value</i></code>
|
## `$24`: <code>checkcoins <i>account</i>, <i>value</i></code>
|
||||||
|
|
||||||
|
|
||||||
## `$25`: <code>givechips <i>value</i></code>
|
## `$25`: <code>givechips <i>value</i></code>
|
||||||
@ -204,9 +204,9 @@ Until this document is filled out, the [G/S Scripting Compendium](https://hax.ii
|
|||||||
## `$3C`: <code>warp <i>map</i>, <i>x</i>, <i>y</i></code>
|
## `$3C`: <code>warp <i>map</i>, <i>x</i>, <i>y</i></code>
|
||||||
|
|
||||||
|
|
||||||
## `$3D`: <code>getmoney <i>string_buffer</i>, <i>account</i></code>
|
## `$3D`: <code>getcoins <i>string_buffer</i>, <i>account</i></code>
|
||||||
|
|
||||||
<code>GetStringBuffer(<i>string_buffer</i>) = PrintNum(GetMoneyAccount(<i>account</i>))</code>
|
<code>GetStringBuffer(<i>string_buffer</i>) = PrintNum(GetCoinsAccount(<i>account</i>))</code>
|
||||||
|
|
||||||
|
|
||||||
## `$3E`: <code>getchips <i>string_buffer</i></code>
|
## `$3E`: <code>getchips <i>string_buffer</i></code>
|
||||||
|
@ -2325,19 +2325,19 @@ WinTrainerBattle:
|
|||||||
call PrintWinLossText
|
call PrintWinLossText
|
||||||
.skip_win_loss_text
|
.skip_win_loss_text
|
||||||
|
|
||||||
jp .give_money
|
jp .give_coins
|
||||||
|
|
||||||
.give_money
|
.give_coins
|
||||||
ld a, [wAmuletCoin]
|
ld a, [wAmuletCoin]
|
||||||
and a
|
and a
|
||||||
call nz, .DoubleReward
|
call nz, .DoubleReward
|
||||||
call .CheckMaxedOutMomMoney
|
call .CheckMaxedOutMomCoins
|
||||||
push af
|
push af
|
||||||
ld a, FALSE
|
ld a, FALSE
|
||||||
jr nc, .okay
|
jr nc, .okay
|
||||||
ld a, [wMomSavingMoney]
|
ld a, [wMomSavingCoins]
|
||||||
and MOM_SAVING_MONEY_MASK
|
and MOM_SAVING_COINS_MASK
|
||||||
cp (1 << MOM_SAVING_SOME_MONEY_F) | (1 << MOM_SAVING_HALF_MONEY_F)
|
cp (1 << MOM_SAVING_SOME_COINS_F) | (1 << MOM_SAVING_HALF_COINS_F)
|
||||||
jr nz, .okay
|
jr nz, .okay
|
||||||
inc a ; TRUE
|
inc a ; TRUE
|
||||||
|
|
||||||
@ -2348,7 +2348,7 @@ WinTrainerBattle:
|
|||||||
ld a, b
|
ld a, b
|
||||||
and a
|
and a
|
||||||
jr z, .loop2
|
jr z, .loop2
|
||||||
call .AddMoneyToMom
|
call .AddCoinsToMom
|
||||||
dec c
|
dec c
|
||||||
dec b
|
dec b
|
||||||
jr .loop
|
jr .loop
|
||||||
@ -2357,7 +2357,7 @@ WinTrainerBattle:
|
|||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
jr z, .done
|
jr z, .done
|
||||||
call .AddMoneyToWallet
|
call .AddCoinsToWallet
|
||||||
dec c
|
dec c
|
||||||
jr .loop2
|
jr .loop2
|
||||||
|
|
||||||
@ -2366,8 +2366,8 @@ WinTrainerBattle:
|
|||||||
call .DoubleReward
|
call .DoubleReward
|
||||||
pop af
|
pop af
|
||||||
jr nc, .KeepItAll
|
jr nc, .KeepItAll
|
||||||
ld a, [wMomSavingMoney]
|
ld a, [wMomSavingCoins]
|
||||||
and MOM_SAVING_MONEY_MASK
|
and MOM_SAVING_COINS_MASK
|
||||||
jr z, .KeepItAll
|
jr z, .KeepItAll
|
||||||
ld hl, .SentToMomTexts
|
ld hl, .SentToMomTexts
|
||||||
dec a
|
dec a
|
||||||
@ -2381,22 +2381,22 @@ WinTrainerBattle:
|
|||||||
jp StdBattleTextbox
|
jp StdBattleTextbox
|
||||||
|
|
||||||
.KeepItAll:
|
.KeepItAll:
|
||||||
ld hl, GotMoneyForWinningText
|
ld hl, GotCoinsForWinningText
|
||||||
jp StdBattleTextbox
|
jp StdBattleTextbox
|
||||||
|
|
||||||
.AddMoneyToMom:
|
.AddCoinsToMom:
|
||||||
push bc
|
push bc
|
||||||
ld hl, wBattleReward + 2
|
ld hl, wBattleReward + 2
|
||||||
ld de, wMomsMoney + 2
|
ld de, wMomsCoins + 2
|
||||||
call AddBattleMoneyToAccount
|
call AddBattleCoinsToAccount
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.AddMoneyToWallet:
|
.AddCoinsToWallet:
|
||||||
push bc
|
push bc
|
||||||
ld hl, wBattleReward + 2
|
ld hl, wBattleReward + 2
|
||||||
ld de, wMoney + 2
|
ld de, wCoins + 2
|
||||||
call AddBattleMoneyToAccount
|
call AddBattleCoinsToAccount
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2420,17 +2420,17 @@ WinTrainerBattle:
|
|||||||
dw SentHalfToMomText
|
dw SentHalfToMomText
|
||||||
dw SentAllToMomText
|
dw SentAllToMomText
|
||||||
|
|
||||||
.CheckMaxedOutMomMoney:
|
.CheckMaxedOutMomCoins:
|
||||||
ld hl, wMomsMoney + 2
|
ld hl, wMomsCoins + 2
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
cp LOW(MAX_MONEY)
|
cp LOW(MAX_COINS)
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
sbc HIGH(MAX_MONEY) ; mid
|
sbc HIGH(MAX_COINS) ; mid
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
sbc HIGH(MAX_MONEY >> 8)
|
sbc HIGH(MAX_COINS >> 8)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
AddBattleMoneyToAccount:
|
AddBattleCoinsToAccount:
|
||||||
ld c, 3
|
ld c, 3
|
||||||
and a
|
and a
|
||||||
push de
|
push de
|
||||||
@ -2450,17 +2450,17 @@ AddBattleMoneyToAccount:
|
|||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
cp LOW(MAX_MONEY)
|
cp LOW(MAX_COINS)
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
sbc HIGH(MAX_MONEY) ; mid
|
sbc HIGH(MAX_COINS) ; mid
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
sbc HIGH(MAX_MONEY >> 8)
|
sbc HIGH(MAX_COINS >> 8)
|
||||||
ret c
|
ret c
|
||||||
ld [hl], HIGH(MAX_MONEY >> 8)
|
ld [hl], HIGH(MAX_COINS >> 8)
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], HIGH(MAX_MONEY) ; mid
|
ld [hl], HIGH(MAX_COINS) ; mid
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], LOW(MAX_MONEY)
|
ld [hl], LOW(MAX_COINS)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
PlayVictoryMusic:
|
PlayVictoryMusic:
|
||||||
@ -2476,7 +2476,7 @@ PlayVictoryMusic:
|
|||||||
call IsAnyMonHoldingExpShare
|
call IsAnyMonHoldingExpShare
|
||||||
pop de
|
pop de
|
||||||
jr nz, .play_music
|
jr nz, .play_music
|
||||||
ld hl, wPayDayMoney
|
ld hl, wPayDayCoins
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
jr nz, .play_music
|
jr nz, .play_music
|
||||||
@ -8142,7 +8142,7 @@ CleanUpBattleRAM:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
CheckPayDay:
|
CheckPayDay:
|
||||||
ld hl, wPayDayMoney
|
ld hl, wPayDayCoins
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
inc hl
|
inc hl
|
||||||
@ -8151,7 +8151,7 @@ CheckPayDay:
|
|||||||
ld a, [wAmuletCoin]
|
ld a, [wAmuletCoin]
|
||||||
and a
|
and a
|
||||||
jr z, .okay
|
jr z, .okay
|
||||||
ld hl, wPayDayMoney + 2
|
ld hl, wPayDayCoins + 2
|
||||||
sla [hl]
|
sla [hl]
|
||||||
dec hl
|
dec hl
|
||||||
rl [hl]
|
rl [hl]
|
||||||
@ -8164,10 +8164,10 @@ CheckPayDay:
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
.okay
|
.okay
|
||||||
ld hl, wPayDayMoney + 2
|
ld hl, wPayDayCoins + 2
|
||||||
ld de, wMoney + 2
|
ld de, wCoins + 2
|
||||||
call AddBattleMoneyToAccount
|
call AddBattleCoinsToAccount
|
||||||
ld hl, BattleText_PlayerPickedUpPayDayMoney
|
ld hl, BattleText_PlayerPickedUpPayDayCoins
|
||||||
call StdBattleTextbox
|
call StdBattleTextbox
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ BattleCommand_PayDay:
|
|||||||
.ok
|
.ok
|
||||||
|
|
||||||
add a
|
add a
|
||||||
ld hl, wPayDayMoney + 2
|
ld hl, wPayDayCoins + 2
|
||||||
add [hl]
|
add [hl]
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
jr nc, .done
|
jr nc, .done
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
GiveMoney::
|
GiveCoins::
|
||||||
ld a, 3
|
ld a, 3
|
||||||
call AddMoney
|
call AddCoins
|
||||||
ld bc, MaxMoney
|
ld bc, MaxCoins
|
||||||
ld a, 3
|
ld a, 3
|
||||||
call CompareMoney
|
call CompareCoins
|
||||||
jr z, .not_maxed_out
|
jr z, .not_maxed_out
|
||||||
jr c, .not_maxed_out
|
jr c, .not_maxed_out
|
||||||
ld hl, MaxMoney
|
ld hl, MaxCoins
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
@ -22,14 +22,14 @@ GiveMoney::
|
|||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MaxMoney:
|
MaxCoins:
|
||||||
dt MAX_MONEY
|
dt MAX_COINS
|
||||||
|
|
||||||
TakeMoney::
|
TakeCoins::
|
||||||
ld a, 3
|
ld a, 3
|
||||||
call SubtractMoney
|
call SubtractCoins
|
||||||
jr nc, .okay
|
jr nc, .okay
|
||||||
; leave with 0 money
|
; leave with 0 coins
|
||||||
xor a
|
xor a
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
@ -43,7 +43,7 @@ TakeMoney::
|
|||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CompareMoney::
|
CompareCoins::
|
||||||
ld a, 3
|
ld a, 3
|
||||||
CompareFunds:
|
CompareFunds:
|
||||||
; a: number of bytes
|
; a: number of bytes
|
||||||
@ -91,7 +91,7 @@ CompareFunds:
|
|||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SubtractMoney:
|
SubtractCoins:
|
||||||
ld a, 3
|
ld a, 3
|
||||||
SubtractFunds:
|
SubtractFunds:
|
||||||
; a: number of bytes
|
; a: number of bytes
|
||||||
@ -126,7 +126,7 @@ SubtractFunds:
|
|||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
|
|
||||||
AddMoney:
|
AddCoins:
|
||||||
ld a, 3
|
ld a, 3
|
||||||
AddFunds:
|
AddFunds:
|
||||||
; a: number of bytes
|
; a: number of bytes
|
@ -17,7 +17,7 @@
|
|||||||
const DAYCARETEXT_GOT_BACK
|
const DAYCARETEXT_GOT_BACK
|
||||||
const DAYCARETEXT_TOO_SOON
|
const DAYCARETEXT_TOO_SOON
|
||||||
const DAYCARETEXT_PARTY_FULL
|
const DAYCARETEXT_PARTY_FULL
|
||||||
const DAYCARETEXT_NOT_ENOUGH_MONEY
|
const DAYCARETEXT_NOT_ENOUGH_COINS
|
||||||
const DAYCARETEXT_OH_FINE
|
const DAYCARETEXT_OH_FINE
|
||||||
const DAYCARETEXT_COME_AGAIN
|
const DAYCARETEXT_COME_AGAIN
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ DayCareMan:
|
|||||||
call DayCare_AskWithdrawBreedMon
|
call DayCare_AskWithdrawBreedMon
|
||||||
jr c, .print_text
|
jr c, .print_text
|
||||||
farcall RetrieveMonFromDayCareMan
|
farcall RetrieveMonFromDayCareMan
|
||||||
call DayCare_GetBackMonForMoney
|
call DayCare_GetBackMonForCoins
|
||||||
ld hl, wDayCareMan
|
ld hl, wDayCareMan
|
||||||
res DAYCAREMAN_HAS_MON_F, [hl]
|
res DAYCAREMAN_HAS_MON_F, [hl]
|
||||||
res DAYCAREMAN_MONS_COMPATIBLE_F, [hl]
|
res DAYCAREMAN_MONS_COMPATIBLE_F, [hl]
|
||||||
@ -83,7 +83,7 @@ DayCareLady:
|
|||||||
call DayCare_AskWithdrawBreedMon
|
call DayCare_AskWithdrawBreedMon
|
||||||
jr c, .print_text
|
jr c, .print_text
|
||||||
farcall RetrieveMonFromDayCareLady
|
farcall RetrieveMonFromDayCareLady
|
||||||
call DayCare_GetBackMonForMoney
|
call DayCare_GetBackMonForCoins
|
||||||
ld hl, wDayCareLady
|
ld hl, wDayCareLady
|
||||||
res DAYCARELADY_HAS_MON_F, [hl]
|
res DAYCARELADY_HAS_MON_F, [hl]
|
||||||
ld hl, wDayCareMan
|
ld hl, wDayCareMan
|
||||||
@ -187,7 +187,7 @@ DayCare_AskWithdrawBreedMon:
|
|||||||
call PrintDayCareText
|
call PrintDayCareText
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
jr c, .refused
|
jr c, .refused
|
||||||
jr .check_money
|
jr .check_coins
|
||||||
|
|
||||||
.grew_at_least_one_level
|
.grew_at_least_one_level
|
||||||
ld a, DAYCARETEXT_GENIUSES
|
ld a, DAYCARETEXT_GENIUSES
|
||||||
@ -199,11 +199,11 @@ DayCare_AskWithdrawBreedMon:
|
|||||||
call YesNoBox
|
call YesNoBox
|
||||||
jr c, .refused
|
jr c, .refused
|
||||||
|
|
||||||
.check_money
|
.check_coins
|
||||||
ld de, wMoney
|
ld de, wCoins
|
||||||
ld bc, wStringBuffer2 + 2
|
ld bc, wStringBuffer2 + 2
|
||||||
farcall CompareMoney
|
farcall CompareCoins
|
||||||
jr c, .not_enough_money
|
jr c, .not_enough_coins
|
||||||
ld a, [wPartyCount]
|
ld a, [wPartyCount]
|
||||||
cp PARTY_LENGTH
|
cp PARTY_LENGTH
|
||||||
jr nc, .party_full
|
jr nc, .party_full
|
||||||
@ -215,8 +215,8 @@ DayCare_AskWithdrawBreedMon:
|
|||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.not_enough_money
|
.not_enough_coins
|
||||||
ld a, DAYCARETEXT_NOT_ENOUGH_MONEY
|
ld a, DAYCARETEXT_NOT_ENOUGH_COINS
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -225,10 +225,10 @@ DayCare_AskWithdrawBreedMon:
|
|||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
DayCare_GetBackMonForMoney:
|
DayCare_GetBackMonForCoins:
|
||||||
ld bc, wStringBuffer2 + 2
|
ld bc, wStringBuffer2 + 2
|
||||||
ld de, wMoney
|
ld de, wCoins
|
||||||
farcall TakeMoney
|
farcall TakeCoins
|
||||||
ld a, DAYCARETEXT_WITHDRAW
|
ld a, DAYCARETEXT_WITHDRAW
|
||||||
call PrintDayCareText
|
call PrintDayCareText
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
@ -290,7 +290,7 @@ PrintDayCareText:
|
|||||||
dw .GotBackMonText ; 0e
|
dw .GotBackMonText ; 0e
|
||||||
dw .BackAlreadyText ; 0f
|
dw .BackAlreadyText ; 0f
|
||||||
dw .HaveNoRoomText ; 10
|
dw .HaveNoRoomText ; 10
|
||||||
dw .NotEnoughMoneyText ; 11
|
dw .NotEnoughCoinsText ; 11
|
||||||
dw .OhFineThenText ; 12
|
dw .OhFineThenText ; 12
|
||||||
dw .ComeAgainText ; 13
|
dw .ComeAgainText ; 13
|
||||||
|
|
||||||
@ -362,8 +362,8 @@ PrintDayCareText:
|
|||||||
text_far _HaveNoRoomText
|
text_far _HaveNoRoomText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
.NotEnoughMoneyText:
|
.NotEnoughCoinsText:
|
||||||
text_far _NotEnoughMoneyText
|
text_far _NotEnoughCoinsText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
.OhFineThenText:
|
.OhFineThenText:
|
||||||
|
@ -23,24 +23,24 @@ BankOfMom:
|
|||||||
.dw
|
.dw
|
||||||
dw .CheckIfBankInitialized
|
dw .CheckIfBankInitialized
|
||||||
dw .InitializeBank
|
dw .InitializeBank
|
||||||
dw .IsThisAboutYourMoney
|
dw .IsThisAboutYourCoins
|
||||||
dw .AccessBankOfMom
|
dw .AccessBankOfMom
|
||||||
dw .StoreMoney
|
dw .StoreCoins
|
||||||
dw .TakeMoney
|
dw .TakeCoins
|
||||||
dw .StopOrStartSavingMoney
|
dw .StopOrStartSavingCoins
|
||||||
dw .JustDoWhatYouCan
|
dw .JustDoWhatYouCan
|
||||||
dw .AskDST
|
dw .AskDST
|
||||||
|
|
||||||
.CheckIfBankInitialized:
|
.CheckIfBankInitialized:
|
||||||
ld a, [wMomSavingMoney]
|
ld a, [wMomSavingCoins]
|
||||||
bit MOM_ACTIVE_F, a
|
bit MOM_ACTIVE_F, a
|
||||||
jr nz, .savingmoneyalready
|
jr nz, .savingcoinsalready
|
||||||
set MOM_ACTIVE_F, a
|
set MOM_ACTIVE_F, a
|
||||||
ld [wMomSavingMoney], a
|
ld [wMomSavingCoins], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
jr .done_0
|
jr .done_0
|
||||||
|
|
||||||
.savingmoneyalready
|
.savingcoinsalready
|
||||||
ld a, $2
|
ld a, $2
|
||||||
|
|
||||||
.done_0
|
.done_0
|
||||||
@ -51,25 +51,25 @@ BankOfMom:
|
|||||||
ld hl, MomLeavingText1
|
ld hl, MomLeavingText1
|
||||||
call PrintText1bpp
|
call PrintText1bpp
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
jr c, .DontSaveMoney
|
jr c, .DontSaveCoins
|
||||||
ld hl, MomLeavingText2
|
ld hl, MomLeavingText2
|
||||||
call PrintText1bpp
|
call PrintText1bpp
|
||||||
ld a, (1 << MOM_ACTIVE_F) | (1 << MOM_SAVING_SOME_MONEY_F)
|
ld a, (1 << MOM_ACTIVE_F) | (1 << MOM_SAVING_SOME_COINS_F)
|
||||||
jr .done_1
|
jr .done_1
|
||||||
|
|
||||||
.DontSaveMoney:
|
.DontSaveCoins:
|
||||||
ld a, 1 << MOM_ACTIVE_F
|
ld a, 1 << MOM_ACTIVE_F
|
||||||
|
|
||||||
.done_1
|
.done_1
|
||||||
ld [wMomSavingMoney], a
|
ld [wMomSavingCoins], a
|
||||||
ld hl, MomLeavingText3
|
ld hl, MomLeavingText3
|
||||||
call PrintText1bpp
|
call PrintText1bpp
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.IsThisAboutYourMoney:
|
.IsThisAboutYourCoins:
|
||||||
ld hl, MomIsThisAboutYourMoneyText
|
ld hl, MomIsThisAboutYourCoinsText
|
||||||
call PrintText1bpp
|
call PrintText1bpp
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
jr c, .nope
|
jr c, .nope
|
||||||
@ -119,8 +119,8 @@ BankOfMom:
|
|||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.StoreMoney:
|
.StoreCoins:
|
||||||
ld hl, MomStoreMoneyText
|
ld hl, MomStoreCoinsText
|
||||||
call PrintText1bpp
|
call PrintText1bpp
|
||||||
xor a
|
xor a
|
||||||
ld hl, wStringBuffer2
|
ld hl, wStringBuffer2
|
||||||
@ -141,29 +141,29 @@ BankOfMom:
|
|||||||
inc hl
|
inc hl
|
||||||
or [hl]
|
or [hl]
|
||||||
jr z, .CancelDeposit
|
jr z, .CancelDeposit
|
||||||
ld de, wMoney
|
ld de, wCoins
|
||||||
ld bc, wStringBuffer2
|
ld bc, wStringBuffer2
|
||||||
farcall CompareMoney
|
farcall CompareCoins
|
||||||
jr c, .InsufficientFundsInWallet
|
jr c, .InsufficientFundsInWallet
|
||||||
ld hl, wStringBuffer2
|
ld hl, wStringBuffer2
|
||||||
ld de, wStringBuffer2 + 3
|
ld de, wStringBuffer2 + 3
|
||||||
ld bc, 3
|
ld bc, 3
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld bc, wMomsMoney
|
ld bc, wMomsCoins
|
||||||
ld de, wStringBuffer2
|
ld de, wStringBuffer2
|
||||||
farcall GiveMoney
|
farcall GiveCoins
|
||||||
jr c, .NotEnoughRoomInBank
|
jr c, .NotEnoughRoomInBank
|
||||||
ld bc, wStringBuffer2 + 3
|
ld bc, wStringBuffer2 + 3
|
||||||
ld de, wMoney
|
ld de, wCoins
|
||||||
farcall TakeMoney
|
farcall TakeCoins
|
||||||
ld hl, wStringBuffer2
|
ld hl, wStringBuffer2
|
||||||
ld de, wMomsMoney
|
ld de, wMomsCoins
|
||||||
ld bc, 3
|
ld bc, 3
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld de, SFX_TRANSACTION
|
ld de, SFX_TRANSACTION
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld hl, MomStoredMoneyText
|
ld hl, MomStoredCoinsText
|
||||||
call PrintText1bpp
|
call PrintText1bpp
|
||||||
ld a, $8
|
ld a, $8
|
||||||
jr .done_4
|
jr .done_4
|
||||||
@ -185,8 +185,8 @@ BankOfMom:
|
|||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.TakeMoney:
|
.TakeCoins:
|
||||||
ld hl, MomTakeMoneyText
|
ld hl, MomTakeCoinsText
|
||||||
call PrintText1bpp
|
call PrintText1bpp
|
||||||
xor a
|
xor a
|
||||||
ld hl, wStringBuffer2
|
ld hl, wStringBuffer2
|
||||||
@ -211,25 +211,25 @@ BankOfMom:
|
|||||||
ld de, wStringBuffer2 + 3
|
ld de, wStringBuffer2 + 3
|
||||||
ld bc, 3
|
ld bc, 3
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld de, wMomsMoney
|
ld de, wMomsCoins
|
||||||
ld bc, wStringBuffer2
|
ld bc, wStringBuffer2
|
||||||
farcall CompareMoney
|
farcall CompareCoins
|
||||||
jr c, .InsufficientFundsInBank
|
jr c, .InsufficientFundsInBank
|
||||||
ld bc, wMoney
|
ld bc, wCoins
|
||||||
ld de, wStringBuffer2
|
ld de, wStringBuffer2
|
||||||
farcall GiveMoney
|
farcall GiveCoins
|
||||||
jr c, .NotEnoughRoomInWallet
|
jr c, .NotEnoughRoomInWallet
|
||||||
ld bc, wStringBuffer2 + 3
|
ld bc, wStringBuffer2 + 3
|
||||||
ld de, wMomsMoney
|
ld de, wMomsCoins
|
||||||
farcall TakeMoney
|
farcall TakeCoins
|
||||||
ld hl, wStringBuffer2
|
ld hl, wStringBuffer2
|
||||||
ld de, wMoney
|
ld de, wCoins
|
||||||
ld bc, 3
|
ld bc, 3
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld de, SFX_TRANSACTION
|
ld de, SFX_TRANSACTION
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld hl, MomTakenMoneyText
|
ld hl, MomTakenCoinsText
|
||||||
call PrintText1bpp
|
call PrintText1bpp
|
||||||
ld a, $8
|
ld a, $8
|
||||||
jr .done_5
|
jr .done_5
|
||||||
@ -251,22 +251,22 @@ BankOfMom:
|
|||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.StopOrStartSavingMoney:
|
.StopOrStartSavingCoins:
|
||||||
ld hl, MomSaveMoneyText
|
ld hl, MomSaveCoinsText
|
||||||
call PrintText1bpp
|
call PrintText1bpp
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
jr c, .StopSavingMoney
|
jr c, .StopSavingCoins
|
||||||
ld a, (1 << MOM_ACTIVE_F) | (1 << MOM_SAVING_SOME_MONEY_F)
|
ld a, (1 << MOM_ACTIVE_F) | (1 << MOM_SAVING_SOME_COINS_F)
|
||||||
ld [wMomSavingMoney], a
|
ld [wMomSavingCoins], a
|
||||||
ld hl, MomStartSavingMoneyText
|
ld hl, MomStartSavingCoinsText
|
||||||
call PrintText1bpp
|
call PrintText1bpp
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.StopSavingMoney:
|
.StopSavingCoins:
|
||||||
ld a, 1 << MOM_ACTIVE_F
|
ld a, 1 << MOM_ACTIVE_F
|
||||||
ld [wMomSavingMoney], a
|
ld [wMomSavingCoins], a
|
||||||
ld a, $7
|
ld a, $7
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
ret
|
ret
|
||||||
@ -297,22 +297,22 @@ Mom_ContinueMenuSetup:
|
|||||||
ld de, Mom_SavedString
|
ld de, Mom_SavedString
|
||||||
call PlaceString
|
call PlaceString
|
||||||
hlcoord 12, 2
|
hlcoord 12, 2
|
||||||
ld de, wMomsMoney
|
ld de, wMomsCoins
|
||||||
lb bc, PRINTNUM_MONEY | 3, 6
|
lb bc, PRINTNUM_COINS | 3, 6
|
||||||
call PrintNum
|
call PrintNum
|
||||||
hlcoord 1, 4
|
hlcoord 1, 4
|
||||||
ld de, Mom_HeldString
|
ld de, Mom_HeldString
|
||||||
call PlaceString
|
call PlaceString
|
||||||
hlcoord 12, 4
|
hlcoord 12, 4
|
||||||
ld de, wMoney
|
ld de, wCoins
|
||||||
lb bc, PRINTNUM_MONEY | 3, 6
|
lb bc, PRINTNUM_COINS | 3, 6
|
||||||
call PrintNum
|
call PrintNum
|
||||||
hlcoord 1, 6
|
hlcoord 1, 6
|
||||||
pop de
|
pop de
|
||||||
call PlaceString
|
call PlaceString
|
||||||
hlcoord 12, 6
|
hlcoord 12, 6
|
||||||
ld de, wStringBuffer2
|
ld de, wStringBuffer2
|
||||||
lb bc, PRINTNUM_MONEY | PRINTNUM_LEADINGZEROS | 3, 6
|
lb bc, PRINTNUM_COINS | PRINTNUM_LEADINGZEROS | 3, 6
|
||||||
call PrintNum
|
call PrintNum
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call CopyTilemapAtOnce
|
call CopyTilemapAtOnce
|
||||||
@ -342,7 +342,7 @@ Mom_WithdrawDepositMenuJoypad:
|
|||||||
call ByteFill
|
call ByteFill
|
||||||
hlcoord 12, 6
|
hlcoord 12, 6
|
||||||
ld de, wStringBuffer2
|
ld de, wStringBuffer2
|
||||||
lb bc, PRINTNUM_MONEY | PRINTNUM_LEADINGZEROS | 3, 6
|
lb bc, PRINTNUM_COINS | PRINTNUM_LEADINGZEROS | 3, 6
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ldh a, [hVBlankCounter]
|
ldh a, [hVBlankCounter]
|
||||||
and $10
|
and $10
|
||||||
@ -405,7 +405,7 @@ Mom_WithdrawDepositMenuJoypad:
|
|||||||
ld c, l
|
ld c, l
|
||||||
ld b, h
|
ld b, h
|
||||||
ld de, wStringBuffer2
|
ld de, wStringBuffer2
|
||||||
farcall GiveMoney
|
farcall GiveCoins
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.decrementdigit
|
.decrementdigit
|
||||||
@ -414,7 +414,7 @@ Mom_WithdrawDepositMenuJoypad:
|
|||||||
ld c, l
|
ld c, l
|
||||||
ld b, h
|
ld b, h
|
||||||
ld de, wStringBuffer2
|
ld de, wStringBuffer2
|
||||||
farcall TakeMoney
|
farcall TakeCoins
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.getdigitquantity
|
.getdigitquantity
|
||||||
@ -462,24 +462,24 @@ MomLeavingText3:
|
|||||||
text_far _MomLeavingText3
|
text_far _MomLeavingText3
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MomIsThisAboutYourMoneyText:
|
MomIsThisAboutYourCoinsText:
|
||||||
text_far _MomIsThisAboutYourMoneyText
|
text_far _MomIsThisAboutYourCoinsText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MomBankWhatDoYouWantToDoText:
|
MomBankWhatDoYouWantToDoText:
|
||||||
text_far _MomBankWhatDoYouWantToDoText
|
text_far _MomBankWhatDoYouWantToDoText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MomStoreMoneyText:
|
MomStoreCoinsText:
|
||||||
text_far _MomStoreMoneyText
|
text_far _MomStoreCoinsText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MomTakeMoneyText:
|
MomTakeCoinsText:
|
||||||
text_far _MomTakeMoneyText
|
text_far _MomTakeCoinsText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MomSaveMoneyText:
|
MomSaveCoinsText:
|
||||||
text_far _MomSaveMoneyText
|
text_far _MomSaveCoinsText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MomHaventSavedThatMuchText:
|
MomHaventSavedThatMuchText:
|
||||||
@ -498,16 +498,16 @@ MomNotEnoughRoomInBankText:
|
|||||||
text_far _MomNotEnoughRoomInBankText
|
text_far _MomNotEnoughRoomInBankText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MomStartSavingMoneyText:
|
MomStartSavingCoinsText:
|
||||||
text_far _MomStartSavingMoneyText
|
text_far _MomStartSavingCoinsText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MomStoredMoneyText:
|
MomStoredCoinsText:
|
||||||
text_far _MomStoredMoneyText
|
text_far _MomStoredCoinsText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MomTakenMoneyText:
|
MomTakenCoinsText:
|
||||||
text_far _MomTakenMoneyText
|
text_far _MomTakenCoinsText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MomJustDoWhatYouCanText:
|
MomJustDoWhatYouCanText:
|
||||||
|
@ -61,37 +61,37 @@ CheckBalance_MomItem2:
|
|||||||
jr nc, .nope
|
jr nc, .nope
|
||||||
call GetItemFromMom
|
call GetItemFromMom
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ldh [hMoneyTemp], a
|
ldh [hCoinsTemp], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ldh [hMoneyTemp + 1], a
|
ldh [hCoinsTemp + 1], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ldh [hMoneyTemp + 2], a
|
ldh [hCoinsTemp + 2], a
|
||||||
ld de, wMomsMoney
|
ld de, wMomsCoins
|
||||||
ld bc, hMoneyTemp
|
ld bc, hCoinsTemp
|
||||||
farcall CompareMoney
|
farcall CompareCoins
|
||||||
jr nc, .have_enough_money
|
jr nc, .have_enough_coins
|
||||||
|
|
||||||
.nope
|
.nope
|
||||||
jr .check_have_2300
|
jr .check_have_2300
|
||||||
|
|
||||||
.have_enough_money
|
.have_enough_coins
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.check_have_2300
|
.check_have_2300
|
||||||
ld hl, hMoneyTemp
|
ld hl, hCoinsTemp
|
||||||
ld [hl], HIGH(MOM_MONEY >> 8)
|
ld [hl], HIGH(MOM_COINS >> 8)
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], HIGH(MOM_MONEY) ; mid
|
ld [hl], HIGH(MOM_COINS) ; mid
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], LOW(MOM_MONEY)
|
ld [hl], LOW(MOM_COINS)
|
||||||
.loop
|
.loop
|
||||||
ld de, wMomItemTriggerBalance
|
ld de, wMomItemTriggerBalance
|
||||||
ld bc, wMomsMoney
|
ld bc, wMomsCoins
|
||||||
farcall CompareMoney
|
farcall CompareCoins
|
||||||
jr z, .exact
|
jr z, .exact
|
||||||
jr nc, .less_than
|
jr nc, .less_than
|
||||||
call .AddMoney
|
call .AddCoins
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
.less_than
|
.less_than
|
||||||
@ -99,7 +99,7 @@ CheckBalance_MomItem2:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.exact
|
.exact
|
||||||
call .AddMoney
|
call .AddCoins
|
||||||
ld a, NUM_MOM_ITEMS_1
|
ld a, NUM_MOM_ITEMS_1
|
||||||
call RandomRange
|
call RandomRange
|
||||||
inc a
|
inc a
|
||||||
@ -107,10 +107,10 @@ CheckBalance_MomItem2:
|
|||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.AddMoney:
|
.AddCoins:
|
||||||
ld de, wMomItemTriggerBalance
|
ld de, wMomItemTriggerBalance
|
||||||
ld bc, hMoneyTemp
|
ld bc, hCoinsTemp
|
||||||
farcall AddMoney
|
farcall AddCoins
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MomBuysItem_DeductFunds:
|
MomBuysItem_DeductFunds:
|
||||||
@ -118,14 +118,14 @@ MomBuysItem_DeductFunds:
|
|||||||
ld de, 3 ; cost
|
ld de, 3 ; cost
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ldh [hMoneyTemp], a
|
ldh [hCoinsTemp], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ldh [hMoneyTemp + 1], a
|
ldh [hCoinsTemp + 1], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ldh [hMoneyTemp + 2], a
|
ldh [hCoinsTemp + 2], a
|
||||||
ld de, wMomsMoney
|
ld de, wMomsCoins
|
||||||
ld bc, hMoneyTemp
|
ld bc, hCoinsTemp
|
||||||
farcall TakeMoney
|
farcall TakeCoins
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Mom_GiveItemOrDoll:
|
Mom_GiveItemOrDoll:
|
||||||
@ -165,14 +165,14 @@ Mom_GetScriptPointer:
|
|||||||
.ItemScript:
|
.ItemScript:
|
||||||
writetext MomHiHowAreYouText
|
writetext MomHiHowAreYouText
|
||||||
writetext MomFoundAnItemText
|
writetext MomFoundAnItemText
|
||||||
writetext MomBoughtWithYourMoneyText
|
writetext MomBoughtWithYourCoinsText
|
||||||
writetext MomItsInPCText
|
writetext MomItsInPCText
|
||||||
end
|
end
|
||||||
|
|
||||||
.DollScript:
|
.DollScript:
|
||||||
writetext MomHiHowAreYouText
|
writetext MomHiHowAreYouText
|
||||||
writetext MomFoundADollText
|
writetext MomFoundADollText
|
||||||
writetext MomBoughtWithYourMoneyText
|
writetext MomBoughtWithYourCoinsText
|
||||||
writetext MomItsInYourRoomText
|
writetext MomItsInYourRoomText
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -212,8 +212,8 @@ MomFoundAnItemText:
|
|||||||
text_far _MomFoundAnItemText
|
text_far _MomFoundAnItemText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MomBoughtWithYourMoneyText:
|
MomBoughtWithYourCoinsText:
|
||||||
text_far _MomBoughtWithYourMoneyText
|
text_far _MomBoughtWithYourCoinsText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MomItsInPCText:
|
MomItsInPCText:
|
||||||
|
@ -779,7 +779,7 @@ ChipVendor_IntroScript:
|
|||||||
farwritetext ChipVendor_IntroText
|
farwritetext ChipVendor_IntroText
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
special DisplayMoneyAndChipBalance
|
special DisplayCoinsAndChipBalance
|
||||||
loadmenu .MenuHeader
|
loadmenu .MenuHeader
|
||||||
verticalmenu
|
verticalmenu
|
||||||
closewindow
|
closewindow
|
||||||
@ -790,10 +790,10 @@ ChipVendor_IntroScript:
|
|||||||
.Buy50:
|
.Buy50:
|
||||||
checkchips MAX_CHIPS - 50
|
checkchips MAX_CHIPS - 50
|
||||||
ifequal HAVE_MORE, .ChipCaseFull
|
ifequal HAVE_MORE, .ChipCaseFull
|
||||||
checkmoney YOUR_MONEY, 1000
|
checkcoins YOUR_COINS, 1000
|
||||||
ifequal HAVE_LESS, .NotEnoughMoney
|
ifequal HAVE_LESS, .NotEnoughCoins
|
||||||
givechips 50
|
givechips 50
|
||||||
takemoney YOUR_MONEY, 1000
|
takecoins YOUR_COINS, 1000
|
||||||
waitsfx
|
waitsfx
|
||||||
playsound SFX_TRANSACTION
|
playsound SFX_TRANSACTION
|
||||||
farwritetext ChipVendor_Buy50ChipsText
|
farwritetext ChipVendor_Buy50ChipsText
|
||||||
@ -803,18 +803,18 @@ ChipVendor_IntroScript:
|
|||||||
.Buy500:
|
.Buy500:
|
||||||
checkchips MAX_CHIPS - 500
|
checkchips MAX_CHIPS - 500
|
||||||
ifequal HAVE_MORE, .ChipCaseFull
|
ifequal HAVE_MORE, .ChipCaseFull
|
||||||
checkmoney YOUR_MONEY, 10000
|
checkcoins YOUR_COINS, 10000
|
||||||
ifequal HAVE_LESS, .NotEnoughMoney
|
ifequal HAVE_LESS, .NotEnoughCoins
|
||||||
givechips 500
|
givechips 500
|
||||||
takemoney YOUR_MONEY, 10000
|
takecoins YOUR_COINS, 10000
|
||||||
waitsfx
|
waitsfx
|
||||||
playsound SFX_TRANSACTION
|
playsound SFX_TRANSACTION
|
||||||
farwritetext ChipVendor_Buy500ChipsText
|
farwritetext ChipVendor_Buy500ChipsText
|
||||||
waitbutton
|
waitbutton
|
||||||
sjump .loop
|
sjump .loop
|
||||||
|
|
||||||
.NotEnoughMoney:
|
.NotEnoughCoins:
|
||||||
farwritetext ChipVendor_NotEnoughMoneyText
|
farwritetext ChipVendor_NotEnoughCoinsText
|
||||||
waitbutton
|
waitbutton
|
||||||
closetext
|
closetext
|
||||||
end
|
end
|
||||||
|
@ -14,7 +14,7 @@ Script_Whiteout:
|
|||||||
special HealParty
|
special HealParty
|
||||||
checkflag ENGINE_BUG_CONTEST_TIMER
|
checkflag ENGINE_BUG_CONTEST_TIMER
|
||||||
iftrue .bug_contest
|
iftrue .bug_contest
|
||||||
callasm HalveMoney
|
callasm HalveCoins
|
||||||
callasm GetWhiteoutSpawn
|
callasm GetWhiteoutSpawn
|
||||||
farscall Script_AbortBugContest
|
farscall Script_AbortBugContest
|
||||||
special WarpToSpawnPoint
|
special WarpToSpawnPoint
|
||||||
@ -42,9 +42,9 @@ BattleBGMap:
|
|||||||
call SetPalettes
|
call SetPalettes
|
||||||
ret
|
ret
|
||||||
|
|
||||||
HalveMoney:
|
HalveCoins:
|
||||||
; Halve the player's money.
|
; Halve the player's coins.
|
||||||
ld hl, wMoney
|
ld hl, wCoins
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
srl a
|
srl a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
|
@ -187,7 +187,7 @@ Sell_HalvePrice:
|
|||||||
|
|
||||||
BuySell_DisplaySubtotal:
|
BuySell_DisplaySubtotal:
|
||||||
push hl
|
push hl
|
||||||
ld hl, hMoneyTemp
|
ld hl, hCoinsTemp
|
||||||
ldh a, [hProduct + 1]
|
ldh a, [hProduct + 1]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ldh a, [hProduct + 2]
|
ldh a, [hProduct + 2]
|
||||||
@ -196,8 +196,8 @@ BuySell_DisplaySubtotal:
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
pop hl
|
pop hl
|
||||||
inc hl
|
inc hl
|
||||||
ld de, hMoneyTemp
|
ld de, hCoinsTemp
|
||||||
lb bc, PRINTNUM_MONEY | 3, 6
|
lb bc, PRINTNUM_COINS | 3, 6
|
||||||
call PrintNum
|
call PrintNum
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
ret
|
ret
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const_def
|
const_def
|
||||||
const MARTTEXT_HOW_MANY
|
const MARTTEXT_HOW_MANY
|
||||||
const MARTTEXT_COSTS_THIS_MUCH
|
const MARTTEXT_COSTS_THIS_MUCH
|
||||||
const MARTTEXT_NOT_ENOUGH_MONEY
|
const MARTTEXT_NOT_ENOUGH_COINS
|
||||||
const MARTTEXT_BAG_FULL
|
const MARTTEXT_BAG_FULL
|
||||||
const MARTTEXT_HERE_YOU_GO
|
const MARTTEXT_HERE_YOU_GO
|
||||||
const MARTTEXT_SOLD_OUT
|
const MARTTEXT_SOLD_OUT
|
||||||
@ -398,7 +398,7 @@ GetMartDialogGroup:
|
|||||||
.StandardMartPointers:
|
.StandardMartPointers:
|
||||||
dw MartHowManyText
|
dw MartHowManyText
|
||||||
dw MartFinalPriceText
|
dw MartFinalPriceText
|
||||||
dw MartNoMoneyText
|
dw MartNoCoinsText
|
||||||
dw MartPackFullText
|
dw MartPackFullText
|
||||||
dw MartThanksText
|
dw MartThanksText
|
||||||
dw BuyMenuLoop
|
dw BuyMenuLoop
|
||||||
@ -406,7 +406,7 @@ GetMartDialogGroup:
|
|||||||
.HerbShopPointers:
|
.HerbShopPointers:
|
||||||
dw HerbalLadyHowManyText
|
dw HerbalLadyHowManyText
|
||||||
dw HerbalLadyFinalPriceText
|
dw HerbalLadyFinalPriceText
|
||||||
dw HerbalLadyNoMoneyText
|
dw HerbalLadyNoCoinsText
|
||||||
dw HerbalLadyPackFullText
|
dw HerbalLadyPackFullText
|
||||||
dw HerbalLadyThanksText
|
dw HerbalLadyThanksText
|
||||||
dw BuyMenuLoop
|
dw BuyMenuLoop
|
||||||
@ -422,13 +422,13 @@ GetMartDialogGroup:
|
|||||||
.PharmacyPointers:
|
.PharmacyPointers:
|
||||||
dw PharmacyHowManyText
|
dw PharmacyHowManyText
|
||||||
dw PharmacyFinalPriceText
|
dw PharmacyFinalPriceText
|
||||||
dw PharmacyNoMoneyText
|
dw PharmacyNoCoinsText
|
||||||
dw PharmacyPackFullText
|
dw PharmacyPackFullText
|
||||||
dw PharmacyThanksText
|
dw PharmacyThanksText
|
||||||
dw BuyMenuLoop
|
dw BuyMenuLoop
|
||||||
|
|
||||||
BuyMenuLoop:
|
BuyMenuLoop:
|
||||||
farcall PlaceMoneyTopRight
|
farcall PlaceCoinsTopRight
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
ld hl, MenuHeader_Buy
|
ld hl, MenuHeader_Buy
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
@ -453,10 +453,10 @@ BuyMenuLoop:
|
|||||||
jr c, .cancel
|
jr c, .cancel
|
||||||
call MartConfirmPurchase
|
call MartConfirmPurchase
|
||||||
jr c, .cancel
|
jr c, .cancel
|
||||||
ld de, wMoney
|
ld de, wCoins
|
||||||
ld bc, hMoneyTemp
|
ld bc, hCoinsTemp
|
||||||
ld a, 3 ; useless load
|
ld a, 3 ; useless load
|
||||||
call CompareMoney
|
call CompareCoins
|
||||||
jr c, .insufficient_funds
|
jr c, .insufficient_funds
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
call ReceiveItem
|
call ReceiveItem
|
||||||
@ -468,9 +468,9 @@ BuyMenuLoop:
|
|||||||
ld hl, wBargainShopFlags
|
ld hl, wBargainShopFlags
|
||||||
call FlagAction
|
call FlagAction
|
||||||
call PlayTransactionSound
|
call PlayTransactionSound
|
||||||
ld de, wMoney
|
ld de, wCoins
|
||||||
ld bc, hMoneyTemp
|
ld bc, hCoinsTemp
|
||||||
call TakeMoney
|
call TakeCoins
|
||||||
ld a, MARTTEXT_HERE_YOU_GO
|
ld a, MARTTEXT_HERE_YOU_GO
|
||||||
call LoadBuyMenuText
|
call LoadBuyMenuText
|
||||||
call JoyWaitAorB
|
call JoyWaitAorB
|
||||||
@ -492,7 +492,7 @@ BuyMenuLoop:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.insufficient_funds
|
.insufficient_funds
|
||||||
ld a, MARTTEXT_NOT_ENOUGH_MONEY
|
ld a, MARTTEXT_NOT_ENOUGH_COINS
|
||||||
call LoadBuyMenuText
|
call LoadBuyMenuText
|
||||||
call JoyWaitAorB
|
call JoyWaitAorB
|
||||||
and a
|
and a
|
||||||
@ -539,11 +539,11 @@ BargainShopAskPurchaseQuantity:
|
|||||||
add hl, de
|
add hl, de
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ldh [hMoneyTemp + 2], a
|
ldh [hCoinsTemp + 2], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ldh [hMoneyTemp + 1], a
|
ldh [hCoinsTemp + 1], a
|
||||||
xor a
|
xor a
|
||||||
ldh [hMoneyTemp], a
|
ldh [hCoinsTemp], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -619,7 +619,7 @@ MenuHeader_Buy:
|
|||||||
pop hl
|
pop hl
|
||||||
ld bc, SCREEN_WIDTH
|
ld bc, SCREEN_WIDTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld c, PRINTNUM_LEADINGZEROS | PRINTNUM_MONEY | 3
|
ld c, PRINTNUM_LEADINGZEROS | PRINTNUM_COINS | 3
|
||||||
call PrintBCDNumber
|
call PrintBCDNumber
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -643,8 +643,8 @@ HerbalLadyPackFullText:
|
|||||||
text_far _HerbalLadyPackFullText
|
text_far _HerbalLadyPackFullText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
HerbalLadyNoMoneyText:
|
HerbalLadyNoCoinsText:
|
||||||
text_far _HerbalLadyNoMoneyText
|
text_far _HerbalLadyNoCoinsText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
HerbalLadyComeAgainText:
|
HerbalLadyComeAgainText:
|
||||||
@ -699,8 +699,8 @@ PharmacyPackFullText:
|
|||||||
text_far _PharmacyPackFullText
|
text_far _PharmacyPackFullText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
PharmacyNoMoneyText:
|
PharmacyNoCoinsText:
|
||||||
text_far _PharmacyNoMoneyText
|
text_far _PharmacyNoCoinsText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
PharmacyComeAgainText:
|
PharmacyComeAgainText:
|
||||||
@ -765,7 +765,7 @@ SellMenu:
|
|||||||
.okay_to_sell
|
.okay_to_sell
|
||||||
ld hl, MartSellHowManyText
|
ld hl, MartSellHowManyText
|
||||||
call PrintText1bpp
|
call PrintText1bpp
|
||||||
farcall PlaceMoneyAtTopLeftOfTextbox
|
farcall PlaceCoinsAtTopLeftOfTextbox
|
||||||
farcall SelectQuantityToSell
|
farcall SelectQuantityToSell
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
jr c, .declined
|
jr c, .declined
|
||||||
@ -776,9 +776,9 @@ SellMenu:
|
|||||||
call PrintTextboxText
|
call PrintTextboxText
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
jr c, .declined
|
jr c, .declined
|
||||||
ld de, wMoney
|
ld de, wCoins
|
||||||
ld bc, hMoneyTemp
|
ld bc, hCoinsTemp
|
||||||
call GiveMoney
|
call GiveCoins
|
||||||
ld a, [wMartItemID]
|
ld a, [wMartItemID]
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
call TossItem
|
call TossItem
|
||||||
@ -789,7 +789,7 @@ SellMenu:
|
|||||||
ld hl, MartBoughtText
|
ld hl, MartBoughtText
|
||||||
call PrintTextboxText
|
call PrintTextboxText
|
||||||
call PlayTransactionSound
|
call PlayTransactionSound
|
||||||
farcall PlaceMoneyBottomLeft
|
farcall PlaceCoinsBottomLeft
|
||||||
call JoyWaitAorB
|
call JoyWaitAorB
|
||||||
|
|
||||||
.declined
|
.declined
|
||||||
@ -826,8 +826,8 @@ MartThanksText:
|
|||||||
text_far _MartThanksText
|
text_far _MartThanksText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MartNoMoneyText:
|
MartNoCoinsText:
|
||||||
text_far _MartNoMoneyText
|
text_far _MartNoCoinsText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
MartPackFullText:
|
MartPackFullText:
|
||||||
|
@ -5,7 +5,7 @@ _PrintNum::
|
|||||||
; The high nybble of the c register specifies how many of the total amount of
|
; The high nybble of the c register specifies how many of the total amount of
|
||||||
; digits will be in front of the decimal point.
|
; digits will be in front of the decimal point.
|
||||||
; Some extra flags can be given in bits 5-7 of b.
|
; Some extra flags can be given in bits 5-7 of b.
|
||||||
; Bit 5: money if set (unless left-aligned without leading zeros)
|
; Bit 5: coins if set (unless left-aligned without leading zeros)
|
||||||
; Bit 6: left-aligned if set
|
; Bit 6: left-aligned if set
|
||||||
; Bit 7: print leading zeros if set
|
; Bit 7: print leading zeros if set
|
||||||
|
|
||||||
@ -14,11 +14,11 @@ _PrintNum::
|
|||||||
bit 5, b
|
bit 5, b
|
||||||
jr z, .main
|
jr z, .main
|
||||||
bit 7, b
|
bit 7, b
|
||||||
jr nz, .moneyflag
|
jr nz, .coinsflag
|
||||||
bit 6, b
|
bit 6, b
|
||||||
jr z, .main
|
jr z, .main
|
||||||
|
|
||||||
.moneyflag ; 101xxxxx or 011xxxxx
|
.coinsflag ; 101xxxxx or 011xxxxx
|
||||||
ld a, "<COIN>"
|
ld a, "<COIN>"
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
res 5, b ; 100xxxxx or 010xxxxx
|
res 5, b ; 100xxxxx or 010xxxxx
|
||||||
@ -150,11 +150,11 @@ _PrintNum::
|
|||||||
ld b, a
|
ld b, a
|
||||||
ldh a, [hPrintNumBuffer + 0]
|
ldh a, [hPrintNumBuffer + 0]
|
||||||
or c
|
or c
|
||||||
jr nz, .money
|
jr nz, .coins
|
||||||
call .PrintLeadingZero
|
call .PrintLeadingZero
|
||||||
jr .money_leading_zero
|
jr .coins_leading_zero
|
||||||
|
|
||||||
.money
|
.coins
|
||||||
call .PrintCoin
|
call .PrintCoin
|
||||||
push af
|
push af
|
||||||
ld a, "0"
|
ld a, "0"
|
||||||
@ -164,11 +164,11 @@ _PrintNum::
|
|||||||
ldh [hPrintNumBuffer + 0], a
|
ldh [hPrintNumBuffer + 0], a
|
||||||
inc e
|
inc e
|
||||||
dec e
|
dec e
|
||||||
jr nz, .money_leading_zero
|
jr nz, .coins_leading_zero
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], "."
|
ld [hl], "."
|
||||||
|
|
||||||
.money_leading_zero
|
.coins_leading_zero
|
||||||
call .AdvancePointer
|
call .AdvancePointer
|
||||||
call .PrintCoin
|
call .PrintCoin
|
||||||
ld a, "0"
|
ld a, "0"
|
||||||
|
@ -160,24 +160,24 @@ _ResetWRAM:
|
|||||||
ld [wChips], a
|
ld [wChips], a
|
||||||
ld [wChips + 1], a
|
ld [wChips + 1], a
|
||||||
|
|
||||||
if START_MONEY >= $10000
|
if START_COINS >= $10000
|
||||||
ld a, HIGH(START_MONEY >> 8)
|
ld a, HIGH(START_COINS >> 8)
|
||||||
endc
|
endc
|
||||||
ld [wMoney], a
|
ld [wCoins], a
|
||||||
ld a, HIGH(START_MONEY) ; mid
|
ld a, HIGH(START_COINS) ; mid
|
||||||
ld [wMoney + 1], a
|
ld [wCoins + 1], a
|
||||||
ld a, LOW(START_MONEY)
|
ld a, LOW(START_COINS)
|
||||||
ld [wMoney + 2], a
|
ld [wCoins + 2], a
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wWhichMomItem], a
|
ld [wWhichMomItem], a
|
||||||
|
|
||||||
ld hl, wMomItemTriggerBalance
|
ld hl, wMomItemTriggerBalance
|
||||||
ld [hl], HIGH(MOM_MONEY >> 8)
|
ld [hl], HIGH(MOM_COINS >> 8)
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], HIGH(MOM_MONEY) ; mid
|
ld [hl], HIGH(MOM_COINS) ; mid
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], LOW(MOM_MONEY)
|
ld [hl], LOW(MOM_COINS)
|
||||||
|
|
||||||
call InitializeNPCNames
|
call InitializeNPCNames
|
||||||
|
|
||||||
|
@ -27,38 +27,38 @@ PlaceMenuItemQuantity:
|
|||||||
.done
|
.done
|
||||||
ret
|
ret
|
||||||
|
|
||||||
PlaceMoneyTopRight:
|
PlaceCoinsTopRight:
|
||||||
ld hl, MoneyTopRightMenuHeader
|
ld hl, CoinsTopRightMenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
jr PlaceMoneyTextbox
|
jr PlaceCoinsTextbox
|
||||||
|
|
||||||
PlaceMoneyBottomLeft:
|
PlaceCoinsBottomLeft:
|
||||||
ld hl, MoneyBottomLeftMenuHeader
|
ld hl, CoinsBottomLeftMenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
jr PlaceMoneyTextbox
|
jr PlaceCoinsTextbox
|
||||||
|
|
||||||
PlaceMoneyAtTopLeftOfTextbox:
|
PlaceCoinsAtTopLeftOfTextbox:
|
||||||
ld hl, MoneyTopRightMenuHeader
|
ld hl, CoinsTopRightMenuHeader
|
||||||
lb de, 0, 11
|
lb de, 0, 11
|
||||||
call OffsetMenuHeader
|
call OffsetMenuHeader
|
||||||
|
|
||||||
PlaceMoneyTextbox:
|
PlaceCoinsTextbox:
|
||||||
call MenuBox
|
call MenuBox
|
||||||
call MenuBoxCoord2Tile
|
call MenuBoxCoord2Tile
|
||||||
ld de, SCREEN_WIDTH + 1
|
ld de, SCREEN_WIDTH + 1
|
||||||
add hl, de
|
add hl, de
|
||||||
ld de, wMoney
|
ld de, wCoins
|
||||||
lb bc, PRINTNUM_MONEY | 3, 6
|
lb bc, PRINTNUM_COINS | 3, 6
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MoneyTopRightMenuHeader:
|
CoinsTopRightMenuHeader:
|
||||||
db MENU_BACKUP_TILES ; flags
|
db MENU_BACKUP_TILES ; flags
|
||||||
menu_coords 11, 0, SCREEN_WIDTH - 1, 2
|
menu_coords 11, 0, SCREEN_WIDTH - 1, 2
|
||||||
dw NULL
|
dw NULL
|
||||||
db 1 ; default option
|
db 1 ; default option
|
||||||
|
|
||||||
MoneyBottomLeftMenuHeader:
|
CoinsBottomLeftMenuHeader:
|
||||||
db MENU_BACKUP_TILES ; flags
|
db MENU_BACKUP_TILES ; flags
|
||||||
menu_coords 0, 11, 8, 13
|
menu_coords 0, 11, 8, 13
|
||||||
dw NULL
|
dw NULL
|
||||||
@ -74,7 +74,7 @@ DisplayChipCaseBalance:
|
|||||||
ld de, ChipString
|
ld de, ChipString
|
||||||
call PlaceString
|
call PlaceString
|
||||||
hlcoord 17, 1
|
hlcoord 17, 1
|
||||||
ld de, ShowMoney_TerminatorString
|
ld de, ShowCoins_TerminatorString
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ld de, wChips
|
ld de, wChips
|
||||||
lb bc, 2, 4
|
lb bc, 2, 4
|
||||||
@ -82,17 +82,17 @@ DisplayChipCaseBalance:
|
|||||||
call PrintNum
|
call PrintNum
|
||||||
ret
|
ret
|
||||||
|
|
||||||
DisplayMoneyAndChipBalance:
|
DisplayCoinsAndChipBalance:
|
||||||
hlcoord 5, 0
|
hlcoord 5, 0
|
||||||
ld b, 3
|
ld b, 3
|
||||||
ld c, 13
|
ld c, 13
|
||||||
call Textbox1bpp
|
call Textbox1bpp
|
||||||
hlcoord 6, 1
|
hlcoord 6, 1
|
||||||
ld de, MoneyString
|
ld de, CoinsString
|
||||||
call PlaceString
|
call PlaceString
|
||||||
hlcoord 12, 1
|
hlcoord 12, 1
|
||||||
ld de, wMoney
|
ld de, wCoins
|
||||||
lb bc, PRINTNUM_MONEY | 3, 6
|
lb bc, PRINTNUM_COINS | 3, 6
|
||||||
call PrintNum
|
call PrintNum
|
||||||
hlcoord 6, 3
|
hlcoord 6, 3
|
||||||
ld de, ChipString
|
ld de, ChipString
|
||||||
@ -103,11 +103,11 @@ DisplayMoneyAndChipBalance:
|
|||||||
call PrintNum
|
call PrintNum
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MoneyString:
|
CoinsString:
|
||||||
db "MONEY@"
|
db "COINS@"
|
||||||
ChipString:
|
ChipString:
|
||||||
db "CHIP@"
|
db "CHIP@"
|
||||||
ShowMoney_TerminatorString:
|
ShowCoins_TerminatorString:
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
StartMenu_PrintSafariGameStatus: ; unreferenced
|
StartMenu_PrintSafariGameStatus: ; unreferenced
|
||||||
|
@ -228,7 +228,7 @@ TrainerCard_PrintTopHalfOfCard:
|
|||||||
ld d, 5
|
ld d, 5
|
||||||
call TrainerCard_InitBorder
|
call TrainerCard_InitBorder
|
||||||
hlcoord 2, 2
|
hlcoord 2, 2
|
||||||
ld de, .Name_Money
|
ld de, .Name_Coins
|
||||||
call PlaceString
|
call PlaceString
|
||||||
hlcoord 2, 4
|
hlcoord 2, 4
|
||||||
ld de, .ID_No
|
ld de, .ID_No
|
||||||
@ -241,8 +241,8 @@ TrainerCard_PrintTopHalfOfCard:
|
|||||||
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
||||||
call PrintNum
|
call PrintNum
|
||||||
hlcoord 7, 6
|
hlcoord 7, 6
|
||||||
ld de, wMoney
|
ld de, wCoins
|
||||||
lb bc, PRINTNUM_MONEY | 3, 6
|
lb bc, PRINTNUM_COINS | 3, 6
|
||||||
call PrintNum
|
call PrintNum
|
||||||
hlcoord 1, 3
|
hlcoord 1, 3
|
||||||
ld de, .HorizontalDivider
|
ld de, .HorizontalDivider
|
||||||
@ -254,10 +254,10 @@ TrainerCard_PrintTopHalfOfCard:
|
|||||||
predef PlaceGraphic
|
predef PlaceGraphic
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.Name_Money:
|
.Name_Coins:
|
||||||
db "NAME/"
|
db "NAME/"
|
||||||
next ""
|
next ""
|
||||||
next "MONEY@"
|
next "COINS@"
|
||||||
|
|
||||||
.ID_No:
|
.ID_No:
|
||||||
db $27, $28, -1 ; ID NO
|
db $27, $28, -1 ; ID NO
|
||||||
|
@ -98,9 +98,9 @@ ScriptCommandTable:
|
|||||||
dw Script_giveitem ; 1f
|
dw Script_giveitem ; 1f
|
||||||
dw Script_takeitem ; 20
|
dw Script_takeitem ; 20
|
||||||
dw Script_checkitem ; 21
|
dw Script_checkitem ; 21
|
||||||
dw Script_givemoney ; 22
|
dw Script_givecoins ; 22
|
||||||
dw Script_takemoney ; 23
|
dw Script_takecoins ; 23
|
||||||
dw Script_checkmoney ; 24
|
dw Script_checkcoins ; 24
|
||||||
dw Script_givechips ; 25
|
dw Script_givechips ; 25
|
||||||
dw Script_takechips ; 26
|
dw Script_takechips ; 26
|
||||||
dw Script_checkchips ; 27
|
dw Script_checkchips ; 27
|
||||||
@ -125,7 +125,7 @@ ScriptCommandTable:
|
|||||||
dw Script_warpmod ; 3a
|
dw Script_warpmod ; 3a
|
||||||
dw Script_blackoutmod ; 3b
|
dw Script_blackoutmod ; 3b
|
||||||
dw Script_warp ; 3c
|
dw Script_warp ; 3c
|
||||||
dw Script_getmoney ; 3d
|
dw Script_getcoins ; 3d
|
||||||
dw Script_getchips ; 3e
|
dw Script_getchips ; 3e
|
||||||
dw Script_getnum ; 3f
|
dw Script_getnum ; 3f
|
||||||
dw Script_getmonname ; 40
|
dw Script_getmonname ; 40
|
||||||
@ -1650,9 +1650,9 @@ Script_gettrainerclassname:
|
|||||||
ld [wNamedObjectType], a
|
ld [wNamedObjectType], a
|
||||||
jr ContinueToGetName
|
jr ContinueToGetName
|
||||||
|
|
||||||
Script_getmoney:
|
Script_getcoins:
|
||||||
call ResetStringBuffer1
|
call ResetStringBuffer1
|
||||||
call GetMoneyAccount
|
call GetCoinsAccount
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
lb bc, PRINTNUM_LEFTALIGN | 3, 6
|
lb bc, PRINTNUM_LEFTALIGN | 3, 6
|
||||||
call PrintNum
|
call PrintNum
|
||||||
@ -1771,24 +1771,24 @@ Script_checkitem:
|
|||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_givemoney:
|
Script_givecoins:
|
||||||
call GetMoneyAccount
|
call GetCoinsAccount
|
||||||
call LoadMoneyAmountToMem
|
call LoadCoinsAmountToMem
|
||||||
farcall GiveMoney
|
farcall GiveCoins
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_takemoney:
|
Script_takecoins:
|
||||||
call GetMoneyAccount
|
call GetCoinsAccount
|
||||||
call LoadMoneyAmountToMem
|
call LoadCoinsAmountToMem
|
||||||
farcall TakeMoney
|
farcall TakeCoins
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_checkmoney:
|
Script_checkcoins:
|
||||||
call GetMoneyAccount
|
call GetCoinsAccount
|
||||||
call LoadMoneyAmountToMem
|
call LoadCoinsAmountToMem
|
||||||
farcall CompareMoney
|
farcall CompareCoins
|
||||||
|
|
||||||
CompareMoneyAction:
|
CompareCoinsAction:
|
||||||
jr c, .less
|
jr c, .less
|
||||||
jr z, .exact
|
jr z, .exact
|
||||||
ld a, HAVE_MORE
|
ld a, HAVE_MORE
|
||||||
@ -1802,16 +1802,16 @@ CompareMoneyAction:
|
|||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetMoneyAccount:
|
GetCoinsAccount:
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
and a
|
and a
|
||||||
ld de, wMoney ; YOUR_MONEY
|
ld de, wCoins ; YOUR_COINS
|
||||||
ret z
|
ret z
|
||||||
ld de, wMomsMoney ; MOMS_MONEY
|
ld de, wMomsCoins ; MOMS_COINS
|
||||||
ret
|
ret
|
||||||
|
|
||||||
LoadMoneyAmountToMem:
|
LoadCoinsAmountToMem:
|
||||||
ld bc, hMoneyTemp
|
ld bc, hCoinsTemp
|
||||||
push bc
|
push bc
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
@ -1837,14 +1837,14 @@ Script_takechips:
|
|||||||
Script_checkchips:
|
Script_checkchips:
|
||||||
call LoadChipAmountToMem
|
call LoadChipAmountToMem
|
||||||
farcall CheckChips
|
farcall CheckChips
|
||||||
jr CompareMoneyAction
|
jr CompareCoinsAction
|
||||||
|
|
||||||
LoadChipAmountToMem:
|
LoadChipAmountToMem:
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ldh [hMoneyTemp + 1], a
|
ldh [hCoinsTemp + 1], a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ldh [hMoneyTemp], a
|
ldh [hCoinsTemp], a
|
||||||
ld bc, hMoneyTemp
|
ld bc, hCoinsTemp
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_checktime:
|
Script_checktime:
|
||||||
|
@ -15,8 +15,8 @@ PrintBCDNumber::
|
|||||||
ld b, c ; save flags in b
|
ld b, c ; save flags in b
|
||||||
res PRINTNUM_LEADINGZEROS_F, c
|
res PRINTNUM_LEADINGZEROS_F, c
|
||||||
res PRINTNUM_LEFTALIGN_F, c
|
res PRINTNUM_LEFTALIGN_F, c
|
||||||
res PRINTNUM_MONEY_F, c ; c now holds the length
|
res PRINTNUM_COINS_F, c ; c now holds the length
|
||||||
bit PRINTNUM_MONEY_F, b
|
bit PRINTNUM_COINS_F, b
|
||||||
jr z, .loop
|
jr z, .loop
|
||||||
bit PRINTNUM_LEADINGZEROS_F, b
|
bit PRINTNUM_LEADINGZEROS_F, b
|
||||||
jr nz, .loop ; skip currency symbol
|
jr nz, .loop ; skip currency symbol
|
||||||
@ -39,7 +39,7 @@ PrintBCDNumber::
|
|||||||
; the string is left-aligned; it needs to be moved back one space
|
; the string is left-aligned; it needs to be moved back one space
|
||||||
dec hl
|
dec hl
|
||||||
.skipLeftAlignmentAdjustment
|
.skipLeftAlignmentAdjustment
|
||||||
bit PRINTNUM_MONEY_F, b
|
bit PRINTNUM_COINS_F, b
|
||||||
jr z, .skipCurrencySymbol
|
jr z, .skipCurrencySymbol
|
||||||
ld [hl], "<COIN>" ; currency symbol
|
ld [hl], "<COIN>" ; currency symbol
|
||||||
inc hl
|
inc hl
|
||||||
@ -58,11 +58,11 @@ PrintBCDDigit::
|
|||||||
bit PRINTNUM_LEADINGZEROS_F, b ; have any non-space characters been printed?
|
bit PRINTNUM_LEADINGZEROS_F, b ; have any non-space characters been printed?
|
||||||
jr z, .outputDigit
|
jr z, .outputDigit
|
||||||
; if bit 7 is set, then no numbers have been printed yet
|
; if bit 7 is set, then no numbers have been printed yet
|
||||||
bit PRINTNUM_MONEY_F, b
|
bit PRINTNUM_COINS_F, b
|
||||||
jr z, .skipCurrencySymbol
|
jr z, .skipCurrencySymbol
|
||||||
ld [hl], "<COIN>"
|
ld [hl], "<COIN>"
|
||||||
inc hl
|
inc hl
|
||||||
res PRINTNUM_MONEY_F, b
|
res PRINTNUM_COINS_F, b
|
||||||
.skipCurrencySymbol
|
.skipCurrencySymbol
|
||||||
res PRINTNUM_LEADINGZEROS_F, b ; unset 7 to indicate that a nonzero digit has been reached
|
res PRINTNUM_LEADINGZEROS_F, b ; unset 7 to indicate that a nonzero digit has been reached
|
||||||
.outputDigit
|
.outputDigit
|
||||||
|
@ -190,8 +190,8 @@ MACRO stringtotext
|
|||||||
getstring \2, \1
|
getstring \2, \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
MACRO readmoney
|
MACRO readcoins
|
||||||
getmoney \2, \1
|
getcoins \2, \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
DEF RAM2MEM EQUS "getnum"
|
DEF RAM2MEM EQUS "getnum"
|
||||||
|
@ -225,25 +225,25 @@ MACRO checkitem
|
|||||||
db \1 ; item
|
db \1 ; item
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
const givemoney_command ; $22
|
const givecoins_command ; $22
|
||||||
MACRO givemoney
|
MACRO givecoins
|
||||||
db givemoney_command
|
db givecoins_command
|
||||||
db \1 ; account
|
db \1 ; account
|
||||||
dt \2 ; money
|
dt \2 ; coins
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
const takemoney_command ; $23
|
const takecoins_command ; $23
|
||||||
MACRO takemoney
|
MACRO takecoins
|
||||||
db takemoney_command
|
db takecoins_command
|
||||||
db \1 ; account
|
db \1 ; account
|
||||||
dt \2 ; money
|
dt \2 ; coins
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
const checkmoney_command ; $24
|
const checkcoins_command ; $24
|
||||||
MACRO checkmoney
|
MACRO checkcoins
|
||||||
db checkmoney_command
|
db checkcoins_command
|
||||||
db \1 ; account
|
db \1 ; account
|
||||||
dt \2 ; money
|
dt \2 ; coins
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
const givechips_command ; $25
|
const givechips_command ; $25
|
||||||
@ -407,9 +407,9 @@ MACRO warp
|
|||||||
db \3 ; y
|
db \3 ; y
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
const getmoney_command ; $3d
|
const getcoins_command ; $3d
|
||||||
MACRO getmoney
|
MACRO getcoins
|
||||||
db getmoney_command
|
db getcoins_command
|
||||||
db \2 ; account
|
db \2 ; account
|
||||||
db \1 ; string_buffer
|
db \1 ; string_buffer
|
||||||
ENDM
|
ENDM
|
||||||
|
2
main.asm
2
main.asm
@ -76,7 +76,7 @@ INCLUDE "engine/overworld/spawn_points.asm"
|
|||||||
INCLUDE "engine/overworld/map_setup.asm"
|
INCLUDE "engine/overworld/map_setup.asm"
|
||||||
INCLUDE "engine/events/pokecenter_pc.asm"
|
INCLUDE "engine/events/pokecenter_pc.asm"
|
||||||
INCLUDE "engine/items/mart.asm"
|
INCLUDE "engine/items/mart.asm"
|
||||||
INCLUDE "engine/events/money.asm"
|
INCLUDE "engine/events/coins.asm"
|
||||||
INCLUDE "data/items/marts.asm"
|
INCLUDE "data/items/marts.asm"
|
||||||
INCLUDE "engine/events/mom.asm"
|
INCLUDE "engine/events/mom.asm"
|
||||||
INCLUDE "engine/events/daycare.asm"
|
INCLUDE "engine/events/daycare.asm"
|
||||||
|
@ -92,7 +92,7 @@ hCurSpriteOAMFlags:: db
|
|||||||
ENDU
|
ENDU
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
hMoneyTemp:: ds 3
|
hCoinsTemp:: ds 3
|
||||||
NEXTU
|
NEXTU
|
||||||
hMGJoypadPressed:: db
|
hMGJoypadPressed:: db
|
||||||
hMGJoypadReleased:: db
|
hMGJoypadReleased:: db
|
||||||
|
14
ram/wram.asm
14
ram/wram.asm
@ -406,7 +406,7 @@ wEnemyItemState:: db
|
|||||||
wCurEnemyMoveNum:: db
|
wCurEnemyMoveNum:: db
|
||||||
|
|
||||||
wEnemyHPAtTimeOfPlayerSwitch:: dw
|
wEnemyHPAtTimeOfPlayerSwitch:: dw
|
||||||
wPayDayMoney:: ds 3
|
wPayDayCoins:: ds 3
|
||||||
|
|
||||||
wSafariMonAngerCount:: db ; unreferenced
|
wSafariMonAngerCount:: db ; unreferenced
|
||||||
wSafariMonEating:: db
|
wSafariMonEating:: db
|
||||||
@ -2329,13 +2329,13 @@ wStatusFlags2::
|
|||||||
; bit 7: rockets in mahogany
|
; bit 7: rockets in mahogany
|
||||||
db
|
db
|
||||||
|
|
||||||
wMoney:: ds 3
|
wCoins:: ds 3
|
||||||
wMomsMoney:: ds 3
|
wMomsCoins:: ds 3
|
||||||
|
|
||||||
wMomSavingMoney::
|
wMomSavingCoins::
|
||||||
; bit 0: saving some money
|
; bit 0: saving some coins
|
||||||
; bit 1: saving half money (unused)
|
; bit 1: saving half coins (unused)
|
||||||
; bit 2: saving all money (unused)
|
; bit 2: saving all coins (unused)
|
||||||
; bit 7: active
|
; bit 7: active
|
||||||
db
|
db
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user