Prev: B2D7 Up: Map Next: B339
B2F9: Drop World Objects
Set bit 7 (falling) on world slots 1 and 2 unless they are carried, clear the low flag bits of slot 3, update the bomb flags and turn an occupied slot 4 into a platform.
Set bit 7 (falling) on world slot 1 unless bit 3 (carried) is set.
HideDistantObjects B2F9 LD A,($60B0) Fetch World_Slot_1_Flags.
B2FC BIT 3,A Jump to HideDistantObjects_Slot2Flags if bit 3 is set.
B2FE JR NZ,HideDistantObjects_Slot2Flags
B300 OR %10000000 Set bit 7.
B302 LD ($60B0),A Write it back.
Do the same for world slot 2.
HideDistantObjects_Slot2Flags B305 LD A,($60C8) Fetch World_Slot_2_Flags.
B308 BIT 3,A Jump to HideDistantObjects_Slot3Flags if bit 3 is set.
B30A JR NZ,HideDistantObjects_Slot3Flags
B30C OR %10000000 Set bit 7.
B30E LD ($60C8),A Write it back.
Clear bits 0-1 of the flags of world slot 3.
HideDistantObjects_Slot3Flags B311 LD A,($60E0) Fetch World_Slot_3_Flags.
B314 AND %11111100 Keep only bits 2-7.
B316 LD ($60E0),A Write it back.
Update the bomb flag when it is not on the ground.
B319 LD A,($61A0) Fetch 61A0.
B31C BIT 2,A Jump to HideDistantObjects_WriteBomb if bit 2 is set.
B31E JR NZ,HideDistantObjects_WriteBomb
B320 LD A,($619C) Fetch 619C.
B323 CP $AF Compare it against AF.
B325 LD A,$00 A=00.
B327 JR Z,HideDistantObjects_WriteBomb Jump to HideDistantObjects_WriteBomb if they are equal.
B329 OR %00000010 Set bit 1.
HideDistantObjects_WriteBomb B32B LD ($61A0),A Write it to 61A0.
Turn world slot 4 into a platform if it is occupied.
B32E LD A,($60F0) Fetch World_Slot_4.
B331 AND A Return if it is free.
B332 RET Z
B333 LD A,$2F Write 2F to World_Slot_4.
B335 LD ($60F0),A
B338 RET Return.
Prev: B2D7 Up: Map Next: B339