Coding

 Reply to this postStart new topic

Opcode to memory address

x86
post May 19 2010, 06:32 PM
Post #1


The New Guy!

Posts: 4
From: UK
Joined: 5-April 10



Hi,

I've found this opcode:
018C: play_sound 1052 at 0.0 0.0 0.0
018D: NOP 76@ 65535 2181.127 -2251.999 14.036
018E: stop_sound 82@

I want to make a function to play a sound track at a position (with asm code).
Anyone knows how to translate this ?
Go to the top of the page
 
+Quote Post
Deji
post May 31 2010, 06:12 PM
Post #2


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



ASM is tricky business. I've been learning some of the basics but don't know how to do anything real with it.

Why do you want to do this with ASM? You could simply use the Function Address for the appropriate opcode...

0x47D034 = 018C
0x47D07D = 018D

Not sure how the params go. Should be pretty much the same as the original opcode (but with the sound ID last, the coords first).

May be something like this:
SANNY
0AA7: call_function 0x47D034 num_params 4 pop 4 0.0 0.0 0.0 1052


--------------------
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: