Prev: 39962 Up: Map Next: 40099
40056: Update Drop Entity
Updates an entity of the type 4. Every other frame it calls IncreaseEntityCounter.
Input
IX The entity
UpdateDropEntity 40056 LD A,(41693) Fetch the low byte of the frame counter from FrameCounter.
40059 AND %00000001 Keep bit 0.
40061 CALL Z,IncreaseEntityCounter Call IncreaseEntityCounter on every other frame.
40064 SET 7,(IX+17) Set bit 7 of the heading of the entity.
40068 BIT 7,(IX+35) Jump to UpdateEntity_Move to carry on updating the entity if bit 7 of field 35 of the entity is not set.
40072 JP Z,UpdateEntity_Move
40075 LD A,(IX+31) Read field 31 of the entity.
40078 INC A Add one.
40079 CP 2 Compare it with 2.
40081 RES 7,(IX+35) Reset bit 7 of field 35 of the entity.
40085 JP C,UpdateEntity_Move Jump to UpdateEntity_Move to carry on updating the entity if it was below 2.
40088 SET 7,(IX+35) Set bit 7 of field 35 of the entity.
40092 RES 7,(IX+17) Reset bit 7 of the heading of the entity.
40096 JP UpdateEntity_Move Jump to UpdateEntity_Move to carry on updating the entity.
Prev: 39962 Up: Map Next: 40099