Sorry this is off topic to what you was previously talking about but VL-TONE asked me to have a look at an invisible object in the waterfall outside the castle. The object he mentioned is actually hidden in the waterfall area even when using my code to see the invisible objects; there are two other invisible objects at the top and middle of the waterfall that you can use when using my code.
The object that VL-TONE wanted to know about which has the behaviour 0x13003C90 is used by the object at 0x80349748 outside the castle for the NTSC game. Its only purpose is to call the function 0x802F0950, which thanks to Nemu I can show you:
802F0950: ADDIU SP, SP, 0xFFE8
802F0954: SW RA, 0x0014 (SP)
802F0958: LUI T6, 0x8034
802F095C: LW T6, 0xCBD0 (T6)
802F0960: ADDIU AT, R0, 0x0003
802F0964: LBU T7, 0x0000 (T6)
802F0968: BNE T7, AT, 0x802F0978
802F096C: NOP
802F0970: BEQ R0, R0, 0x802F0994
802F0974: NOP
802F0978: LUI A0, 0x6010
802F097C: LUI A1, 0x8033
802F0980: ADDIU A1, A1, 0x31F0
802F0984: JAL 0x8031EB00 play_sound2
802F0988: ORI A0, A0, 0x4001
802F098C: BEQ R0, R0, 0x802F0994
802F0990: NOP
802F0994: LW RA, 0x0014 (SP)
802F0998: ADDIU SP, SP, 0x0018
802F099C: JR RA
802F09A0: NOP
Using my naming of the functions, the behaviour function calls the play_sound2 function which is used, for example, to play the pause sound. So, this behaviour plays a sound whenever you go outside the castle, except that the sound seems to be blank, or at least it is when I transfer the sound values (0x60104001) to the pause coding.
The value 0x10 is loaded from a pointer which I don't know it's purpose and why it plays the sound unless it's equal to 0x03. If you want proof that the waterfall object does play a sound when you go outside the castle, this Gameshark code changes the sound to that of the pause sound effect. It's for the NTSC version; turn the code on before the title screen appears. You'll hear the sound when outside the castle and if you go inside and out again.
812F097A 7002
812F098A FF81
Why would this invisible object need to be placed in the waterfall, I don't think the sound function is capable of 3D sound so it can't be to do with position? The pointer that the sound function needs seems to be to do with soud related variables.
____________________ James S.
We English do things a little differently...Anyone for a cup of tea while we hack?! |