Prev: 81D4 Up: Map Next: 835F
823B: Generate Ticker Messaging
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:
Bit Message
01 ticker-01
02 ticker-02
03 ticker-03
04 ticker-04
05 ticker-05
06 ticker-06
07 ticker-07
Messaging_GenerateTicker 823B CALL InitialiseTickerBuffer Call InitialiseTickerBuffer.
Test if the player has been deported from Russia.
823E LD HL,$EFFA Jump to Ticker_CheckKilledInSpain if the player hasn't been "deported from Russia".
8241 BIT 2,(HL)
8243 JR Z,Ticker_CheckKilledInSpain
Player has been deported from Russia, so handle displaying the messaging in the ticker.
8245 RES 2,(HL) Reset bit 2 ("Deported From Russia") in *GameState_1.
8247 RES 0,(HL) Reset bit 0 of *GameState_1.
Build the string in the ticker buffer.
8249 LD HL,$8CF0 Adds ... " deported from Russia, FO says rubbish." to the ticker buffer.
824C CALL AddStringToBuffer
824F LD A,$5A Set the spacing to 5A in A.
8251 LD HL,$EFFA Jump to AddSpacingFillTickerBuffer if the player has no bonus points.
8254 BIT 1,(HL)
8256 JP Z,AddSpacingFillTickerBuffer
8259 RES 1,(HL) Reset bit 1 ("Has Bonus Points?") of *GameState_1.
825B LD HL,$8D17 Adds ... " He denies smuggling out " to the ticker buffer.
825E CALL AddStringToBuffer
8261 CALL AddBonusPointsToTicker Adds the players bonus points to the ticker buffer.
8264 LD HL,$8DB1 Adds ... " bonus pts." to the ticker buffer.
8267 CALL AddStringToBuffer
826A LD A,$78 Set the spacing to 78 and jump to AddSpacingFillTickerBuffer.
826C JP AddSpacingFillTickerBuffer
Test if the player has been hit by the bull in Madrid.
Ticker_CheckKilledInSpain 826F BIT 3,(HL) Jump to Ticker_CheckSubGameWasSuccess if the player has not been hit by the bull.
8271 JR Z,Ticker_CheckSubGameWasSuccess
Player has been hit by the bull, so handle displaying the messaging in the ticker.
8273 RES 3,(HL) Reset bit 3 ("Hit By The Bull") of *GameState_1.
8275 RES 0,(HL) Reset bit 0 of *GameState_1.
Build the string in the ticker buffer.
8277 LD HL,$8D30 Adds ... " killed in Spain, while crowd cheers." to the ticker buffer.
827A CALL AddStringToBuffer
827D LD A,$55 Set the spacing to 55 in A.
827F LD HL,$EFFA Jump to AddSpacingFillTickerBuffer if the player has no bonus points.
8282 BIT 1,(HL)
8284 JP Z,AddSpacingFillTickerBuffer
8287 RES 1,(HL) Reset bit 1 ("Has Bonus Points?") of *GameState_1.
8289 LD HL,$8D55 Adds ... " His " to the ticker buffer.
828C CALL AddStringToBuffer
828F CALL AddBonusPointsToTicker Adds the players bonus points to the ticker buffer.
8292 LD HL,$8D5A Adds ... " Bonus pts. will be flown back to the U.K. today." to the ticker buffer.
8295 CALL AddStringToBuffer
8298 LD A,$8E Set the spacing to 8E and jump to AddSpacingFillTickerBuffer.
829A JP AddSpacingFillTickerBuffer
Did the player manage to complete the sub-game?
Ticker_CheckSubGameWasSuccess 829D BIT 0,(HL) Jump to Ticker_CheckSubGameWasSuccess_WithBonusPoints if bit 0 of *GameState_1 is not set.
829F JR Z,Ticker_CheckSubGameWasSuccess_WithBonusPoints
82A1 RES 0,(HL) Reset bit 0 of *GameState_1.
Build the string in the ticker buffer.
82A3 LD HL,$8D8B Adds ... " successfully cleans up " to the ticker buffer.
82A6 CALL AddStringToBuffer
82A9 CALL AddLocationTickerBuffer Add the current location name to the ticker buffer.
82AC LD HL,$8DA3 Adds ... " ." to the ticker buffer.
82AF CALL AddStringToBuffer
82B2 LD A,$5A Set the spacing to 5A and jump to AddSpacingFillTickerBuffer.
82B4 JP AddSpacingFillTickerBuffer
As above, but also with bonus points.
Ticker_CheckSubGameWasSuccess_WithBonusPoints 82B7 BIT 1,(HL) Jump to Ticker_CheckStranded if the player has no bonus points.
82B9 JR Z,Ticker_CheckStranded
Player has completed the sub-game and has bonus points, so handle displaying the messaging in the ticker.
82BB RES 1,(HL) Reset bit 1 ("Has Bonus Points?") of *GameState_1.
Build the string in the ticker buffer.
82BD LD HL,$8D8B Adds ... " successfully cleans up " to the ticker buffer.
82C0 CALL AddStringToBuffer
82C3 CALL AddLocationTickerBuffer Add the current location name to the ticker buffer.
82C6 LD HL,$8DA5 Adds ... " and gains " to the ticker buffer.
82C9 CALL AddStringToBuffer
82CC CALL AddBonusPointsToTicker Add the players bonus points to the ticker buffer.
82CF LD HL,$8DB1 Adds ... " bonus pts." to the ticker buffer.
82D2 CALL AddStringToBuffer
82D5 LD A,$6E Set the spacing to 6E and jump to AddSpacingFillTickerBuffer.
82D7 JP AddSpacingFillTickerBuffer
Is the player out of money and stranded in their current location?
Ticker_CheckStranded 82DA BIT 4,(HL) Jump to Ticker_CheckAffordToFly if the player is not "stranded" (doesn't have enough money to fly).
82DC JR Z,Ticker_CheckAffordToFly
Player is stranded in their current location, so handle displaying the messaging in the ticker.
82DE RES 4,(HL) Reset bit 4 ("Stranded") of *GameState_1.
Build the string in the ticker buffer.
82E0 LD HL,$8CC3 Adds ... " stranded in " to the ticker buffer.
82E3 CALL AddStringToBuffer
82E6 CALL AddLocationTickerBuffer Add the current location name to the ticker buffer.
82E9 LD HL,$8CD0 Adds ... ", penniless." to the ticker buffer.
82EC CALL AddStringToBuffer
82EF LD A,$50 Set the spacing to 50 and jump to AddSpacingFillTickerBuffer.
82F1 JP AddSpacingFillTickerBuffer
Can the player not afford to fly?
Ticker_CheckAffordToFly 82F4 BIT 5,(HL) Jump to Ticker_CheckGameWasCompleted if the player can afford to fly to someplace else.
82F6 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.
82F8 RES 5,(HL) Reset bit 5 ("Can't Afford To Fly") of *GameState_1.
Build the string in the ticker buffer.
82FA LD HL,$8CC3 Adds ... " stranded in " to the ticker buffer.
82FD CALL AddStringToBuffer
8300 CALL AddLocationTickerBuffer Add the current location name to the ticker buffer.
8303 LD HL,$8CDC Adds ... ", without fare home." to the ticker buffer.
8306 CALL AddStringToBuffer
8309 LD A,$5A Set the spacing to 5A and jump to AddSpacingFillTickerBuffer.
830B JP AddSpacingFillTickerBuffer
Has the player completed ALL the sub-games?
Ticker_CheckGameWasCompleted 830E BIT 6,(HL) Jump to Ticker_CheckFlyingToNewDestination if the player hasn't yet completed all the sub-games.
8310 JR Z,Ticker_CheckFlyingToNewDestination
Player has completed all the sub-games, so handle displaying the messaging in the ticker.
8312 RES 6,(HL) Reset bit 6 ("Completed All Locations") of *GameState_1.
Build the string in the ticker buffer.
8314 LD HL,$8DBC Adds ... " completes round world trip........... time machine found in " to the ticker buffer.
8317 CALL AddStringToBuffer
831A CALL AddLocationTickerBuffer Add the current location name to the ticker buffer.
831D LD A,$78 Set the spacing to 78 and jump to AddSpacingFillTickerBuffer.
831F JP AddSpacingFillTickerBuffer
Is the player flying somewhere new?
Ticker_CheckFlyingToNewDestination 8322 BIT 7,(HL) Just return if the player is not flying somewhere new, there are no more conditions covered.
8324 RET Z
Player is flying to a new destination, so handle displaying the messaging in the ticker.
8325 RES 7,(HL) Reset bit 7 ("Flying To New Destination") of *GameState_1.
Build the string in the ticker buffer.
8327 LD HL,$8CBA Adds ... " flies to" to the ticker buffer.
832A CALL AddStringToBuffer
832D CALL AddLocationTickerBuffer Add the current location name to the ticker buffer.
8330 LD A,$46 Set the spacing to 46 and jump to AddSpacingFillTickerBuffer.
8332 JP AddSpacingFillTickerBuffer
Adds the players bonus points count to the ticker.
AddBonusPointsToTicker 8335 LD HL,$EFF8 HL=ActivePlayerCash_02.
8338 LD IX,$EFFB IX=GameState_2.
833C SET 4,(IX+$00) Set bit 4 ("Used for printing scores/ stripping off leading zeroes") of *IX+00.
8340 LD C,$02 Set a counter in C for the number of digits (02).
ProcessBonusPointsDigit_Loop 8342 LD B,$02 Set a counter in B for the count of how many score digits are to be processed in each score byte (02).
ProcessBonusPoints_Loop 8344 LD A,$30 Load A with ASCII "0" (30).
8346 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).
8348 BIT 4,(IX+$00) Jump to WriteDigitToTickerBuffer if bit 4 of *IX+00 is not set.
834C JR Z,WriteDigitToTickerBuffer
Strip off leading zeros.
834E CP $30 Jump to BonusPointsProcessNextNumber if the current digit is "0".
8350 JR Z,BonusPointsProcessNextNumber
The digit is not a zero, so flag and process.
8352 RES 4,(IX+$00) Reset bit 4 ("Used for printing scores/ stripping off leading zeroes") of *IX+00.
WriteDigitToTickerBuffer 8356 LD (DE),A Write the digit to the ticker buffer.
8357 INC DE Increment the ticker buffer pointer by one.
BonusPointsProcessNextNumber 8358 DJNZ ProcessBonusPoints_Loop Decrease counter by one and loop back to ProcessBonusPoints_Loop until counter is zero.
The score is evaluated backwards.
835A DEC HL Decrease the score pointer by one.
835B DEC C Decrease the score digit counter by one.
835C JR NZ,ProcessBonusPointsDigit_Loop Jump to ProcessBonusPointsDigit_Loop until both digits of the score have been processed.
835E RET Return.
Prev: 81D4 Up: Map Next: 835F