Prev: 690F Up: Map Next: 6974
696B: Get Robbie Direction
Used by the routines at FireRepellentSpray, FireStreamer and FireWeapon.
Used when a weapon is fired. This gets the X position of Robbie and tests bit 0 of State_Robbie_Flags, which decides the direction of the weapon: the weapon is fired to the right when the bit is clear.
Input
DE State_Robbie_Colour (the colour of Robbie)
Output
A The X position of Robbie
DE State_Robbie_Pos_X (the X position of Robbie)
F The zero flag is set if the weapon goes to the right
GetRobbieDirection 696B INC DE Move DE onto State_Robbie_Flags.
696C LD A,(DE) A=the direction byte of Robbie.
696D DEC DE Move DE back onto the X position of Robbie.
696E DEC DE
696F DEC DE
6970 AND %00000001 Keep only bit 0.
6972 LD A,(DE) A=the X position of Robbie.
6973 RET Return.
Prev: 690F Up: Map Next: 6974