Prev: 37874 Up: Map Next: 38036
37975: Update Type 1C Object
The code for an object of type 28, which is run by RunObjectHandler.
Input
IX Address of the object
UpdateType1C 37975 LD A,(IX+19) Fetch the first state byte of the object.
37978 AND %00001111 Keep the bottom four bits.
37980 LD HL,37964 Use the table at UpdateType13_Table.
37983 CALL AddAToHL Add the offset to the address.
37986 LD A,(HL) Fetch the collision effects for this state.
37987 LD (36396),A Store them in 36396.
37990 LD A,(IX+20) Fetch the second state byte of the object.
37993 CP 2 Is it two?
37995 CALL Z,AccelerateObject Move the object if so.
37998 LD A,(IX+19) Fetch the first state byte of the object.
38001 AND %00001111 Keep the bottom four bits.
38003 CP 8 Is it eight?
38005 LD C,42 C=42.
38007 JR Z,UpdateType1C_Finish Jump to UpdateType1C_Finish if so.
38009 CP 9 Jump to UpdateType1C_Finish if it is nine.
38011 JR Z,UpdateType1C_Finish
38013 CALL StepObjectState Step the state of the object.
38016 LD C,24 C=24.
UpdateType1C_Finish 38018 LD B,24 B=24.
38020 CALL MoveObjectAndStop Move the object and stop it.
38023 DEC (IX+21) Count down the lifetime of the object.
38026 JP NZ,UpdateType14_Flags Jump to UpdateType14_Flags if it has not run out.
38029 SET 3,(IX+23) Set bit 3 of the second set of flags of the object.
38033 JP UpdateType14_Flags Jump to UpdateType14_Flags.
Prev: 37874 Up: Map Next: 38036