![]() |
Routines |
| Prev: D234 | Up: Map | Next: D45B |
|
Used by the routine at Update_Entity_Slot.
Check Entity Collision against the complex entity table at StateData_Boney.
|
||||
|
Called from B380 on a type-08 / type-0B pair: set bit 07 of TaskOneCollisionFlags, bump CollisionScratchByte, and on the third bump set bit 06 of TaskOneCollisionFlags (cleared by EDB8).
|
||||
| Check_Entity_Collision | D446 | PUSH HL | Stash HL on the stack. | |
| D447 | LD HL,$72B8 | Point HL at task-one / collision flags (TaskOneCollisionFlags). | ||
| D44A | SET 7,(HL) | Set bit 07 of TaskOneCollisionFlags. | ||
| D44C | LD A,($72BD) | Load the collision scratch byte (CollisionScratchByte) into A. | ||
| D44F | INC A | Advance that counter by one. | ||
| D450 | LD ($72BD),A | Store the counter back to CollisionScratchByte. | ||
| D453 | CP $03 | Has CollisionScratchByte reached 03? If not, jump to Check_Entity_Collision_RestoreReturn. | ||
| D455 | JR NZ,Check_Entity_Collision_RestoreReturn | |||
| D457 | SET 6,(HL) | Set bit 06 of TaskOneCollisionFlags. | ||
|
Restore HL and return after recording the type-08 / 0B collision.
|
||||
| Check_Entity_Collision_RestoreReturn | D459 | POP HL | Restore HL from the stack. | |
| D45A | RET | Return. | ||
| Prev: D234 | Up: Map | Next: D45B |