![]() |
Routines |
Prev: 34876 | Up: Map | Next: 35180 |
Used by the routines at ChooseLocationOrTakeJob and Handler_SubGame.
|
||||||||
Check_AffordToFly | 35151 | LD L,(IX+8) | Fetch the players current location and store it in HL. | |||||
35154 | LD H,(IX+9) | |||||||
35157 | LD DE,6 | Move HL by 0006 to point to the destination cost. | ||||||
35160 | ADD HL,DE | |||||||
35161 | LD E,(HL) | Load the cost of this destination into DE. | ||||||
35162 | INC HL | |||||||
35163 | LD D,(HL) | |||||||
35164 | LD L,(IX+13) | Loads the active players cash balance into HL. | ||||||
35167 | LD H,(IX+14) | |||||||
35170 | AND A | Subtract the cost of the destination from the active players cash balance. | ||||||
35171 | SBC HL,DE | |||||||
35173 | LD HL,61434 | Return if the player can afford the "cheapest" destination. | ||||||
35176 | RET NC | |||||||
Else, the player is stuck in their current destination. Set the flag for this.
|
||||||||
35177 | SET 5,(HL) | Set bit 5 ("Can't Afford To Fly") of *GameState_1. | ||||||
35179 | RET | Return. |
Prev: 34876 | Up: Map | Next: 35180 |