+1








f3e61a31aa
* buffers: refresh 15 and revert to base decomp * behavior script * color helper functions * extended bounds * egeo_layout * fixed model ids * camera conf improved * message panel ucode small * graph node * level script * mathutil updates * mathutil updates (allow unused funcs) * behaviors a - beta_fish * Add librtc and fix some data declarations * Move GRUCODE define to proper location in makefile * Refresh 15 * extra * Make ROM name smaller and change messages printed on build a bit * Fix console (lol) * Update UNF to latest master * Make ucode load from .o's (and also fix Super3D) * Fix crash with rumble + custom mario model * graph node and mathutil * removed behaviors * Ldtob documentation * _Putfld labeling * area * behavior actions * camera * debug updates * bubbles * envfx snow * farcall helpers * game init * geo misc * hud * only check if VC on render init * ingame menu * revert goddard to base decomp * insn disasm * interaction documentation * level geo * level update defines * macro special objects formatting changes * main.h documentation * map parser documentation & formatting * airborne documentation * mario actions automatic documentation * mario actions cutscene documentation * mario actions moving documentation and options * mario actions object documentation and options * mario stationary documentation * mario submerged documentation * mario misc documentation * mario step: ledge grab fixes and documentation * mario documentation * memory.h documentation * moving textures * object behaviors * object collision * fix flamethrower bug * object helpers * object list processor documentation * paintings * platform displacement * print / printf * puppycam absf * puppyprint updates and formatting changes * rendering graph node performance optimizations * rumble opt and doc * hqvm back to ultrasm64 * save file documentation and unlock defines * s2d engine * reset various files to ultrasm64 * file select * intro geo documentation * screen transition documentation * segment2.h * shadow overhaul * skybox refactor * sound init: clean up define usage + documentation * spawn object optimizations and documentation * spawn sound cleanup * sram to ultrasm64 * star select cleanup * title screen cleanup * dialogs / text * rename stomp smoke * stomp smoke -> small water splash * updated README * compilation flags * optimized file positions + support function/data sections * surface collision performance improvements * surface load optimizations * camera conf documentation * Allow easier command for opening puppyprint debug * Rearranged framebuffers & fixed puppyprint console printing * Fix shadow scaling and shifting * Fix SILHOUETTE, OBJECTS_REJ, and ucode loading, also clean up render phase system a bit. * Fixed build with BETTER_HANGING off * Clean up OBJECTS_REJ ifdefs * Fix duplicate comment & graph render layers/flags bitmask * Fixed build with BETTER_HANGING off * Fix Fast64 importing by reverting sSegmentTable change * Readded missing functions that caused build errors with Mario head enabled * Fixed clang compilation issues * Add INTER mode for geo_update_layer_transparency * Fix build warnings * bugfix: miscalculation in obj_turn_toward_object * Some puppytech fixes * Further Puppycamera fixes * Fix BUGFIX_DIALOG_TIME_STOP Fixes #136 * Fix sliding platform bparams * Add LEGACY_SHADOW_IDS define for Fast64 compatibility * Apply suggested changes * Better find_in_bounds_yaw_wdw_bob_thi ifdef * Fix build warnings for unused functions * Fixed stale reference bug from obj_mark_for_deletion change * Fixed incorrect digit for 100s #145 * Change groundpound-fix define and functionality to just disable bonking * Fixed puppyroll #134 * Adjust height value for terrain angle to kick in * fixed hi score flashing * Remove menudata backup (#131) Not considered important enough to keep * Fix fread() build warning * Add COURSE_NUM_TO_INDEX to save_file_get_star_flags check in bhv_unagi_init * Fix approach_s16 return value * Use boolean defines for oCapDoScaleVertically * Make the door lock a part of the key door model to eliminate z-fighting, also reduce z fighting on numbered doors with AUTO_LOD enabled. * Move flames to LAYER_TRANSPARENT_INTER * Resolved some compiler warnings and added FALL_THROUGH define (#168) * Address some more compiler warnings with different define toggles * Remove unnecessary fallthrough attribute * fixed geo_process_billboard floating point exception * Allow water to face any direction * Initialize focOffset so that BBH doesn't crash * Removed superfluous RDP commands when switching microcodes which would override scissor * Set OBJ_FLAG_DONT_CALC_COLL_DIST on bhvUkikiCage * Fix rumble build * Fixed UNLOCK_FPS strobing * Update src/game/object_helpers.c Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> * Update src/game/object_helpers.c Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> * Fix LEGACY_SHADOW_IDS id conflict * Use the vanilla default value for rotating fire bars if bparam2 is 0 * START_LEVEL safeguard * Fix some drawing distance issues caused by AUTO_COLLISION_DISTANCE * Fix rumble build * Fixed spline poll code using the wrong values for keyframes * Update readme with better credits Better credits for individual contributors * add arthur * added falco and moose * add fazana * le funny typo * added S2DEX engine to credits * silhouette + axo + ratio * remove specific callouts + add auto col distance * Update data/behavior_data.c Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> * Update data/behavior_data.c Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> * Update data/behavior_data.c Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> * Revert formatting changes to match vanilla decomp * Re-implement Y buffer for find_ceil * Re-implement POWER_STARS_HEAL for normal Power Stars * Start level comment & exit course comment/collapse * utilize reonucam technique for FAST_VERTICAL_CAMERA_MOVEMENT * Fix "MAX_REFERENCED_WALLS" typo * Allow stop_and_set_height_to_floor to work at any height if Mario is teleporting (#213) * Revert stop_and_set_height_to_floor to vanilla Fixes #208 * Fixed sAudioEnabled so that it disables audio CPU processing as well * Fixed puppyprint debug RDP us calculations * Renamed sAudioEnabled to gAudioEnabled * Replaced mtxf_to_mtx_asm with an equivalent implementation that supports WORLD_SCALE * Moved extended bounds and world scale configuration to a new config_world.h file * Default all objects to non-rej (#227) Fixes #221 (Default all objects to non-rej) * Fix #221 * Fix VISUAL_DEBUG breaking/crashing when OBJECTS_REJ is disabled (#211) * Fix VISUAL_DEBUG breaking/crashing when OBJECTS_REJ is disabled * Change vtl decrement in visual_surface_display from 6 to 3 Fixes #207 * Make area in SL igloo wider to prevent a softlock (#233) Fixes #210 * Fix coin formation coins being deleted if they spawn in the middle of a floor, also fix TTM slide coin position (#232) Fixes #201 * Make UNLOCK_ALL apply to more things * Fix wrong ifdef/ifndef in bhv_invisible_objects_under_bridge_init * Change chain chomp load/unload distances depending on number of segments (#237) Fixes #192 * added WATER_PLUNGE_UPWARP define * Add reonucam patch (#239) * added reonucam patch Fixes #218 * Fix how shadows handle water/transparency/height (#228) * Fix how shadows handle water/transparency/height * Change shadow check for flying carpets from a level specific check to a oPlatformOnTrackType check Fixes #179 * added reonucam credit * delete unnecesary patches * Apply suggested changes * murdered more patches * UNLOCK_ALL unlocks the cap boxes * UNLOCK_ALL unlocks cap boxes (slightly more epic edition) * revert ceil buffer * Renamed HD_INTRO_TEXTURES define, separated intro floombas * prevent double definition of floombas * actually prevent floomba redefinition * Develop/refactor default defines (#242) * Changed default config options * Added build dir to includePaths for pngs * disable NO_SLEEP by default * Disable puppyprint by default Sorry fazana 😔 * fix typos * add comment about BETTER_REVERB console perf * disable blue coin switch retry by default * Update config_audio.h Co-authored-by: Reonu <danileon95@gmail.com> Co-authored-by: Mr-Wiseguy <68165316+Mr-Wiseguy@users.noreply.github.com> * revert air step line to vanilla to fix bitfs scaling platform issue (#247) Fixes #200 * Fix stuttering on thin slopes (#248) * Fix stuttering on thin slopes * Revert vec3f_find_ceil calls to vanilla * Rename vec3f_find_ceil to find_mario_ceil * Update src/engine/surface_collision.h Fixes #249 * Swap static and dynamic surface checks back to vanilla order (#253) * Swap static and dynamic surface checks back to vanilla order * re-enable DISABLE_ALL config Fixes #251 #252 * Fixed save and quitting while in widescreen (#257) * Fixed save and quitting while in widescreen * use define for the level * all my homies hate ifdefs * skip wall offsets < 0 (#255) Fixes #255 * #264: Document non-stop stars' issues (#267) * #264: Document non-stop stars' issues * Update include/config/config_game.h * nonstop vanilla comment * derive margin_radius from radius after capping at 200 (#266) Fixes #259 * Config cleanup/refactor (#269) * Moved puppyprint define to graphics / rearranged some debug defines for ease of access * Moved compatibility safeguards to config_safeguards.h * spacing and comment formatting * #272 Move GFX_POOL_SIZE to config_graphics.h * disable EASIER_DIALOG_TRIGGER by default * prevent redefining warnings * small ifdef typo * changed ifndef to undefs Fixes #262 Fixes #272 * Improved movement config documentation related to turning around (#271) Fixes #270 * rename CUSTOM_DEBUG, add comments (#275) * Update README.md (#277) * v2.0.0 Co-authored-by: CrashOveride95 <crashoveride953@gmail.com> Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com> Co-authored-by: n64 <n64> Co-authored-by: Fazana <52551480+FazanaJ@users.noreply.github.com> Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com> Co-authored-by: aglab2 <aglab3@gmail.com> Co-authored-by: gheskett <gheskett@gmail.com> Co-authored-by: Reonu <danileon95@gmail.com> Co-authored-by: Axollyon <20480418+Axollyon@users.noreply.github.com> Co-authored-by: Mr-Wiseguy <68165316+Mr-Wiseguy@users.noreply.github.com>
274 lines
14 KiB
C
274 lines
14 KiB
C
#ifndef OBJECT_HELPERS_H
|
|
#define OBJECT_HELPERS_H
|
|
|
|
#include <PR/ultratypes.h>
|
|
|
|
#include "macros.h"
|
|
#include "types.h"
|
|
|
|
// used for chain chomp and wiggler
|
|
struct ChainSegment {
|
|
Vec3f pos;
|
|
Vec3s angle;
|
|
};
|
|
|
|
enum WaterDropletFlags {
|
|
WATER_DROPLET_FLAG_RAND_ANGLE = (1 << 1), // 0x02
|
|
WATER_DROPLET_FLAG_RAND_OFFSET_XZ = (1 << 2), // 0x04 // Unused
|
|
WATER_DROPLET_FLAG_RAND_OFFSET_XYZ = (1 << 3), // 0x08 // Unused
|
|
WATER_DROPLET_FLAG_UNUSED = (1 << 4), // 0x10 // Unused
|
|
WATER_DROPLET_FLAG_SET_Y_TO_WATER_LEVEL = (1 << 5), // 0x20
|
|
WATER_DROPLET_FLAG_RAND_ANGLE_INCR_BACKWARD = (1 << 6), // 0x40
|
|
WATER_DROPLET_FLAG_RAND_ANGLE_INCR_FORWARD = (1 << 7), // 0x80 // Unused
|
|
};
|
|
|
|
// Call spawn_water_droplet with this struct to spawn an object.
|
|
struct WaterDropletParams {
|
|
s16 flags; // Droplet spawn flags, see defines above
|
|
ModelID16 model;
|
|
const BehaviorScript *behavior;
|
|
s16 moveAngleRange; // Only used for RAND_ANGLE_INCR flags
|
|
s16 moveRange; // Only used for RAND_OFFSET flags
|
|
f32 randForwardVelOffset;
|
|
f32 randForwardVelScale;
|
|
f32 randYVelOffset;
|
|
f32 randYVelScale;
|
|
f32 randSizeOffset;
|
|
f32 randSizeScale;
|
|
};
|
|
|
|
struct SpawnParticlesInfo {
|
|
/*0x00*/ s8 behParam;
|
|
/*0x01*/ s8 count;
|
|
/*0x02*/ ModelID16 model;
|
|
/*0x03*/ s8 offsetY;
|
|
/*0x04*/ s8 forwardVelBase;
|
|
/*0x05*/ s8 forwardVelRange;
|
|
/*0x06*/ s8 velYBase;
|
|
/*0x07*/ s8 velYRange;
|
|
/*0x08*/ s8 gravity;
|
|
/*0x09*/ s8 dragStrength;
|
|
/*0x0C*/ f32 sizeBase;
|
|
/*0x10*/ f32 sizeRange;
|
|
};
|
|
|
|
enum GeoUpdateLayerTransparencyModes {
|
|
GEO_TRANSPARENCY_MODE_NORMAL = 0,
|
|
GEO_TRANSPARENCY_MODE_NO_DITHER = 10,
|
|
GEO_TRANSPARENCY_MODE_DECAL = 20,
|
|
GEO_TRANSPARENCY_MODE_INTER = 30,
|
|
};
|
|
|
|
Gfx *geo_update_projectile_pos_from_parent(s32 callContext, UNUSED struct GraphNode *node, Mat4 mtx);
|
|
Gfx *geo_update_layer_transparency(s32 callContext, struct GraphNode *node, UNUSED void *context);
|
|
Gfx *geo_switch_anim_state(s32 callContext, struct GraphNode *node, UNUSED void *context);
|
|
Gfx *geo_switch_area(s32 callContext, struct GraphNode *node, UNUSED void *context);
|
|
void obj_update_pos_from_parent_transformation(Mat4 mtx, struct Object *obj);
|
|
void create_transformation_from_matrices(Mat4 a0, Mat4 a1, Mat4 a2);
|
|
void obj_set_held_state(struct Object *obj, const BehaviorScript *heldBehavior);
|
|
f32 lateral_dist_between_objects(struct Object *obj1, struct Object *obj2);
|
|
f32 dist_between_objects(struct Object *obj1, struct Object *obj2);
|
|
f32 dist_between_objects_squared(struct Object *obj1, struct Object *obj2);
|
|
void cur_obj_forward_vel_approach_upward(f32 target, f32 increment);
|
|
s32 cur_obj_rotate_yaw_toward(s16 target, s16 increment);
|
|
s32 obj_angle_to_object(struct Object *obj1, struct Object *obj2);
|
|
s32 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleIndex, s16 turnAmount);
|
|
void obj_set_parent_relative_pos(struct Object *obj, s16 relX, s16 relY, s16 relZ);
|
|
void obj_set_pos(struct Object *obj, s16 x, s16 y, s16 z);
|
|
void obj_set_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);
|
|
struct Object *spawn_object_abs_with_rot(struct Object *parent, s16 uselessArg, ModelID32 model,
|
|
const BehaviorScript *behavior,
|
|
s16 x, s16 y, s16 z, s16 pitch, s16 yaw, s16 roll);
|
|
struct Object *spawn_object_rel_with_rot(struct Object *parent, ModelID32 model, const BehaviorScript *behavior,
|
|
s16 xOff, s16 yOff, s16 zOff, s16 pitch, s16 yaw, s16 roll);
|
|
struct Object *spawn_obj_with_transform_flags(struct Object *parent, ModelID32 model, const BehaviorScript *behavior);
|
|
struct Object *spawn_water_droplet(struct Object *parent, struct WaterDropletParams *params);
|
|
struct Object *spawn_object_at_origin(struct Object *parent, UNUSED s32 unusedArg, ModelID32 model, const BehaviorScript *behavior);
|
|
struct Object *spawn_object(struct Object *parent, ModelID32 model, const BehaviorScript *behavior);
|
|
struct Object *try_to_spawn_object(s16 offsetY, f32 scale, struct Object *parent, ModelID32 model, const BehaviorScript *behavior);
|
|
struct Object *spawn_object_with_scale(struct Object *parent, ModelID32 model, const BehaviorScript *behavior, f32 scale);
|
|
struct Object *spawn_object_relative(s16 behaviorParam, s16 relativePosX, s16 relativePosY, s16 relativePosZ,
|
|
struct Object *parent, ModelID32 model, const BehaviorScript *behavior);
|
|
struct Object *spawn_object_relative_with_scale(s16 behaviorParam, s16 relativePosX, s16 relativePosY,
|
|
s16 relativePosZ, f32 scale, struct Object *parent,
|
|
ModelID32 model, const BehaviorScript *behavior);
|
|
void cur_obj_move_using_vel(void);
|
|
void obj_copy_graph_y_offset(struct Object *dst, struct Object *src);
|
|
void obj_copy_pos_and_angle(struct Object *dst, struct Object *src);
|
|
void obj_copy_pos(struct Object *dst, struct Object *src);
|
|
void obj_copy_angle(struct Object *dst, struct Object *src);
|
|
void obj_set_gfx_pos_from_pos(struct Object *obj);
|
|
void obj_apply_scale_to_transform(struct Object *obj);
|
|
void obj_copy_scale(struct Object *dst, struct Object *src);
|
|
void obj_scale_xyz(struct Object *obj, f32 xScale, f32 yScale, f32 zScale);
|
|
void obj_scale(struct Object *obj, f32 scale);
|
|
void cur_obj_scale(f32 scale);
|
|
void cur_obj_init_animation_with_sound(s32 animIndex);
|
|
void cur_obj_init_animation_with_accel_and_sound(s32 animIndex, f32 accel);
|
|
void cur_obj_init_animation(s32 animIndex);
|
|
void obj_init_animation_with_sound(struct Object *obj, const struct Animation * const* animations, s32 animIndex);
|
|
void cur_obj_enable_rendering(void);
|
|
void cur_obj_disable_rendering(void);
|
|
void cur_obj_unhide(void);
|
|
void cur_obj_hide(void);
|
|
void cur_obj_set_pos_relative(struct Object *other, f32 dleft, f32 dy, f32 dforward);
|
|
u32 get_object_list_from_behavior(const BehaviorScript *behavior);
|
|
struct Object *cur_obj_nearest_object_with_behavior(const BehaviorScript *behavior);
|
|
f32 cur_obj_dist_to_nearest_object_with_behavior(const BehaviorScript* behavior);
|
|
struct Object *cur_obj_find_nearest_object_with_behavior(const BehaviorScript * behavior, f32 *dist);
|
|
struct Object *find_unimportant_object(void);
|
|
s32 count_unimportant_objects(void);
|
|
s32 count_objects_with_behavior(const BehaviorScript *behavior);
|
|
struct Object *cur_obj_find_nearby_held_actor(const BehaviorScript *behavior, f32 maxDist);
|
|
void cur_obj_change_action(s32 action);
|
|
void cur_obj_set_vel_from_mario_vel(f32 f12,f32 f14);
|
|
void cur_obj_reverse_animation(void);
|
|
void cur_obj_extend_animation_if_at_end(void);
|
|
s32 cur_obj_check_if_near_animation_end(void);
|
|
s32 cur_obj_check_if_at_animation_end(void);
|
|
s32 cur_obj_check_anim_frame(s32 frame);
|
|
s32 cur_obj_check_anim_frame_in_range(s32 startFrame, s32 rangeLength);
|
|
s32 cur_obj_check_frame_prior_current_frame(s16 *a0);
|
|
s32 mario_is_in_air_action(void);
|
|
s32 mario_is_dive_sliding(void);
|
|
void cur_obj_set_y_vel_and_animation(f32 yVel, s32 animIndex);
|
|
void cur_obj_unrender_set_action_and_anim(s32 animIndex, s32 action);
|
|
void cur_obj_get_thrown_or_placed(f32 forwardVel, f32 velY, s32 thrownAction);
|
|
void cur_obj_get_dropped(void);
|
|
void obj_set_model(struct Object *obj, ModelID16 modelID);
|
|
void cur_obj_set_model(ModelID16 modelID);
|
|
s32 obj_has_model(struct Object *obj, ModelID16 modelID);
|
|
s32 cur_obj_has_model(ModelID16 modelID);
|
|
ModelID32 obj_get_model_id(struct Object *obj);
|
|
void mario_set_flag(s32 flag);
|
|
s32 cur_obj_clear_interact_status_flag(s32 flag);
|
|
void obj_mark_for_deletion(struct Object *obj);
|
|
// Hackersm64 backwards compatibility
|
|
#define mark_obj_for_deletion obj_mark_for_deletion
|
|
void cur_obj_disable(void);
|
|
void cur_obj_become_intangible(void);
|
|
void cur_obj_become_tangible(void);
|
|
void obj_become_tangible(struct Object *obj);
|
|
void cur_obj_update_floor_height(void);
|
|
struct Surface *cur_obj_update_floor_height_and_get_floor(void);
|
|
void cur_obj_apply_drag_xz(f32 dragStrength);
|
|
void cur_obj_move_y(f32 gravity, f32 bounciness, f32 buoyancy);
|
|
void cur_obj_unused_resolve_wall_collisions(f32 offsetY, f32 radius);
|
|
void cur_obj_move_xz_using_fvel_and_yaw(void);
|
|
void cur_obj_move_y_with_terminal_vel(void);
|
|
void cur_obj_compute_vel_xz(void);
|
|
f32 increment_velocity_toward_range(f32 value, f32 center, f32 zeroThreshold, f32 increment);
|
|
s32 obj_check_if_collided_with_object(struct Object *obj1, struct Object *obj2);
|
|
void cur_obj_set_behavior(const BehaviorScript *behavior);
|
|
void obj_set_behavior(struct Object *obj, const BehaviorScript *behavior);
|
|
s32 cur_obj_has_behavior(const BehaviorScript *behavior);
|
|
s32 obj_has_behavior(struct Object *obj, const BehaviorScript *behavior);
|
|
f32 cur_obj_lateral_dist_from_mario_to_home(void);
|
|
f32 cur_obj_lateral_dist_to_home(void);
|
|
void cur_obj_set_pos_to_home(void);
|
|
void cur_obj_set_pos_to_home_and_stop(void);
|
|
void cur_obj_shake_y(f32 amount);
|
|
void cur_obj_start_cam_event(UNUSED struct Object *obj, s32 cameraEvent);
|
|
void obj_set_billboard(struct Object *obj);
|
|
void cur_obj_set_hitbox_radius_and_height(f32 radius, f32 height);
|
|
void cur_obj_set_hurtbox_radius_and_height(f32 radius, f32 height);
|
|
void obj_spawn_loot_blue_coins(struct Object *obj, s32 numCoins, f32 baseYVel, s16 posJitter);
|
|
void obj_spawn_loot_yellow_coins(struct Object *obj, s32 numCoins, f32 baseYVel);
|
|
void cur_obj_spawn_loot_coin_at_mario_pos(void);
|
|
s32 cur_obj_advance_looping_anim(void);
|
|
s32 cur_obj_resolve_wall_collisions(void);
|
|
void cur_obj_update_floor_and_walls(void);
|
|
void cur_obj_move_standard(s16 steepSlopeAngleDegrees);
|
|
void cur_obj_move_using_vel_and_gravity(void);
|
|
void cur_obj_move_using_fvel_and_gravity(void);
|
|
s32 cur_obj_angle_to_home(void);
|
|
void obj_set_gfx_pos_at_obj_pos(struct Object *obj1, struct Object *obj2);
|
|
void obj_translate_local(struct Object *obj, s16 posIndex, s16 localTranslateIndex);
|
|
void obj_build_transform_from_pos_and_angle(struct Object *obj, s16 posIndex, s16 angleIndex);
|
|
void obj_set_throw_matrix_from_transform(struct Object *obj);
|
|
void obj_build_transform_relative_to_parent(struct Object *obj);
|
|
void obj_create_transform_from_self(struct Object *obj);
|
|
void cur_obj_rotate_face_angle_using_vel(void);
|
|
s32 cur_obj_follow_path_new(void);
|
|
// define is for backwards compatibility (arg used to be useless)
|
|
#define cur_obj_follow_path(...) cur_obj_follow_path_new()
|
|
void chain_segment_init(struct ChainSegment *segment);
|
|
f32 random_f32_around_zero(f32 diameter);
|
|
void obj_scale_random(struct Object *obj, f32 rangeLength, f32 minScale);
|
|
void obj_translate_xyz_random(struct Object *obj, f32 rangeLength);
|
|
void obj_translate_xz_random(struct Object *obj, f32 rangeLength);
|
|
void cur_obj_set_pos_via_transform(void);
|
|
void cur_obj_spawn_particles(struct SpawnParticlesInfo *info);
|
|
s32 cur_obj_reflect_move_angle_off_wall(void);
|
|
|
|
#define WAYPOINT_FLAGS_END -1
|
|
#define WAYPOINT_FLAGS_NONE 0
|
|
#define WAYPOINT_FLAGS_INITIALIZED 0x8000
|
|
#define WAYPOINT_FLAGS_PLATFORM_ON_TRACK_PAUSE 3
|
|
#define WAYPOINT_MASK_00FF 0x00FF
|
|
|
|
enum PathStatus {
|
|
PATH_REACHED_END = -1,
|
|
PATH_NONE,
|
|
PATH_REACHED_WAYPOINT,
|
|
};
|
|
|
|
enum ObjScaleAxis {
|
|
SCALE_AXIS_X = (1 << 0), // 0x01
|
|
SCALE_AXIS_Y = (1 << 1), // 0x02
|
|
SCALE_AXIS_Z = (1 << 2), // 0x04
|
|
};
|
|
|
|
void obj_set_hitbox(struct Object *obj, struct ObjectHitbox *hitbox);
|
|
s32 cur_obj_wait_then_blink(s32 timeUntilBlinking, s32 numBlinks);
|
|
s32 cur_obj_is_mario_ground_pounding_platform(void);
|
|
void spawn_mist_particles(void);
|
|
void spawn_mist_particles_with_sound(u32 soundMagic);
|
|
void cur_obj_push_mario_away(f32 radius);
|
|
void cur_obj_push_mario_away_from_cylinder(f32 radius, f32 extentY);
|
|
s32 cur_obj_set_direction_table(s8 *a0);
|
|
s32 cur_obj_progress_direction_table(void);
|
|
void cur_obj_scale_over_time(s32 axis, s32 times, f32 start, f32 end);
|
|
void cur_obj_set_pos_to_home_with_debug(void);
|
|
s32 cur_obj_is_mario_on_platform(void);
|
|
void cur_obj_call_action_function(ObjActionFunc actionFunctions[]);
|
|
s32 cur_obj_mario_far_away(void);
|
|
s32 is_mario_moving_fast_or_in_air(s32 speedThreshold);
|
|
s32 is_item_in_array(s8 item, s8 *array);
|
|
void cur_obj_enable_rendering_if_mario_in_room(void);
|
|
s32 cur_obj_set_hitbox_and_die_if_attacked(struct ObjectHitbox *hitbox, s32 deathSound, s32 noLootCoins);
|
|
void obj_explode_and_spawn_coins(f32 mistSize, s32 coinType);
|
|
void obj_set_collision_data(struct Object *obj, const void *segAddr);
|
|
void cur_obj_if_hit_wall_bounce_away(void);
|
|
s32 cur_obj_hide_if_mario_far_away_y(f32 distY);
|
|
Gfx *geo_offset_klepto_held_object(s32 callContext, struct GraphNode *node, UNUSED Mat4 mtx);
|
|
s32 obj_is_hidden(struct Object *obj);
|
|
void enable_time_stop(void);
|
|
void disable_time_stop(void);
|
|
void set_time_stop_flags(s32 flags);
|
|
void clear_time_stop_flags(s32 flags);
|
|
s32 cur_obj_can_mario_activate_textbox(f32 radius, f32 height, UNUSED s32 unused);
|
|
s32 cur_obj_can_mario_activate_textbox_2(f32 radius, f32 height);
|
|
s32 cur_obj_update_dialog(s32 actionArg, s32 dialogFlags, s32 dialogID, UNUSED s32 unused);
|
|
s32 cur_obj_update_dialog_with_cutscene(s32 actionArg, s32 dialogFlags, s32 cutsceneTable, s32 dialogID);
|
|
void cur_obj_align_gfx_with_floor(void);
|
|
s32 mario_is_within_rectangle(s16 minX, s16 maxX, s16 minZ, s16 maxZ);
|
|
void cur_obj_shake_screen(s32 shake);
|
|
s32 obj_attack_collided_from_other_object(struct Object *obj);
|
|
s32 cur_obj_was_attacked_or_ground_pounded(void);
|
|
void obj_copy_behavior_params(struct Object *dst, struct Object *src);
|
|
void cur_obj_init_animation_and_anim_frame(s32 animIndex, s32 animFrame);
|
|
s32 cur_obj_init_animation_and_check_if_near_end(s32 animIndex);
|
|
void cur_obj_init_animation_and_extend_if_at_end(s32 animIndex);
|
|
s32 cur_obj_check_grabbed_mario(void);
|
|
s32 player_performed_grab_escape_action(void);
|
|
void cur_obj_unused_play_footstep_sound(s32 animFrame1, s32 animFrame2, s32 sound);
|
|
void enable_time_stop_including_mario(void);
|
|
void disable_time_stop_including_mario(void);
|
|
s32 cur_obj_check_interacted(void);
|
|
void cur_obj_spawn_loot_blue_coin(void);
|
|
|
|
void cur_obj_spawn_star_at_y_offset(f32 targetX, f32 targetY, f32 targetZ, f32 offsetY);
|
|
|
|
#endif // OBJECT_HELPERS_H
|