List of Opcodes: Difference between revisions
m Made a few edits to some stuff I knew, mainly some move opcodes and diaglog opcodes |
Some opcode info (0x1 - 0x38) |
||
| Line 11: | Line 11: | ||
No parameters. | No parameters. | ||
=== 0x1 - back_ChangeGround === | === 0x1 - back_ChangeGround === | ||
Sets the Map Background from a Level without changing the chunks from the currently loaded Map Background. Entities such as actors, objects, and performers will not be deleted when this opcode is executed. | |||
This has very few uses in the game—a notable use is how Wigglytuff's Chamber has its door open, as seen via LEVEL_G01P04A and LEVEL_G01P04A2. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 24: | Line 26: | ||
|Level | |Level | ||
|level_id | |level_id | ||
| | |An entry in the Level List. This opcode will pull from the Level's Map Background. | ||
|} | |} | ||
=== 0x2 - back_SetBackEffect === | === 0x2 - back_SetBackEffect === | ||
Performs various effects related to the currently loaded Animation Palettes. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 39: | Line 41: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |effect | ||
| | | | ||
# The default state of the Animation Palette. | |||
# Plays the Animation Palette in a loop. | |||
# Plays the Animation Palette once. | |||
# Freezes the Animation Palette at its current frame. | |||
# Resumes the Animation Palette. | |||
|} | |} | ||
=== 0x3 - back_SetBackScrollOffset === | === 0x3 - back_SetBackScrollOffset === | ||
Shifts the background by a certain number of pixels, without affecting entities such as actors, objects, or performers. Backgrounds used with this opcode will display a "loop" effect, i.e., it has the appearance of scrolling forever. | |||
This opcode seems to only work for only a few Levels, such as LEVEL_P13P01A, LEVEL_S13P06A, and LEVEL_V03P11A. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 59: | Line 63: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
| | |offset0 | ||
| | |The number of pixels to shift either: | ||
* The Map Background's Layer 1 and Layer 2 X-axis. | |||
* The Map Background's Layer 1 X-axis. | |||
Which one the game performs for a given Level seems to be hardcoded. | |||
|- | |- | ||
|2 | |2 | ||
| | |sint | ||
| | |offset1 | ||
| | |The number of pixels to shift either: | ||
* The Map Background's Layer 1 and Layer 2 Y-axis | |||
* The Map Background's Layer 2 X-axis. | |||
Which one the game performs for a given Level seems to be hardcoded. | |||
|} | |} | ||
=== 0x4 - back_SetBackScrollSpeed === | === 0x4 - back_SetBackScrollSpeed === | ||
Continuously scrolls the background at a certain speed, without affecting entities such as actors, objects, or performers. Backgrounds used with this opcode will display a "loop" effect, i.e., it has the appearance of scrolling forever. | |||
This opcode seems to only work for only a few Levels, such as LEVEL_P13P01A, LEVEL_S13P06A, and LEVEL_V03P11A. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 80: | Line 96: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
| | |speed0 | ||
| | |The speed to scroll either: | ||
* The Map Background's Layer 1 and Layer 2 X-axis. | |||
* The Map Background's Layer 1 X-axis. | |||
Which one the game performs for a given Level seems to be hardcoded. | |||
|- | |- | ||
|2 | |2 | ||
| | |sint | ||
| | |speed1 | ||
| | |The speed to scroll either: | ||
* The Map Background's Layer 1 and Layer 2 Y-axis. | |||
* The Map Background's Layer 2 X-axis. | |||
Which one the game performs for a given Level seems to be hardcoded. | |||
|} | |} | ||
=== 0x5 - back_SetBanner === | === 0x5 - back_SetBanner === | ||
< | Displays broken text using the <code>FONT/banner.bin:FONT/b_pal.bin</code> font, editable in the Misc. Graphics tab of SkyTemple. This opcode will delete any actors, objects, and performers that are currently loaded. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 101: | Line 127: | ||
|- | |- | ||
|1 | |1 | ||
|sint | |||
|chapter_number | |||
|The chapter number displayed for the banner. A value of -1 will be "Final Chapter". | |||
|- | |||
|2 | |||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |Currently unknown. | ||
|} | |} | ||
=== 0x6 - back_SetBanner2 === | === 0x6 - back_SetBanner2 === | ||
< | Displays text using the <code>FONT/banner.bin:FONT/b_pal.bin</code> font, editable in the Misc. Graphics tab of SkyTemple. This opcode is typically used for chapter introductions, which includes chapter text and a subtitle displayed over a Map Background. This opcode will delete any actors, objects, and performers that are currently loaded. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 122: | Line 148: | ||
|- | |- | ||
|1 | |1 | ||
| | |Level | ||
| | |level | ||
| | |An entry in the Level List. This opcode will pull from the Level's Map Background. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |unk0 | ||
| | |Currently unknown. Typically, the game uses 0 for this parameter, but it seems to have no effect. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
|x | |x | ||
| | |The pixel position the camera will center the Map Background on its X-axis. | ||
|- | |- | ||
|4 | |4 | ||
|uint | |uint | ||
|y | |y | ||
| | |The pixel position the camera will center the Map Background on its Y-axis. | ||
|- | |- | ||
|5 | |5 | ||
| | |sint | ||
|chapter_number | |chapter_number | ||
| | |The chapter number displayed for the banner. A value of -1 will be "Final Chapter". | ||
|- | |- | ||
|6 | |6 | ||
|String | |String | ||
|title | |title | ||
| | |The title of the chapter, e.g., "A Storm At Sea" for Chapter 1. | ||
|} | |} | ||
=== 0x7 - back_SetEffect === | === 0x7 - back_SetEffect === | ||
Performs various effects related to the current Map Background's layers across a certain number of frames. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 164: | Line 190: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |duration | ||
| | |The number of frames used to play a given effect. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |effect | ||
| | | | ||
# Transitions from Layer 2 to Layer 1. | |||
# Fades in Layer 1 from total darkness. | |||
# Transitions from Layer 2 to Layer 1. | |||
# Fades in Layer 1 from total darkness. | |||
# Transitions from Layer 1 to Layer 2. | |||
# Fades out Layer 1 to total darkness. | |||
# Merges Layer 1 onto Layer 2, but fades in Layer 1 from total darkness. | |||
# Fades in Layer 1 from total darkness. | |||
# Merges Layer onto Layer 2, but fades out Layer 1 to total darkness. | |||
# Fades out Layer 1 to total darkness. | |||
|} | |} | ||
=== 0x8 - back_SetDungeonBanner === | === 0x8 - back_SetDungeonBanner === | ||
< | Displays a specific string using the <code>FONT/banner.bin:FONT/b_pal.bin</code> font, editable in the Misc. Graphics tab of SkyTemple. The text chosen is defined in Dungeons tab as a dungeon's <code>back_SetDunegonBanner</code> string. This opcode will delete any actors, objects, and performers that are currently loaded. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 185: | Line 221: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |dungeon_id | ||
| | |The ID of a dungeon, as listed in the Dungeons tab of SkyTemple. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |unk0 | ||
| | |Currently unknown. Does not seem to affect much. | ||
|} | |} | ||
=== 0x9 - back_SetGround === | === 0x9 - back_SetGround === | ||
Sets the Map Background from a Level. Upon using this opcode, the variable $GROUND_MAP will be updated to match the ID of the chosen Level. This opcode will delete any actors, objects, and performers that are currently loaded. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 207: | Line 243: | ||
|Level | |Level | ||
|level_id | |level_id | ||
| | |An entry in the Level List. This opcode will pull from the Level's Map Background. | ||
|} | |} | ||
=== 0xa - back_SetSpecialEpisodeBanner === | === 0xa - back_SetSpecialEpisodeBanner === | ||
< | Displays text using the <code>FONT/banner.bin:FONT/b_pal.bin</code> font, editable in the Misc. Graphics tab of SkyTemple. This opcode is used for Special Episodes 1-3. This opcode plays a short animation of a green line shooting across the screen, followed by text scrolling across the screen horizontally from opposite directions. This opcode will delete any actors, objects, and performers that are currently loaded. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 221: | Line 257: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
|episode_number | |episode_number | ||
| | |The episode number displayed for the banner. A value of -1 will be "Final Chapter". | ||
|- | |- | ||
|2 | |2 | ||
|String | |String | ||
|title | |title | ||
| | |The title of the episode, e.g., "Bidoof's Wish" for Special Episode 1. | ||
|} | |} | ||
=== 0xb - back_SetSpecialEpisodeBanner2 === | === 0xb - back_SetSpecialEpisodeBanner2 === | ||
< | Displays text using the <code>FONT/banner_c.bin:FONT/b_pal_r.bin</code> font, editable in the Misc. Graphics tab of SkyTemple. This opcode is only used for Special Episode 4. This opcode features an elaborate animation featuring hearts and sparkles, along with text scrolling across the screen horizontally from opposite directions. This opcode will delete any actors, objects, and performers that are currently loaded. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 242: | Line 278: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
|episode_number | |episode_number | ||
| | |The episode number displayed for the banner. A value of -1 will be "Final Chapter". | ||
|- | |- | ||
|2 | |2 | ||
|String | |String | ||
|title | |title | ||
| | |The title of the episode, e.g., "Bidoof's Wish" for Special Episode 1. | ||
|} | |} | ||
=== 0xc - back_SetSpecialEpisodeBanner3 === | === 0xc - back_SetSpecialEpisodeBanner3 === | ||
< | Displays text using the <code>FONT/banner.bin:FONT/b_pal.bin</code> font, editable in the Misc. Graphics tab of SkyTemple. This opcode is only used for Special Episode 5. This opcode features no animation, but the end result is similar to the opcode <code>back_SetSpecialEpisodeBanner</code>. This opcode will delete any actors, objects, and performers that are currently loaded. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 263: | Line 299: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
|episode_number | |episode_number | ||
| | |The episode number displayed for the banner. A value of -1 will be "Final Chapter". | ||
|- | |- | ||
|2 | |2 | ||
|String | |String | ||
|title | |title | ||
| | |The title of the episode, e.g., "Bidoof's Wish" for Special Episode 1. | ||
|} | |} | ||
=== 0xd - back_SetTitleBanner === | === 0xd - back_SetTitleBanner === | ||
< | Displays user-defined text using the <code>FONT/banner.bin:FONT/b_pal.bin</code> font, editable in the Misc. Graphics tab of SkyTemple. This opcode will delete any actors, objects, and performers that are currently loaded. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 285: | Line 321: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |y | ||
| | |The Y-axis pixel position of the title. | ||
|- | |- | ||
|2 | |2 | ||
|String | |String | ||
|title | |title | ||
| | |The title displayed onscreen. | ||
|} | |} | ||
=== 0xe - back_SetWeather === | === 0xe - back_SetWeather === | ||
Displays a weather effect that overlays the current Map Background. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 305: | Line 341: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
|weather_id | |weather_id | ||
| | |Values of 0 and below mean no weather effect is to be displayed. | ||
# Dark, unmoving clouds. | |||
# Dark, unmoving clouds. | |||
# Clouds. | |||
# No weather. | |||
# Clouds. | |||
# Unknown; seems to either softlock the game or drastically change the current Map Background. | |||
# Fog. | |||
# No weather. | |||
# Unknown; does not seem to have a visible effect, but it loads something into memory. | |||
# Unknown; seems to either softlock the game or drastically change the current Map Background. | |||
# Purple smog. | |||
|} | |} | ||
=== 0xf - back_SetWeatherEffect === | === 0xf - back_SetWeatherEffect === | ||
Currently unknown. The only values this opcode accepts seems to be 1, 2, and 3. Its only known use is in V00P02/m01a04a.ssb, which is a test script used by the developers. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 323: | Line 371: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |Currently unknown. | ||
|} | |} | ||
=== 0x10 - back_SetWeatherScrollOffset === | === 0x10 - back_SetWeatherScrollOffset === | ||
Currently unknown. This opcode is not used in the base game. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 339: | Line 387: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |Currently unknown. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|unk1 | |unk1 | ||
| | |Currently unknown. | ||
|} | |} | ||
=== 0x11 - back_SetWeatherScrollSpeed === | === 0x11 - back_SetWeatherScrollSpeed === | ||
Currently unknown. This opcode is not used in the base game. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 360: | Line 408: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |Currently unknown. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|unk1 | |unk1 | ||
| | |Currently unknown. | ||
|} | |} | ||
=== 0x12 - back2_SetBackEffect === | === 0x12 - back2_SetBackEffect === | ||
< | The same as <code>back_SetBackEffect</code>, but for the Top Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 380: | Line 428: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |effect | ||
| | | | ||
# The default state of the Animation Palette. | |||
# Plays the Animation Palette in a loop. | |||
# Plays the Animation Palette once. | |||
# Freezes the Animation Palette at its current frame. | |||
# Resumes the Animation Palette. | |||
|} | |} | ||
=== 0x13 - back2_SetBackScrollOffset === | === 0x13 - back2_SetBackScrollOffset === | ||
< | The same as <code>back_SetBackScrollOffset</code>, but for the Top Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 395: | Line 448: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
| | |offset0 | ||
| | |The number of pixels to shift either: | ||
* The Map Background's Layer 1 and Layer 2 X-axis. | |||
* The Map Background's Layer 1 X-axis. | |||
Which one the game performs for a given Level seems to be hardcoded. | |||
|- | |- | ||
|2 | |2 | ||
| | |sint | ||
| | |offset1 | ||
| | |The number of pixels to shift either: | ||
* The Map Background's Layer 1 and Layer 2 Y-axis. | |||
* The Map Background's Layer 2 X-axis. | |||
Which one the game performs for a given Level seems to be hardcoded. | |||
|} | |} | ||
=== 0x14 - back2_SetBackScrollSpeed === | === 0x14 - back2_SetBackScrollSpeed === | ||
< | The same as <code>back_SetBackScrollSpeed</code>, but for the Top Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 416: | Line 480: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
| | |speed0 | ||
| | |The speed to scroll either: | ||
* The Map Background's Layer 1 and Layer 2 X-axis. | |||
* The Map Background's Layer 1 X-axis. | |||
Which one the game performs for a given Level seems to be hardcoded. | |||
|- | |- | ||
|2 | |2 | ||
| | |sint | ||
| | |speed1 | ||
| | |The speed to scroll either: | ||
* The Map Background's Layer 1 and Layer 2 Y-axis. | |||
* The Map Background's Layer 2 X-axis. | |||
Which one the game performs for a given Level seems to be hardcoded. | |||
|} | |} | ||
=== 0x15 - back2_SetData === | === 0x15 - back2_SetData === | ||
Currently unknown. This opcode is not used in the base game. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 439: | Line 513: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |Currently unknown. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|unk1 | |unk1 | ||
| | |Currently unknown. | ||
|} | |} | ||
=== 0x16 - back2_SetEffect === | === 0x16 - back2_SetEffect === | ||
< | The same as <code>back_SetEffect</code>, but for the Top Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 459: | Line 533: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |duration | ||
| | |The number of frames used to play a given effect. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |effect | ||
| | | | ||
# Transitions from Layer 2 to Layer 1. | |||
# Fades in Layer 1 from total darkness. | |||
# Transitions from Layer 2 to Layer 1. | |||
# Fades in Layer 1 from total darkness. | |||
# Transitions from Layer 1 to Layer 2. | |||
# Fades out Layer 1 to total darkness. | |||
# Merges Layer 1 onto Layer 2, but fades in Layer 1 from total darkness. | |||
# Fades in Layer 1 from total darkness. | |||
# Merges Layer onto Layer 2, but fades out Layer 1 to total darkness. | |||
# Fades out Layer 1 to total darkness. | |||
|} | |} | ||
=== 0x17 - back2_SetGround === | === 0x17 - back2_SetGround === | ||
< | Mostly the same as <code>back_SetGround</code>, but for the Top Screen. This opcode only works if <code>back2_SetMode(4);</code> is used prior to this opcode. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 481: | Line 565: | ||
|Level | |Level | ||
|level_id | |level_id | ||
| | |An entry in the Level List. This opcode will pull from the Level's Map Background. | ||
|} | |} | ||
=== 0x18 - back2_SetMode === | === 0x18 - back2_SetMode === | ||
Determines a hardcoded status of the Top Screen. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 495: | Line 579: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
|mode_id | |mode_id | ||
| | |A value of 0 is no mode. A negative value seems to set the Top Screen to the overworld's current Top Screen setting. | ||
# Fades out the Top Screen. | |||
# Team Stats. | |||
# The Map Background S01P01A with the hero idling on a World Map Marker. | |||
# Allows for the Top Screen to display a Map Background from a Level using the <code>back2_SetGround</code> opcode. | |||
# Splits the Map Background used in the Level defined by <code>back_SetGround</code> equally between the Top and Bottom Screen. | |||
#Splits the Map Background used in the Level defined by <code>back_SetGround</code> between the Top and Bottom Screen. | |||
|} | |} | ||
=== 0x19 - back2_SetSpecialActing === | === 0x19 - back2_SetSpecialActing === | ||
Currently unknown. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 513: | Line 604: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |Currently unknown. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|unk1 | |unk1 | ||
| | |Currently unknown. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
|unk2 | |unk2 | ||
| | |Currently unknown. | ||
|} | |} | ||
=== 0x1a - back2_SetWeather === | === 0x1a - back2_SetWeather === | ||
< | The same as <code>back_SetWeather</code>, but for the Top Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 537: | Line 628: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
|weather_id | |weather_id | ||
| | |Values of 0 and below mean no weather effect is to be displayed. | ||
# Dark, unmoving clouds. | |||
# Dark, unmoving clouds. | |||
# Clouds. | |||
# No weather. | |||
# Clouds. | |||
# Unknown; seems to either softlock the game or drastically change the current Map Background. | |||
# Fog. | |||
# No weather. | |||
# Unknown; does not seem to have a visible effect, but it loads something into memory. | |||
# Unknown; seems to either softlock the game or drastically change the current Map Background. | |||
# Purple smog. | |||
|} | |} | ||
=== 0x1b - back2_SetWeatherEffect === | === 0x1b - back2_SetWeatherEffect === | ||
< | Currently unknown. Potentially has similar functionality as <code>back_SetWeatherEffect</code>, but for the Top Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 555: | Line 659: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |Currently unknown. | ||
|} | |} | ||
=== 0x1c - back2_SetWeatherScrollOffset === | === 0x1c - back2_SetWeatherScrollOffset === | ||
< | Currently unknown. Potentially has similar functionality as <code>back_SetWeatherScrollOffset</code>, but for the Top Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 571: | Line 675: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |Currently unknown. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|unk1 | |unk1 | ||
| | |Currently unknown. | ||
|} | |} | ||
=== 0x1d - back2_SetWeatherScrollSpeed === | === 0x1d - back2_SetWeatherScrollSpeed === | ||
< | Currently unknown. Potentially has similar functionality as <code>back_SetWeatherScrollSpeed</code>, but for the Top Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 592: | Line 696: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |Currently unknown. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|unk1 | |unk1 | ||
| | |Currently unknown. | ||
|} | |} | ||
=== 0x1e - bgm_FadeOut === | === 0x1e - bgm_FadeOut === | ||
Fades out the BGM that is currently playing over a certain period of time. | Fades out the BGM that is currently playing over a certain period of time on the first BGM track. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 613: | Line 717: | ||
|uint | |uint | ||
|duration | |duration | ||
| | |The number of frames used to fade out and silence a given BGM. | ||
|} | |} | ||
=== 0x1f - bgm_Play === | === 0x1f - bgm_Play === | ||
Instantly plays a BGM on the first BGM track. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 630: | Line 733: | ||
|Bgm | |Bgm | ||
|bgm_id | |bgm_id | ||
| | |A music track defined in SOUND/BGM of the ROM. | ||
|} | |} | ||
=== 0x20 - bgm_PlayFadeIn === | === 0x20 - bgm_PlayFadeIn === | ||
Starts playing a BGM over a certain period of time and at a certain volume on the first BGM track. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 646: | Line 749: | ||
|Bgm | |Bgm | ||
|bgm_id | |bgm_id | ||
| | |A music track defined in SOUND/BGM of the ROM. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|duration | |duration | ||
| | |The number of frames to fade in the BGM. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
|volume | |volume | ||
| | |The volume that the BGM will play at. It has a maximum of 256 and a minimum of 0. | ||
|} | |} | ||
=== 0x21 - bgm_Stop === | === 0x21 - bgm_Stop === | ||
Instantly stops the BGM that is currently playing. | Instantly stops the BGM that is currently playing on the first BGM track. | ||
No parameters. | No parameters. | ||
=== 0x22 - bgm_ChangeVolume === | === 0x22 - bgm_ChangeVolume === | ||
Changes the volume of the BGM that is currently playing on the first BGM track. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 676: | Line 779: | ||
|uint | |uint | ||
|duration | |duration | ||
| | |The number of frames to change the BGM's volume. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|volume | |volume | ||
| | |The volume that the BGM will play at. It has a maximum of 256 and a minimum of 0. | ||
|} | |} | ||
=== 0x23 - bgm2_FadeOut === | === 0x23 - bgm2_FadeOut === | ||
Fades out the BGM that is currently playing over a certain period of time on the second BGM track. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 697: | Line 800: | ||
|uint | |uint | ||
|duration | |duration | ||
| | |The number of frames used to fade out and silence a given BGM. | ||
|} | |} | ||
=== 0x24 - bgm2_Play === | === 0x24 - bgm2_Play === | ||
Instantly plays a BGM on the second BGM track. | |||
{| class="wikitable" | {| class="wikitable" | ||
|+Parameters | |+Parameters | ||
| Line 713: | Line 815: | ||
|Bgm | |Bgm | ||
|bgm_id | |bgm_id | ||
| | |A music track defined in SOUND/BGM of the ROM. | ||
|} | |} | ||
=== 0x25 - bgm2_PlayFadeIn === | === 0x25 - bgm2_PlayFadeIn === | ||
Starts playing a BGM over a certain period of time and at a certain volume on the second BGM track. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 729: | Line 831: | ||
|Bgm | |Bgm | ||
|bgm_id | |bgm_id | ||
| | |A music track defined in SOUND/BGM of the ROM. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|duration | |duration | ||
| | |The number of frames to fade in the BGM. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
|volume | |volume | ||
| | |The volume that the BGM will play at. It has a maximum of 256 and a minimum of 0. | ||
|} | |} | ||
=== 0x26 - bgm2_Stop === | === 0x26 - bgm2_Stop === | ||
Instantly stops the BGM that is currently playing on the second BGM track. | |||
No parameters. | No parameters. | ||
=== 0x27 - bgm2_ChangeVolume === | === 0x27 - bgm2_ChangeVolume === | ||
Changes the volume of the BGM that is currently playing on the second BGM track. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 759: | Line 861: | ||
|uint | |uint | ||
|duration | |duration | ||
| | |The number of frames to change the BGM's volume. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|volume | |volume | ||
| | |The volume that the BGM will play at. It has a maximum of 256 and a minimum of 0. | ||
|} | |} | ||
=== 0x37 - Call === | === 0x37 - Call === | ||
Jumps to the specified address, runs code, and returns to the line of code in which this opcode was used (only if <code>return;</code> was used in the routine this opcode calls). | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 778: | Line 880: | ||
|- | |- | ||
|1 | |1 | ||
| | |Addr | ||
| | |jump_address | ||
| | |The address to call, e.g., <code>call @label_0;</code> if <code>§label_0;</code> is defined in the script. | ||
|} | |} | ||
=== 0x38 - CallCommon === | === 0x38 - CallCommon === | ||
< | Jumps to the specified Unionall Coroutine, runs its code, and returns to the line of code in which this opcode was used (only if <code>return;</code> was used in the Coroutine). This opcode can be used in any script, no matter the type (Common, Enter, Acting, or Sub). | ||
If used in the context of an actor/object/performer, this should not be used in with-statements. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 794: | Line 898: | ||
|- | |- | ||
|1 | |1 | ||
| | |Coroutine | ||
|coro_id | |coro_id | ||
| | |One of the 701 possible Unionall Coroutines. | ||
|} | |} | ||
=== 0x39 - camera_Move2Default === | === 0x39 - camera_Move2Default === | ||
| Line 810: | Line 914: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
| | |speed | ||
| | | | ||
|} | |} | ||
| Line 1,713: | Line 1,817: | ||
|} | |} | ||
=== 0x8b - Lock === | === 0x8b - Lock === | ||
Suspends the current | Suspends the current routine until the opcode <code>Unlock</code> is called with the same ''lock_id''. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 1,726: | Line 1,830: | ||
|uint | |uint | ||
|lock_id | |lock_id | ||
|Lock | |The ID of a Lock, ranged from 0-19 (inclusive). | ||
( | |||
|} | |} | ||
=== 0x8c - main_EnterAdventure === | === 0x8c - main_EnterAdventure === | ||
| Line 5,652: | Line 5,755: | ||
|} | |} | ||
=== 0x156 - Unlock === | === 0x156 - Unlock === | ||
Resumes the | Resumes the routine that was suspended when <code>Lock</code> was called with the specified ''lock_id''. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,665: | Line 5,768: | ||
|uint | |uint | ||
|lock_id | |lock_id | ||
|Lock | |The ID of a Lock, ranged from 0-19 (inclusive). | ||
( | |||
|} | |} | ||
=== 0x157 - Wait === | === 0x157 - Wait === | ||
| Line 5,692: | Line 5,794: | ||
No parameters. | No parameters. | ||
=== 0x15a - | === 0x15a - WaitBack2Effect === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||