shorten call_native command (#733)

This commit is contained in:
arthurtilly
2023-12-15 17:24:35 +13:00
committed by GitHub
parent dcfcf50a80
commit 1646702393
2 changed files with 16 additions and 16 deletions

View File

@@ -66,6 +66,7 @@
#define BC_HH(a, b) (_SHIFTL(a, 16, 16) | _SHIFTL(b, 0, 16))
#define BC_W(a) ((uintptr_t)(u32)(a))
#define BC_PTR(a) ((uintptr_t)(a))
#define BC_BPTR(a, b) (_SHIFTL(a, 24, 8) + OS_K0_TO_PHYSICAL(b))
enum BehaviorCommands {
/*0x00*/ BHV_CMD_BEGIN,
@@ -180,8 +181,7 @@ enum BehaviorCommands {
// Executes a native game function.
#define CALL_NATIVE(func) \
BC_B(BHV_CMD_CALL_NATIVE), \
BC_PTR(func)
BC_BPTR(BHV_CMD_CALL_NATIVE, func)
// Adds a float to the specified field.
#define ADD_FLOAT(field, value) \
@@ -386,8 +386,7 @@ enum BehaviorCommands {
// Spawns a water droplet with the given parameters.
#define SPAWN_WATER_DROPLET(dropletParams) \
BC_B(BHV_CMD_SPAWN_WATER_DROPLET), \
BC_PTR(dropletParams)
BC_BPTR(BHV_CMD_SPAWN_WATER_DROPLET, dropletParams)
const BehaviorScript bhvStarDoor[] = {