Prev: 62380 Up: Map Next: 63489
62526: Routine at F43E
Used by the routine at Controls_CheckLeftUp.
62526 LD A,(HL) A=*HL.
62527 LD HL,57952 HL=57952.
62530 LD B,0 B=0.
62532 LD C,A C=A.
62533 ADD HL,BC HL+=BC.
62534 LD A,(HL) A=*HL.
62535 LD (58800),HL Write HL to *58800.
62538 CP 0 Jump to 58194 if A is equal to 0.
62540 JP Z,58194
62543 LD (58055),A Write A to *Item_ID.
62546 LD A,(55346) Jump to 62558 if *55346 is equal to 3.
62549 CP 3
62551 JR Z,62558
62553 LD A,1 Write 1 to *55346.
62555 LD (55346),A
62558 LD A,(55348) Compare *PlayerCursor_TileID with 9.
62561 CP 9
62563 LD A,(58802) A=*Data_Control.
62566 JP Z,63489 Jump to 63489 if *PlayerCursor_TileID is equal to 9.
62569 CP 17 Jump to 62760 if *PlayerCursor_TileID is not equal to 17.
62571 JP NZ,62760
This entry point is used by the routine at 63489.
62574 INC HL Increment HL by one.
62575 LD A,(HL) Jump to 62583 if *HL is not equal to 0.
62576 CP 0
62578 JR NZ,62583
62580 INC B Increment B by one.
62581 JR 62574 Jump to 62574.
62583 CALL 61744 Call 61744.
62586 CALL 62037 Call 62037.
62589 PUSH BC Stash BC and HL on the stack.
62590 PUSH HL
62591 CALL 55707 Call 55707.
62594 CALL 58109 Call 58109.
62597 CALL MoveTile_Right Call MoveTile_Right.
62600 CALL 55742 Call 55742.
62603 POP HL Restore HL and BC from the stack.
62604 POP BC
62605 DEC HL Decrease HL by one.
62606 CALL 58097 Call 58097.
62609 LD A,(55346) Return if *55346 is equal to 2.
62612 CP 2
62614 RET Z
62615 BIT 5,B Test bit 5 of B.
62617 JR Z,62647 Jump to 62647 if A is zero.
62619 LD A,0 Write 0 to *55346.
62621 LD (55346),A
62624 LD A,(59230) A=*Tile_Vertical_Position.
62627 CP 15 Return if *Tile_Vertical_Position is greater than or equal to 15.
62629 RET P
62630 ADD A,4 A+=4.
62632 LD (55341),A Write A to *DestinationCursor_X_Position.
62635 INC HL Increment HL by one.
62636 LD (58800),HL Write HL to *58800.
62639 LD A,(HL) Write *HL to *Item_ID.
62640 LD (58055),A
62643 LD B,0 B=0.
62645 JR 62574 Jump to 62574.
62647 LD A,(55346) Jump to 62661 if *55346 is not equal to 0.
62650 CP 0
62652 JR NZ,62661
62654 PUSH BC Stash BC and HL on the stack.
62655 PUSH HL
62656 CALL 62971 Call 62971.
62659 POP HL Restore HL and BC from the stack.
62660 POP BC
62661 LD A,(55346) A=*55346.
62664 CP 2 Return if A is equal to 2.
62666 RET Z
62667 CP 3 Jump to 62676 if A is equal to 3.
62669 JR Z,62676
62671 LD A,1 Write 1 to *55346.
62673 LD (55346),A
62676 BIT 6,B Test bit 6 of B.
62678 JR NZ,62688 Jump to 62688 if A is not zero.
62680 LD A,(55346) Return if *55346 is equal to 3.
62683 CP 3
62685 RET Z
62686 JR 62624 Jump to 62624.
62688 LD A,(59233) C=*Tile_SpacesToMove.
62691 LD C,A
62692 LD A,(55341) A=*DestinationCursor_X_Position.
62695 ADD A,C A+=C.
62696 LD (55341),A Write A to *DestinationCursor_X_Position.
62699 LD (58800),HL Write HL to *58800.
62702 CALL Sound_TileMoving Call Sound_TileMoving.
62705 LD A,(55346) Jump to 62717 if *55346 is equal to 3.
62708 CP 3
62710 JR Z,62717
62712 LD A,2 Write 2 to *55346.
62714 LD (55346),A
62717 CALL 62765 Call 62765.
62720 PUSH BC Stash BC and HL on the stack.
62721 PUSH HL
62722 CALL 62736 Call 62736.
62725 POP HL Restore HL and BC from the stack.
62726 POP BC
62727 LD A,(55346) Return if *55346 is equal to 3.
62730 CP 3
62732 RET Z
62733 JP 62854 Jump to 62854.
62736 LD A,(55341) A=*DestinationCursor_X_Position.
62739 ADD A,3 A+=3.
62741 RLCA RLCA.
62742 RLCA
62743 RLCA
62744 DEC A Decrease A by one.
62745 LD H,A H=A.
62746 LD A,(55340) A=*DestinationCursor_Y_Position.
62749 INC A Increment A by one.
62750 RLCA RLCA.
62751 RLCA
62752 RLCA
62753 LD IX,57722 IX=57722.
62757 JP 57570 Jump to 57570.
62760 CP 18 Jump to 62993 if A is not equal to 18.
62762 JP NZ,62993
62765 DEC HL Decrease HL by one.
62766 LD A,(HL) Jump to 62774 if *HL is not equal to 0.
62767 CP 0
62769 JR NZ,62774
62771 INC B Increment B by one.
62772 JR 62765 Jump to 62765.
62774 CALL 61744 Call 61744.
62777 CALL 62037 Call 62037.
62780 PUSH BC Stash BC and HL on the stack.
62781 PUSH HL
62782 CALL 55707 Call 55707.
62785 CALL 58109 Call 58109.
62788 CALL MoveTile_Left Call MoveTile_Left.
62791 CALL 55742 Call 55742.
62794 POP HL Restore HL and BC from the stack.
62795 POP BC
62796 BIT 7,B Test bit 7 of B.
62798 JR Z,62840 Jump to 62840 if B is zero.
62800 LD A,(59233) A=*Tile_SpacesToMove.
62803 PUSH AF Stash AF on the stack.
62804 CALL 58074 Call 58074.
62807 CALL 55707 Call 55707.
62810 PUSH BC Stash BC on the stack.
62811 LD A,2 Write 2 to *Tile_Vertical_Position.
62813 LD (59230),A
62816 CALL MoveTile_Left Call MoveTile_Left.
62819 POP BC Restore BC from the stack.
62820 DJNZ 62810 Decrease counter by one and loop back to 62810 until counter is zero.
62822 POP AF Restore AF from the stack.
62823 ADD A,3 A+=3.
62825 LD (59233),A Write A to *Tile_SpacesToMove.
62828 LD A,(55346) A=*55346.
62831 CP 1 Return if A is equal to 1.
62833 RET Z
62834 CP 3 Return if A is equal to 3.
62836 RET Z
62837 JP 62736 Jump to 62736.
62840 INC HL Increment HL by one.
62841 CALL 58097 Call 58097.
62844 LD A,(55346) Return if *55346 is equal to 2.
62847 CP 2
62849 RET Z
62850 BIT 5,B Test bit 5 of B.
62852 JR Z,62882 Jump to 62882 if A is zero.
62854 LD A,0 Write 0 to *55346.
62856 LD (55346),A
62859 LD A,(59230) A=*Tile_Vertical_Position.
62862 CP 6 Return if A is lower than 6 (unsigned comparison).
62864 RET M
62865 SUB 4 A-=4.
62867 LD (55341),A Write A to *DestinationCursor_X_Position.
62870 DEC HL Decrease HL by one.
62871 LD (58800),HL Write HL to *58800.
62874 LD A,(HL) Write *HL to *Item_ID.
62875 LD (58055),A
62878 LD B,0 B=0.
62880 JR 62765 Jump to 62765.
62882 LD A,(55346) Jump to 62896 if *55346 is not equal to 0.
62885 CP 0
62887 JR NZ,62896
62889 PUSH BC Stash BC and HL on the stack.
62890 PUSH HL
62891 CALL 62736 Call 62736.
62894 POP HL Restore HL and BC from the stack.
62895 POP BC
62896 LD A,(55346) A=*55346.
62899 CP 2 Return if A is equal to 2.
62901 RET Z
62902 CP 3 Jump to 62911 if A is equal to 3.
62904 JR Z,62911
62906 LD A,1 Write 1 to *55346.
62908 LD (55346),A
62911 BIT 6,B Test bit 6 of B.
62913 JR NZ,62923 Jump to 62923 if A is not zero.
62915 LD A,(55346) Return if *55346 is equal to 3.
62918 CP 3
62920 RET Z
62921 JR 62859 Jump to 62859.
62923 LD A,(59233) C=*Tile_SpacesToMove.
62926 LD C,A
62927 LD A,(55341) A=*DestinationCursor_X_Position.
62930 SUB C A-=C.
62931 LD (55341),A Write A to *DestinationCursor_X_Position.
62934 LD (58800),HL Write HL to *58800.
62937 CALL Sound_TileMoving Call Sound_TileMoving.
62940 LD A,(55346) Jump to 62952 if *55346 is equal to 3.
62943 CP 3
62945 JR Z,62952
62947 LD A,2 Write 2 to *55346.
62949 LD (55346),A
62952 CALL 62574 Call 62574.
62955 PUSH BC Stash BC and HL on the stack.
62956 PUSH HL
62957 CALL 62971 Call 62971.
62960 POP HL Restore HL and BC from the stack.
62961 POP BC
62962 LD A,(55346) Return if *55346 is equal to 3.
62965 CP 3
62967 RET Z
62968 JP 62619 Jump to 62619.
62971 LD A,(55341) A=*DestinationCursor_X_Position.
62974 DEC A Decrease A by one.
62975 RLCA RLCA.
62976 RLCA
62977 RLCA
62978 LD H,A H=A.
62979 LD A,(55340) A=*DestinationCursor_Y_Position.
62982 INC A Increment A by one.
62983 RLCA RLCA.
62984 RLCA
62985 RLCA
62986 LD IX,57710 IX=57710.
62990 JP 57570 Jump to 57570.
62993 LD DE,7 DE=0007.
62996 CP 20 Jump to 63243 if A is not equal to 20.
62998 JP NZ,63243
63001 ADD HL,DE HL+=DE.
63002 LD A,(HL) Jump to 63010 if *HL is not equal to 0.
63003 CP 0
63005 JR NZ,63010
63007 INC B Increment B by one.
63008 JR 63001 Jump to 63001.
63010 CALL 61744 Call 61744.
63013 CALL 62037 Call 62037.
63016 PUSH BC Stash BC and HL on the stack.
63017 PUSH HL
63018 CALL 55707 Call 55707.
63021 CALL 58109 Call 58109.
63024 CALL MoveTile_Down Call MoveTile_Down.
63027 CALL 55742 Call 55742.
63030 POP HL Restore HL and BC from the stack.
63031 POP BC
63032 BIT 7,B Test bit 7 of B.
63034 JR Z,63076 Jump to 63076 if B is zero.
63036 LD A,(59233) A=*Tile_SpacesToMove.
63039 PUSH AF Stash AF on the stack.
63040 CALL 58074 Call 58074.
63043 CALL 55707 Call 55707.
63046 PUSH BC Stash BC on the stack.
63047 LD A,18 Write 18 to *Tile_Horizontal_Position.
63049 LD (59229),A
63052 CALL MoveTile_Down Call MoveTile_Down.
63055 POP BC Restore BC from the stack.
63056 DJNZ 63046 Decrease counter by one and loop back to 63046 until counter is zero.
63058 POP AF Restore AF from the stack.
63059 ADD A,3 A+=3.
63061 LD (59233),A Write A to *Tile_SpacesToMove.
63064 LD A,(55346) A=*55346.
63067 CP 1 Return if A is equal to 1.
63069 RET Z
63070 CP 3 Return if A is equal to 3.
63072 RET Z
63073 JP 63467 Jump to 63467.
63076 LD DE,7 HL-=0007.
63079 AND A
63080 SBC HL,DE
63082 CALL 58097 Call 58097.
63085 LD A,(55346) Return if *55346 is equal to 2.
63088 CP 2
63090 RET Z
63091 BIT 5,B Test bit 5 of B.
63093 JR Z,63126 Jump to 63126 if A is zero.
63095 LD A,0 Write 0 to *55346.
63097 LD (55346),A
63100 LD A,(59229) A=*Tile_Horizontal_Position.
63103 CP 15 Compare A with 15.
63105 RET P Return P.
63106 ADD A,4 A+=4.
63108 LD (55340),A Write A to *DestinationCursor_Y_Position.
63111 LD DE,7 HL+=0007.
63114 ADD HL,DE
63115 LD (58800),HL Write HL to *58800.
63118 LD A,(HL) Write *HL to *Item_ID.
63119 LD (58055),A
63122 LD B,0 B=0.
63124 JR 63001 Jump to 63001.
63126 LD A,(55346) Jump to 63140 if *55346 is not equal to 0.
63129 CP 0
63131 JR NZ,63140
63133 PUSH BC Stash BC and HL on the stack.
63134 PUSH HL
63135 CALL 63467 Call 63467.
63138 POP HL Restore HL and BC from the stack.
63139 POP BC
63140 LD A,(55346) A=*55346.
63143 CP 2 Return if A is equal to 2.
63145 RET Z
63146 CP 3 Jump to 63155 if A is equal to 3.
63148 JR Z,63155
63150 LD A,1 Write 1 to *55346.
63152 LD (55346),A
63155 BIT 6,B Test bit 6 of B.
63157 JR NZ,63167 Jump to 63167 if A is not zero.
63159 LD A,(55346) Return if *55346 is equal to 3.
63162 CP 3
63164 RET Z
63165 JR 63100 Jump to 63100.
63167 LD A,(59233) C=*Tile_SpacesToMove.
63170 LD C,A
63171 LD A,(55340) A=*DestinationCursor_Y_Position.
63174 ADD A,C A+=C.
63175 LD (55340),A Write A to *DestinationCursor_Y_Position.
63178 LD (58800),HL Write HL to *58800.
63181 CALL Sound_TileMoving Call Sound_TileMoving.
63184 LD A,(55346) Jump to 63196 if *55346 is equal to 3.
63187 CP 3
63189 JR Z,63196
63191 LD A,2 Write 2 to *55346.
63193 LD (55346),A
63196 LD DE,7 DE=0007.
63199 AND A Set flags.
63200 CALL 63249 Call 63249.
63203 PUSH BC Stash BC and HL on the stack.
63204 PUSH HL
63205 CALL 63219 Call 63219.
63208 POP HL Restore HL and BC from the stack.
63209 POP BC
63210 LD A,(55346) Return if *55346 is equal to 3.
63213 CP 3
63215 RET Z
63216 JP 63342 Jump to 63342.
63219 LD A,(55341) A=*DestinationCursor_X_Position.
63222 INC A Increment A by one.
63223 RLCA RLCA.
63224 RLCA
63225 RLCA
63226 LD H,A H=A.
63227 LD A,(55340) A=*DestinationCursor_Y_Position.
63230 ADD A,3 A+=3.
63232 RLCA RLCA.
63233 RLCA
63234 RLCA
63235 DEC A Decrease A by one.
63236 LD IX,57746 IX=57746.
63240 JP 57570 Jump to 57570.
63243 CP 24 Compare A with 24.
63245 JP NZ,Handler_Bombs_5 Jump to Handler_Bombs_5 if A is not zero.
63248 AND A Set flags.
63249 SBC HL,DE HL-=DE (with carry).
63251 LD A,(HL) A=*HL.
63252 CP 0 Compare A with 0.
63254 JR NZ,63259 Jump to 63259 if A is not zero.
63256 INC B Increment B by one.
63257 JR 63249 Jump to 63249.
63259 CALL 61744 Call 61744.
63262 CALL 62037 Call 62037.
63265 PUSH BC Stash BC and HL on the stack.
63266 PUSH HL
63267 CALL 55707 Call 55707.
63270 CALL 58109 Call 58109.
63273 CALL MoveTile_Up Call MoveTile_Up.
63276 CALL 55742 Call 55742.
63279 POP HL Restore HL and BC from the stack.
63280 POP BC
63281 BIT 7,B Test bit 7 of B.
63283 JR Z,63325 Jump to 63325 if B is zero.
63285 LD A,(59233) A=*Tile_SpacesToMove.
63288 PUSH AF Stash AF on the stack.
63289 CALL 58074 Call 58074.
63292 CALL 55707 Call 55707.
63295 PUSH BC Stash BC on the stack.
63296 LD A,2 Write 2 to *Tile_Horizontal_Position.
63298 LD (59229),A
63301 CALL MoveTile_Up Call MoveTile_Up.
63304 POP BC Restore BC from the stack.
63305 DJNZ 63295 Decrease counter by one and loop back to 63295 until counter is zero.
63307 POP AF Restore AF from the stack.
63308 ADD A,3 A+=3.
63310 LD (59233),A Write A to *Tile_SpacesToMove.
63313 LD A,(55346) Return if *55346 is either 1 or 3.
63316 CP 1
63318 RET Z
63319 CP 3
63321 RET Z
63322 JP 63219 Jump to 63219.
63325 LD DE,7 HL+=0007.
63328 ADD HL,DE
63329 CALL 58097 Call 58097.
63332 LD A,(55346) Return if *55346 is equal to 2.
63335 CP 2
63337 RET Z
63338 BIT 5,B Test bit 5 of B.
63340 JR Z,63375 Jump to 63375 if A is zero.
63342 LD A,0 Write 0 to *55346.
63344 LD (55346),A
63347 LD A,(59229) A=*Tile_Horizontal_Position.
63350 CP 5 Return if A is lower than 5 (unsigned comparison).
63352 RET M
63353 SUB 4 A-=4.
63355 LD (55340),A Write A to *DestinationCursor_Y_Position.
63358 LD DE,7 HL-=0007 (with carry).
63361 AND A
63362 SBC HL,DE
63364 LD (58800),HL Write HL to *58800.
63367 LD A,(HL) Write *HL to *Item_ID.
63368 LD (58055),A
63371 LD B,0 B=0.
63373 JR 63249 Jump to 63249.
63375 LD A,(55346) Jump to 63389 if *55346 is not equal to 0.
63378 CP 0
63380 JR NZ,63389
63382 PUSH BC Stash BC and HL on the stack.
63383 PUSH HL
63384 CALL 63219 Call 63219.
63387 POP HL Restore HL and BC from the stack.
63388 POP BC
63389 LD A,(55346) Return if *55346 is equal to 2.
63392 CP 2
63394 RET Z
63395 CP 3 Jump to 63404 if *55346 is equal to 3.
63397 JR Z,63404
63399 LD A,1 Write 1 to *55346.
63401 LD (55346),A
63404 BIT 6,B Test bit 6 of B.
63406 JR NZ,63416 Jump to 63416 if A is not zero.
63408 LD A,(55346) Return if *55346 is equal to 3.
63411 CP 3
63413 RET Z
63414 JR 63347 Jump to 63347.
63416 LD A,(59233) C=*Tile_SpacesToMove.
63419 LD C,A
63420 LD A,(55340) A=*DestinationCursor_Y_Position.
63423 SUB C A-=C.
63424 LD (55340),A Write A to *DestinationCursor_Y_Position.
63427 LD (58800),HL Write HL to *58800.
63430 CALL Sound_TileMoving Call Sound_TileMoving.
63433 LD A,(55346) Jump to 63445 if *55346 is equal to 3.
63436 CP 3
63438 JR Z,63445
63440 LD A,2 Write 2 to *55346.
63442 LD (55346),A
63445 LD DE,7 DE=0007.
63448 CALL 63001 Call 63001.
63451 PUSH BC Stash BC and HL on the stack.
63452 PUSH HL
63453 CALL 63467 Call 63467.
63456 POP HL Restore HL and BC from the stack.
63457 POP BC
63458 LD A,(55346) Return if *55346 is equal to 3.
63461 CP 3
63463 RET Z
63464 JP 63095 Jump to 63095.
63467 LD A,(55341) A=*DestinationCursor_X_Position.
63470 INC A Increment A by one.
63471 RLCA RLCA.
63472 RLCA
63473 RLCA
63474 LD H,A H=A.
63475 LD A,(55340) A=*DestinationCursor_Y_Position.
63478 DEC A Decrease A by one.
63479 RLCA RLCA.
63480 RLCA
63481 RLCA
63482 LD IX,57734 IX=57734.
63486 JP 57570 Jump to 57570.
Prev: 62380 Up: Map Next: 63489