HyMyNameIsMatt said:I believe all that needs to be done about the calls is a variable based on direction in one bullet call as apposed to 6 bullet calls. I'll figure it out. Then I'll need to redo all the bullet codes. But that's simple enough.
0x41FF3C:
83 C4 18
0x41DE60:
55 89 E5 83 EC 1C 8B 45 08 89 45 F8 83 C0 03 89
45 FC 6A 02 E8 C7 5D FE FF 83 C4 04 83 F8 02 7E
05 E9 32 01 00 00 8B 0D 14 E2 49 00 23 0D 14 36
49 00 0F 84 20 01 00 00 6A 01 E8 01 41 FE FF 83
C4 04 85 C0 75 11 6A 01 6A 25 E8 91 27 00 00 83
C4 08 E9 01 01 00 00 A1 54 E6 49 00 89 45 F4 A1
58 E6 49 00 89 45 F0 A1 40 E6 49 00 89 45 EC A1
44 E6 49 00 89 45 E8 A1 48 E6 49 00 03 45 E8 89
45 E4 83 7D E4 00 74 4C 83 7D EC 00 74 0D 8B 45
F4 05 00 02 00 00 89 45 F4 EB 0B 8B 45 F4 2D 00
02 00 00 89 45 F4 83 7D E8 00 74 14 C7 45 EC 01
00 00 00 8B 45 F0 2D 00 10 00 00 89 45 F0 EB 35
C7 45 EC 03 00 00 00 8B 45 F0 05 00 10 00 00 89
45 F0 EB 21 8B 45 F0 05 00 06 00 00 89 45 F0 83
7D EC 00 74 09 C7 45 F4 00 0C 00 00 EB 07 C7 45
F4 00 F4 FF FF 8B 45 EC 50 8B 45 F0 50 8B 45 F4
83 7D E4 00 75 06 03 05 54 E6 49 00 50 8B 45 FC
50 E8 0A 60 FE FF 83 C4 10 6A 00 6A 03 8B 45 F0
50 83 7D E4 00 75 0F 8B 45 F4 03 45 F4 03 05 54
E6 49 00 89 45 F4 8B 45 F4 50 E8 F1 CC FE FF 83
C4 10 6A 01 83 7D 08 03 75 04 6A 31 EB 02 6A 20
E8 8B 26 00 00 83 C4 08 89 EC 5D C3
CPU Disasm
Address Hex dump Command Comments
0041DE60 /$ 55 PUSH EBP ; Cave_Story_-_Redesign.0041DE60(guessed Arg1)
0041DE61 |. 89E5 MOV EBP,ESP
0041DE63 |. 83EC 1C SUB ESP,1C
0041DE66 |. 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8]
0041DE69 |. 8945 F8 MOV DWORD PTR SS:[EBP-8],EAX
0041DE6C |. 83C0 03 ADD EAX,3
0041DE6F |. 8945 FC MOV DWORD PTR SS:[EBP-4],EAX
0041DE72 |. 6A 02 PUSH 2
0041DE74 |. E8 87680700 CALL 00403C40
0041DE79 |. 83C4 04 ADD ESP,4
0041DE7C |. 83F8 02 CMP EAX,2
0041DE7F |. 7E 05 JLE SHORT 0041DE86
0041DE81 |. E9 32010000 JMP 0041DFB8
0041DE86 |> 8B0D 14E24900 MOV ECX,DWORD PTR DS:[49E214]
0041DE8C |. 230D 14364900 AND ECX,DWORD PTR DS:[493614]
0041DE92 |. 0F84 20010000 JE 0041DFB8
0041DE98 |. 6A 01 PUSH 1 ; /Arg1 = 1
0041DE9A |. E8 0141FEFF CALL 00401FA0 ; \Cave_Story_-_Redesign.00401FA0
0041DE9F |. 83C4 04 ADD ESP,4
0041DEA2 |. 85C0 TEST EAX,EAX
0041DEA4 |. 75 11 JNE SHORT 0041DEB7
0041DEA6 |. 6A 01 PUSH 1 ; /Arg2 = 1
0041DEA8 |. 6A 25 PUSH 25 ; |Arg1 = 25
0041DEAA |. E8 91270000 CALL 00420640 ; \Cave_Story_-_Redesign.00420640
0041DEAF |. 83C4 08 ADD ESP,8
0041DEB2 |. E9 01010000 JMP 0041DFB8
0041DEB7 |> A1 54E64900 MOV EAX,DWORD PTR DS:[49E654]
0041DEBC |. 8945 F4 MOV DWORD PTR SS:[EBP-0C],EAX ; EBP-0C = PlayerXPosition
0041DEBF |. A1 58E64900 MOV EAX,DWORD PTR DS:[49E658]
0041DEC4 |. 8945 F0 MOV DWORD PTR SS:[EBP-10],EAX ; EBP-10 = PlayerYPosition
0041DEC7 |. A1 40E64900 MOV EAX,DWORD PTR DS:[49E640]
0041DECC |. 8945 EC MOV DWORD PTR SS:[EBP-14],EAX ; EBP-14 = DirectionFaced
0041DECF |. A1 44E64900 MOV EAX,DWORD PTR DS:[49E644]
0041DED4 |. 8945 E8 MOV DWORD PTR SS:[EBP-18],EAX ; EBP-18 = IsFacingUp
0041DED7 |. A1 48E64900 MOV EAX,DWORD PTR DS:[49E648]
0041DEDC |. 0345 E8 ADD EAX,DWORD PTR SS:[EBP-18]
0041DEDF |. 8945 E4 MOV DWORD PTR SS:[EBP-1C],EAX ; EBP-1C = IsNotFacingLeftOrRight
0041DEE2 |. 837D E4 00 CMP DWORD PTR SS:[EBP-1C],0
0041DEE6 |. 74 4C JE SHORT 0041DF34
0041DEE8 |. 837D EC 00 CMP DWORD PTR SS:[EBP-14],0
0041DEEC |. 74 0D JE SHORT 0041DEFB
0041DEEE |. 8B45 F4 MOV EAX,DWORD PTR SS:[EBP-0C]
0041DEF1 |. 05 00020000 ADD EAX,200
0041DEF6 |. 8945 F4 MOV DWORD PTR SS:[EBP-0C],EAX
0041DEF9 |. EB 0B JMP SHORT 0041DF06
0041DEFB |> 8B45 F4 MOV EAX,DWORD PTR SS:[EBP-0C]
0041DEFE |. 2D 00020000 SUB EAX,200
0041DF03 |. 8945 F4 MOV DWORD PTR SS:[EBP-0C],EAX
0041DF06 |> 837D E8 00 CMP DWORD PTR SS:[EBP-18],0
0041DF0A |. 74 14 JE SHORT 0041DF20
0041DF0C |. C745 EC 01000000 MOV DWORD PTR SS:[EBP-14],1
0041DF13 |. 8B45 F0 MOV EAX,DWORD PTR SS:[EBP-10]
0041DF16 |. 2D 00100000 SUB EAX,1000
0041DF1B |. 8945 F0 MOV DWORD PTR SS:[EBP-10],EAX
0041DF1E |. EB 35 JMP SHORT 0041DF55
0041DF20 |> C745 EC 03000000 MOV DWORD PTR SS:[EBP-14],3
0041DF27 |. 8B45 F0 MOV EAX,DWORD PTR SS:[EBP-10]
0041DF2A |. 05 00100000 ADD EAX,1000
0041DF2F |. 8945 F0 MOV DWORD PTR SS:[EBP-10],EAX
0041DF32 |. EB 21 JMP SHORT 0041DF55
0041DF34 |> 8B45 F0 MOV EAX,DWORD PTR SS:[EBP-10]
0041DF37 |. 05 00060000 ADD EAX,600
0041DF3C |. 8945 F0 MOV DWORD PTR SS:[EBP-10],EAX
0041DF3F |. 837D EC 00 CMP DWORD PTR SS:[EBP-14],0
0041DF43 |. 74 09 JE SHORT 0041DF4E
0041DF45 |. C745 F4 000C0000 MOV DWORD PTR SS:[EBP-0C],0C00
0041DF4C |. EB 07 JMP SHORT 0041DF55
0041DF4E |> C745 F4 00F4FFFF MOV DWORD PTR SS:[EBP-0C],-0C00
0041DF55 |> 8B45 EC MOV EAX,DWORD PTR SS:[EBP-14]
0041DF58 |. 50 PUSH EAX ; /Arg4 => [EBP-14]
0041DF59 |. 8B45 F0 MOV EAX,DWORD PTR SS:[EBP-10] ; |
0041DF5C |. 50 PUSH EAX ; |Arg3 => [EBP-10]
0041DF5D |. 8B45 F4 MOV EAX,DWORD PTR SS:[EBP-0C] ; |
0041DF60 |. 837D E4 00 CMP DWORD PTR SS:[EBP-1C],0 ; |
0041DF64 |. 75 06 JNE SHORT 0041DF6C ; |
0041DF66 |. 0305 54E64900 ADD EAX,DWORD PTR DS:[49E654] ; |
0041DF6C |> 50 PUSH EAX ; |Arg2
0041DF6D |. 8B45 FC MOV EAX,DWORD PTR SS:[EBP-4] ; |
0041DF70 |. 50 PUSH EAX ; |Arg1 => [EBP-4]
0041DF71 |. E8 0A60FEFF CALL 00403F80 ; \Cave_Story_-_Redesign.00403F80
0041DF76 |. 83C4 10 ADD ESP,10
0041DF79 |. 6A 00 PUSH 0
0041DF7B |. 6A 03 PUSH 3
0041DF7D |. 8B45 F0 MOV EAX,DWORD PTR SS:[EBP-10]
0041DF80 |. 50 PUSH EAX
0041DF81 |. 837D E4 00 CMP DWORD PTR SS:[EBP-1C],0
0041DF85 |. 75 0F JNE SHORT 0041DF96
0041DF87 |. 8B45 F4 MOV EAX,DWORD PTR SS:[EBP-0C]
0041DF8A |. 0345 F4 ADD EAX,DWORD PTR SS:[EBP-0C]
0041DF8D |. 0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041DF93 |. 8945 F4 MOV DWORD PTR SS:[EBP-0C],EAX
0041DF96 |> 8B45 F4 MOV EAX,DWORD PTR SS:[EBP-0C]
0041DF99 |. 50 PUSH EAX
0041DF9A |. E8 F1CCFEFF CALL 0040AC90
0041DF9F |. 83C4 10 ADD ESP,10
0041DFA2 |. 6A 01 PUSH 1 ; /Arg2 = 1
0041DFA4 |. 837D 08 03 CMP DWORD PTR SS:[EBP+8],3 ; |
0041DFA8 |. 75 04 JNE SHORT 0041DFAE ; |
0041DFAA |. 6A 31 PUSH 31 ; |
0041DFAC |. EB 02 JMP SHORT 0041DFB0 ; |
0041DFAE |> 6A 20 PUSH 20 ; |
0041DFB0 |> E8 8B260000 CALL 00420640 ; \Cave_Story_-_Redesign.00420640
0041DFB5 |. 83C4 08 ADD ESP,8
0041DFB8 |> 89EC MOV ESP,EBP
0041DFBA |. 5D POP EBP
0041DFBB \. C3 RETN
Dubby said:Thank you Celtic, that's very useful to know - especially since I will likely need at least a dozen teleporter slots.
Celtic Minstrel said:If you need all twelve active simultaneously, then, you'll need to do some assembly hacking to extend the length of that array. Of course, you could also have a way to arrange it so that no more than six are ever active at a time.
DoubleThink said:Can anyone tell me what entity flag 0x0040 "special solid" does again? I can't remember where it's used... or flag 0x0002 "no effect about tile 44" for that matter.
LunarSoul said:Hah!
Quoting the very first post, I love it.
How would you go about setting a weapon's EXP to 0?
If you want specifics, I need it for the polar star.
LunarSoul said:I don't want to use zam, though. I just want to set the EXP of the polar star to 0.
MOV ECX,OFFSET 00499C9C
CMP ECX,6
JNE 0048B904
...
mov ecx,[499c9c]
cmp ecx,6
jne 0x48B904
...
You'd have to describe more about what you did, a lot of things could've gone wrong.Game Reaper said:Umm hi. I have a question. I am making a mod and its all messed up in mimiga village. I put a new door with script (works great except doesnt show the open door image when i press down aka flag 2000) and a new transporter with script (works but kinda buggy) and now none of the doors in mimiga village work except the one that I made. please help me.
Make sure your entire Cave Story folder does not have "Read-Only" checked, in Properties.Game Reaper said:(edit) Ahhh! new problem! Whenever i try to edit weapons it just says error saving file! Help me!