Prev: 25831 Up: Map Next: 25850
25837: Update Bug Common
Used by the routines at UpdateLeech, UpdateMidges and UpdateSlug.
The checks which are made at the start of the update of every bug. This counts the bug (the bug counter at CurrentBug_ID is used to decide when to spawn more bugs), remembers the position and state of the bug so that it can be erased, checks the bug against the leaves and finally checks whether the bug is touching Robbie by jumping to BugCollision, which returns to the caller.
Input
IX Bug object
Output
E 0 The bug is not touching Robbie
E 1 The bug is touching Robbie
UpdateBugCommon 25837 LD HL,24086 HL=CurrentBug_ID (the bug counter).
25840 INC (HL) Increment the bug counter by one.
25841 CALL StoreEntity Remember the position and state of the bug using StoreEntity.
25844 CALL LeafCollision Call LeafCollision.
25847 JP BugCollision Jump to BugCollision.
Prev: 25831 Up: Map Next: 25850