![]() |
Routines |
Prev: 33236 | Up: Map | Next: 33631 |
Used by the routines at Handler_Ticker, ChooseLocationOrTakeJob, Handler_LocationChoice and Handler_SubGame.
|
||||||||||||||||||||
These examples are generated with the location being "London" so obviously aren't possible to see in the actual game (given London isn't a playable level - that's the first game!)
Note, this isn't a complete list - as some vary with the bonus points messaging:
|
||||||||||||||||||||
Messaging_GenerateTicker | 33339 | CALL InitialiseTickerBuffer | Call InitialiseTickerBuffer. | |||||||||||||||||
Test if the player has been deported from Russia.
|
||||||||||||||||||||
33342 | LD HL,61434 | Jump to Ticker_CheckKilledInSpain if the player hasn't been "deported from Russia". | ||||||||||||||||||
33345 | BIT 2,(HL) | |||||||||||||||||||
33347 | JR Z,Ticker_CheckKilledInSpain | |||||||||||||||||||
Player has been deported from Russia, so handle displaying the messaging in the ticker.
|
||||||||||||||||||||
33349 | RES 2,(HL) | Reset bit 2 ("Deported From Russia") in *GameState_1. | ||||||||||||||||||
33351 | RES 0,(HL) | Reset bit 0 of *GameState_1. | ||||||||||||||||||
Build the string in the ticker buffer.
|
||||||||||||||||||||
33353 | LD HL,36080 | Adds ... " deported from Russia, FO says rubbish." to the ticker buffer. | ||||||||||||||||||
33356 | CALL AddStringToBuffer | |||||||||||||||||||
33359 | LD A,90 | Set the spacing to 90 in A. | ||||||||||||||||||
33361 | LD HL,61434 | Jump to AddSpacingFillTickerBuffer if the player has no bonus points. | ||||||||||||||||||
33364 | BIT 1,(HL) | |||||||||||||||||||
33366 | JP Z,AddSpacingFillTickerBuffer | |||||||||||||||||||
33369 | RES 1,(HL) | Reset bit 1 ("Has Bonus Points?") of *GameState_1. | ||||||||||||||||||
33371 | LD HL,36119 | Adds ... " He denies smuggling out " to the ticker buffer. | ||||||||||||||||||
33374 | CALL AddStringToBuffer | |||||||||||||||||||
33377 | CALL AddBonusPointsToTicker | Adds the players bonus points to the ticker buffer. | ||||||||||||||||||
33380 | LD HL,36273 | Adds ... " bonus pts." to the ticker buffer. | ||||||||||||||||||
33383 | CALL AddStringToBuffer | |||||||||||||||||||
33386 | LD A,120 | Set the spacing to 120 and jump to AddSpacingFillTickerBuffer. | ||||||||||||||||||
33388 | JP AddSpacingFillTickerBuffer | |||||||||||||||||||
Test if the player has been hit by the bull in Madrid.
|
||||||||||||||||||||
Ticker_CheckKilledInSpain | 33391 | BIT 3,(HL) | Jump to Ticker_CheckSubGameWasSuccess if the player has not been hit by the bull. | |||||||||||||||||
33393 | JR Z,Ticker_CheckSubGameWasSuccess | |||||||||||||||||||
Player has been hit by the bull, so handle displaying the messaging in the ticker.
|
||||||||||||||||||||
33395 | RES 3,(HL) | Reset bit 3 ("Hit By The Bull") of *GameState_1. | ||||||||||||||||||
33397 | RES 0,(HL) | Reset bit 0 of *GameState_1. | ||||||||||||||||||
Build the string in the ticker buffer.
|
||||||||||||||||||||
33399 | LD HL,36144 | Adds ... " killed in Spain, while crowd cheers." to the ticker buffer. | ||||||||||||||||||
33402 | CALL AddStringToBuffer | |||||||||||||||||||
33405 | LD A,85 | Set the spacing to 85 in A. | ||||||||||||||||||
33407 | LD HL,61434 | Jump to AddSpacingFillTickerBuffer if the player has no bonus points. | ||||||||||||||||||
33410 | BIT 1,(HL) | |||||||||||||||||||
33412 | JP Z,AddSpacingFillTickerBuffer | |||||||||||||||||||
33415 | RES 1,(HL) | Reset bit 1 ("Has Bonus Points?") of *GameState_1. | ||||||||||||||||||
33417 | LD HL,36181 | Adds ... " His " to the ticker buffer. | ||||||||||||||||||
33420 | CALL AddStringToBuffer | |||||||||||||||||||
33423 | CALL AddBonusPointsToTicker | Adds the players bonus points to the ticker buffer. | ||||||||||||||||||
33426 | LD HL,36186 | Adds ... " Bonus pts. will be flown back to the U.K. today." to the ticker buffer. | ||||||||||||||||||
33429 | CALL AddStringToBuffer | |||||||||||||||||||
33432 | LD A,142 | Set the spacing to 142 and jump to AddSpacingFillTickerBuffer. | ||||||||||||||||||
33434 | JP AddSpacingFillTickerBuffer | |||||||||||||||||||
Did the player manage to complete the sub-game?
|
||||||||||||||||||||
Ticker_CheckSubGameWasSuccess | 33437 | BIT 0,(HL) | Jump to Ticker_CheckSubGameWasSuccess_WithBonusPoints if bit 0 of *GameState_1 is not set. | |||||||||||||||||
33439 | JR Z,Ticker_CheckSubGameWasSuccess_WithBonusPoints | |||||||||||||||||||
33441 | RES 0,(HL) | Reset bit 0 of *GameState_1. | ||||||||||||||||||
Build the string in the ticker buffer.
|
||||||||||||||||||||
33443 | LD HL,36235 | Adds ... " successfully cleans up " to the ticker buffer. | ||||||||||||||||||
33446 | CALL AddStringToBuffer | |||||||||||||||||||
33449 | CALL AddLocationTickerBuffer | Add the current location name to the ticker buffer. | ||||||||||||||||||
33452 | LD HL,36259 | Adds ... " ." to the ticker buffer. | ||||||||||||||||||
33455 | CALL AddStringToBuffer | |||||||||||||||||||
33458 | LD A,90 | Set the spacing to 90 and jump to AddSpacingFillTickerBuffer. | ||||||||||||||||||
33460 | JP AddSpacingFillTickerBuffer | |||||||||||||||||||
As above, but also with bonus points.
|
||||||||||||||||||||
Ticker_CheckSubGameWasSuccess_WithBonusPoints | 33463 | BIT 1,(HL) | Jump to Ticker_CheckStranded if the player has no bonus points. | |||||||||||||||||
33465 | JR Z,Ticker_CheckStranded | |||||||||||||||||||
Player has completed the sub-game and has bonus points, so handle displaying the messaging in the ticker.
|
||||||||||||||||||||
33467 | RES 1,(HL) | Reset bit 1 ("Has Bonus Points?") of *GameState_1. | ||||||||||||||||||
Build the string in the ticker buffer.
|
||||||||||||||||||||
33469 | LD HL,36235 | Adds ... " successfully cleans up " to the ticker buffer. | ||||||||||||||||||
33472 | CALL AddStringToBuffer | |||||||||||||||||||
33475 | CALL AddLocationTickerBuffer | Add the current location name to the ticker buffer. | ||||||||||||||||||
33478 | LD HL,36261 | Adds ... " and gains " to the ticker buffer. | ||||||||||||||||||
33481 | CALL AddStringToBuffer | |||||||||||||||||||
33484 | CALL AddBonusPointsToTicker | Add the players bonus points to the ticker buffer. | ||||||||||||||||||
33487 | LD HL,36273 | Adds ... " bonus pts." to the ticker buffer. | ||||||||||||||||||
33490 | CALL AddStringToBuffer | |||||||||||||||||||
33493 | LD A,110 | Set the spacing to 110 and jump to AddSpacingFillTickerBuffer. | ||||||||||||||||||
33495 | JP AddSpacingFillTickerBuffer | |||||||||||||||||||
Is the player out of money and stranded in their current location?
|
||||||||||||||||||||
Ticker_CheckStranded | 33498 | BIT 4,(HL) | Jump to Ticker_CheckAffordToFly if the player is not "stranded" (doesn't have enough money to fly). | |||||||||||||||||
33500 | JR Z,Ticker_CheckAffordToFly | |||||||||||||||||||
Player is stranded in their current location, so handle displaying the messaging in the ticker.
|
||||||||||||||||||||
33502 | RES 4,(HL) | Reset bit 4 ("Stranded") of *GameState_1. | ||||||||||||||||||
Build the string in the ticker buffer.
|
||||||||||||||||||||
33504 | LD HL,36035 | Adds ... " stranded in " to the ticker buffer. | ||||||||||||||||||
33507 | CALL AddStringToBuffer | |||||||||||||||||||
33510 | CALL AddLocationTickerBuffer | Add the current location name to the ticker buffer. | ||||||||||||||||||
33513 | LD HL,36048 | Adds ... ", penniless." to the ticker buffer. | ||||||||||||||||||
33516 | CALL AddStringToBuffer | |||||||||||||||||||
33519 | LD A,80 | Set the spacing to 80 and jump to AddSpacingFillTickerBuffer. | ||||||||||||||||||
33521 | JP AddSpacingFillTickerBuffer | |||||||||||||||||||
Can the player not afford to fly?
|
||||||||||||||||||||
Ticker_CheckAffordToFly | 33524 | BIT 5,(HL) | Jump to Ticker_CheckGameWasCompleted if the player can afford to fly to someplace else. | |||||||||||||||||
33526 | JR Z,Ticker_CheckGameWasCompleted | |||||||||||||||||||
The player is broke and can't afford to fly to a new destination, so handle displaying this in the ticker.
|
||||||||||||||||||||
33528 | RES 5,(HL) | Reset bit 5 ("Can't Afford To Fly") of *GameState_1. | ||||||||||||||||||
Build the string in the ticker buffer.
|
||||||||||||||||||||
33530 | LD HL,36035 | Adds ... " stranded in " to the ticker buffer. | ||||||||||||||||||
33533 | CALL AddStringToBuffer | |||||||||||||||||||
33536 | CALL AddLocationTickerBuffer | Add the current location name to the ticker buffer. | ||||||||||||||||||
33539 | LD HL,36060 | Adds ... ", without fare home." to the ticker buffer. | ||||||||||||||||||
33542 | CALL AddStringToBuffer | |||||||||||||||||||
33545 | LD A,90 | Set the spacing to 90 and jump to AddSpacingFillTickerBuffer. | ||||||||||||||||||
33547 | JP AddSpacingFillTickerBuffer | |||||||||||||||||||
Has the player completed ALL the sub-games?
|
||||||||||||||||||||
Ticker_CheckGameWasCompleted | 33550 | BIT 6,(HL) | Jump to Ticker_CheckFlyingToNewDestination if the player hasn't yet completed all the sub-games. | |||||||||||||||||
33552 | JR Z,Ticker_CheckFlyingToNewDestination | |||||||||||||||||||
Player has completed all the sub-games, so handle displaying the messaging in the ticker.
|
||||||||||||||||||||
33554 | RES 6,(HL) | Reset bit 6 ("Completed All Locations") of *GameState_1. | ||||||||||||||||||
Build the string in the ticker buffer.
|
||||||||||||||||||||
33556 | LD HL,36284 | Adds ... " completes round world trip........... time machine found in " to the ticker buffer. | ||||||||||||||||||
33559 | CALL AddStringToBuffer | |||||||||||||||||||
33562 | CALL AddLocationTickerBuffer | Add the current location name to the ticker buffer. | ||||||||||||||||||
33565 | LD A,120 | Set the spacing to 120 and jump to AddSpacingFillTickerBuffer. | ||||||||||||||||||
33567 | JP AddSpacingFillTickerBuffer | |||||||||||||||||||
Is the player flying somewhere new?
|
||||||||||||||||||||
Ticker_CheckFlyingToNewDestination | 33570 | BIT 7,(HL) | Just return if the player is not flying somewhere new, there are no more conditions covered. | |||||||||||||||||
33572 | RET Z | |||||||||||||||||||
Player is flying to a new destination, so handle displaying the messaging in the ticker.
|
||||||||||||||||||||
33573 | RES 7,(HL) | Reset bit 7 ("Flying To New Destination") of *GameState_1. | ||||||||||||||||||
Build the string in the ticker buffer.
|
||||||||||||||||||||
33575 | LD HL,36026 | Adds ... " flies to" to the ticker buffer. | ||||||||||||||||||
33578 | CALL AddStringToBuffer | |||||||||||||||||||
33581 | CALL AddLocationTickerBuffer | Add the current location name to the ticker buffer. | ||||||||||||||||||
33584 | LD A,70 | Set the spacing to 70 and jump to AddSpacingFillTickerBuffer. | ||||||||||||||||||
33586 | JP AddSpacingFillTickerBuffer | |||||||||||||||||||
Adds the players bonus points count to the ticker.
|
||||||||||||||||||||
AddBonusPointsToTicker | 33589 | LD HL,61432 | HL=ActivePlayerCash_02. | |||||||||||||||||
33592 | LD IX,61435 | IX=GameState_2. | ||||||||||||||||||
33596 | SET 4,(IX+0) | Set bit 4 ("Used for printing scores/ stripping off leading zeroes") of *IX+0. | ||||||||||||||||||
33600 | LD C,2 | Set a counter in C for the number of digits (2). | ||||||||||||||||||
ProcessBonusPointsDigit_Loop | 33602 | LD B,2 | Set a counter in B for the count of how many score digits are to be processed in each score byte (2). | |||||||||||||||||
ProcessBonusPoints_Loop | 33604 | LD A,48 | Load A with ASCII "0" (48). | |||||||||||||||||
33606 | RLD | Extract the score digit into the accumulator. | ||||||||||||||||||
Don't print any zeros while bit 4 is set, it's only unset when a printable digit is "found" (i.e. not a zero). Once it is, then the zero characters are set freely (e.g. we won't print 001, but we will print 100).
|
||||||||||||||||||||
33608 | BIT 4,(IX+0) | Jump to WriteDigitToTickerBuffer if bit 4 of *IX+0 is not set. | ||||||||||||||||||
33612 | JR Z,WriteDigitToTickerBuffer | |||||||||||||||||||
Strip off leading zeros.
|
||||||||||||||||||||
33614 | CP 48 | Jump to BonusPointsProcessNextNumber if the current digit is "0". | ||||||||||||||||||
33616 | JR Z,BonusPointsProcessNextNumber | |||||||||||||||||||
The digit is not a zero, so flag and process.
|
||||||||||||||||||||
33618 | RES 4,(IX+0) | Reset bit 4 ("Used for printing scores/ stripping off leading zeroes") of *IX+0. | ||||||||||||||||||
WriteDigitToTickerBuffer | 33622 | LD (DE),A | Write the digit to the ticker buffer. | |||||||||||||||||
33623 | INC DE | Increment the ticker buffer pointer by one. | ||||||||||||||||||
BonusPointsProcessNextNumber | 33624 | DJNZ ProcessBonusPoints_Loop | Decrease counter by one and loop back to ProcessBonusPoints_Loop until counter is zero. | |||||||||||||||||
The score is evaluated backwards.
|
||||||||||||||||||||
33626 | DEC HL | Decrease the score pointer by one. | ||||||||||||||||||
33627 | DEC C | Decrease the score digit counter by one. | ||||||||||||||||||
33628 | JR NZ,ProcessBonusPointsDigit_Loop | Jump to ProcessBonusPointsDigit_Loop until both digits of the score have been processed. | ||||||||||||||||||
33630 | RET | Return. |
Prev: 33236 | Up: Map | Next: 33631 |