|  | Routines | 
| Prev: 54019 | Up: Map | Next: 54162 | 
| 
Used by the routine at 53977.
 | ||||||||||||||||
| 
On entry A will contain one of;  
 | ||||||||||||||||
| Action_Controls | 54023 | LD HL,54022 | Writes A to Controls_Byte and sets HL=Hit. | |||||||||||||
| 54026 | LD (HL),A | |||||||||||||||
| 54027 | LD HL,54016 | |||||||||||||||
| 54030 | LD A,C | |||||||||||||||
| 54031 | BIT 0,A | If "3" was pressed then jump to Shot_Three (a check for if bit 0 is set). | ||||||||||||||
| 54033 | JR NZ,Shot_Three | |||||||||||||||
| 54035 | BIT 1,A | If "1" was pressed then jump to Shot_One (a check for if bit 1 is set). | ||||||||||||||
| 54037 | JR NZ,Shot_One | |||||||||||||||
| 
Handles settings flags and shot drawing location for door 2.
 | ||||||||||||||||
| Shot_Two | 54039 | LD A,(54019) | If Two is not zero then return. | |||||||||||||
| 54042 | AND A | |||||||||||||||
| 54043 | RET NZ | |||||||||||||||
| 54044 | LD (54020),A | Sets the other two door flags to zero (Three and One). | ||||||||||||||
| 54047 | LD (54021),A | |||||||||||||||
| 54050 | INC A | Indicate the the middle door is being shot at (write $01 to Two and $02 to Hit). | ||||||||||||||
| 54051 | LD (54019),A | |||||||||||||||
| 54054 | LD A,2 | |||||||||||||||
| 54056 | LD (HL),A | |||||||||||||||
| 54057 | LD HL,55468 | Increase 55468 by one. | ||||||||||||||
| 54060 | INC (HL) | |||||||||||||||
| 54061 | LD HL,18479 | Sets the screen location for this shot to $482F and stash it. | ||||||||||||||
| 54064 | PUSH HL | |||||||||||||||
| 54065 | CALL Draw_GunShot_Mask | Draw the shot mask. | ||||||||||||||
| 54068 | POP HL | Grab the screen location again, and now draw the shot. | ||||||||||||||
| 54069 | CALL Draw_GunShot | |||||||||||||||
| 54072 | JP Shot_Sound_01_Alias | Jump to Shot_Sound_01_Alias. | ||||||||||||||
| 
Handles settings flags and shot drawing location for door 3.
 | ||||||||||||||||
| Shot_Three | 54075 | LD A,(54020) | If Three is not zero then return. | |||||||||||||
| 54078 | AND A | |||||||||||||||
| 54079 | RET NZ | |||||||||||||||
| 54080 | LD (54019),A | Sets the other two door flags to zero (Two and One). | ||||||||||||||
| 54083 | LD (54021),A | |||||||||||||||
| 54086 | INC A | Indicate the the right door is being shot at (write $01 to Three and $03 to Hit). | ||||||||||||||
| 54087 | LD (54020),A | |||||||||||||||
| 54090 | LD A,3 | |||||||||||||||
| 54092 | LD (HL),A | |||||||||||||||
| 54093 | LD HL,55468 | Shifts the value at 55468 to the left with bit 7 moved to the carry flag and bit 0 reset (zeroed). | ||||||||||||||
| 54096 | SLA (HL) | |||||||||||||||
| 54098 | LD HL,18490 | Sets the screen location for this shot to $483A and stash it. | ||||||||||||||
| 54101 | PUSH HL | |||||||||||||||
| 54102 | CALL Draw_GunShot_Mask | Draw the shot mask. | ||||||||||||||
| 54105 | POP HL | Grab the screen location again, and now draw the shot. | ||||||||||||||
| 54106 | CALL Draw_GunShot | |||||||||||||||
| 54109 | JP Shot_Sound_02_Alias | Jump to Shot_Sound_02_Alias. | ||||||||||||||
| 
Handles settings flags and shot drawing location for door 1.
 | ||||||||||||||||
| Shot_One | 54112 | LD A,(54021) | If One is not zero then return. | |||||||||||||
| 54115 | AND A | |||||||||||||||
| 54116 | RET NZ | |||||||||||||||
| 54117 | LD (54019),A | Sets the other two door flags to zero (Two and Three). | ||||||||||||||
| 54120 | LD (54020),A | |||||||||||||||
| 54123 | INC A | Indicate the the left door is being shot at (write $01 to One and $01 to Hit). | ||||||||||||||
| 54124 | LD (54021),A | |||||||||||||||
| 54127 | LD A,1 | |||||||||||||||
| 54129 | LD (HL),A | |||||||||||||||
| 54130 | LD HL,55468 | Shifts the value at 55468 to the left with bit 7 moved to the carry flag and bit 0 reset (zeroed). | ||||||||||||||
| 54133 | SLA (HL) | |||||||||||||||
| 54135 | LD HL,18468 | Sets the screen location for this shot to $4824 and stash it. | ||||||||||||||
| 54138 | PUSH HL | |||||||||||||||
| 54139 | CALL Draw_GunShot_Mask | Draw the shot mask. | ||||||||||||||
| 54142 | POP HL | Grab the screen location again, and now draw the shot. | ||||||||||||||
| 54143 | CALL Draw_GunShot | |||||||||||||||
| 54146 | CALL Shot_Sound_03_Alias | Jump to Shot_Sound_03_Alias. | ||||||||||||||
| 54149 | RET | Return. | ||||||||||||||
| 
Sets the flag for indicating "right" has been pressed by the player.
 | ||||||||||||||||
| Set_Right | 54150 | LD HL,54017 | Write $01 to Right and return. | |||||||||||||
| 54153 | LD (HL),1 | |||||||||||||||
| 54155 | RET | |||||||||||||||
| 
Sets the flag for indicating "left" has been pressed by the player.
 | ||||||||||||||||
| Set_Left | 54156 | LD HL,54018 | Write $01 to Left and return. | |||||||||||||
| 54159 | LD (HL),1 | |||||||||||||||
| 54161 | RET | |||||||||||||||
| Prev: 54019 | Up: Map | Next: 54162 |