| alien | Routines |
| Prev: 31369 | Up: Map | Next: 31562 |
|
Initialises the corridor view for the current room. Clears the room mode byte, freezes both crew animation channels (sets bit 7 of 31263/31264), resets the corridor cursor to segment 8, copies the 19-byte corridor position template from 30197 to 29630, then draws the room's attribute colours and initial crew sprites.
|
||||||||||
| 31417 | XOR A | A = 0 | ||||||||
| 31418 | LD (31252),A | clear room mode byte at 31252 | ||||||||
| 31421 | LD HL,31263 | HL = 31263 (crew animation flags) | ||||||||
| 31424 | SET 7,(HL) | freeze animation channel A (bit 7 = freeze) | ||||||||
| 31426 | INC HL | |||||||||
| 31427 | SET 7,(HL) | freeze animation channel B | ||||||||
| 31429 | LD A,128 | $80 | ||||||||
| 31431 | LD (39741),A | set alien pixel X sentinel (39741) | ||||||||
| 31434 | LD (39753),A | set alien pixel Y sentinel (39753) | ||||||||
| 31437 | LD A,8 | segment 8 = centre of 19-segment corridor | ||||||||
| 31439 | LD (33683),A | store as current corridor cursor (33683) | ||||||||
| 31442 | LD A,32 | space char | ||||||||
| 31444 | CALL 33479 | draw blank room border / clear game window | ||||||||
| 31447 | LD A,(31243) | read room-type byte (31243) | ||||||||
| 31450 | CP 4 | room type 4 = special (engine room) | ||||||||
| 31452 | JR NZ,31459 | |||||||||
| 31454 | LD A,1 | remap type 4 → type 1 | ||||||||
| 31456 | LD (31243),A | |||||||||
| 31459 | CALL 31267 | draw room background (walls, doors, floor tiles) | ||||||||
| 31462 | LD DE,29630 | DE = 29630 (corridor position table, 19 bytes) | ||||||||
| 31465 | LD HL,30197 | HL = 30197 (corridor position templates) | ||||||||
| 31468 | LD BC,19 | copy 19 entries | ||||||||
| 31471 | LDIR | initialise position table from template | ||||||||
| 31473 | LD HL,22550 | HL = $5816 (attribute row for top of game window) | ||||||||
| 31476 | LD A,7 | white ink on black paper | ||||||||
| 31478 | LD C,1 | 1 column wide | ||||||||
| 31480 | CALL 31612 | paint attribute column | ||||||||
| 31483 | LD A,40 | |||||||||
| 31485 | LD C,8 | |||||||||
| 31487 | CALL 31612 | |||||||||
| 31490 | LD A,32 | |||||||||
| 31492 | LD C,2 | |||||||||
| 31494 | CALL 31612 | |||||||||
| 31497 | LD A,23 | |||||||||
| 31499 | LD C,5 | |||||||||
| 31501 | CALL 31612 | |||||||||
| 31504 | XOR A | |||||||||
| 31505 | LD C,3 | |||||||||
| 31507 | CALL 31612 | |||||||||
| 31510 | LD C,1 | |||||||||
| 31512 | LD A,7 | |||||||||
| 31514 | CALL 31612 | |||||||||
| 31517 | LD HL,16406 | |||||||||
| 31520 | LD (31257),HL | |||||||||
| 31523 | LD A,82 | |||||||||
| 31525 | CALL 31634 | |||||||||
| 31528 | LD HL,30197 | |||||||||
| 31531 | LD (31261),HL | |||||||||
| 31534 | CALL 31626 | |||||||||
| 31537 | LD B,7 | |||||||||
| 31539 | PUSH BC | |||||||||
| 31540 | LD A,92 | |||||||||
| 31542 | CALL 31634 | |||||||||
| 31545 | POP BC | |||||||||
| 31546 | DJNZ 31539 | |||||||||
| 31548 | LD HL,16470 | |||||||||
| 31551 | LD (31257),HL | |||||||||
| 31554 | LD A,1 | |||||||||
| 31556 | EX AF,AF' | |||||||||
| 31557 | LD A,7 | |||||||||
|
This entry point is used by the routine at 31577. Orders-screen crew-name loop head: A' holds the next crew id, A the remaining row count (7 names on menu rows 2-8).
|
||||||||||
| 31559 | EX AF,AF' | A = crew id to print | ||||||||
| 31560 | DEFB 42,25 | first 2 bytes of "LD HL,(draw pointer)": the operand-high byte is the LD A,D at 31562, so falling through loads HL and continues after it | ||||||||
| Prev: 31369 | Up: Map | Next: 31562 |