Prev: 31562 Up: Map Next: 31626
31577: Orders-menu build, lower part
Tail of the orders-screen build started in InitGameView (31417). First the third-boundary case of the crew-name row stride (+1824), then the shared loop tail: store the draw pointer, advance A' to the next crew id and loop until all 7 names are printed. After the loop, draws menu rows 9-18 straight from OrdersMenuLowerHalf (30205) (" Indicate "/" Location ", " Display "/" Level ", the three deck rows, blanks), re-highlights the cursor row and mirrors its cell value (34882), and redraws the oxygen clock on row 19 (39572).
31577 LD DE,1824 big stride: next char row across a third boundary
This entry point is used by the routine at 31562.
31580 ADD HL,DE
31581 LD (31257),HL store draw pointer for the next row
31584 POP AF A = crew id just printed
31585 INC A
31586 EX AF,AF' A' = next crew id, A = row counter
31587 DEC A
31588 JR NZ,31559 loop for all 7 crew rows
31590 LD HL,30205 then draw rows 9-18 from OrdersMenuLowerHalf
31593 LD (31261),HL
31596 LD B,10
31598 PUSH BC
31599 CALL 31626 draw next menu row from the template
31602 POP BC
31603 DJNZ 31598
31605 CALL 34882 highlight the cursor row / mirror its value
31608 CALL 39572 redraw the oxygen clock (row 19)
31611 RET
This entry point is used by the routines at 31417, 31634, 34684, 35222 and 35578. FillAttrColumn: paint a 10-cell-wide attribute block — C rows of attribute A starting at HL (stride 22 = 32-10 to the next row). Used to colour the menu rows.
31612 LD DE,22 row stride remainder (32 - 10)
31615 LD B,10 10 attribute cells per row
31617 LD (HL),A
31618 INC HL
31619 DJNZ 31617
31621 ADD HL,DE next row
31622 DEC C
31623 JR NZ,31615
31625 RET
Prev: 31562 Up: Map Next: 31626