Prev: B833 Up: Map Next: B8CF
B897: Make Shot Row
Used by the routine at UpdateSpecialShot.
Builds the picture of a shot from one of the six patterns in the table at ShotPatternTable, picked by the bottom four bits of offset 15, which go round from zero to five as the shot is updated. The picture is made in the buffer at F800 and its size is stored in A1D7. MakeShotColumn does the same for the buffer at BuildTables_Buffer and A1D8.
Input
IX Address of the shot
MakeShotRow B897 LD DE,$F800 Use F800.
B89A CALL FindShotPattern Call FindShotPattern.
B89D LD A,(IX+$15) Read offset 15 of IX.
B8A0 AND %00001111 Keep the bits of A that are set in 0F.
B8A2 INC A Advance A.
B8A3 CP $06 Jump to MakeShotRow_Store if A is not 06.
B8A5 JR NZ,MakeShotRow_Store
B8A7 XOR A Clear A.
MakeShotRow_Store B8A8 OR %10000000 Set the bits of A that are set in 80.
B8AA LD (IX+$15),A Write A to offset 15 of IX.
B8AD EX DE,HL Swap DE and HL.
B8AE LD A,(DE) Read DE.
B8AF LD ($A1D7),A The rows of the shot picture.
B8B2 JP BuildShotPattern Jump to BuildShotPattern.
This entry point is used by the routine at UpdateSpecialShot.
MakeShotColumn B8B5 LD DE,$F880 The build buffer.
B8B8 CALL FindShotPattern Call FindShotPattern.
B8BB EX DE,HL Swap DE and HL.
B8BC LD A,(DE) Read DE.
B8BD LD ($A1D8),A The rows of the shot column.
B8C0 JP BuildShotPattern Jump to BuildShotPattern.
FindShotPattern B8C3 LD A,(IX+$15) Read offset 15 of IX.
B8C6 AND %00001111 Keep the bits of A that are set in 0F.
B8C8 LD C,A C=A.
B8C9 LD HL,$B8CF The shot pattern table.
B8CC JP GetTableEntry Jump to GetTableEntry.
Prev: B833 Up: Map Next: B8CF