Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub_E244:
- add.w (a3),d5
- add.w 4(a3),d4
- move.w d4,d3
- add.w d3,d3
- andi.w #$F00,d3
- lsr.w #3,d5
- move.w d5,d0
- lsr.w #4,d0
- andi.w #$7F,d0
- add.w d3,d0
- moveq #0,d3
- bsr.s LocateBlock
- move.l #BM128_FDZ,d6
- tst.b (Current_Zone).w
- beq.w sub_E244_continue
- move.l #BM128_CFZ,d6
- cmpi.b #$0D,(Current_Zone).w
- beq.w sub_E244_continue
- move.l #BM128_ALZ,d6
- sub_E244_continue:
- add.l d6,d3
- movea.l d3,a0
- move.w (a0),d3
- andi.w #$3FF,d3
- lsl.w #3,d3
- adda.w d3,a1
- rts ; Return to whatever code was running before this routine was run.
- ; ---------------------------------------------------------------------------
- LocateBlock:
- move.b (a4,d0.w),d3 ; load chunk ID in d3
- beq.s LocateBlock_EmptyChunk
- lsl.w #7,d3
- andi.w #$70,d4
- andi.w #$E,d5
- add.w d4,d3
- add.w d5,d3
- rts ; Return to whatever code was running before this routine was run.
- ; ---------------------------------------------------------------------------
- LocateBlock_EmptyChunk:
- addq.w #4,sp ; pop a stack frame to leave a1 pointing at the first tile
- rts ; Return to whatever code was running before this routine was run.
- ; End of function sub_E09E
Advertisement