document waypoint and more

This commit is contained in:
coco875 2024-12-20 04:23:37 +01:00
parent 59c798fe02
commit 5e6eb4fbcc
15 changed files with 414 additions and 381 deletions

View File

@ -328,7 +328,7 @@ glabel func_8000929C
/* 00A340 80009740 304C1000 */ andi $t4, $v0, 0x1000
/* 00A344 80009744 1580001E */ bnez $t4, .L800097C0
/* 00A348 80009748 01402825 */ move $a1, $t2
/* 00A34C 8000974C 0C001974 */ jal func_800065D0
/* 00A34C 8000974C 0C001974 */ jal detect_player_wrong_direction
/* 00A350 80009750 AFA40050 */ sw $a0, 0x50($sp)
/* 00A354 80009754 3C0D800E */ lui $t5, %hi(gModeSelection)
/* 00A358 80009758 8DADC53C */ lw $t5, %lo(gModeSelection)($t5)

View File

@ -349,10 +349,10 @@ glabel func_80009B60
/* 00AC08 8000A008 8FB90038 */ lw $t9, 0x38($sp)
/* 00AC0C 8000A00C AFAE0024 */ sw $t6, 0x24($sp)
/* 00AC10 8000A010 00027880 */ sll $t7, $v0, 2
/* 00AC14 8000A014 3C0D8016 */ lui $t5, %hi(D_80164550) # 0x8016
/* 00AC14 8000A014 3C0D8016 */ lui $t5, %hi(gTrackWaypoints) # 0x8016
/* 00AC18 8000A018 95D80000 */ lhu $t8, ($t6)
/* 00AC1C 8000A01C 01AF6821 */ addu $t5, $t5, $t7
/* 00AC20 8000A020 8DAD4550 */ lw $t5, %lo(D_80164550)($t5) # 0x4550($t5)
/* 00AC20 8000A020 8DAD4550 */ lw $t5, %lo(gTrackWaypoints)($t5) # 0x4550($t5)
/* 00AC24 8000A024 032A3021 */ addu $a2, $t9, $t2
/* 00AC28 8000A028 0018C8C0 */ sll $t9, $t8, 3
/* 00AC2C 8000A02C 01B95021 */ addu $t2, $t5, $t9
@ -569,8 +569,8 @@ glabel func_80009B60
/* 00AF48 8000A348 0C00350E */ jal func_8000D438
/* 00AF4C 8000A34C 8FA400D0 */ lw $a0, 0xd0($sp)
/* 00AF50 8000A350 8FA60040 */ lw $a2, 0x40($sp)
/* 00AF54 8000A354 3C078016 */ lui $a3, %hi(D_80162FA0) # $a3, 0x8016
/* 00AF58 8000A358 24E72FA0 */ addiu $a3, %lo(D_80162FA0) # addiu $a3, $a3, 0x2fa0
/* 00AF54 8000A354 3C078016 */ lui $a3, %hi(gOffsetPosition) # $a3, 0x8016
/* 00AF58 8000A358 24E72FA0 */ addiu $a3, %lo(gOffsetPosition) # addiu $a3, $a3, 0x2fa0
/* 00AF5C 8000A35C 8CC200BC */ lw $v0, 0xbc($a2)
/* 00AF60 8000A360 C4E80000 */ lwc1 $f8, ($a3)
/* 00AF64 8000A364 C4EA0008 */ lwc1 $f10, 8($a3)
@ -593,7 +593,7 @@ glabel func_80009B60
/* 00AFA8 8000A3A8 3C0B8016 */ lui $t3, %hi(D_801630E0) # 0x8016
/* 00AFAC 8000A3AC 3C0C8016 */ lui $t4, %hi(D_80164430) # $t4, 0x8016
/* 00AFB0 8000A3B0 3C198016 */ lui $t9, %hi(D_80163448) # 0x8016
/* 00AFB4 8000A3B4 3C0F8016 */ lui $t7, %hi(D_80164590) # 0x8016
/* 00AFB4 8000A3B4 3C0F8016 */ lui $t7, %hi(gWaypointExpectedRotation) # 0x8016
/* 00AFB8 8000A3B8 46062200 */ add.s $f8, $f4, $f6
/* 00AFBC 8000A3BC 4608903C */ c.lt.s $f18, $f8
/* 00AFC0 8000A3C0 00000000 */ nop
@ -608,10 +608,10 @@ glabel func_80009B60
/* 00AFE4 8000A3E4 AFA8003C */ sw $t0, 0x3c($sp)
/* 00AFE8 8000A3E8 8FAB0034 */ lw $t3, 0x34($sp)
/* 00AFEC 8000A3EC 3C0E8016 */ lui $t6, %hi(D_80162FF8) # 0x8016
/* 00AFF0 8000A3F0 3C078016 */ lui $a3, %hi(D_80162FA0) # $a3, 0x8016
/* 00AFF0 8000A3F0 3C078016 */ lui $a3, %hi(gOffsetPosition) # $a3, 0x8016
/* 00AFF4 8000A3F4 01CB7021 */ addu $t6, $t6, $t3
/* 00AFF8 8000A3F8 85CE2FF8 */ lh $t6, %lo(D_80162FF8)($t6) # 0x2ff8($t6)
/* 00AFFC 8000A3FC 24E72FA0 */ addiu $a3, %lo(D_80162FA0) # addiu $a3, $a3, 0x2fa0
/* 00AFFC 8000A3FC 24E72FA0 */ addiu $a3, %lo(gOffsetPosition) # addiu $a3, $a3, 0x2fa0
/* 00B000 8000A400 8FA8003C */ lw $t0, 0x3c($sp)
/* 00B004 8000A404 19C0001F */ blez $t6, .L8000A484
/* 00B008 8000A408 3C048016 */ lui $a0, %hi(D_801630E0) # $a0, 0x8016
@ -644,8 +644,8 @@ glabel func_80009B60
/* 00B06C 8000A46C 84C6344A */ lh $a2, %lo(D_80163448 + 2)($a2)
/* 00B070 8000A470 0C002EF6 */ jal func_8000BBD8
/* 00B074 8000A474 AFA8003C */ sw $t0, 0x3c($sp)
/* 00B078 8000A478 3C078016 */ lui $a3, %hi(D_80162FA0) # $a3, 0x8016
/* 00B07C 8000A47C 24E72FA0 */ addiu $a3, %lo(D_80162FA0) # addiu $a3, $a3, 0x2fa0
/* 00B078 8000A478 3C078016 */ lui $a3, %hi(gOffsetPosition) # $a3, 0x8016
/* 00B07C 8000A47C 24E72FA0 */ addiu $a3, %lo(gOffsetPosition) # addiu $a3, $a3, 0x2fa0
/* 00B080 8000A480 8FA8003C */ lw $t0, 0x3c($sp)
.L8000A484:
/* 00B084 8000A484 8FA60040 */ lw $a2, 0x40($sp)
@ -667,7 +667,7 @@ glabel func_80009B60
/* 00B0BC 8000A4BC 01CC001A */ div $zero, $t6, $t4
/* 00B0C0 8000A4C0 00196880 */ sll $t5, $t9, 2
/* 00B0C4 8000A4C4 01ED7821 */ addu $t7, $t7, $t5
/* 00B0C8 8000A4C8 8DEF4590 */ lw $t7, %lo(D_80164590)($t7) # 0x4590($t7)
/* 00B0C8 8000A4C8 8DEF4590 */ lw $t7, %lo(gWaypointExpectedRotation)($t7) # 0x4590($t7)
/* 00B0CC 8000A4CC 0000C010 */ mfhi $t8
/* 00B0D0 8000A4D0 00185040 */ sll $t2, $t8, 1
/* 00B0D4 8000A4D4 15800002 */ bnez $t4, .L8000A4E0
@ -1092,8 +1092,8 @@ glabel func_80009B60
/* 00B6CC 8000AACC 24010003 */ li $at, 3
/* 00B6D0 8000AAD0 004A1021 */ addu $v0, $v0, $t2
/* 00B6D4 8000AAD4 84423410 */ lh $v0, %lo(D_80163410)($v0) # 0x3410($v0)
/* 00B6D8 8000AAD8 3C078016 */ lui $a3, %hi(D_80162FA0) # $a3, 0x8016
/* 00B6DC 8000AADC 24E72FA0 */ addiu $a3, %lo(D_80162FA0) # addiu $a3, $a3, 0x2fa0
/* 00B6D8 8000AAD8 3C078016 */ lui $a3, %hi(gOffsetPosition) # $a3, 0x8016
/* 00B6DC 8000AADC 24E72FA0 */ addiu $a3, %lo(gOffsetPosition) # addiu $a3, $a3, 0x2fa0
/* 00B6E0 8000AAE0 10410005 */ beq $v0, $at, .L8000AAF8
/* 00B6E4 8000AAE4 24010004 */ li $at, 4
/* 00B6E8 8000AAE8 1041000C */ beq $v0, $at, .L8000AB1C
@ -1117,16 +1117,16 @@ glabel func_80009B60
/* 00B728 8000AB28 030CC021 */ addu $t8, $t8, $t4
/* 00B72C 8000AB2C 971845C8 */ lhu $t8, %lo(gWaypointCountByPathIndex)($t8) # 0x45c8($t8)
/* 00B730 8000AB30 25EB000A */ addiu $t3, $t7, 0xa
/* 00B734 8000AB34 3C0A8016 */ lui $t2, %hi(D_80164550) # 0x8016
/* 00B734 8000AB34 3C0A8016 */ lui $t2, %hi(gTrackWaypoints) # 0x8016
/* 00B738 8000AB38 0178001A */ div $zero, $t3, $t8
/* 00B73C 8000AB3C 01495021 */ addu $t2, $t2, $t1
/* 00B740 8000AB40 8D4A4550 */ lw $t2, %lo(D_80164550)($t2) # 0x4550($t2)
/* 00B740 8000AB40 8D4A4550 */ lw $t2, %lo(gTrackWaypoints)($t2) # 0x4550($t2)
/* 00B744 8000AB44 0000C810 */ mfhi $t9
/* 00B748 8000AB48 001970C0 */ sll $t6, $t9, 3
/* 00B74C 8000AB4C 01CA1021 */ addu $v0, $t6, $t2
/* 00B750 8000AB50 844D0000 */ lh $t5, ($v0)
/* 00B754 8000AB54 3C078016 */ lui $a3, %hi(D_80162FA0) # $a3, 0x8016
/* 00B758 8000AB58 24E72FA0 */ addiu $a3, %lo(D_80162FA0) # addiu $a3, $a3, 0x2fa0
/* 00B754 8000AB54 3C078016 */ lui $a3, %hi(gOffsetPosition) # $a3, 0x8016
/* 00B758 8000AB58 24E72FA0 */ addiu $a3, %lo(gOffsetPosition) # addiu $a3, $a3, 0x2fa0
/* 00B75C 8000AB5C 448D9000 */ mtc1 $t5, $f18
/* 00B760 8000AB60 17000002 */ bnez $t8, .L8000AB6C
/* 00B764 8000AB64 00000000 */ nop
@ -1148,9 +1148,9 @@ glabel func_80009B60
/* 00B79C 8000AB9C E4F00008 */ swc1 $f16, 8($a3)
.L8000ABA0:
/* 00B7A0 8000ABA0 3C0C8016 */ lui $t4, %hi(D_80163178) # $t4, 0x8016
/* 00B7A4 8000ABA4 3C078016 */ lui $a3, %hi(D_80162FA0) # 0x8016
/* 00B7A4 8000ABA4 3C078016 */ lui $a3, %hi(gOffsetPosition) # 0x8016
/* 00B7A8 8000ABA8 258C3178 */ addiu $t4, %lo(D_80163178) # addiu $t4, $t4, 0x3178
/* 00B7AC 8000ABAC 24E52FA0 */ addiu $a1, $a3, %lo(D_80162FA0) # 0x2fa0
/* 00B7AC 8000ABAC 24E52FA0 */ addiu $a1, $a3, %lo(gOffsetPosition) # 0x2fa0
/* 00B7B0 8000ABB0 012C1021 */ addu $v0, $t1, $t4
/* 00B7B4 8000ABB4 C4460000 */ lwc1 $f6, ($v0)
/* 00B7B8 8000ABB8 C4A40000 */ lwc1 $f4, ($a1)

View File

@ -136,8 +136,8 @@ glabel func_80017054
/* 017E24 80017224 3044FFFF */ andi $a0, $v0, 0xffff
/* 017E28 80017228 0C002EF6 */ jal func_8000BBD8
/* 017E2C 8001722C AFA6003C */ sw $a2, 0x3c($sp)
/* 017E30 80017230 3C038016 */ lui $v1, %hi(D_80162FA0) # $v1, 0x8016
/* 017E34 80017234 24632FA0 */ addiu $v1, %lo(D_80162FA0) # addiu $v1, $v1, 0x2fa0
/* 017E30 80017230 3C038016 */ lui $v1, %hi(gOffsetPosition) # $v1, 0x8016
/* 017E34 80017234 24632FA0 */ addiu $v1, %lo(gOffsetPosition) # addiu $v1, $v1, 0x2fa0
/* 017E38 80017238 C4660000 */ lwc1 $f6, ($v1)
/* 017E3C 8001723C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000
/* 017E40 80017240 44810800 */ mtc1 $at, $f1
@ -156,8 +156,8 @@ glabel func_80017054
/* 017E74 80017274 E7A40084 */ swc1 $f4, 0x84($sp)
/* 017E78 80017278 0C002EF6 */ jal func_8000BBD8
/* 017E7C 8001727C 8F050000 */ lw $a1, ($t8)
/* 017E80 80017280 3C038016 */ lui $v1, %hi(D_80162FA0) # $v1, 0x8016
/* 017E84 80017284 24632FA0 */ addiu $v1, %lo(D_80162FA0) # addiu $v1, $v1, 0x2fa0
/* 017E80 80017280 3C038016 */ lui $v1, %hi(gOffsetPosition) # $v1, 0x8016
/* 017E84 80017284 24632FA0 */ addiu $v1, %lo(gOffsetPosition) # addiu $v1, $v1, 0x2fa0
/* 017E88 80017288 C46A0000 */ lwc1 $f10, ($v1)
/* 017E8C 8001728C C7A6008C */ lwc1 $f6, 0x8c($sp)
/* 017E90 80017290 3C013FE0 */ li $at, 0x3FE00000 # 1.750000
@ -201,9 +201,9 @@ glabel func_80017054
/* 017F20 80017320 8FAC005C */ lw $t4, 0x5c($sp)
/* 017F24 80017324 000D7403 */ sra $t6, $t5, 0x10
/* 017F28 80017328 01C01025 */ move $v0, $t6
/* 017F2C 8001732C 3C0E8016 */ lui $t6, %hi(D_80164550) # $t6, 0x8016
/* 017F2C 8001732C 3C0E8016 */ lui $t6, %hi(gTrackWaypoints) # $t6, 0x8016
/* 017F30 80017330 00004810 */ mfhi $t1
/* 017F34 80017334 25CE4550 */ addiu $t6, %lo(D_80164550) # addiu $t6, $t6, 0x4550
/* 017F34 80017334 25CE4550 */ addiu $t6, %lo(gTrackWaypoints) # addiu $t6, $t6, 0x4550
/* 017F38 80017338 000C6880 */ sll $t5, $t4, 2
/* 017F3C 8001733C 0009C400 */ sll $t8, $t1, 0x10
/* 017F40 80017340 01AE5021 */ addu $t2, $t5, $t6
@ -272,8 +272,8 @@ glabel func_80017054
/* 018024 80017424 A7AF006C */ sh $t7, 0x6c($sp)
/* 018028 80017428 0C002EF6 */ jal func_8000BBD8
/* 01802C 8001742C A7A2006E */ sh $v0, 0x6e($sp)
/* 018030 80017430 3C038016 */ lui $v1, %hi(D_80162FA0) # $v1, 0x8016
/* 018034 80017434 24632FA0 */ addiu $v1, %lo(D_80162FA0) # addiu $v1, $v1, 0x2fa0
/* 018030 80017430 3C038016 */ lui $v1, %hi(gOffsetPosition) # $v1, 0x8016
/* 018034 80017434 24632FA0 */ addiu $v1, %lo(gOffsetPosition) # addiu $v1, $v1, 0x2fa0
/* 018038 80017438 C4660000 */ lwc1 $f6, ($v1)
/* 01803C 8001743C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000
/* 018040 80017440 44810800 */ mtc1 $at, $f1
@ -292,8 +292,8 @@ glabel func_80017054
/* 018074 80017474 E7AE0098 */ swc1 $f14, 0x98($sp)
/* 018078 80017478 0C002EF6 */ jal func_8000BBD8
/* 01807C 8001747C E7B00090 */ swc1 $f16, 0x90($sp)
/* 018080 80017480 3C038016 */ lui $v1, %hi(D_80162FA0) # $v1, 0x8016
/* 018084 80017484 24632FA0 */ addiu $v1, %lo(D_80162FA0) # addiu $v1, $v1, 0x2fa0
/* 018080 80017480 3C038016 */ lui $v1, %hi(gOffsetPosition) # $v1, 0x8016
/* 018084 80017484 24632FA0 */ addiu $v1, %lo(gOffsetPosition) # addiu $v1, $v1, 0x2fa0
/* 018088 80017488 C4640000 */ lwc1 $f4, ($v1)
/* 01808C 8001748C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000
/* 018090 80017490 44810800 */ mtc1 $at, $f1

View File

@ -398,11 +398,11 @@ glabel L8001B0EC
/* 01BD9C 8001B19C 01EB7821 */ addu $t7, $t7, $t3
/* 01BDA0 8001B1A0 95EF45C8 */ lhu $t7, %lo(gWaypointCountByPathIndex)($t7) # 0x45c8($t7)
/* 01BDA4 8001B1A4 952D0000 */ lhu $t5, ($t1)
/* 01BDA8 8001B1A8 3C0B8016 */ lui $t3, %hi(D_80164550) # 0x8016
/* 01BDA8 8001B1A8 3C0B8016 */ lui $t3, %hi(gTrackWaypoints) # 0x8016
/* 01BDAC 8001B1AC 018F001A */ div $zero, $t4, $t7
/* 01BDB0 8001B1B0 000DC880 */ sll $t9, $t5, 2
/* 01BDB4 8001B1B4 01795821 */ addu $t3, $t3, $t9
/* 01BDB8 8001B1B8 8D6B4550 */ lw $t3, %lo(D_80164550)($t3) # 0x4550($t3)
/* 01BDB8 8001B1B8 8D6B4550 */ lw $t3, %lo(gTrackWaypoints)($t3) # 0x4550($t3)
/* 01BDBC 8001B1BC 00007010 */ mfhi $t6
/* 01BDC0 8001B1C0 000EC0C0 */ sll $t8, $t6, 3
/* 01BDC4 8001B1C4 030B1021 */ addu $v0, $t8, $t3

View File

@ -18,9 +18,9 @@ typedef struct {
} TrackSections;
struct _struct_gCoursePathSizes_0x10 {
/* 0x00 */ u16 unk0;
/* 0x02 */ u16 unk2;
/* 0x04 */ u16 unk4;
/* 0x00 */ u16 numWaypoint;
/* 0x02 */ u16 numInnerWaypoint;
/* 0x04 */ u16 numOuterWaypoint;
/* 0x06 */ u16 unk6;
/* 0x08 */ u16 unk8;
/* 0x0A */ char padA[6];

View File

@ -325,6 +325,7 @@ enum DIRECTION { NORTH, EAST, SOUTH, WEST };
#define STAR_EFFECT 0x200 // being a star
#define BOOST_EFFECT 0x2000 // being boosted by trigger a mushroom
#define BOOST_RAMP_ASPHALT_EFFECT 0x100000 // being boosted by a boost pad
#define REVERSE_EFFECT 0x400000 // being in reverse of the course
#define HIT_BY_ITEM_EFFECT 0x2000000 // being hit by an item
#define HIT_EFFECT 0x4000000 // hitting an object
#define LIGHTNING_EFFECT 0x40000000 // being hit by lightning

View File

@ -12,46 +12,46 @@ typedef struct {
/**
* These are per-path arrays that contain some information relating to waypoints
* The arrays in D_80164550 contain X/Y/Z and track segment information
* The arrays in D_80164560 and D_80164570 track some other X/Y/Z, but the track segment is always 0 (so,
* The arrays in gTrackWaypoints contain X/Y/Z and track segment information
* The arrays in gTrackInnerPath and gTrackOuterPath track some other X/Y/Z, but the track segment is always 0 (so,
*untracked/unused) Its unclear how these arrays relate to each other
**/
extern TrackWaypoint* D_80164550[];
extern TrackWaypoint* D_80164560[];
extern TrackWaypoint* D_80164570[];
extern TrackWaypoint* gTrackWaypoints[];
extern TrackWaypoint* gTrackInnerPath[];
extern TrackWaypoint* gTrackOuterPath[];
/**
* Don't know what exactly these are, but like D_80164550, D_80164560, and D_80164570
* Don't know what exactly these are, but like gTrackWaypoints, gTrackInnerPath, and gTrackOuterPath
* they track something about the waypoints on a per-path basis
**/
// Waypoint types?
extern s16* D_80164580[];
// Based on func_80010DBC this may be angles between waypoints
// D_80164590[i] = atan2(waypoint_i, waypoint_i+1)?
extern s16* D_80164590[];
// gWaypointExpectedRotation[i] = atan2(waypoint_i, waypoint_i+1)?
extern s16* gWaypointExpectedRotation[];
// No idea. Adjacency list?
extern s16* D_801645A0[];
/**
* Certain parts of the waypoint logic will copy some path/player specific data to a temporary variable.
* For example: D_80164490 is always a value from D_80164550. Depending on which path
* For example: D_80164490 is always a value from gTrackWaypoints. Depending on which path
* a given player is on, the specific value may change
**/
// Shadows values from gNearestWaypointByPlayerId
extern s16 sSomeNearestWaypoint;
// Shadows values from gPathIndexByPlayerId
extern s32 D_80163448;
// Shadows values from D_80164560
// Shadows values from gTrackInnerPath
extern TrackWaypoint* D_801631D0;
// Shadows values from D_80164570
// Shadows values from gTrackOuterPath
extern TrackWaypoint* D_801631D4;
// Shadows values from D_80164580
extern s16* D_801631D8;
// Shadows values from D_80164590
// Shadows values from gWaypointExpectedRotation
extern s16* D_801631DC;
// Shadowd values from gWaypointCountByPathIndex
extern u16 D_80164430;
// Shadows values from D_80164550
// Shadows values from gTrackWaypoints
extern TrackWaypoint* D_80164490;
// Shadows values from D_801645A0
extern s16* D_801645E0;

View File

@ -223,7 +223,7 @@ void func_8001CA78(UNUSED Player* player, Camera* camera, Vec3f arg2, f32* arg3,
UNUSED s32 pad;
TrackWaypoint* temp_s2;
temp_s2 = &D_80164550[0][gWaypointCountByPathIndex[0] - 10];
temp_s2 = &gTrackWaypoints[0][gWaypointCountByPathIndex[0] - 10];
sp68[0] = camera->unk_30[0];
sp68[1] = camera->unk_30[1];
sp68[2] = camera->unk_30[2];

File diff suppressed because it is too large Load Diff

View File

@ -61,14 +61,14 @@ typedef struct {
/* Function Prototypes */
s16 get_angle_between_waypoints(Vec3f, Vec3f);
s32 func_80006018(f32, f32, f32, f32, f32, f32, f32, f32);
s32 is_collide_with_vehicle(f32, f32, f32, f32, f32, f32, f32, f32);
void adjust_position_by_angle(Vec3f, Vec3f, s16);
s32 set_vehicle_render_distance_flags(Vec3f, f32, s32);
void func_800065D0(s32, Player*);
void detect_player_wrong_direction(s32, Player*);
void set_places(void);
void func_800070F4(void);
void func_800074D4(void);
void update_places(void);
void set_places_end_course_with_time(void);
s32 func_80007BF8(u16, u16, u16, u16, u16);
void func_80007D04(s32, Player*);
void func_80007FA4(s32, Player*, f32);
@ -93,7 +93,7 @@ s32 func_8000B7E4(s32, u16);
s32 func_8000B820(s32);
f32 func_8000B874(f32, f32, u16, s32);
void func_8000B95C(s32, u16, s32);
void func_8000BA14(u16, f32, f32, s16);
void calculate_track_offset_position(u16, f32, f32, s16);
void func_8000BBD8(u16, f32, s16);
s16 func_8000BD94(f32, f32, f32, s32);
@ -127,12 +127,12 @@ void generate_player_smoke(void);
void func_8000F0E0(void);
void func_8000F124(void);
void func_8000F2BC(TrackWaypoint*, size_t);
void func_8000F2DC(void);
void clear_waypoint(TrackWaypoint*, size_t);
void init_course_waypoint(void);
void func_8000F628(void);
void func_800100F0(s32);
void func_80010218(s32);
void load_track_waypoint(s32);
void calculate_track_boundaries(s32);
f32 func_80010480(s32, u16);
void func_800107C4(s32);
s16 func_80010CB0(s32, s32);
@ -261,7 +261,7 @@ extern s16 D_80162EB2; // possibly [3]
extern KartAIBehaviour* gCoursesKartAIBehaviour[];
extern s16 D_80162F10[];
extern s16 D_80162F50[];
extern Vec3f D_80162FA0;
extern Vec3f gOffsetPosition;
extern Vec3f D_80162FB0;
extern Vec3f D_80162FC0;
extern s16 gTrainSmokeTimer;
@ -294,8 +294,8 @@ extern f32 D_8016320C;
extern f32 D_80163210[];
extern s32 D_80163238;
extern u16 D_80163240[];
extern u16 D_80163258[];
extern u16 D_80163270[];
extern u16 gWrongDirectionCounter[];
extern u16 gIsPlayerWrongDirection[];
extern s32 D_80163288[];
// Exact pointer type unknown
extern KartAIBehaviour* sCurrentKartAIBehaviour;
@ -408,6 +408,12 @@ extern s32 D_8016448C;
extern u16 D_801637BE;
extern u16 D_80163E2A;
#define SEVERE_WRONG_DIRECTION_MIN 136
#define SEVERE_WRONG_DIRECTION_MAX 225
#define SEVERE_CORRECT_DIRECTION_MIN 45
#define SEVERE_CORRECT_DIRECTION_MAX 316
#define WRONG_DIRECTION_FRAMES_LIMIT 5
// extern Gfx D_0D0076F8[];
#endif

View File

@ -61,6 +61,7 @@ UNUSED void func_8003DE4C(Player* player, Vec3f arg1) {
arg1[1] = 0.0f;
mtxf_translate_vec3f_mat3(arg1, player->orientationMatrix);
}
// Stick to ground?
void func_8003E048(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
*arg5 += arg1[0] * player->collision.surfaceDistance[2] * 1;

View File

@ -1701,11 +1701,11 @@ void func_80090178(Player* player, s8 playerId, Vec3f arg2, Vec3f arg3) {
switch (gCurrentCourseId) {
case COURSE_YOSHI_VALLEY:
test = player->nearestWaypointId;
temp_v1 = &D_80164550[gCopyPathIndexByPlayerId[playerId]][test];
temp_v1 = &gTrackWaypoints[gCopyPathIndexByPlayerId[playerId]][test];
arg2[0] = temp_v1->posX;
arg2[1] = temp_v1->posY;
arg2[2] = temp_v1->posZ;
temp_v1 = &D_80164550[gCopyPathIndexByPlayerId[playerId]]
temp_v1 = &gTrackWaypoints[gCopyPathIndexByPlayerId[playerId]]
[(player->nearestWaypointId + 5) %
(gWaypointCountByPathIndex[gCopyPathIndexByPlayerId[playerId]] + 1)];
arg3[0] = temp_v1->posX;
@ -1746,11 +1746,11 @@ void func_80090178(Player* player, s8 playerId, Vec3f arg2, Vec3f arg3) {
break;
default:
test = player->nearestWaypointId;
temp_v1 = &D_80164550[0][test];
temp_v1 = &gTrackWaypoints[0][test];
arg2[0] = temp_v1->posX;
arg2[1] = temp_v1->posY;
arg2[2] = temp_v1->posZ;
temp_v1 = &D_80164550[0][(player->nearestWaypointId + 5) % (gWaypointCountByPathIndex[0] + 1)];
temp_v1 = &gTrackWaypoints[0][(player->nearestWaypointId + 5) % (gWaypointCountByPathIndex[0] + 1)];
arg3[0] = temp_v1->posX;
arg3[1] = temp_v1->posY;
arg3[2] = temp_v1->posZ;
@ -1921,7 +1921,7 @@ void func_80090970(Player* player, s8 playerId, s8 arg2) {
player->pos[0] = player->pos[0] + sins(-player->rotation[1]) * -10.0f;
}
if (player->unk_0C8 == 0x00FC) {
waypoint = D_80164550[0];
waypoint = gTrackWaypoints[0];
player->pos[0] = waypoint->posX;
player->pos[1] = waypoint->posY;
player->pos[2] = waypoint->posZ;

View File

@ -79,6 +79,8 @@ void rsp_set_matrix_transformation_inverted_x_y_orientation(Vec3f, Vec3su, f32);
void rsp_set_matrix_transl_rot_scale(Vec3f, Vec3f, f32);
void rsp_set_matrix_gObjectList(s32);
#define DEGREES_CONVERSION_FACTOR 182
/* This is where I'd put my static data, if I had any */
extern s8 D_801658FE;

View File

@ -139,7 +139,7 @@ void func_8028E298(void) {
gTimePlayerLastTouchedFinishLine[i] = gCourseTimer + temp_v0;
}
D_8016348C = 1;
func_800070F4();
update_places();
}
void func_8028E3A0(void) {
@ -625,7 +625,7 @@ void func_8028EF28(void) {
}
if ((D_802BA048 != 0) && (D_802BA048 != 100)) {
D_802BA048 = 100;
func_800074D4();
set_places_end_course_with_time();
}
}

View File

@ -871,10 +871,10 @@ void func_8003C0F0(void) {
case COURSE_RAINBOW_ROAD:
case COURSE_WARIO_STADIUM:
case COURSE_DK_JUNGLE:
func_8000F2DC();
sp5E = (f32) D_80164550[0][0].posX;
sp5C = (f32) D_80164550[0][0].posZ;
sp5A = (f32) D_80164550[0][0].posY;
init_course_waypoint();
sp5E = (f32) gTrackWaypoints[0][0].posX;
sp5C = (f32) gTrackWaypoints[0][0].posZ;
sp5A = (f32) gTrackWaypoints[0][0].posY;
if (gCurrentCourseId == COURSE_TOADS_TURNPIKE) {
sp5E = 0;
}