Prev: 34902 Up: Map Next: 34977
34916: If fire pressed, or character-swap-pending flag set, then swap characters
Used by the routine at 34438.
34916 LD HL,34208 If character-swap-pending flag is reset...
34919 BIT 6,(HL) ...
34921 JR Z,34927 ...then skip ahead to 34927
34923 RES 6,(HL) Reset character-swap-pending flag
34925 JR 34944 Skip ahead to 34944
34927 LD A,(34219) Load A with control input
34930 BIT 4,A If fire was pressed...
34932 JR NZ,34940 ...then skip ahead to 34940
34934 RES 1,(HL) Reset characters-already-swapped flag
34936 CALL 53825 Copy room dimension data entry for current character's current room to temporary store location (34230)
34939 RET Return
Fire pressed
34940 BIT 1,(HL) If characters-already-swapped flag set (i.e. FIRE hasn't been released since last swap)...
34942 JR NZ,34936 ...then jump back to 34936
34944 SET 1,(HL) Set characters-already-swapped flag
34946 LD A,(HL) Invert Drutt-mode flag and store...
34947 XOR 1 ...
34949 LD (HL),A ...
34950 BIT 0,(HL) If current character is now Berk (0)...
34952 JR Z,34958 ...then jump ahead to 34958
34954 LD A,6 Load A with 6 (attribute for Drutt's timer indicator figures)
34956 JR 34960 Skip ahead to 34960
34958 LD A,1 Load A with 1 (attribute for Berk's timer indicator figures)
34960 LD (34226),A Set attribute of timer indicator figures to value in A
34963 CALL 53887 Paint red areas outside accessible areas of current character's current room
34966 LD HL,34208 If show-score flag is set...
34969 BIT 7,(HL) ...
34971 JP NZ,47628 ...then print SCORE / TOTAL / HI-SC string in current character's colours and return
34974 JP 47241 Reset show-score flag, draw timer figures bar and return
Prev: 34902 Up: Map Next: 34977