Jun 27, 2016 at 10:32 AM
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 804
Age: 26
Pronouns: 菓子
Thanks, can you also tell me where the value for the waiting time is(aka the waiting time between shots), if there's any?^ Distance codes:CPU Disasm
Address Command
00449A89 MOV EAX,DWORD PTR SS:[ARG.1]
00449A8C MOV ECX,DWORD PTR DS:[EAX+0C]
00449A8F ADD ECX,0A000
00449A95 CMP DWORD PTR DS:[49E658],ECX
00449A9B JGE SHORT 00449AE1
00449A9D MOV EDX,DWORD PTR SS:[ARG.1]
00449AA0 MOV EAX,DWORD PTR DS:[EDX+0C]
00449AA3 SUB EAX,0A000
00449AA8 CMP DWORD PTR DS:[49E658],EAX
00449AAE JLE SHORT 00449AE1
00449AB0 MOV ECX,DWORD PTR SS:[ARG.1]
00449AB3 MOV EDX,DWORD PTR DS:[49E654]
00449AB9 CMP EDX,DWORD PTR DS:[ECX+8]
00449ABC JGE SHORT 00449AE1
00449ABE MOV EAX,DWORD PTR SS:[ARG.1]
00449AC1 MOV ECX,DWORD PTR DS:[EAX+8]
00449AC4 SUB ECX,14000
00449ACA CMP DWORD PTR DS:[49E654],ECX
00449AD0 JLE SHORT 00449AE1
00449AD2 MOV EDX,DWORD PTR SS:[ARG.1]
00449AD5 MOV EAX,DWORD PTR DS:[EDX+6C]
00449AD8 ADD EAX,1
00449ADB MOV ECX,DWORD PTR SS:[ARG.1]
00449ADE MOV DWORD PTR DS:[ECX+6C],EAX
00449AE1 JMP SHORT 00449B3A
00449AE3 MOV EDX,DWORD PTR SS:[ARG.1]
00449AE6 MOV EAX,DWORD PTR DS:[EDX+0C]
00449AE9 ADD EAX,0A000
00449AEE CMP DWORD PTR DS:[49E658],EAX
00449AF4 JGE SHORT 00449B3A
00449AF6 MOV ECX,DWORD PTR SS:[ARG.1]
00449AF9 MOV EDX,DWORD PTR DS:[ECX+0C]
00449AFC SUB EDX,0A000
00449B02 CMP DWORD PTR DS:[49E658],EDX
00449B08 JLE SHORT 00449B3A
00449B0A MOV EAX,DWORD PTR SS:[ARG.1]
00449B0D MOV ECX,DWORD PTR DS:[EAX+8]
00449B10 ADD ECX,14000
00449B16 CMP DWORD PTR DS:[49E654],ECX
00449B1C JGE SHORT 00449B3A
00449B1E MOV EDX,DWORD PTR SS:[ARG.1]
00449B21 MOV EAX,DWORD PTR DS:[49E654]
00449B26 CMP EAX,DWORD PTR DS:[EDX+8]
00449B29 JLE SHORT 00449B3A
00449B2B MOV ECX,DWORD PTR SS:[ARG.1]
00449B2E MOV EDX,DWORD PTR DS:[ECX+6C]
00449B31 ADD EDX,1
00449B34 MOV EAX,DWORD PTR SS:[ARG.1]
00449B37 MOV DWORD PTR DS:[EAX+6C],EDX
BTW, in the Cave Story engine, 1 block = 2,000 units, so A,000 units = 5 blocks and 14,000 units = 10 (dec) blocks.CPU Disasm
Address Command
00449A8F ADD ECX, 0A000 - How far down
CPU Disasm
Address Command
00449AA3 SUB EAX, 0A000 - How far up
CPU Disasm
Address Command
00449AC4 SUB ECX, 14000 - How far left
CPU Disasm
Address Command
00449AE9 ADD EAX, 0A000 - How far down
CPU Disasm
Address Command
00449AFC SUB EDX, 0A000 - How far up
CPU Disasm
Address Command
00449B10 ADD ECX, 14000 - How far right
You may have noticed there were two checks for up and down; another example of Pixel's inefficient code, one is for left, one for right. You don't actually need to check it twice for the same value...