Prev: 64E7 Up: Map Next: 64FA
64ED: 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 00 The bug is not touching Robbie
E 01 The bug is touching Robbie
UpdateBugCommon 64ED LD HL,$5E16 HL=CurrentBug_ID (the bug counter).
64F0 INC (HL) Increment the bug counter by one.
64F1 CALL StoreEntity Remember the position and state of the bug using StoreEntity.
64F4 CALL LeafCollision Call LeafCollision.
64F7 JP BugCollision Jump to BugCollision.
Prev: 64E7 Up: Map Next: 64FA