8#define NAMESPACE battle_item_mystery
16#include "battle/move/item/mystery.png.h"
17INCLUDE_IMG(
"battle/move/item/mystery.png", battle_item_mystery_png);
18INCLUDE_PAL(
"battle/move/item/mystery.pal", battle_item_mystery_pal);
21 { .v = {{ -16, -16, 0 }, FALSE, { 0, 0 }, { 0, 0, 0, 255 }}},
22 { .v = {{ 15, -16, 0 }, FALSE, { 1024, 0 }, { 0, 0, 0, 255 }}},
23 { .v = {{ 15, 15, 0 }, FALSE, { 1024, 1024 }, { 0, 0, 0, 255 }}},
24 { .v = {{ -16, 15, 0 }, FALSE, { 0, 1024 }, { 0, 0, 0, 255 }}},
27Gfx N(displayList)[] = {
29 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
30 gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
31 gsDPSetTexturePersp(G_TP_PERSP),
32 gsDPSetTextureDetail(G_TD_CLAMP),
33 gsDPSetTextureLOD(G_TL_TILE),
34 gsDPSetTextureLUT(G_TT_NONE),
35 gsDPSetTextureFilter(G_TF_AVERAGE),
36 gsDPSetTextureConvert(G_TC_FILT),
37 gsDPSetTextureLUT(G_TT_RGBA16),
38 gsDPLoadTLUT_pal16(0, battle_item_mystery_pal),
39 gsDPLoadTextureTile_4b(battle_item_mystery_png, G_IM_FMT_CI, battle_item_mystery_png_width, battle_item_mystery_png_height, 0, 0, battle_item_mystery_png_width - 1, battle_item_mystery_png_height - 1, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD),
40 gsSPClearGeometryMode(G_LIGHTING),
41 gsSPClearGeometryMode(G_SHADING_SMOOTH),
43 gsSP1Triangle(0, 1, 2, 0),
44 gsSP1Triangle(0, 2, 3, 0),
51s32 N(D_802A227C_72D82C)[8] = {
62s32 N(D_802A229C_72D84C)[8] = {
85void N(func_802A123C_72C7EC(
void)) {
92 draw_box(0,
WINDOW_STYLE_7, 106, 86, 0, 36, 36, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
SCREEN_WIDTH,
SCREEN_HEIGHT, NULL);
93 gDPSetScissor(
gMainGfxPos++, G_SC_NON_INTERLACE, 108, 90, 139, 118);
107API_CALLABLE(N(func_802A13E4_72C994)) {
132 if (zoom >= 215.0f) {
179 var_v0_2 = temp_a0_4 + 3;
183 temp_a0_4 = var_v0_2 >> 2;
186 if (temp_a0_4 == 0) {
192 if (temp_v1_3 == 0) {
196 temp_a0_4 = 26 - temp_v1_3;
197 var_v0_3 = temp_a0_4 + 3;
201 temp_a0_4 = var_v0_3 >> 2;
227API_CALLABLE(N(func_802A188C_72CE3C)) {
228 Bytecode* args = script->ptrReadPos;
246 Call(N(func_802A13E4_72C994))
#define STANDARD_ENTITY_MODEL_SCRIPT(gfx, renderMode)
@ BS_FLAGS1_TRIGGER_EVENTS
@ BTL_DARKNESS_STATE_NONE
s32 evt_get_variable(Evt *script, Bytecode var)
void get_screen_overlay_params(s32, u8 *type, f32 *zoom)
s32 create_worker_frontUI(void(*updateFunc)(void), void(*drawFunc)(void))
void hud_element_draw_without_clipping(s32 id)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
s32 hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
void hud_element_set_flags(s32 id, s32 flags)
Turns on the given flags.
void hud_element_free(s32 id)
#define INCLUDE_PAL(FILENAME, SYMBOLNAME)
#define INCLUDE_IMG(FILENAME, SYMBOLNAME)
IconHudScriptPair gItemHudScripts[]
ApiStatus CreateVirtualEntity(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityPosition(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityJumpGravity(Evt *script, b32 isInitialCall)
ApiStatus DeleteVirtualEntity(Evt *script, b32 isInitialCall)
ApiStatus VirtualEntityJumpTo(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityRotation(Evt *script, b32 isInitialCall)
#define Ref(sym)
Address/pointer constant.
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
#define Add(VAR, INT_VALUE)
#define EndLoop
Marks the end of a loop.
#define EndIf
Marks the end of an if statement or an else block.
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
#define Thread
Marks the start of a thread block.
#define EndThread
Marks the end of a thread block.
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
#define Loop(TIMES)
Marks the beginning of a loop.
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
#define Return
Kills the current EVT thread.
#define Jump(EVT_SOURCE)
Jumps to a given instruction pointer and begins execution from there.
BattleStatus gBattleStatus
void fx_damage_stars(s32, f32, f32, f32, f32, f32, f32, s32)