List of Opcodes: Difference between revisions
Happylappy (talk | contribs) |
|||
| (8 intermediate revisions by 2 users not shown) | |||
| Line 1,988: | Line 1,988: | ||
If attempting to run this opcode before selecting any option from the Top Menu, the game will not enter any dungeon and instead attempt to load a DEMO Unionall coroutine or the Top Menu. | If attempting to run this opcode before selecting any option from the Top Menu, the game will not enter any dungeon and instead attempt to load a DEMO Unionall coroutine or the Top Menu. | ||
Entering a given dungeon is made in two time: first by calling this function with dungeon_id set to the dungeon you want to enter, the second time with dungeon_id set to -1. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,624: | Line 4,626: | ||
|uint | |uint | ||
|pan | |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. | |The panning of the SE. Has an intended range of -260 (left) to 260 (right), with 0 being the center. | ||
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: | What this means is that: | ||
* A ''pan'' parameter of 260 will result in sound panning only to the right channel. | * 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. | * A ''pan'' parameter of 261 will result in sound panning only to the left channel. | ||
|} | |} | ||
=== 0xf6 - se_ChangeVolume === | === 0xf6 - se_ChangeVolume === | ||
| Line 4,719: | Line 4,721: | ||
|uint | |uint | ||
|pan | |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. | |The panning of the SE. Has an intended range of -260 (left) to 260 (right), with 0 being the center. | ||
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: | What this means is that: | ||
* A ''pan'' parameter of 260 will result in sound panning only to the right channel. | * 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. | * A ''pan'' parameter of 261 will result in sound panning only to the left channel. | ||
|} | |} | ||
=== 0xfa - se_PlayPan === | === 0xfa - se_PlayPan === | ||
| Line 4,746: | Line 4,748: | ||
|uint | |uint | ||
|pan | |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. | |The panning of the SE. Has an intended range of -260 (left) to 260 (right), with 0 being the center. | ||
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: | What this means is that: | ||
* A ''pan'' parameter of 260 will result in sound panning only to the right channel. | * 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. | * A ''pan'' parameter of 261 will result in sound panning only to the left channel. | ||
|} | |} | ||
=== 0xfb - se_PlayVolume === | === 0xfb - se_PlayVolume === | ||
| Line 6,211: | Line 6,213: | ||
=== 0x13a - supervision_SpecialActing === | === 0x13a - supervision_SpecialActing === | ||
It performs various hardcoded functionalities, mostly fancy graphical things like the Waterfall Cave flood, the beach bubbles, SE1 spotlight, etc | It performs various hardcoded functionalities, mostly fancy graphical things like the Waterfall Cave flood, the beach bubbles, SE1 spotlight, etc. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,224: | Line 6,226: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |Performs the following effect/function: | ||
# <li value="3">Exclusively used when scenes end. Related to screen fadeouts/whiteouts? <TODO: Details?></li> | |||
# Bubble stream (only used in base game by the Krabby in V01P04B scenes) <TODO: Details?> | |||
# Bubble stream 2 (only used in base game by the Krabby in V01P05B scenes) <TODO: Details?> | |||
# Unsure; only used in scene <code>m26a0606</code> (beach bubble or light effect related) <TODO: Details> | |||
# Waterfall Cave flood. <TODO: Details?> | |||
# <li value="10">"Glass shards" effect used when Primal Dialga stops Celebi in scene <code>m19b1008</code>. <TODO: Details?></li> | |||
# <li value="13">"Boss battle starts" wipe. <TODO: Details?></li> | |||
# Crystal effect used while Azelf blocks off the Crystal Lake in scene <code>m15b0908</code>. <TODO: Details?> | |||
# <li value="16">Unsure; used by <code>V00P03/m01a01a</code>, a debug Waterfall Cave geyser script. <TODO: Details></li> | |||
# "Frozen time zone expands to left" electric effect used in scene <code>m14a0802</code> (Underground Lake). <TODO: Details?> | |||
# "Frozen time zone expands to right" electric effect used in scene <code>m14a0803</code>. <TODO: Details?> | |||
# Unsure; used by the Luminous Spring <code>evolve</code> script. <TODO: Details> | |||
# Unsure; one of the effects in scene <code>m24a0204</code> (finding Hidden Land scene). <TODO: Details> | |||
# Floating Beach bubbles. <TODO: Details?> | |||
# <li value="23">Unsure; effect related to the staff credits scene. <TODO: Details></li> | |||
# Related to special Team Charm "Boss battle starts" wipe (heart effect). <TODO: Details> | |||
# Related to special Team Charm "Boss battle starts" wipe (heart effect). <TODO: Details> | |||
# Related to special Team Charm "Boss battle starts" wipe (heart effect). <TODO: Details> | |||
# <li value="27">Allocating memory for the spotlight (see <code>n01a0101</code>, the SE1 intro scene); MUST USE ONCE WHEN CREATING A SPOTLIGHT</li> | |||
# Sets the center of the spotlight at X and Y coordinates (in pixels) | |||
# SIZE parameter is the size of the spotlight. Third parameter seems unused. | |||
# FRAMES parameter is the amount of frames it will take for the spotlight to close. Third parameter seems unused. | |||
# FRAMES parameter is the amount of frames it will take for the spotlight to open. Third parameter seems unused. | |||
# Frees up the memory; MUST USE ONCE WHEN ENDING A SPOTLIGHT! | |||
# <li value="34">Unsure; used solely alongside <code>back_SetWeather(11);</code> (purple smog) in Sky Peak Summit cutscenes, but the smog seems functional without this. <TODO: Details></li> | |||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|unk1 | |unk1 | ||
| | |Function is dependent on parameter 1. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
|unk2 | |unk2 | ||
| | |Function is dependent on parameter 1. | ||
|} | |} | ||
=== 0x13b - supervision_Station === | === 0x13b - supervision_Station === | ||
Loads a sector of the Sub scene. | Loads a sector of the Sub scene. | ||
| Line 6,289: | Line 6,317: | ||
|} | |} | ||
=== 0x13e - supervision2_SpecialActing === | === 0x13e - supervision2_SpecialActing === | ||
<TO DO: | Appears to perform similar functions as <code>[[#0x13a - supervision_SpecialActing|supervision_SpecialActing]]</code>, specifically for the Top Screen. | ||
<TO DO: Details> | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 8,073: | Line 8,103: | ||
Same as _SwitchMonologue, but typically uses <code>$PARTNER_TALK_KIND</code> as an argument, and the cases used vary. | Same as _SwitchMonologue, but typically uses <code>$PARTNER_TALK_KIND</code> as an argument, and the cases used vary. | ||
Of the | Of the game's partner options: | ||
<code>case 1:</code> used if Squirtle, | <code>case 1:</code> used if male Squirtle, Totodile, Chimchar, Meowth, or Munchlax | ||
<code>case 2:</code> | <code>case 2:</code> default (all other male partners in vanilla) | ||
<code>case 3:</code> used | <code>case 3:</code> used if female Vulpix, Eevee, Chikorita, Torchic or Skitty (all female partners in vanilla) | ||
<code>default:</code> used when <code>$PARTNER_TALK_KIND</code>'s Talk Group has a value other than 1, 2, or 3 | <code>default:</code> used when <code>$PARTNER_TALK_KIND</code>'s Talk Group has a value other than 1, 2, or 3 | ||
| Line 8,098: | Line 8,128: | ||
|<code>$x_TALK_KIND</code>, contains Talk Group number | |<code>$x_TALK_KIND</code>, contains Talk Group number | ||
|} | |} | ||
=== 0xc9 - object === | === 0xc9 - object === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||