Prev: 31917 Up: Map Next: 32549
32289: Draw the inner border for the intro sequence
After drawing the decorative border, this routine draws the rectangular 'spiky' border at the edge of the picture that you can see during the intro sequence.
Graphics for the border and backdrop are stored at 33375.
intro inner border
The border on the left hand side of the screen is drawn first:
32289 LD A,1 1 column
32291 LD (35759),A
32294 LD A,12 12 rows
32296 LD (35760),A
32299 LD HL,33375 Address pointer for left-hand border graphic
32302 LD (31940),HL Store the border graphic address. This appears to be overwriting earlier code. However, this code that's overwritten is part of the decorative border which is already drawn, so doesn't need to be executed again.
32305 LD HL,16482 Set screen display address
32308 CALL 33319 Drawing routine (to draw the graphic 12 times in a vertical line)
...Then the border on the right hand side
32311 LD A,1 1 column
32313 LD (35759),A
32316 LD A,12 12 rows
32318 LD (35760),A
32321 LD HL,33407 Address pointer for right-hand border graphic
32324 LD (31940),HL Store the border graphic address. This looks like a mistake as it seems to be overwriting earlier code at 31940. However, this code is part of the decorative border drawing so doesn't need to be executed again.
32327 LD HL,16509 Set screen address
32330 CALL 33319 Drawing routine (to draw the graphic 12 times in a vertical line)
Draw the top right 'corner piece' of the border
32333 LD A,1 Just 1 character (1 row, 1 column)
32335 LD (35759),A
32338 LD A,1
32340 LD (35760),A
32343 LD HL,33415 Store address of top right-hand corner graphic
32346 LD (31940),HL
32349 LD HL,16477 Set screen display address
32352 CALL 33319 Draw the graphic
Draw the bottom left 'corner piece' of the border
32355 LD A,1 Just 1 character (1 row, 1 column)
32357 LD (35759),A
32360 LD A,1
32362 LD (35760),A
32365 LD HL,33383 Store address of bottom left-hand corner graphic
32368 LD (31940),HL
32371 LD HL,18658 Set screen display address
32374 CALL 33319 Draw the graphic
Draw the bottom right 'corner piece' of the border
32377 LD A,1 Just 1 character (1 row, 1 column)
32379 LD (35759),A
32382 LD A,1
32384 LD (35760),A
32387 LD HL,33399 Store address of bottom right-hand corner graphic
32390 LD (31940),HL
32393 LD HL,18685 Set screen display address
32396 CALL 33319 Draw the graphic
Draw bottom border
32399 LD A,26 26 columns to draw
32401 LD (35759),A
32404 LD A,1 1 row
32406 LD (35760),A
32409 LD HL,33423 Store address of bottom border graphic
32412 LD (31940),HL
32415 LD HL,16451 Set screen display address
32418 CALL 33319 Draw the border
Draw top border
32421 LD A,26 26 columns to draw
32423 LD (35759),A
32426 LD A,1 1 row
32428 LD (35760),A
32431 LD HL,33391 Store address of bottom border graphic
32434 LD (31940),HL
32437 LD HL,18659 Set screen display address
32440 CALL 33319 Draw the border
Draw the top left 'corner piece' of the border
32443 LD A,1 Just 1 character (1 row, 1 column)
32445 LD (35759),A
32448 LD A,1
32450 LD (35760),A
32453 LD HL,33431 Store address of top left-hand corner graphic
32456 LD (31940),HL
32459 LD HL,16450 Set screen display address
32462 CALL 33319 Draw the graphic
Now set the colours (dark blue) to the top 6 lines of the 'inner screen' (including the border)
32465 LD HL,22594 Set the display address position on screen (top left)
32468 LD C,6 6 rows to colour
32470 LD B,28 28 columns across the screen
32472 LD (HL),8 Set colour of block to blue (INK 0, PAPER 1)
32474 INC HL Move right to the next square
32475 DJNZ 32472 ...and repeat until the row is finished
32477 INC HL Advance screen display position by 4, which takes us back to the left but to the next row down
32478 INC HL
32479 INC HL
32480 INC HL
32481 DEC C Row counter reduced by one
32482 JR NZ,32470 Repeat until colour in all rows coloured
Set colour for the sky section (stars/moon) to white
32484 LD (31940),HL Pointer is now beneath the first 6 rows - store it
32487 LD HL,22627 Set screen address pointer to just inside the top left border
32490 LD C,2 Top 2 rows of the picture
32492 LD B,26 ...and 26 columns, just inside the border
32494 LD (HL),15 Set the screen attribute block colour (INK 7, PAPER 1)
32496 INC HL Move right to the next character square
32497 DJNZ 32494 ...and repeat until all 26 columns are coloured in
32499 INC HL Keep moving the screen display position right until back on the left of the screen, one row down
32500 INC HL
32501 INC HL
32502 INC HL
32503 INC HL
32504 INC HL
32505 DEC C Decrement row counter, and repeat until all 2 rows are coloured in
32506 JR NZ,32492
Set black colour for the next 8 rows of the graphics scene (just below the top of the sky)
32508 LD HL,(31940) Retrieve the screen attribute display address pointer, just over a third of the way down the screen
32511 LD C,8 8 rows to colour
32513 LD B,28 28 columns (this will also include the bottom half of the border)
32515 LD (HL),0 INK 0, PAPER 0
32517 INC HL Move right to the next character square
32518 DJNZ 32515 Repeat until all 28 columns are filled in
32520 INC HL Keep moving right until back on the left of the screen, one row down
32521 INC HL
32522 INC HL
32523 INC HL
32524 DEC C Decrement row counter, and repeat until all 8 rows are coloured in
32525 JR NZ,32513
Set the bottom part of the intro screen to yellow (this will be Maroc's colour)
32527 LD HL,(31940) Retrieve the screen address pointer, just over a third of the way down the screen
32530 INC HL Move right one square, so just inside the (invisible) border
32531 LD C,7 7 rows to colour in
32533 LD B,26 ...and 26 columns
32535 LD (HL),6 Set colour of the square to yellow - INK 0, PAPER 7
32537 INC HL Move right to the next square
32538 DJNZ 32535 ...and repeat so the row of 26 squares is coloured in
32540 INC HL Keep moving the screen display address pointer right until back on the left side of the screen, one row down
32541 INC HL
32542 INC HL
32543 INC HL
32544 INC HL
32545 INC HL
32546 DEC C Decrement the row counter, and repeat until all 7 rows are coloured in
32547 JR NZ,32533
Prev: 31917 Up: Map Next: 32549