Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
pebble.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
3#include "ld_addrs.h"
4#include "entity.h"
5#include "sprite/player.h"
6#include "include_asset.h"
7
8#define NAMESPACE battle_item_pebble
9
12
13static s32 _pad = 0;
14
15#include "battle/move/item/pebble.png.h"
16INCLUDE_IMG("battle/move/item/pebble.png", battle_item_pebble_png);
17INCLUDE_PAL("battle/move/item/pebble.pal", battle_item_pebble_pal);
18
19Vtx N(model)[] = {
20 { .v = { { -16, -16, 0 }, FALSE, { 0, 0 }, { 0, 0, 0, 255 } } },
21 { .v = { { 15, -16, 0 }, FALSE, { 1024, 0 }, { 0, 0, 0, 255 } } },
22 { .v = { { 15, 15, 0 }, FALSE, { 1024, 1024 }, { 0, 0, 0, 255 } } },
23 { .v = { { -16, 15, 0 }, FALSE, { 0, 1024 }, { 0, 0, 0, 255 } } },
24};
25
26Gfx N(displayList)[] = {
28 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
42 gsSP1Triangle(0, 1, 2, 0),
43 gsSP1Triangle(0, 2, 3, 0),
46};
47
49
57 Wait(3)
59 SetF(LVar0, Float(1.0))
63 Set(LVar3, 20)
64 Set(LVar4, 42)
65 Set(LVar5, 5)
74 Thread
75 Set(LVar0, 0)
76 Loop(18)
77 Add(LVar0, -60)
79 Wait(1)
83 Add(LVar2, 5)
88 Add(LVar0, 60)
89 Add(LVar1, 0)
93 Return
94 End
95};
BSS s32 PopupMenu_SelectedIndex
Bytecode EvtScript[]
s32 EntityModelScript[]
Definition entity.h:7
#define STANDARD_ENTITY_MODEL_SCRIPT(gfx, renderMode)
Definition entity.h:56
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3574
@ BTL_CAM_VIEW_ENEMIES
Definition enums.h:4824
@ SOUND_THROW
Definition enums.h:1311
@ RENDER_MODE_ALPHATEST
Definition enums.h:3276
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ DAMAGE_TYPE_IGNORE_DEFENSE
Definition enums.h:2877
@ DAMAGE_TYPE_NO_CONTACT
Definition enums.h:2878
#define INCLUDE_PAL(FILENAME, SYMBOLNAME)
#define INCLUDE_IMG(FILENAME, SYMBOLNAME)
ApiStatus PlaySound(Evt *script, b32 isInitialCall)
ApiStatus CreateVirtualEntity(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityPosition(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityJumpGravity(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityScale(Evt *script, b32 isInitialCall)
ApiStatus DeleteVirtualEntity(Evt *script, b32 isInitialCall)
ApiStatus GetItemPower(Evt *script, b32 isInitialCall)
ApiStatus VirtualEntityJumpTo(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityRotation(Evt *script, b32 isInitialCall)
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define EndLoop
Marks the end of a loop.
Definition macros.h:248
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define Float(DOUBLE)
Definition macros.h:51
#define LVar5
Definition macros.h:153
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define SetF(VAR, FLOAT_VALUE)
Sets the given variable to a given value, but supports Floats.
Definition macros.h:373
#define LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define LVarA
Definition macros.h:158
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define LVar9
Definition macros.h:157
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVar4
Definition macros.h:152
#define LVar3
Definition macros.h:151
#define LVar0
Definition macros.h:148
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:370
#define Return
Kills the current EVT thread.
Definition macros.h:217