List of Opcodes: Difference between revisions
m accidental rollback moment, very professional Tags: Manual revert Visual edit |
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 === | ||
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 | ||
| | |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 | ||
| | |duration | ||
| | |The number of frames used to change the SE's panning. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
| | |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. | |||
|} | |} | ||
=== 0xf6 - se_ChangeVolume === | === 0xf6 - se_ChangeVolume === | ||
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 | ||
| | |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 | ||
| | |duration | ||
| | |The number of frames used to change the SE's volume. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
| | |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 === | ||
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 | ||
| | |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 | ||
| | |duration | ||
| | |The number of frames used to fade out and silence a given SE. | ||
|} | |} | ||
=== 0xf8 - se_Play === | === 0xf8 - se_Play === | ||
Instantly plays a sound effect. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,470: | Line 4,470: | ||
|uint | |uint | ||
|se_id | |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. | ||
|} | |} | ||
=== 0xf9 - se_PlayFull === | === 0xf9 - se_PlayFull === | ||
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 | ||
| | |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 | ||
| | |volume | ||
| | |The volume that the SE will play at. It has a maximum of 256 and a minimum of 0. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
| | |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 === | ||
Instantly plays a sound effect at a specified panning. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,511: | Line 4,517: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |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 | ||
| | |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 === | ||
Instantly plays a sound effect at a specified volume. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,532: | Line 4,546: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |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 | ||
| | |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 === | ||
Instantly stops a specified sound effect. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,553: | Line 4,567: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |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 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 === | ||
Does nothing. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,586: | Line 4,600: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |Does nothing. | ||
|} | |} | ||
=== 0xff - SetBlink === | === 0xff - SetBlink === | ||
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 | ||
| | |visible_interval | ||
| | |The number of frames to wait for while the entity is visible. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |invisible_interval | ||
| | |The number of frames to wait for while the entity is invisible. | ||
|} | |} | ||
=== 0x100 - SetDirection === | === 0x100 - SetDirection === | ||
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 === | ||