List of Opcodes: Difference between revisions

Adex (talk | contribs)
m accidental rollback moment, very professional
Tags: Manual revert Visual edit
Adex (talk | contribs)
m Opcode time; we made it to 0x100!
Line 754: Line 754:
|uint
|uint
|duration
|duration
|The number of frames to fade in the BGM.
|The number of frames used to fade in the BGM.
|-
|-
|3
|3
Line 2,848: Line 2,848:
|Direction
|Direction
|direction
|direction
|The type of direction, the list of which can be seen by typing DIR_ in SkyTemple's Script Engine Debugger.
|The type of direction, the list of which can be seen by typing <code>DIR_</code> in SkyTemple's Script Engine Debugger.
|}
|}
=== 0xbe - MoveHeight ===
=== 0xbe - MoveHeight ===
Line 3,978: Line 3,978:
|unk2
|unk2
|Does nothing.
|Does nothing.
|-
|-
|4
|4
Line 3,985: Line 3,983:
|unk3
|unk3
|Does nothing.
|Does nothing.
|}
|}
=== 0xe8 - screen2_FadeIn ===
=== 0xe8 - screen2_FadeIn ===
Line 4,291: Line 4,287:
|unk2
|unk2
|Does nothing.
|Does nothing.
|-
|-
|4
|4
Line 4,384: Line 4,378:
|}
|}
=== 0xf5 - se_ChangePan ===
=== 0xf5 - se_ChangePan ===
Currently unknown.
Changes the panning of the currently-playing sound effect across a certain number of frames.


{| class="wikitable"
{| class="wikitable"
Line 4,396: Line 4,390:
|1
|1
|uint
|uint
|unk0
|se_id
|Currently unknown.
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|Currently unknown.
|The number of frames used to change the SE's panning.
|-
|-
|3
|3
|uint
|uint
|unk2
|pan
|Currently unknown.
|The panning of the SE. This parameter gets recalculated internally as  <code>((''pan'' * 0x3f + ((''pan'' * 0x3f >> 7) >> 0x18)) >> 8) + 0x40</code>, which is eventually split up into two halfwords, then recalculated further into a signed byte.
What this means is that:
 
* A ''pan'' parameter of 260 will result in sound panning only to the right channel.
* A ''pan'' parameter of 261 will result in sound panning only to the left channel.
 
More research on this parameter may be needed.
|}
|}
=== 0xf6 - se_ChangeVolume ===
=== 0xf6 - se_ChangeVolume ===
<TO DO: Opcode description>
Changes the volume of the currently-playing sound effect across a certain number of frames.


{| class="wikitable"
{| class="wikitable"
Line 4,422: Line 4,422:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the SE's volume.
|-
|-
|3
|3
|uint
|uint
|unk2
|volume
|
|The volume that the SE will play at. It has a maximum of 256 and a minimum of 0.
|}
|}
=== 0xf7 - se_FadeOut ===
=== 0xf7 - se_FadeOut ===
<TO DO: Opcode description>
Fades out the currently-playing sound effect across a certain number of frames.


{| class="wikitable"
{| class="wikitable"
Line 4,448: Line 4,448:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to fade out and silence a given SE.
|}
|}
=== 0xf8 - se_Play ===
=== 0xf8 - se_Play ===
Plays a sound effect.
Instantly plays a sound effect.


{| class="wikitable"
{| class="wikitable"
Line 4,470: Line 4,470:
|uint
|uint
|se_id
|se_id
|Sound effect ID. It's actually encoded as sound_bank_id << 8 + sound_id, but it can also be represented as an integer.
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|}
|}
=== 0xf9 - se_PlayFull ===
=== 0xf9 - se_PlayFull ===
<TO DO: Opcode description>
Instantly plays a sound effect at a specified volume and panning.


{| class="wikitable"
{| class="wikitable"
Line 4,485: Line 4,485:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|-
|-
|2
|2
|uint
|uint
|unk1
|volume
|
|The volume that the SE will play at. It has a maximum of 256 and a minimum of 0.
|-
|-
|3
|3
|uint
|uint
|unk2
|pan
|
|The panning of the SE. This parameter gets recalculated internally as  <code>((''pan'' * 0x3f + ((''pan'' * 0x3f >> 7) >> 0x18)) >> 8) + 0x40</code>, which is eventually split up into two halfwords, then recalculated further into a signed byte.
What this means is that:
 
* A ''pan'' parameter of 260 will result in sound panning only to the right channel.
* A ''pan'' parameter of 261 will result in sound panning only to the left channel.
 
More research on this parameter may be needed.
|}
|}
=== 0xfa - se_PlayPan ===
=== 0xfa - se_PlayPan ===
<TO DO: Opcode description>
Instantly plays a sound effect at a specified panning.


{| class="wikitable"
{| class="wikitable"
Line 4,511: Line 4,517:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|-
|-
|2
|2
|uint
|uint
|unk1
|pan
|
|The panning of the SE. This parameter gets recalculated internally as  <code>((''pan'' * 0x3f + ((''pan'' * 0x3f >> 7) >> 0x18)) >> 8) + 0x40</code>, which is eventually split up into two halfwords, then recalculated further into a signed byte.
What this means is that:
 
* A ''pan'' parameter of 260 will result in sound panning only to the right channel.
* A ''pan'' parameter of 261 will result in sound panning only to the left channel.
 
More research on this parameter may be needed.
 
 
|}
|}
=== 0xfb - se_PlayVolume ===
=== 0xfb - se_PlayVolume ===
<TO DO: Opcode description>
Instantly plays a sound effect at a specified volume.


{| class="wikitable"
{| class="wikitable"
Line 4,532: Line 4,546:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|-
|-
|2
|2
|uint
|uint
|unk1
|volume
|
|The volume that the SE will play at. It has a maximum of 256 and a minimum of 0.
|}
|}
=== 0xfc - se_Stop ===
=== 0xfc - se_Stop ===
<TO DO: Opcode description>
Instantly stops a specified sound effect.


{| class="wikitable"
{| class="wikitable"
Line 4,553: Line 4,567:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|}
|}
=== 0xfd - SetAnimation ===
=== 0xfd - SetAnimation ===
Line 4,570: Line 4,584:
|uint
|uint
|id
|id
|Animation table index. Converted to an animation id for the current sprite using the [https://docs.google.com/spreadsheets/d/11xHv80Def5mtF60ZsfI1lF1eNX0dBE2It837Q08AlRk/htmlview SetAnimation table].
|Animation table index. Converted to an Animation ID for the current sprite using the [https://docs.google.com/spreadsheets/d/11xHv80Def5mtF60ZsfI1lF1eNX0dBE2It837Q08AlRk/htmlview SetAnimation table].
|}
|}
=== 0xfe - SetAttribute ===
=== 0xfe - SetAttribute ===
<TO DO: Opcode description>
Does nothing.


{| class="wikitable"
{| class="wikitable"
Line 4,586: Line 4,600:
|uint
|uint
|unk0
|unk0
|
|Does nothing.
|}
|}
=== 0xff - SetBlink ===
=== 0xff - SetBlink ===
<TO DO: Opcode description>
Sets a specific entity (i.e., an actor, object, or performer) to continuously flicker in and out of view at a certain interval.
 
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.


{| class="wikitable"
{| class="wikitable"
Line 4,601: Line 4,617:
|1
|1
|uint
|uint
|unk0
|visible_interval
|
|The number of frames to wait for while the entity is visible.
|-
|-
|2
|2
|uint
|uint
|unk1
|invisible_interval
|
|The number of frames to wait for while the entity is invisible.
|}
|}
=== 0x100 - SetDirection ===
=== 0x100 - SetDirection ===
<TO DO: Opcode description>
Instantly sets a specific entity (i.e., an actor, object, or performer) to a specified direction.
 
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.


{| class="wikitable"
{| class="wikitable"
Line 4,623: Line 4,641:
|Direction
|Direction
|direction
|direction
|
|The type of direction, the list of which can be seen by typing <code>DIR_</code> in SkyTemple's Script Engine Debugger.
|}
|}
=== 0x101 - SetDirectionLives ===
=== 0x101 - SetDirectionLives ===