| alien | Routines |
| Prev: 34967 | Up: Map | Next: 35163 |
|
Animates marker channel B — the blinking box cursor on a candidate room (placed by PlaceRoomMarkerB 35128). Identical logic to 34967 (AnimateCrewA) but uses a faster frame rate (counter resets to 5 rather than 10), the B-set animation table at 26861, and the B-channel screen address at SpriteDestAddr (33688). Cycles through four cursor shapes (RoomCursor0-3) at twice the speed of the crew walk animation.
|
||||||||
| 35016 | LD A,(31264) | A = animation-freeze / frame-phase byte (31264) | ||||||
| 35019 | BIT 7,A | bit 7 = freeze flag | ||||||
| 35021 | RET NZ | frozen: skip | ||||||
| 35022 | LD HL,33690 | HL = frame counter B ($83CA) | ||||||
| 35025 | DEC (HL) | tick down counter | ||||||
| 35026 | RET NZ | not expired | ||||||
| 35027 | LD (HL),5 | reset to 5 frames per phase (2× speed of set A) | ||||||
| 35029 | LD B,2 | draw 2 sprite rows | ||||||
|
This entry point is used by the routine at 42821.
|
||||||||
| 35031 | PUSH BC | |||||||
| 35032 | LD E,A | E = frame phase (0-3) | ||||||
| 35033 | LD D,0 | |||||||
| 35035 | LD HL,26861 | base of crew-B animation table (26861) | ||||||
| 35038 | ADD HL,DE | index by phase × 2 | ||||||
| 35039 | ADD HL,DE | |||||||
| 35040 | LD A,(HL) | read 16-bit sprite bitmap pointer | ||||||
| 35041 | INC HL | |||||||
| 35042 | LD H,(HL) | |||||||
| 35043 | LD L,A | HL = pointer to sprite row data | ||||||
| 35044 | EX DE,HL | DE = sprite data source | ||||||
| 35045 | LD HL,(33688) | HL = screen destination address (33688) | ||||||
| 35048 | CALL 35065 | XOR-blit 3 bytes × 12 rows onto screen | ||||||
| 35051 | POP BC | |||||||
| 35052 | DEC B | |||||||
| 35053 | RET Z | |||||||
| 35054 | LD A,(31264) | advance frame phase | ||||||
| 35057 | INC A | |||||||
| 35058 | AND 3 | wrap 0-3 | ||||||
| 35060 | LD (31264),A | |||||||
| 35063 | JR 35031 | |||||||
|
This entry point is used by the routine at 34967.
|
||||||||
| 35065 | LD C,12 | |||||||
| 35067 | LD B,3 | |||||||
| 35069 | LD A,(DE) | |||||||
| 35070 | XOR (HL) | |||||||
| 35071 | LD (HL),A | |||||||
| 35072 | INC HL | |||||||
| 35073 | INC DE | |||||||
| 35074 | DJNZ 35069 | |||||||
| 35076 | DEC HL | |||||||
| 35077 | DEC HL | |||||||
| 35078 | DEC HL | |||||||
| 35079 | PUSH DE | |||||||
| 35080 | CALL 31393 | |||||||
| 35083 | POP DE | |||||||
| 35084 | DEC C | |||||||
| 35085 | JR NZ,35067 | |||||||
| 35087 | RET | |||||||
|
GetRoomMarkerAddr: A = room id (0-33) -> HL = display-file address of the room's indicator box on its deck map, from RoomMarkerAddrTable (26569).
|
||||||||
| 35088 | ADD A,A | |||||||
| 35089 | LD D,0 | |||||||
| 35091 | LD E,A | |||||||
| 35092 | LD HL,26569 | RoomMarkerAddrTable + room*2 | ||||||
| 35095 | ADD HL,DE | |||||||
| 35096 | LD A,(HL) | |||||||
| 35097 | INC HL | |||||||
| 35098 | LD H,(HL) | |||||||
| 35099 | LD L,A | HL = the room's marker screen address | ||||||
| 35100 | RET | |||||||
|
This entry point is used by the routine at 31634. PlaceRoomMarkerA: aim marker channel A (the walking crew figure that marks the viewed room on the deck map) at the current room (31242) and draw its first frame; no marker on the Narcissus (deck type 3). Channel A then keeps animating via AnimateCrewA (34967).
|
||||||||
| 35101 | LD A,(31243) | on the Narcissus (type 3)? | ||||||
| 35104 | CP 3 | |||||||
| 35106 | RET NC | yes: no marker | ||||||
| 35107 | LD A,(31242) | A = the viewed room | ||||||
| 35110 | CALL 35088 | |||||||
| 35113 | LD (33686),HL | channel A dest = its marker address | ||||||
| 35116 | LD HL,31263 | |||||||
| 35119 | RES 7,(HL) | unfreeze channel A | ||||||
| 35121 | LD A,(HL) | A = current phase | ||||||
| 35122 | LD B,1 | |||||||
| 35124 | CALL 34982 | XOR-blit one frame (place the box) | ||||||
| 35127 | RET | |||||||
|
This entry point is used by the routines at 34684 and 35338. PlaceRoomMarkerB: aim marker channel B (the "candidate room" blinker) at room A and draw its first frame. Used for the exit row under the cursor in the room view (UpdateRoomMarkerB 34933) and for a room picked from the Indicate Location list (LocationListAction 35338). Channel B then keeps blinking via AnimateCrewB (35016).
|
||||||||
| 35128 | CALL 35088 | HL = marker address of room A | ||||||
| 35131 | LD (33688),HL | channel B dest = it | ||||||
| 35134 | LD HL,31264 | |||||||
| 35137 | RES 7,(HL) | unfreeze channel B | ||||||
| 35139 | LD A,(HL) | A = current phase | ||||||
| 35140 | LD B,1 | |||||||
| 35142 | CALL 35031 | XOR-blit one frame (place the box) | ||||||
| 35145 | RET | |||||||
|
This entry point is used by the routine at 34684. EraseRoomMarkerB: if marker channel B is live, XOR-blit its current frame once more (which removes it from the screen) and freeze the channel.
|
||||||||
| 35146 | LD HL,31264 | |||||||
| 35149 | BIT 7,(HL) | already frozen? | ||||||
| 35151 | RET NZ | yes: nothing to erase | ||||||
| 35152 | PUSH HL | |||||||
| 35153 | LD A,(HL) | A = current phase | ||||||
| 35154 | LD B,1 | |||||||
| 35156 | CALL 35031 | XOR-blit once = erase | ||||||
| 35159 | POP HL | |||||||
| 35160 | SET 7,(HL) | freeze the channel | ||||||
| 35162 | RET | |||||||
| Prev: 34967 | Up: Map | Next: 35163 |