Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Vehicles #641

Merged
merged 23 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions courses/dks_jungle_parkway/course_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ extern Gfx d_course_dks_jungle_parkway_dl_7008[];
extern Gfx d_course_dks_jungle_parkway_dl_7080[];
extern Gfx d_course_dks_jungle_parkway_dl_7108[];
extern TrackWaypoint d_course_dks_jungle_parkway_unknown_waypoints[];
extern TrackWaypoint d_course_dks_jungle_parkway_unknown_waypoints2[];
extern TrackWaypoint d_course_dks_jungle_parkway_track_waypoints[];
extern Vtx d_course_dks_jungle_parkway_paddle_boat_model1[];
extern Vtx d_course_dks_jungle_parkway_paddle_boat_model2[];
Expand Down
8 changes: 4 additions & 4 deletions include/common_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ typedef struct {
/* 0x06 */ u16 unk36;
/* 0x08 */ u16 unk38;
// This may be an index to the tilemap?
/* 0x0A */ u16 unk3A;
/* 0x0A */ u16 collisionMeshIndex;
/* 0x0C */ Vec3f unk3C;
/* 0x18 */ Vec3f unk48;
/* 0x24 */ Vec3f unk54;
Expand Down Expand Up @@ -279,9 +279,9 @@ typedef struct {
/* 0x0010 */ s16 currentItemCopy; // Has no effect on what item the players has, It is just a synced copy
/* 0x0012 */ s16 unk_012;
/* 0x0014 */ Vec3f pos;
/* 0x0020 */ f32 copy_rotation_x;
/* 0x0024 */ f32 copy_rotation_y;
/* 0x0028 */ f32 copy_rotation_z;
/* 0x0020 */ f32 copy_x; // or old position?
/* 0x0024 */ f32 copy_y;
/* 0x0028 */ f32 copy_z;
coco875 marked this conversation as resolved.
Show resolved Hide resolved
/* 0x002C */ Vec3s rotation;
/* 0x0032 */ char unk_032[0x2];
/* 0x0034 */ Vec3f velocity;
Expand Down
6 changes: 3 additions & 3 deletions include/vehicles.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ typedef struct {
/* 0x000 */ TrainCarStuff locomotive;
/* 0x024 */ TrainCarStuff tender;
/* 0x048 */ TrainCarStuff passengerCars[NUM_PASSENGER_CAR_ENTRIES];
/* 0x0FC */ f32 someMultiplier;
/* 0x0FC */ f32 speed;
/* 0x100 */ s32 someFlags;
/* 0x104 */ s32 numCars; // Non-locomotive car count?
/* 0x108 */ s32 unused; // Not read or written. Could be padding?
Expand All @@ -51,7 +51,7 @@ typedef struct {
/* 0x10 */ Vec3f velocity; //
/* 0x1C */ u16 waypointIndex; //
/* 0x1E */ s16 actorIndex; //
/* 0x20 */ f32 someMultiplier; //
/* 0x20 */ f32 speed; //
/* 0x24 */ s16 rotY; // Only Y rotation is tracked in this struct
/* 0x26 */ // s16 compilerPadding2;
/**
Expand All @@ -68,7 +68,7 @@ typedef struct {
/* 0x10 */ Vec3f velocity;
/* 0x1C */ u16 waypointIndex;
/* 0x1E */ s16 actorIndex;
/* 0x20 */ f32 someMultiplier; //
/* 0x20 */ f32 speed; //
/* 0x24 */ f32 someMultiplierTheSequel; //
/* 0x28 */ Vec3s rotation;
/* 0x2E */ s16 someType; //
Expand Down
2 changes: 1 addition & 1 deletion src/actors/blue_and_red_shells/update.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ void update_actor_red_blue_shell(struct ShellActor *shell) {
shell->pos[0] = player->pos[0] + somePosVel[0];
pad7 = player->pos[1] - somePosVel[1];
shell->pos[2] = player->pos[2] + somePosVel[2];
temp_f0 = func_802ABE30(shell->pos[0], pad7, shell->pos[2], player->unk_110.unk3A);
temp_f0 = func_802ABE30(shell->pos[0], pad7, shell->pos[2], player->unk_110.collisionMeshIndex);
temp_f2 = pad7 - temp_f0;

if ((temp_f2 < 5.0f) && (temp_f2 > -5.0f)) {
Expand Down
2 changes: 1 addition & 1 deletion src/actors/falling_rock/render.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void render_actor_falling_rock(Camera *camera, struct FallingRock *rock) {
if (rock->unk30.unk34 == 1) {
sp8C[0] = rock->pos[0];
sp8C[2] = rock->pos[2];
temp_f0 = func_802ABE30(sp8C[0], rock->pos[1], sp8C[2], rock->unk30.unk3A);
temp_f0 = func_802ABE30(sp8C[0], rock->pos[1], sp8C[2], rock->unk30.collisionMeshIndex);
sp98[0] = 0;
sp98[1] = 0;
sp98[2] = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/actors/green_shell/update.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void update_actor_green_shell(struct ShellActor *shell) {
shell->pos[0] = player->pos[0] + somePosVel[0];
pad2 = player->pos[1] - somePosVel[1];
shell->pos[2] = player->pos[2] + somePosVel[2];
pad0 = func_802ABE30(shell->pos[0], pad2, shell->pos[2], player->unk_110.unk3A);
pad0 = func_802ABE30(shell->pos[0], pad2, shell->pos[2], player->unk_110.collisionMeshIndex);
pad1 = pad2 - pad0;
if ((pad1 < 5.0f) && (pad1 > -5.0f)) {
shell->pos[1] = shell->boundingBoxSize + pad0;
Expand Down
2 changes: 1 addition & 1 deletion src/actors/kiwano_fruit/update.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void update_actor_kiwano_fruit(struct KiwanoFruit *fruit) {
}
switch (fruit->state) { /* irregular */
case 0:
if ((get_surface_type(player->unk_110.unk3A) & 0xFF) != GRASS) {
if ((get_surface_type(player->unk_110.collisionMeshIndex) & 0xFF) != GRASS) {
return;
}
fruit->state = 1;
Expand Down
Loading