Quick Modding/Hacking Answers Thread

Mar 7, 2012 at 3:52 PM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1104
Age: 27
Pronouns: none
How to change number of bullets that can be shot?
E.g. Polar Star - 2.
I want more.
 
Mar 9, 2012 at 5:12 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
Assembly is required.
 
Mar 10, 2012 at 2:24 AM
Not COMMA
Discord Group Moderator
"..."
Join Date: May 9, 2011
Location:
Posts: 350
Age: 26
Pronouns: he/him
Can I make the main character look backwards without having to press the down key?
Can I make a certian sound play as you press down?
 
Mar 10, 2012 at 3:19 AM
Veteran Member
"The Ultimate Sword of Extraordinary Magnitude"
Join Date: Jan 26, 2012
Location:
Posts: 292
Pronouns: he/him
Not necessarily. If he wants the main character to look to the background in a cutscene (and why else would he want that to happen without pressing down?) all he has to do is add <MYD0004.

However, I do believe you are right about him needing assembly to associate pressing down with a sound, sadly.

Unless it is location specific, then he could just have a "nothing" entity that plays the sound when he presses down... and if the character must not look to the background, besides <SOUXXXX he could first add <MYD0000 (if he wants him to look left) or <MYD0002 (if he wants him to look right).
He may still turn to the background for a fraction of a second though.
 
Mar 10, 2012 at 2:17 PM
Not COMMA
Discord Group Moderator
"..."
Join Date: May 9, 2011
Location:
Posts: 350
Age: 26
Pronouns: he/him
Where are the sound effects located in the resource hacker?
 
Mar 12, 2012 at 8:09 AM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1104
Age: 27
Pronouns: none
Assembly is required.

I can do assembly.
Where is located the maximum number of shots?



And JERSE:
You can't edit sounds with ResHack.
You have to get C Tone or other program.
I use C Tone.
 
Mar 12, 2012 at 2:09 PM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 21, 2011
Location:
Posts: 249
Alright, first a list of the sounds though. CE's list is incomplete, as there are additional sounds at higher points than most people think.

Code:
[CE_SOUNDS] 118
0 <nothing>
1 [blip]
2 message typing
3 hit ceiling 'bonk'
4 weapon switch
5 some kind of menu beep
6 [critter hop?]
7 [nothing?]
8 [nothing?]
9 [nothing?]
10 [nothing?]
11 door
12 [*plsh* - map tile change?]
13 [nothing?]
14 get weapon energy
15 [click]
16 take damage
17 die
18 [menu?]
19 [nothing?]
20 health/ammo refill
21 [bubble]
22 click (chest, life capsule, unlock door)
23 [thud]
24 [tap - walking?]
25 [enemy killed?]
26 [loud thud - balrog?]
27 level up
28 [thump]
29 teleport
30 [jump]
31 invulnerable "ting"
32 [shot - polar star?]
33 [shot - fireball]
34 [shot - fireball bounce?]
35 [explosion (missiles?]
36 [nothing?]
37 [click]
38 [get item?]
39 [*bvng*]
40 [water?]
41 [water?]
42 [beep]
43 computer beep (activate terminals, etc.)
44 blast (blow up door to shelt)
45 weapon energy bounce
46 [*ftt*]
47 tiny balloon pop
48 [shot - bubble pop?]
49 [shot - spur lv 1]
50 [enemy squeak]
51 [enemy take damage]
52 [large enemy take damage (roar)]
53 [enemy squeak-bblblbl]
54 [object shot (thud)]
55 [enemy squeak]
56 [splash]
57 [little damage sound]
58 [*chlk*]
59 [nothing?]
60 [spur charge - lower]
61 [spur charge - higher]
62 shot - spur lv 2
63 shot - spur lv 3
64 shot - spur max
65 spur fully charged
66 [nothing?]
67 [nothing?]
68 [nothing?]
69 [nothing?]
70 [sue hitting you while you're unconscious in jail1]
71 [explosion]
72 [explosion]
73 [nothing?]
74 [nothing?]
75 [nothing?]
76 [nothing?]
77 [nothing?]
78 [nothing?]
79 [nothing?]
80 [nothing?]
81 [nothing?]
82 [nothing?]
83 [nothing?]
84 [nothing?]
85 [nothing?]
86 [nothing?]
87 [nothing?]
88 [nothing?]
89 [nothing?]
90 [nothing?]
91 [nothing?]
92 [nothing?]
93 [nothing?]
94 [nothing?]
95 [nothing?]
96 [nothing?]
97 [nothing?]
98 [nothing?]
99 [nothing?]
100 [high pitch 'slap']
101 thunderclap
102 deep-pitched enemy take damage
103 [alarm]
104 high-pitch critter jump
105 [*arf!*]
106 "swishing" sound that the blade projectile makes
107 rumble sound that moving blocks make (very short)
108 giant critter jumps
109 [*tang*]
110 [*whosh*] (helicopter blade)
111 very low pitch thumping sound
112 [*whack*]
113 booster flight (very short)
114 big 'recoil' sound
115 booming echo
116 loud CLANG sound, then rises from low pitch to high pitch
117 [*plshsss* - hissing map tile change?]

As for actually changing how many bullets a weapon fires... that's more difficult to do than it lets on. Basically, you need to calculate the position of the bullet in relation to the gun & player, rather than simply tell the gun where to place the bullet. Then you need to do so for each bullet to produce. You could also setup a loop, but that is considerably more complicated. Here's an excerpt from my Autogun code that shows the first method:

Code:
CPU Disasm
Address   Hex dump		  Command								  Comments
0041E425	 \8B0D 54E64900 MOV ECX,DWORD PTR DS:[49E654]
0041E42B	  894D F4	   MOV DWORD PTR SS:[EBP-0C],ECX			; EBP-0C = PlayerXPosition
0041E42E	  8B15 58E64900 MOV EDX,DWORD PTR DS:[49E658]
0041E434	  8955 F0	   MOV DWORD PTR SS:[EBP-10],EDX			; EBP-10 = PlayerYPosition
0041E437	  A1 40E64900   MOV EAX,DWORD PTR DS:[49E640]
0041E43C	  8945 EC	   MOV DWORD PTR SS:[EBP-14],EAX			; EBP-14 = DirectionFaced
0041E43F	  8B0D 44E64900 MOV ECX,DWORD PTR DS:[49E644]
0041E445	  894D E8	   MOV DWORD PTR SS:[EBP-18],ECX			; EBP-18 = IsFacingUp
0041E448	  8B15 48E64900 MOV EDX,DWORD PTR DS:[49E648]
0041E44E	  0355 E8	   ADD EDX,DWORD PTR SS:[EBP-18]
0041E451	  8955 E4	   MOV DWORD PTR SS:[EBP-1C],EDX			; EBP-1C = IsFacingUp [OR] IsFacingDown
0041E454	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E458	  74 4C		 JE SHORT 0041E4A6
0041E45A	  837D EC 00	CMP DWORD PTR SS:[EBP-14],0
0041E45E	  74 0D		 JE SHORT 0041E46D
0041E460	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E463	  05 00080000   ADD EAX,800							  ; Player is facing right, but looking down (or up)
0041E468	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E46B	  EB 0B		 JMP SHORT 0041E478
0041E46D	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E470	  2D 00080000   SUB EAX,800							  ; Player is facing left, but looking down (or up)
0041E475	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E478	  837D E8 00	CMP DWORD PTR SS:[EBP-18],0
0041E47C	  74 14		 JE SHORT 0041E492
0041E47E	  C745 EC 01000 MOV DWORD PTR SS:[EBP-14],1			  ; fix DirectionFaced for bullet
0041E485	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E488	  2D 00100000   SUB EAX,1000							 ; Player is looking up
0041E48D	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E490	  EB 35		 JMP SHORT 0041E4C7
0041E492	  C745 EC 03000 MOV DWORD PTR SS:[EBP-14],3			  ; fix DirectionFaced for bullet
0041E499	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E49C	  05 00100000   ADD EAX,1000							 ; Player is looking down
0041E4A1	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E4A4	  EB 21		 JMP SHORT 0041E4C7
0041E4A6	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E4A9	  05 00060000   ADD EAX,600							  ; Player is facing left or right and not looking up or down
0041E4AE	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E4B1	  837D EC 00	CMP DWORD PTR SS:[EBP-14],0
0041E4B5	  74 09		 JE SHORT 0041E4C0
0041E4B7	  C745 F4 00120 MOV DWORD PTR SS:[EBP-0C],1200		   ; Player is facing right and not looking up or down
0041E4BE	  EB 07		 JMP SHORT 0041E4C7
0041E4C0	  C745 F4 00EEF MOV DWORD PTR SS:[EBP-0C],-1200		  ; Player is facing left and not looking up or down
0041E4C7	  6A 00		 PUSH 0
0041E4C9	  6A 03		 PUSH 3
0041E4CB	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E4CE	  50			PUSH EAX
0041E4CF	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0			  ; figure out where the muzzle flash goes
0041E4D3	  75 0E		 JNE SHORT 0041E4E3
0041E4D5	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E4D8	  0345 F4	   ADD EAX,DWORD PTR SS:[EBP-0C]
0041E4DB	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E4E1	  EB 03		 JMP SHORT 0041E4E6
0041E4E3	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E4E6	  50			PUSH EAX
0041E4E7	  E8 A4C7FEFF   CALL 0040AC90							; do the muzzle flash
0041E4EC	  83C4 10	   ADD ESP,10
0041E4EF	  6A 01		 PUSH 1
0041E4F1	  837D 08 03	CMP DWORD PTR SS:[EBP+8],3
0041E4F5	  75 04		 JNE SHORT 0041E4FB
0041E4F7	  6A 31		 PUSH 31								  ; level 3 sounds different
0041E4F9	  EB 02		 JMP SHORT 0041E4FD
0041E4FB	  6A 20		 PUSH 20
0041E4FD	  E8 3E210000   CALL 00420640							; play firing sound
0041E502	  83C4 08	   ADD ESP,8
0041E505	  837D E0 01	CMP DWORD PTR SS:[EBP-20],1			  ; ebp-20 is how many bullets we are firing
0041E509	  7F 29		 JG SHORT 0041E534
0041E50B	  8B45 EC	   MOV EAX,DWORD PTR SS:[EBP-14]			; -------
0041E50E	  50			PUSH EAX								 ; this section fires one bullet
0041E50F	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E512	  50			PUSH EAX
0041E513	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E516	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E51A	  75 06		 JNE SHORT 0041E522
0041E51C	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E522	  50			PUSH EAX
0041E523	  8B45 FC	   MOV EAX,DWORD PTR SS:[EBP-4]
0041E526	  50			PUSH EAX
0041E527	  E8 545AFEFF   CALL 00403F80
0041E52C	  83C4 10	   ADD ESP,10							   ; end of 1 bullet section
0041E52F	  E9 AB010000   JMP 0041E6DF							 ; -------
0041E534	  837D E0 03	CMP DWORD PTR SS:[EBP-20],3
0041E538	  0F84 89000000 JE 0041E5C7
0041E53E	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0			  ; -------
0041E542	  74 0D		 JE SHORT 0041E551						; this section fires two bullets
0041E544	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E547	  2D 00040000   SUB EAX,400
0041E54C	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E54F	  EB 0B		 JMP SHORT 0041E55C
0041E551	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E554	  2D 00060000   SUB EAX,600
0041E559	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E55C	  8B45 EC	   MOV EAX,DWORD PTR SS:[EBP-14]
0041E55F	  50			PUSH EAX
0041E560	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E563	  50			PUSH EAX
0041E564	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E567	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E56B	  75 06		 JNE SHORT 0041E573
0041E56D	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E573	  50			PUSH EAX
0041E574	  8B45 FC	   MOV EAX,DWORD PTR SS:[EBP-4]
0041E577	  50			PUSH EAX
0041E578	  E8 035AFEFF   CALL 00403F80
0041E57D	  83C4 10	   ADD ESP,10
0041E580	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E584	  74 0D		 JE SHORT 0041E593
0041E586	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E589	  05 000A0000   ADD EAX,0A00
0041E58E	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E591	  EB 0B		 JMP SHORT 0041E59E
0041E593	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E596	  05 000A0000   ADD EAX,0A00
0041E59B	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E59E	  8B45 EC	   MOV EAX,DWORD PTR SS:[EBP-14]
0041E5A1	  50			PUSH EAX
0041E5A2	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E5A5	  50			PUSH EAX
0041E5A6	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E5A9	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E5AD	  75 06		 JNE SHORT 0041E5B5
0041E5AF	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E5B5	  50			PUSH EAX
0041E5B6	  8B45 FC	   MOV EAX,DWORD PTR SS:[EBP-4]
0041E5B9	  50			PUSH EAX
0041E5BA	  E8 C159FEFF   CALL 00403F80
0041E5BF	  83C4 10	   ADD ESP,10							   ; end of 2 bullet section
0041E5C2	  E9 18010000   JMP 0041E6DF							 ; -------
0041E5C7	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0			  ; this section fires three bullets
0041E5CB	  74 0D		 JE SHORT 0041E5DA
0041E5CD	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E5D0	  2D 000A0000   SUB EAX,0A00
0041E5D5	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E5D8	  EB 0B		 JMP SHORT 0041E5E5
0041E5DA	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E5DD	  2D 000F0000   SUB EAX,0F00
0041E5E2	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E5E5	  8B45 EC	   MOV EAX,DWORD PTR SS:[EBP-14]
0041E5E8	  50			PUSH EAX
0041E5E9	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E5EC	  50			PUSH EAX
0041E5ED	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E5F0	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E5F4	  75 06		 JNE SHORT 0041E5FC
0041E5F6	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E5FC	  50			PUSH EAX
0041E5FD	  8B45 FC	   MOV EAX,DWORD PTR SS:[EBP-4]
0041E600	  50			PUSH EAX
0041E601	  E8 7A59FEFF   CALL 00403F80
0041E606	  83C4 10	   ADD ESP,10
0041E609	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E60D	  74 0D		 JE SHORT 0041E61C
0041E60F	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E612	  05 000A0000   ADD EAX,0A00
0041E617	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E61A	  EB 0B		 JMP SHORT 0041E627
0041E61C	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E61F	  05 000A0000   ADD EAX,0A00
0041E624	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E627	  8B45 EC	   MOV EAX,DWORD PTR SS:[EBP-14]
0041E62A	  50			PUSH EAX
0041E62B	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E62E	  50			PUSH EAX
0041E62F	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E632	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E636	  75 06		 JNE SHORT 0041E63E
0041E638	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E63E	  50			PUSH EAX
0041E63F	  8B45 FC	   MOV EAX,DWORD PTR SS:[EBP-4]
0041E642	  50			PUSH EAX
0041E643	  E8 3859FEFF   CALL 00403F80
0041E648	  83C4 10	   ADD ESP,10
0041E64B	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E64F	  74 0D		 JE SHORT 0041E65E
0041E651	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E654	  05 000A0000   ADD EAX,0A00
0041E659	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E65C	  EB 0B		 JMP SHORT 0041E669
0041E65E	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E661	  05 000A0000   ADD EAX,0A00
0041E666	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E669	  8B45 EC	   MOV EAX,DWORD PTR SS:[EBP-14]
0041E66C	  50			PUSH EAX
0041E66D	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E670	  50			PUSH EAX
0041E671	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E674	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E678	  75 06		 JNE SHORT 0041E680
0041E67A	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E680	  50			PUSH EAX
0041E681	  8B45 FC	   MOV EAX,DWORD PTR SS:[EBP-4]
0041E684	  50			PUSH EAX
0041E685	  E8 F658FEFF   CALL 00403F80
0041E68A	  83C4 10	   ADD ESP,10							   ; end of 3 bullet section
0041E68D	  EB 50		 JMP SHORT 0041E6DF					   ; -------

Yes, I know that this will look drastically different to anything in the original weapon code. Here's the binary for my version of the Polar Star, which is considerably more compact (and can be appended to use the above code):

Code:
STARTS AT 0041DE60

55 89 E5 83 EC 1C 8B 45 08 89 45 F8 83 C0 03 89
45 FC 6A 02 E8 87 68 07 00 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

ENDS AT 0041DFBB
 
Mar 12, 2012 at 2:18 PM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1104
Age: 27
Pronouns: none
As for actually changing how many bullets a weapon fires... that's more difficult to do than it lets on. Basically, you need to calculate the position of the bullet in relation to the gun & player, rather than simply tell the gun where to place the bullet. Then you need to do so for each bullet to produce. You could also setup a loop, but that is considerably more complicated. Here's an excerpt from my Autogun code that shows the first method:

Code:
CPU Disasm
Address   Hex dump		  Command								  Comments
0041E425	 \8B0D 54E64900 MOV ECX,DWORD PTR DS:[49E654]
0041E42B	  894D F4	   MOV DWORD PTR SS:[EBP-0C],ECX			; EBP-0C = PlayerXPosition
0041E42E	  8B15 58E64900 MOV EDX,DWORD PTR DS:[49E658]
0041E434	  8955 F0	   MOV DWORD PTR SS:[EBP-10],EDX			; EBP-10 = PlayerYPosition
0041E437	  A1 40E64900   MOV EAX,DWORD PTR DS:[49E640]
0041E43C	  8945 EC	   MOV DWORD PTR SS:[EBP-14],EAX			; EBP-14 = DirectionFaced
0041E43F	  8B0D 44E64900 MOV ECX,DWORD PTR DS:[49E644]
0041E445	  894D E8	   MOV DWORD PTR SS:[EBP-18],ECX			; EBP-18 = IsFacingUp
0041E448	  8B15 48E64900 MOV EDX,DWORD PTR DS:[49E648]
0041E44E	  0355 E8	   ADD EDX,DWORD PTR SS:[EBP-18]
0041E451	  8955 E4	   MOV DWORD PTR SS:[EBP-1C],EDX			; EBP-1C = IsFacingUp [OR] IsFacingDown
0041E454	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E458	  74 4C		 JE SHORT 0041E4A6
0041E45A	  837D EC 00	CMP DWORD PTR SS:[EBP-14],0
0041E45E	  74 0D		 JE SHORT 0041E46D
0041E460	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E463	  05 00080000   ADD EAX,800							  ; Player is facing right, but looking down (or up)
0041E468	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E46B	  EB 0B		 JMP SHORT 0041E478
0041E46D	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E470	  2D 00080000   SUB EAX,800							  ; Player is facing left, but looking down (or up)
0041E475	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E478	  837D E8 00	CMP DWORD PTR SS:[EBP-18],0
0041E47C	  74 14		 JE SHORT 0041E492
0041E47E	  C745 EC 01000 MOV DWORD PTR SS:[EBP-14],1			  ; fix DirectionFaced for bullet
0041E485	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E488	  2D 00100000   SUB EAX,1000							 ; Player is looking up
0041E48D	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E490	  EB 35		 JMP SHORT 0041E4C7
0041E492	  C745 EC 03000 MOV DWORD PTR SS:[EBP-14],3			  ; fix DirectionFaced for bullet
0041E499	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E49C	  05 00100000   ADD EAX,1000							 ; Player is looking down
0041E4A1	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E4A4	  EB 21		 JMP SHORT 0041E4C7
0041E4A6	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E4A9	  05 00060000   ADD EAX,600							  ; Player is facing left or right and not looking up or down
0041E4AE	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E4B1	  837D EC 00	CMP DWORD PTR SS:[EBP-14],0
0041E4B5	  74 09		 JE SHORT 0041E4C0
0041E4B7	  C745 F4 00120 MOV DWORD PTR SS:[EBP-0C],1200		   ; Player is facing right and not looking up or down
0041E4BE	  EB 07		 JMP SHORT 0041E4C7
0041E4C0	  C745 F4 00EEF MOV DWORD PTR SS:[EBP-0C],-1200		  ; Player is facing left and not looking up or down
0041E4C7	  6A 00		 PUSH 0
0041E4C9	  6A 03		 PUSH 3
0041E4CB	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E4CE	  50			PUSH EAX
0041E4CF	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0			  ; figure out where the muzzle flash goes
0041E4D3	  75 0E		 JNE SHORT 0041E4E3
0041E4D5	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E4D8	  0345 F4	   ADD EAX,DWORD PTR SS:[EBP-0C]
0041E4DB	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E4E1	  EB 03		 JMP SHORT 0041E4E6
0041E4E3	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E4E6	  50			PUSH EAX
0041E4E7	  E8 A4C7FEFF   CALL 0040AC90							; do the muzzle flash
0041E4EC	  83C4 10	   ADD ESP,10
0041E4EF	  6A 01		 PUSH 1
0041E4F1	  837D 08 03	CMP DWORD PTR SS:[EBP+8],3
0041E4F5	  75 04		 JNE SHORT 0041E4FB
0041E4F7	  6A 31		 PUSH 31								  ; level 3 sounds different
0041E4F9	  EB 02		 JMP SHORT 0041E4FD
0041E4FB	  6A 20		 PUSH 20
0041E4FD	  E8 3E210000   CALL 00420640							; play firing sound
0041E502	  83C4 08	   ADD ESP,8
0041E505	  837D E0 01	CMP DWORD PTR SS:[EBP-20],1			  ; ebp-20 is how many bullets we are firing
0041E509	  7F 29		 JG SHORT 0041E534
0041E50B	  8B45 EC	   MOV EAX,DWORD PTR SS:[EBP-14]			; -------
0041E50E	  50			PUSH EAX								 ; this section fires one bullet
0041E50F	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E512	  50			PUSH EAX
0041E513	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E516	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E51A	  75 06		 JNE SHORT 0041E522
0041E51C	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E522	  50			PUSH EAX
0041E523	  8B45 FC	   MOV EAX,DWORD PTR SS:[EBP-4]
0041E526	  50			PUSH EAX
0041E527	  E8 545AFEFF   CALL 00403F80
0041E52C	  83C4 10	   ADD ESP,10							   ; end of 1 bullet section
0041E52F	  E9 AB010000   JMP 0041E6DF							 ; -------
0041E534	  837D E0 03	CMP DWORD PTR SS:[EBP-20],3
0041E538	  0F84 89000000 JE 0041E5C7
0041E53E	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0			  ; -------
0041E542	  74 0D		 JE SHORT 0041E551						; this section fires two bullets
0041E544	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E547	  2D 00040000   SUB EAX,400
0041E54C	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E54F	  EB 0B		 JMP SHORT 0041E55C
0041E551	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E554	  2D 00060000   SUB EAX,600
0041E559	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E55C	  8B45 EC	   MOV EAX,DWORD PTR SS:[EBP-14]
0041E55F	  50			PUSH EAX
0041E560	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E563	  50			PUSH EAX
0041E564	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E567	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E56B	  75 06		 JNE SHORT 0041E573
0041E56D	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E573	  50			PUSH EAX
0041E574	  8B45 FC	   MOV EAX,DWORD PTR SS:[EBP-4]
0041E577	  50			PUSH EAX
0041E578	  E8 035AFEFF   CALL 00403F80
0041E57D	  83C4 10	   ADD ESP,10
0041E580	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E584	  74 0D		 JE SHORT 0041E593
0041E586	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E589	  05 000A0000   ADD EAX,0A00
0041E58E	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E591	  EB 0B		 JMP SHORT 0041E59E
0041E593	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E596	  05 000A0000   ADD EAX,0A00
0041E59B	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E59E	  8B45 EC	   MOV EAX,DWORD PTR SS:[EBP-14]
0041E5A1	  50			PUSH EAX
0041E5A2	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E5A5	  50			PUSH EAX
0041E5A6	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E5A9	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E5AD	  75 06		 JNE SHORT 0041E5B5
0041E5AF	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E5B5	  50			PUSH EAX
0041E5B6	  8B45 FC	   MOV EAX,DWORD PTR SS:[EBP-4]
0041E5B9	  50			PUSH EAX
0041E5BA	  E8 C159FEFF   CALL 00403F80
0041E5BF	  83C4 10	   ADD ESP,10							   ; end of 2 bullet section
0041E5C2	  E9 18010000   JMP 0041E6DF							 ; -------
0041E5C7	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0			  ; this section fires three bullets
0041E5CB	  74 0D		 JE SHORT 0041E5DA
0041E5CD	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E5D0	  2D 000A0000   SUB EAX,0A00
0041E5D5	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E5D8	  EB 0B		 JMP SHORT 0041E5E5
0041E5DA	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E5DD	  2D 000F0000   SUB EAX,0F00
0041E5E2	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E5E5	  8B45 EC	   MOV EAX,DWORD PTR SS:[EBP-14]
0041E5E8	  50			PUSH EAX
0041E5E9	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E5EC	  50			PUSH EAX
0041E5ED	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E5F0	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E5F4	  75 06		 JNE SHORT 0041E5FC
0041E5F6	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E5FC	  50			PUSH EAX
0041E5FD	  8B45 FC	   MOV EAX,DWORD PTR SS:[EBP-4]
0041E600	  50			PUSH EAX
0041E601	  E8 7A59FEFF   CALL 00403F80
0041E606	  83C4 10	   ADD ESP,10
0041E609	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E60D	  74 0D		 JE SHORT 0041E61C
0041E60F	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E612	  05 000A0000   ADD EAX,0A00
0041E617	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E61A	  EB 0B		 JMP SHORT 0041E627
0041E61C	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E61F	  05 000A0000   ADD EAX,0A00
0041E624	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E627	  8B45 EC	   MOV EAX,DWORD PTR SS:[EBP-14]
0041E62A	  50			PUSH EAX
0041E62B	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E62E	  50			PUSH EAX
0041E62F	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E632	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E636	  75 06		 JNE SHORT 0041E63E
0041E638	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E63E	  50			PUSH EAX
0041E63F	  8B45 FC	   MOV EAX,DWORD PTR SS:[EBP-4]
0041E642	  50			PUSH EAX
0041E643	  E8 3859FEFF   CALL 00403F80
0041E648	  83C4 10	   ADD ESP,10
0041E64B	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E64F	  74 0D		 JE SHORT 0041E65E
0041E651	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E654	  05 000A0000   ADD EAX,0A00
0041E659	  8945 F4	   MOV DWORD PTR SS:[EBP-0C],EAX
0041E65C	  EB 0B		 JMP SHORT 0041E669
0041E65E	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E661	  05 000A0000   ADD EAX,0A00
0041E666	  8945 F0	   MOV DWORD PTR SS:[EBP-10],EAX
0041E669	  8B45 EC	   MOV EAX,DWORD PTR SS:[EBP-14]
0041E66C	  50			PUSH EAX
0041E66D	  8B45 F0	   MOV EAX,DWORD PTR SS:[EBP-10]
0041E670	  50			PUSH EAX
0041E671	  8B45 F4	   MOV EAX,DWORD PTR SS:[EBP-0C]
0041E674	  837D E4 00	CMP DWORD PTR SS:[EBP-1C],0
0041E678	  75 06		 JNE SHORT 0041E680
0041E67A	  0305 54E64900 ADD EAX,DWORD PTR DS:[49E654]
0041E680	  50			PUSH EAX
0041E681	  8B45 FC	   MOV EAX,DWORD PTR SS:[EBP-4]
0041E684	  50			PUSH EAX
0041E685	  E8 F658FEFF   CALL 00403F80
0041E68A	  83C4 10	   ADD ESP,10							   ; end of 3 bullet section
0041E68D	  EB 50		 JMP SHORT 0041E6DF					   ; -------

Aargh it looks hard.
Is it any other way to do it?
Maybe a one digit to change or something? I was joking
 
Mar 12, 2012 at 2:38 PM
Veteran Member
"The Ultimate Sword of Extraordinary Magnitude"
Join Date: Jan 26, 2012
Location:
Posts: 292
Pronouns: he/him
Alright, first a list of the sounds though. CE's list is incomplete, as there are additional sounds at higher points than most people think.
Yes! Christmas came early this year! Thanks Santa... I mean, Dubby.
 
Mar 12, 2012 at 2:40 PM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1104
Age: 27
Pronouns: none
Dubby said:
Alright, first a list of the sounds though. CE's list is incomplete, as there are additional sounds at higher points than most people think.

Code:
[CE_SOUNDS] 118
0 <nothing>
1 [blip]
2 message typing
3 hit ceiling 'bonk'
4 weapon switch
5 some kind of menu beep
6 [critter hop?]
7 [nothing?]
8 [nothing?]
9 [nothing?]
10 [nothing?]
11 door
12 [*plsh* - map tile change?]
13 [nothing?]
14 get weapon energy
15 [click]
16 take damage
17 die
18 [menu?]
19 [nothing?]
20 health/ammo refill
21 [bubble]
22 click (chest, life capsule, unlock door)
23 [thud]
24 [tap - walking?]
25 [enemy killed?]
26 [loud thud - balrog?]
27 level up
28 [thump]
29 teleport
30 [jump]
31 invulnerable "ting"
32 [shot - polar star?]
33 [shot - fireball]
34 [shot - fireball bounce?]
35 [explosion (missiles?]
36 [nothing?]
37 [click]
38 [get item?]
39 [*bvng*]
40 [water?]
41 [water?]
42 [beep]
43 computer beep (activate terminals, etc.)
44 blast (blow up door to shelt)
45 weapon energy bounce
46 [*ftt*]
47 tiny balloon pop
48 [shot - bubble pop?]
49 [shot - spur lv 1]
50 [enemy squeak]
51 [enemy take damage]
52 [large enemy take damage (roar)]
53 [enemy squeak-bblblbl]
54 [object shot (thud)]
55 [enemy squeak]
56 [splash]
57 [little damage sound]
58 [*chlk*]
59 [nothing?]
60 [spur charge - lower]
61 [spur charge - higher]
62 shot - spur lv 2
63 shot - spur lv 3
64 shot - spur max
65 spur fully charged
66 [nothing?]
67 [nothing?]
68 [nothing?]
69 [nothing?]
70 [sue hitting you while you're unconscious in jail1]
71 [explosion]
72 [explosion]
73 [nothing?]
74 [nothing?]
75 [nothing?]
76 [nothing?]
77 [nothing?]
78 [nothing?]
79 [nothing?]
80 [nothing?]
81 [nothing?]
82 [nothing?]
83 [nothing?]
84 [nothing?]
85 [nothing?]
86 [nothing?]
87 [nothing?]
88 [nothing?]
89 [nothing?]
90 [nothing?]
91 [nothing?]
92 [nothing?]
93 [nothing?]
94 [nothing?]
95 [nothing?]
96 [nothing?]
97 [nothing?]
98 [nothing?]
99 [nothing?]
100 [high pitch 'slap']
101 thunderclap
102 deep-pitched enemy take damage
103 [alarm]
104 high-pitch critter jump
105 [*arf!*]
106 "swishing" sound that the blade projectile makes
107 rumble sound that moving blocks make (very short)
108 giant critter jumps
109 [*tang*]
110 [*whosh*] (helicopter blade)
111 very low pitch thumping sound
112 [*whack*]
113 booster flight (very short)
114 big 'recoil' sound
115 booming echo
116 loud CLANG sound, then rises from low pitch to high pitch
117 [*plshsss* - hissing map tile change?]

But whatabout changing them?
There are umm... seventy few sounds that can be changed.

and whatabout my bullets
 
Mar 12, 2012 at 9:34 PM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 21, 2011
Location:
Posts: 249
Is it any other way to do it?

You could also use a loop, but the bullets will have to be able to propel themselves at different angles upon creation, otherwise you would not be able to see them. This is basically how shotgun-type weapons are made.

This is what a firing loop looks like, taken from the Sparkler weapon:
Code:
CPU Disasm
Address   Hex dump		  Command								  Comments
00493B02	8B0D 54E64900   MOV ECX,DWORD PTR DS:[49E654]
00493B08	894D F4		 MOV DWORD PTR SS:[EBP-0C],ECX
00493B0B	8B15 58E64900   MOV EDX,DWORD PTR DS:[49E658]
00493B11	8955 F0		 MOV DWORD PTR SS:[EBP-10],EDX
00493B14	A1 40E64900	 MOV EAX,DWORD PTR DS:[49E640]
00493B19	8945 EC		 MOV DWORD PTR SS:[EBP-14],EAX
00493B1C	8B0D 44E64900   MOV ECX,DWORD PTR DS:[49E644]
00493B22	894D E8		 MOV DWORD PTR SS:[EBP-18],ECX
00493B25	8B15 48E64900   MOV EDX,DWORD PTR DS:[49E648]
00493B2B	0355 E8		 ADD EDX,DWORD PTR SS:[EBP-18]
00493B2E	8955 E4		 MOV DWORD PTR SS:[EBP-1C],EDX
00493B31	837D D0 00	  CMP DWORD PTR SS:[EBP-30],0
00493B35	74 19		   JE SHORT 00493B50
00493B37	6A 03		   PUSH 3
00493B39	6A 01		   PUSH 1
00493B3B	E8 10B8F7FF	 CALL 0040F350
00493B40	83C4 08		 ADD ESP,8
00493B43	8B4D CC		 MOV ECX,DWORD PTR SS:[EBP-34]
00493B46	C1F9 02		 SAR ECX,2
00493B49	01C8			ADD EAX,ECX
00493B4B	8945 DC		 MOV DWORD PTR SS:[EBP-24],EAX
00493B4E	EB 65		   JMP SHORT 00493BB5
00493B50	C745 E0 30E9400 MOV DWORD PTR SS:[EBP-20],0040E930	   ; Entry point of procedure
00493B57	8B45 08		 MOV EAX,DWORD PTR SS:[EBP+8]
00493B5A	D1E0			SHL EAX,1
00493B5C	90			  NOP
00493B5D	83C0 05		 ADD EAX,5
00493B60	8945 DC		 MOV DWORD PTR SS:[EBP-24],EAX
00493B63	68 25020000	 PUSH 225
00493B68	FF55 E0		 CALL DWORD PTR SS:[EBP-20]
00493B6B	83C4 04		 ADD ESP,4
00493B6E	85C0			TEST EAX,EAX
00493B70	74 06		   JE SHORT 00493B78
00493B72	8345 DC 08	  ADD DWORD PTR SS:[EBP-24],8
00493B76	EB 3D		   JMP SHORT 00493BB5
00493B78	68 24020000	 PUSH 224
00493B7D	FF55 E0		 CALL DWORD PTR SS:[EBP-20]
00493B80	83C4 04		 ADD ESP,4
00493B83	85C0			TEST EAX,EAX
00493B85	74 06		   JE SHORT 00493B8D
00493B87	8345 DC 06	  ADD DWORD PTR SS:[EBP-24],6
00493B8B	EB 28		   JMP SHORT 00493BB5
00493B8D	68 23020000	 PUSH 223
00493B92	FF55 E0		 CALL DWORD PTR SS:[EBP-20]
00493B95	83C4 04		 ADD ESP,4
00493B98	85C0			TEST EAX,EAX
00493B9A	74 06		   JE SHORT 00493BA2
00493B9C	8345 DC 04	  ADD DWORD PTR SS:[EBP-24],4
00493BA0	EB 13		   JMP SHORT 00493BB5
00493BA2	68 22020000	 PUSH 222
00493BA7	FF55 E0		 CALL DWORD PTR SS:[EBP-20]
00493BAA	83C4 04		 ADD ESP,4
00493BAD	85C0			TEST EAX,EAX
00493BAF	74 04		   JE SHORT 00493BB5
00493BB1	8345 DC 02	  ADD DWORD PTR SS:[EBP-24],2
00493BB5	837D E4 00	  CMP DWORD PTR SS:[EBP-1C],0
00493BB9	74 4C		   JE SHORT 00493C07
00493BBB	837D EC 00	  CMP DWORD PTR SS:[EBP-14],0
00493BBF	74 0D		   JE SHORT 00493BCE
00493BC1	8B45 F4		 MOV EAX,DWORD PTR SS:[EBP-0C]
00493BC4	05 00080000	 ADD EAX,800
00493BC9	8945 F4		 MOV DWORD PTR SS:[EBP-0C],EAX
00493BCC	EB 0B		   JMP SHORT 00493BD9
00493BCE	8B45 F4		 MOV EAX,DWORD PTR SS:[EBP-0C]
00493BD1	2D 00080000	 SUB EAX,800
00493BD6	8945 F4		 MOV DWORD PTR SS:[EBP-0C],EAX
00493BD9	837D E8 00	  CMP DWORD PTR SS:[EBP-18],0
00493BDD	74 14		   JE SHORT 00493BF3
00493BDF	C745 EC 0100000 MOV DWORD PTR SS:[EBP-14],1
00493BE6	8B45 F0		 MOV EAX,DWORD PTR SS:[EBP-10]
00493BE9	2D 00100000	 SUB EAX,1000
00493BEE	8945 F0		 MOV DWORD PTR SS:[EBP-10],EAX
00493BF1	EB 35		   JMP SHORT 00493C28
00493BF3	C745 EC 0300000 MOV DWORD PTR SS:[EBP-14],3
00493BFA	8B45 F0		 MOV EAX,DWORD PTR SS:[EBP-10]
00493BFD	05 00100000	 ADD EAX,1000
00493C02	8945 F0		 MOV DWORD PTR SS:[EBP-10],EAX
00493C05	EB 21		   JMP SHORT 00493C28
00493C07	8B45 F0		 MOV EAX,DWORD PTR SS:[EBP-10]
00493C0A	05 00060000	 ADD EAX,600
00493C0F	8945 F0		 MOV DWORD PTR SS:[EBP-10],EAX
00493C12	837D EC 00	  CMP DWORD PTR SS:[EBP-14],0
00493C16	74 09		   JE SHORT 00493C21
00493C18	C745 F4 0012000 MOV DWORD PTR SS:[EBP-0C],1200
00493C1F	EB 07		   JMP SHORT 00493C28
00493C21	C745 F4 00EEFFF MOV DWORD PTR SS:[EBP-0C],-1200
00493C28	837D D0 01	  CMP DWORD PTR SS:[EBP-30],1
00493C2C	74 28		   JE SHORT 00493C56
00493C2E	6A 00		   PUSH 0
00493C30	6A 03		   PUSH 3
00493C32	8B45 F0		 MOV EAX,DWORD PTR SS:[EBP-10]
00493C35	50			  PUSH EAX
00493C36	837D E4 00	  CMP DWORD PTR SS:[EBP-1C],0
00493C3A	75 0E		   JNE SHORT 00493C4A
00493C3C	8B45 F4		 MOV EAX,DWORD PTR SS:[EBP-0C]
00493C3F	0345 F4		 ADD EAX,DWORD PTR SS:[EBP-0C]
00493C42	0305 54E64900   ADD EAX,DWORD PTR DS:[49E654]
00493C48	EB 03		   JMP SHORT 00493C4D
00493C4A	8B45 F4		 MOV EAX,DWORD PTR SS:[EBP-0C]
00493C4D	50			  PUSH EAX
00493C4E	E8 3D70F7FF	 CALL 0040AC90
00493C53	83C4 10		 ADD ESP,10
00493C56	6A 01		   PUSH 1
00493C58	6A 3E		   PUSH 3E
00493C5A	E8 E1C9F8FF	 CALL 00420640
00493C5F	83C4 08		 ADD ESP,8
00493C62	C745 FC 1600000 MOV DWORD PTR SS:[EBP-4],16
00493C69	837D DC 00	  CMP DWORD PTR SS:[EBP-24],0
00493C6D	74 29		   JE SHORT 00493C98
00493C6F	8B45 EC		 MOV EAX,DWORD PTR SS:[EBP-14]
00493C72	50			  PUSH EAX
00493C73	8B45 F0		 MOV EAX,DWORD PTR SS:[EBP-10]
00493C76	50			  PUSH EAX
00493C77	8B45 F4		 MOV EAX,DWORD PTR SS:[EBP-0C]
00493C7A	837D E4 00	  CMP DWORD PTR SS:[EBP-1C],0
00493C7E	75 06		   JNE SHORT 00493C86
00493C80	0305 54E64900   ADD EAX,DWORD PTR DS:[49E654]
00493C86	50			  PUSH EAX
00493C87	8B45 FC		 MOV EAX,DWORD PTR SS:[EBP-4]
00493C8A	50			  PUSH EAX
00493C8B	E8 F002F7FF	 CALL 00403F80
00493C90	83C4 10		 ADD ESP,10
00493C93	FF4D DC		 DEC DWORD PTR SS:[EBP-24]
00493C96  ^ EB D1		   JMP SHORT 00493C69

This is the section of the sparkler bullet's code that assigns a velocity when the bullet first comes into existence:
Code:
CPU Disasm
Address   Hex dump		  Command								  Comments
004068C4  |.  C741 28 01000 MOV DWORD PTR DS:[ECX+28],1
004068CB  |.  A1 44E64900   MOV EAX,DWORD PTR DS:[49E644]
004068D0  |.  0305 48E64900 ADD EAX,DWORD PTR DS:[49E648]
004068D6  |.  83F8 00	   CMP EAX,0
004068D9  |.  74 02		 JE SHORT 004068DD
004068DB  |.  EB 13		 JMP SHORT 004068F0
004068DD  |>  A1 3CE64900   MOV EAX,DWORD PTR DS:[49E63C]
004068E2  |.  83E0 3D	   AND EAX,0000003D
004068E5  |.  74 09		 JE SHORT 004068F0
004068E7  |.  833D 78E64900 CMP DWORD PTR DS:[49E678],3
004068EE  |.  7E 0C		 JLE SHORT 004068FC
004068F0  |>  68 00030000   PUSH 300
004068F5  |.  68 00FDFFFF   PUSH -300
004068FA  |.  EB 0A		 JMP SHORT 00406906
004068FC  |>  68 A0000000   PUSH 0A0
00406901  |.  68 B0FDFFFF   PUSH -250
00406906  |>  E8 458A0000   CALL 0040F350							; \Cave_Story_-_Redesign.0040F350
0040690B  |.  83C4 08	   ADD ESP,8
0040690E  |.  8945 FC	   MOV DWORD PTR SS:[LOCAL.1],EAX
00406911  |.  68 FF080000   PUSH 8FF								 ; /Arg2 = 8FF
00406916  |.  68 FF060000   PUSH 6FF								 ; |Arg1 = 6FF
0040691B  |.  E8 308A0000   CALL 0040F350							; \Cave_Story_-_Redesign.0040F350
00406920  |.  83C4 08	   ADD ESP,8
00406923  |.  8945 F4	   MOV DWORD PTR SS:[LOCAL.3],EAX
00406926  |.  8B4D 08	   MOV ECX,DWORD PTR SS:[ARG.1]
00406929  |.  8B41 38	   MOV EAX,DWORD PTR DS:[ECX+38]
0040692C  |.  83F8 00	   CMP EAX,0
0040692F  |.  74 0C		 JE SHORT 0040693D
00406931  |.  83F8 01	   CMP EAX,1
00406934  |.  74 25		 JE SHORT 0040695B
00406936  |.  83F8 02	   CMP EAX,2
00406939  |.  74 12		 JE SHORT 0040694D
0040693B  |.  EB 2E		 JMP SHORT 0040696B
0040693D  |>  8B45 F4	   MOV EAX,DWORD PTR SS:[LOCAL.3]
00406940  |.  F7D8		  NEG EAX
00406942  |.  8941 18	   MOV DWORD PTR DS:[ECX+18],EAX
00406945  |.  8B45 FC	   MOV EAX,DWORD PTR SS:[LOCAL.1]
00406948  |.  8941 1C	   MOV DWORD PTR DS:[ECX+1C],EAX
0040694B  |.  EB 2A		 JMP SHORT 00406977
0040694D  |>  8B45 F4	   MOV EAX,DWORD PTR SS:[LOCAL.3]
00406950  |.  8941 18	   MOV DWORD PTR DS:[ECX+18],EAX
00406953  |.  8B45 FC	   MOV EAX,DWORD PTR SS:[LOCAL.1]
00406956  |.  8941 1C	   MOV DWORD PTR DS:[ECX+1C],EAX
00406959  |.  EB 1C		 JMP SHORT 00406977
0040695B  |>  8B45 F4	   MOV EAX,DWORD PTR SS:[LOCAL.3]
0040695E  |.  F7D8		  NEG EAX
00406960  |.  8941 1C	   MOV DWORD PTR DS:[ECX+1C],EAX
00406963  |.  8B45 FC	   MOV EAX,DWORD PTR SS:[LOCAL.1]
00406966  |.  8941 18	   MOV DWORD PTR DS:[ECX+18],EAX
00406969  |.  EB 0C		 JMP SHORT 00406977
0040696B  |>  8B45 F4	   MOV EAX,DWORD PTR SS:[LOCAL.3]
0040696E  |.  8941 1C	   MOV DWORD PTR DS:[ECX+1C],EAX
00406971  |.  8B45 FC	   MOV EAX,DWORD PTR SS:[LOCAL.1]
00406974  |.  8941 18	   MOV DWORD PTR DS:[ECX+18],EAX

Each of the bullets figures out which direction it was fired in, and what the player is touching/doing. That way, the spread of the Sparkler doesn't smash into the ground if you're standing and shooting left or right.

Basically, if you want a single gun to fire multiple bullets, it's going to be time consuming to set up.


--

As for changing sound effects, I am not an expert in the game's audio - yet. Gir is, however. So you should talk to him asap.
 
Mar 16, 2012 at 2:00 PM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1104
Age: 27
Pronouns: none
...
Um... How to change weapon's sound when the bullet is shot?
In assembly or in hex, if it's necessary.
 
Mar 16, 2012 at 8:49 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
.__.

Look for calls of 0x420640.
PS: Use your resources before asking questions. I found that function in like thirty seconds here.
 
Mar 16, 2012 at 8:55 PM
Not COMMA
Discord Group Moderator
"..."
Join Date: May 9, 2011
Location:
Posts: 350
Age: 26
Pronouns: he/him
What tile type is solid but appears behind the player?
 
Mar 16, 2012 at 9:06 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
Pronouns: she/her
Tile 41 is solid. What's the point of a tile that appears behind the player if it's solid? The player will never occupy that tile's space.
 
Mar 16, 2012 at 9:11 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
Tiles 0x0-0x1F are behind the player
Tiles 0x20-0x3F are never drawn
Tiles 0x40-0xFF are in front of the player
 
Mar 16, 2012 at 9:27 PM
Veteran Member
"The Ultimate Sword of Extraordinary Magnitude"
Join Date: Jan 26, 2012
Location:
Posts: 292
Pronouns: he/him
That's a nice list... can I assume everything that applies to the player is true also for other entities? Because a while back I was trying to figure out if I could have a tile that appears behind the player but in front of other entities (i.e. one that can hide enemies). It'd make things easier for me, but I'm assuming it's not possible, unless the tile itself is an entity.
 
Mar 19, 2012 at 1:43 AM
Absentee Modder
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Sep 7, 2010
Location: Outside your window. No no, don't check, it's okay
Posts: 272
Age: 29
Pronouns: he/him
can anyone please explain the "run script on death" flag to me? I've flagged a gaudi with it, and put its event number in the script. For some reason when the gaudi gets killed, though, it doesn't run the event. And it still drops shinies when it dies, which I remember shouldn't be happening if it's got that flag on. Anybody know the problem?
 
Mar 19, 2012 at 1:46 AM
Veteran Member
"The Ultimate Sword of Extraordinary Magnitude"
Join Date: Jan 26, 2012
Location:
Posts: 292
Pronouns: he/him
I could be mistaken... but I remember being told that said flag doesn't work with enemies that have unique death animations (such as the Gaudi who fall back and convulse before blowing up).
 
Back
Top