mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-23 16:14:47 -05:00
Unhardcoded more bowling ball values
This commit is contained in:
parent
091437c430
commit
e40fe57860
6 changed files with 84 additions and 66 deletions
|
@ -139,6 +139,8 @@
|
|||
--- @class BehaviorTrajectories
|
||||
--- @field public BowlingBallBob2Trajectory Pointer_Trajectory
|
||||
--- @field public BowlingBallBobTrajectory Pointer_Trajectory
|
||||
--- @field public BowlingBallThiLargeTrajectory Pointer_Trajectory
|
||||
--- @field public BowlingBallThiSmallTrajectory Pointer_Trajectory
|
||||
--- @field public BowlingBallTtmTrajectory Pointer_Trajectory
|
||||
--- @field public KoopaBobTrajectory Pointer_Trajectory
|
||||
--- @field public KoopaThiTrajectory Pointer_Trajectory
|
||||
|
|
|
@ -251,6 +251,8 @@
|
|||
| ----- | ---- | ------ |
|
||||
| BowlingBallBob2Trajectory | `Pointer` <`Trajectory`> | |
|
||||
| BowlingBallBobTrajectory | `Pointer` <`Trajectory`> | |
|
||||
| BowlingBallThiLargeTrajectory | `Pointer` <`Trajectory`> | |
|
||||
| BowlingBallThiSmallTrajectory | `Pointer` <`Trajectory`> | |
|
||||
| BowlingBallTtmTrajectory | `Pointer` <`Trajectory`> | |
|
||||
| KoopaBobTrajectory | `Pointer` <`Trajectory`> | |
|
||||
| KoopaThiTrajectory | `Pointer` <`Trajectory`> | |
|
||||
|
|
|
@ -12,7 +12,7 @@ static struct ObjectHitbox sBowlingBallHitbox = {
|
|||
/* hurtboxHeight: */ 0,
|
||||
};
|
||||
|
||||
static Trajectory sThiHugeMetalBallTraj[] = {
|
||||
Trajectory sThiHugeMetalBallTraj[] = {
|
||||
TRAJECTORY_POS(0, /*pos*/ -4786, 101, -2166),
|
||||
TRAJECTORY_POS(1, /*pos*/ -5000, 81, -2753),
|
||||
TRAJECTORY_POS(2, /*pos*/ -5040, 33, -3846),
|
||||
|
@ -26,7 +26,7 @@ static Trajectory sThiHugeMetalBallTraj[] = {
|
|||
TRAJECTORY_END(),
|
||||
};
|
||||
|
||||
static Trajectory sThiTinyMetalBallTraj[] = {
|
||||
Trajectory sThiTinyMetalBallTraj[] = {
|
||||
TRAJECTORY_POS(0, /*pos*/ -1476, 29, -680),
|
||||
TRAJECTORY_POS(1, /*pos*/ -1492, 14, -1072),
|
||||
TRAJECTORY_POS(2, /*pos*/ -1500, 3, -1331),
|
||||
|
@ -67,11 +67,11 @@ void bowling_ball_set_waypoints(void) {
|
|||
break;
|
||||
|
||||
case BBALL_BP_STYPE_THI_LARGE:
|
||||
o->oPathedStartWaypoint = (struct Waypoint *) sThiHugeMetalBallTraj;
|
||||
o->oPathedStartWaypoint = segmented_to_virtual(gBehaviorValues.trajectories.BowlingBallThiLargeTrajectory);
|
||||
break;
|
||||
|
||||
case BBALL_BP_STYPE_THI_SMALL:
|
||||
o->oPathedStartWaypoint = (struct Waypoint *) sThiTinyMetalBallTraj;
|
||||
o->oPathedStartWaypoint = segmented_to_virtual(gBehaviorValues.trajectories.BowlingBallThiSmallTrajectory);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -117,23 +117,23 @@ void bhv_bowling_ball_initializeLoop(void) {
|
|||
|
||||
switch (o->oBehParams2ndByte) {
|
||||
case BBALL_BP_STYPE_BOB_UPPER:
|
||||
o->oForwardVel = 20.0f;
|
||||
o->oForwardVel = gBehaviorValues.BowlingBallBobSpeed;
|
||||
break;
|
||||
|
||||
case BBALL_BP_STYPE_TTM:
|
||||
o->oForwardVel = 10.0f;
|
||||
o->oForwardVel = gBehaviorValues.BowlingBallTtmSpeed;
|
||||
break;
|
||||
|
||||
case BBALL_BP_STYPE_BOB_LOWER:
|
||||
o->oForwardVel = 20.0f;
|
||||
o->oForwardVel = gBehaviorValues.BowlingBallBob2Speed;
|
||||
break;
|
||||
|
||||
case BBALL_BP_STYPE_THI_LARGE:
|
||||
o->oForwardVel = 25.0f;
|
||||
o->oForwardVel = gBehaviorValues.BowlingBallThiLargeSpeed;
|
||||
break;
|
||||
|
||||
case BBALL_BP_STYPE_THI_SMALL:
|
||||
o->oForwardVel = 10.0f;
|
||||
o->oForwardVel = gBehaviorValues.BowlingBallThiSmallSpeed;
|
||||
cur_obj_scale(0.3f);
|
||||
o->oGraphYOffset = 39.0f;
|
||||
break;
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
#include "levels/wf/header.h"
|
||||
#include "levels/wmotr/header.h"
|
||||
|
||||
extern Trajectory sThiHugeMetalBallTraj[];
|
||||
extern Trajectory sThiTinyMetalBallTraj[];
|
||||
|
||||
////////////
|
||||
// Levels //
|
||||
////////////
|
||||
|
@ -109,6 +112,11 @@ struct BehaviorValues gDefaultBehaviorValues = {
|
|||
.KingWhompHealth = 3,
|
||||
.MipsStar1Requirement = 15,
|
||||
.MipsStar2Requirement = 50,
|
||||
.BowlingBallBobSpeed = 20.0f,
|
||||
.BowlingBallBob2Speed = 10.0f,
|
||||
.BowlingBallTtmSpeed = 20.0f,
|
||||
.BowlingBallThiLargeSpeed = 25.0f,
|
||||
.BowlingBallThiSmallSpeed = 10.0f,
|
||||
.ShowStarMilestones = TRUE,
|
||||
.starsNeededForDialog = { 1, 3, 8, 30, 50, 70 },
|
||||
.dialogs = {
|
||||
|
@ -207,6 +215,8 @@ struct BehaviorValues gDefaultBehaviorValues = {
|
|||
.BowlingBallBobTrajectory = (Trajectory*) bob_seg7_metal_ball_path0,
|
||||
.BowlingBallBob2Trajectory = (Trajectory*) bob_seg7_metal_ball_path1,
|
||||
.BowlingBallTtmTrajectory = (Trajectory*) ttm_seg7_trajectory_070170A0,
|
||||
.BowlingBallThiLargeTrajectory = (Trajectory*) sThiHugeMetalBallTraj,
|
||||
.BowlingBallThiSmallTrajectory = (Trajectory*) sThiTinyMetalBallTraj,
|
||||
.MipsTrajectory = (Trajectory*) inside_castle_seg7_trajectory_mips_0,
|
||||
.Mips2Trajectory = (Trajectory*) inside_castle_seg7_trajectory_mips_1,
|
||||
.Mips3Trajectory = (Trajectory*) inside_castle_seg7_trajectory_mips_2,
|
||||
|
|
|
@ -70,6 +70,8 @@ struct BehaviorTrajectories {
|
|||
Trajectory* BowlingBallBobTrajectory;
|
||||
Trajectory* BowlingBallBob2Trajectory;
|
||||
Trajectory* BowlingBallTtmTrajectory;
|
||||
Trajectory* BowlingBallThiLargeTrajectory;
|
||||
Trajectory* BowlingBallThiSmallTrajectory;
|
||||
Trajectory* MipsTrajectory;
|
||||
Trajectory* Mips2Trajectory;
|
||||
Trajectory* Mips3Trajectory;
|
||||
|
|
|
@ -173,10 +173,12 @@ static struct LuaObjectField sBehaviorDialogsFields[LUA_BEHAVIOR_DIALOGS_FIELD_C
|
|||
{ "YoshiDialog", LVT_S32, offsetof(struct BehaviorDialogs, YoshiDialog), false, LOT_NONE },
|
||||
};
|
||||
|
||||
#define LUA_BEHAVIOR_TRAJECTORIES_FIELD_COUNT 28
|
||||
#define LUA_BEHAVIOR_TRAJECTORIES_FIELD_COUNT 30
|
||||
static struct LuaObjectField sBehaviorTrajectoriesFields[LUA_BEHAVIOR_TRAJECTORIES_FIELD_COUNT] = {
|
||||
{ "BowlingBallBob2Trajectory", LVT_TRAJECTORY_P, offsetof(struct BehaviorTrajectories, BowlingBallBob2Trajectory), false, LOT_POINTER },
|
||||
{ "BowlingBallBobTrajectory", LVT_TRAJECTORY_P, offsetof(struct BehaviorTrajectories, BowlingBallBobTrajectory), false, LOT_POINTER },
|
||||
{ "BowlingBallThiLargeTrajectory", LVT_TRAJECTORY_P, offsetof(struct BehaviorTrajectories, BowlingBallThiLargeTrajectory), false, LOT_POINTER },
|
||||
{ "BowlingBallThiSmallTrajectory", LVT_TRAJECTORY_P, offsetof(struct BehaviorTrajectories, BowlingBallThiSmallTrajectory), false, LOT_POINTER },
|
||||
{ "BowlingBallTtmTrajectory", LVT_TRAJECTORY_P, offsetof(struct BehaviorTrajectories, BowlingBallTtmTrajectory), false, LOT_POINTER },
|
||||
{ "KoopaBobTrajectory", LVT_TRAJECTORY_P, offsetof(struct BehaviorTrajectories, KoopaBobTrajectory), false, LOT_POINTER },
|
||||
{ "KoopaThiTrajectory", LVT_TRAJECTORY_P, offsetof(struct BehaviorTrajectories, KoopaThiTrajectory), false, LOT_POINTER },
|
||||
|
|
Loading…
Add table
Reference in a new issue