Prev: 93F2 Up: Map Next: 9494
9457: Update Type 1C Object
The code for an object of type 1C, which is run by RunObjectHandler.
Input
IX Address of the object
UpdateType1C 9457 LD A,(IX+$13) Fetch the first state byte of the object.
945A AND %00001111 Keep the bottom four bits.
945C LD HL,$944C Use the table at UpdateType13_Table.
945F CALL AddAToHL Add the offset to the address.
9462 LD A,(HL) Fetch the collision effects for this state.
9463 LD ($8E2C),A Store them in 8E2C.
9466 LD A,(IX+$14) Fetch the second state byte of the object.
9469 CP $02 Is it two?
946B CALL Z,AccelerateObject Move the object if so.
946E LD A,(IX+$13) Fetch the first state byte of the object.
9471 AND %00001111 Keep the bottom four bits.
9473 CP $08 Is it eight?
9475 LD C,$2A C=2A.
9477 JR Z,UpdateType1C_Finish Jump to UpdateType1C_Finish if so.
9479 CP $09 Jump to UpdateType1C_Finish if it is nine.
947B JR Z,UpdateType1C_Finish
947D CALL StepObjectState Step the state of the object.
9480 LD C,$18 C=18.
UpdateType1C_Finish 9482 LD B,$18 B=18.
9484 CALL MoveObjectAndStop Move the object and stop it.
9487 DEC (IX+$15) Count down the lifetime of the object.
948A JP NZ,UpdateType14_Flags Jump to UpdateType14_Flags if it has not run out.
948D SET 3,(IX+$17) Set bit 3 of the second set of flags of the object.
9491 JP UpdateType14_Flags Jump to UpdateType14_Flags.
Prev: 93F2 Up: Map Next: 9494