Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
SuperBlock.inc.c File Reference

Go to the source code of this file.

Data Structures

struct  EnergyOrbSet
 

Macros

#define EVT_MAKE_SUPER_BLOCK(args...)
 
#define SUPER_BLOCK_NUM_ORBS   3
 

Functions

s32 N SuperBlock_get_partner_rank (s32 idx, s16 maxLevel)
 

Data Structure Documentation

◆ EnergyOrbSet

struct EnergyOrbSet
Data Fields
s32 scatterState
s32 gatherState
EffectInstance * orbEffects[3]
f32 posX[3]
f32 posY[3]
f32 posZ[3]
f32 partnerPosX[3]
f32 partnerPosY[3]
f32 partnerPosZ[3]
Entity * superBlock
s32 scatterStateTime
s32 gatherStateTime

Macro Definition Documentation

◆ EVT_MAKE_SUPER_BLOCK

#define EVT_MAKE_SUPER_BLOCK ( args...)
Value:
Set(SUPER_BLOCK_MAPVAR, LVar0)\
Call(AssignBlockFlag, SUPER_BLOCK_GAMEFLAG)\
Call(AssignScript, Ref(N(SuperBlock_OnHit)))
EntityBlueprint Entity_SuperBlock
Definition SuperBlock.c:253
#define MAKE_ENTITY_END
Definition evt.h:107
ApiStatus AssignBlockFlag(Evt *script, b32 isInitialCall)
ApiStatus AssignScript(Evt *script, b32 isInitialCall)
ApiStatus MakeEntity(Evt *script, b32 isInitialCall)
Creates an entity.
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define LVar0
Definition macros.h:148

Definition at line 25 of file SuperBlock.inc.c.

25#define EVT_MAKE_SUPER_BLOCK(args...) \
26 Call(MakeEntity, Ref(Entity_SuperBlock), args, MAKE_ENTITY_END)\
27 Set(SUPER_BLOCK_MAPVAR, LVar0)\
28 Call(AssignBlockFlag, SUPER_BLOCK_GAMEFLAG)\
29 Call(AssignScript, Ref(N(SuperBlock_OnHit)))

◆ SUPER_BLOCK_NUM_ORBS

#define SUPER_BLOCK_NUM_ORBS   3

Definition at line 34 of file SuperBlock.inc.c.

Function Documentation

◆ SuperBlock_get_partner_rank()

s32 N SuperBlock_get_partner_rank ( s32 idx,
s16 maxLevel )

Definition at line 93 of file SuperBlock.inc.c.

93 {
94 if (!gPlayerData.partners[idx].enabled) {
95 return -1;
96 }
97
98 if (gPlayerData.partners[idx].level <= maxLevel) {
99 return gPlayerData.partners[idx].level;
100 }
101
102 return -1;
103}
PartnerData partners[12]
PlayerData gPlayerData
Definition 77480.c:40