mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-08-20 06:26:24 -04:00
document player and cpu (#534)
* document player and cpu * cpu_descisions_branch_item to cpu_decisions_branch_item
This commit is contained in:
+31
-31
@@ -303,7 +303,7 @@ void func_8008C73C(Player *player, s8 arg1) {
|
||||
}
|
||||
|
||||
player->unk_0B6 |= 0x80;
|
||||
player->unk_0C0 = 0; player->unk_07C = 0; player->unk_078 = 0; player->unk_0AE = player->unk_02C[1]; player->unk_0B2 = 2;
|
||||
player->unk_0C0 = 0; player->unk_07C = 0; player->unk_078 = 0; player->unk_0AE = player->rotation[1]; player->unk_0B2 = 2;
|
||||
D_80165190[0][arg1] = 1;
|
||||
D_80165190[1][arg1] = 1;
|
||||
D_80165190[2][arg1] = 1;
|
||||
@@ -327,7 +327,7 @@ void func_8008C8C4(Player* player, s8 playerId) {
|
||||
player->effects &= ~0x80;
|
||||
player->effects &= ~0x40;
|
||||
player->unk_0A8 = 0;
|
||||
player->unk_02C[1] = player->unk_0AE;
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
player->unk_07C = 0;
|
||||
player->unk_0C0 = 0;
|
||||
player->effects &= ~0x800;
|
||||
@@ -367,7 +367,7 @@ void func_8008C9EC(Player *player, s8 arg1) {
|
||||
}
|
||||
}
|
||||
if ((player->effects & 0x80) == 0x80) {
|
||||
player->unk_02C[1] -= sp30[player->unk_0B2];
|
||||
player->rotation[1] -= sp30[player->unk_0B2];
|
||||
D_8018D920[arg1] -= sp30[player->unk_0B2];
|
||||
stackPadding1 = (u16)D_8018D920[arg1] / (0x10000 / (0x168 / (sp30[player->unk_0B2] / 182)));
|
||||
if (stackPadding1 == 0) {
|
||||
@@ -380,7 +380,7 @@ void func_8008C9EC(Player *player, s8 arg1) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
player->unk_02C[1] += sp30[player->unk_0B2];
|
||||
player->rotation[1] += sp30[player->unk_0B2];
|
||||
D_8018D920[arg1] -= sp30[player->unk_0B2];
|
||||
stackPadding2 = (u16)D_8018D920[arg1] / (0x10000 / (0x168 / (sp30[player->unk_0B2] / 182)));
|
||||
if (stackPadding2 == 0) {
|
||||
@@ -588,7 +588,7 @@ void func_8008D554(Player* player) {
|
||||
void func_8008D570(Player *player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
|
||||
player->unk_0AE = player->unk_02C[1];
|
||||
player->unk_0AE = player->rotation[1];
|
||||
player->effects |= 0x80000;
|
||||
player->effects &= ~0x10;
|
||||
player->statusEffects &= ~0x1000;
|
||||
@@ -614,10 +614,10 @@ void func_8008D698(Player* player, s8 arg1) {
|
||||
s16 temp;
|
||||
|
||||
if (player->unk_0B2 == 0) {
|
||||
player->unk_02C[1] = player->unk_0AE;
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
temp = 0;
|
||||
} else {
|
||||
player->unk_02C[1] -= 1820;
|
||||
player->rotation[1] -= 1820;
|
||||
D_8018D920[arg1] -= 1820;
|
||||
temp = ((u16) D_8018D920[arg1] / 1820);
|
||||
}
|
||||
@@ -636,7 +636,7 @@ void func_8008D760(Player* player) {
|
||||
player->unk_0A8 = 0;
|
||||
player->unk_07C = 0;
|
||||
player->unk_0C0 = 0;
|
||||
player->unk_02C[1] = player->unk_0AE;
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
player->effects &= 0xFFF7FFFF;
|
||||
player->kartGravity = gKartGravityTable[player->characterId];
|
||||
player->type &= 0xFF7F;
|
||||
@@ -645,7 +645,7 @@ void func_8008D760(Player* player) {
|
||||
void func_8008D7B0(Player* player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
|
||||
player->unk_0AE = player->unk_02C[1];
|
||||
player->unk_0AE = player->rotation[1];
|
||||
player->effects |= 0x800000;
|
||||
player->effects &= ~0x10;
|
||||
player->statusEffects &= 0xFFFDFFFF;
|
||||
@@ -667,10 +667,10 @@ void func_8008D8B4(Player* player, s8 arg1) {
|
||||
s16 temp;
|
||||
|
||||
if (player->unk_0B2 == 0) {
|
||||
player->unk_02C[1] = player->unk_0AE;
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
temp = 0;
|
||||
} else {
|
||||
player->unk_02C[1] -= 1820;
|
||||
player->rotation[1] -= 1820;
|
||||
D_8018D920[arg1] -= 1820;
|
||||
temp = ((u16) (D_8018D920[arg1]) / 1820);
|
||||
}
|
||||
@@ -689,7 +689,7 @@ void func_8008D97C(Player *player) {
|
||||
player->unk_0A8 = 0;
|
||||
player->unk_07C = 0;
|
||||
player->unk_0C0 = 0;
|
||||
player->unk_02C[1] = player->unk_0AE;
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
player->effects &= 0xFF7FFFFF;
|
||||
player->kartGravity = gKartGravityTable[player->characterId];
|
||||
}
|
||||
@@ -864,7 +864,7 @@ void func_8008DF98(Player* player, s8 arg1) {
|
||||
player->unk_0B0 = 0;
|
||||
player->size = 1.0f;
|
||||
D_8018D930[arg1] = gCourseTimer;
|
||||
player->unk_0AE = player->unk_02C[1];
|
||||
player->unk_0AE = player->rotation[1];
|
||||
player->unk_0B2 = 2;
|
||||
player->unk_0C0 = 0;
|
||||
player->unk_07C = 0;
|
||||
@@ -894,7 +894,7 @@ void func_8008E118(Player *player, s8 arg1) {
|
||||
player->unk_0A8 = 0;
|
||||
player->unk_07C = 0;
|
||||
player->unk_0C0 = 0;
|
||||
player->unk_02C[1] = player->unk_0AE;
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
func_8008E3C0(player, arg1);
|
||||
D_80165190[0][arg1] = 1;
|
||||
D_80165190[1][arg1] = 1;
|
||||
@@ -902,7 +902,7 @@ void func_8008E118(Player *player, s8 arg1) {
|
||||
D_80165190[3][arg1] = 1;
|
||||
func_8008DABC(player, arg1);
|
||||
} else if ((player->effects & 0x20000) == 0x20000) {
|
||||
player->unk_02C[1] -= 0x5B0;
|
||||
player->rotation[1] -= 0x5B0;
|
||||
D_8018D920[arg1] -= 0x5B0;
|
||||
test = (u16)D_8018D920[arg1] / 1456;
|
||||
if (test == 0) {
|
||||
@@ -912,7 +912,7 @@ void func_8008E118(Player *player, s8 arg1) {
|
||||
player->effects &= ~0x20000;
|
||||
player->unk_07C = 0;
|
||||
player->unk_0C0 = 0;
|
||||
player->unk_02C[1] = player->unk_0AE;
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
D_80165190[0][arg1] = 1;
|
||||
D_80165190[1][arg1] = 1;
|
||||
D_80165190[2][arg1] = 1;
|
||||
@@ -950,7 +950,7 @@ void func_8008E3C0(Player* player, UNUSED s8 arg1) {
|
||||
player->effects |= 0x08000000;
|
||||
|
||||
if ((player->effects & 0x20000) == 0x20000) {
|
||||
player->unk_02C[1] = player->unk_0AE;
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
}
|
||||
|
||||
player->effects &= ~0x20000;
|
||||
@@ -1263,7 +1263,7 @@ void func_8008F0E8(Player* player) {
|
||||
void func_8008F104(Player* player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
|
||||
player->unk_0AE = player->unk_02C[1];
|
||||
player->unk_0AE = player->rotation[1];
|
||||
player->unk_0B2 = 2;
|
||||
player->unk_0C0 = 0;
|
||||
player->unk_07C = 0;
|
||||
@@ -1282,7 +1282,7 @@ void func_8008F1B8(Player* player, s8 arg1) {
|
||||
player->unk_08C = (player->unk_210 * 0.05);
|
||||
if (player->unk_0B2 < 0) {
|
||||
if ((player->unk_044 & 0x80) == 0x80) {
|
||||
player->unk_02C[1] += 182;
|
||||
player->rotation[1] += 182;
|
||||
D_8018D920[arg1] += 182;
|
||||
|
||||
temp = ((u16) D_8018D920[arg1] / 182);
|
||||
@@ -1293,7 +1293,7 @@ void func_8008F1B8(Player* player, s8 arg1) {
|
||||
}
|
||||
} else {
|
||||
|
||||
player->unk_02C[1] -= 182;
|
||||
player->rotation[1] -= 182;
|
||||
D_8018D920[arg1] -= 182;
|
||||
temp = ((u16) D_8018D920[arg1] / 182);
|
||||
if (temp == 180) {
|
||||
@@ -1304,7 +1304,7 @@ void func_8008F1B8(Player* player, s8 arg1) {
|
||||
}
|
||||
} else {
|
||||
if ((player->unk_0B2 & 1) != 0) {
|
||||
player->unk_02C[1] -= 364;
|
||||
player->rotation[1] -= 364;
|
||||
D_8018D920[arg1] -= 364;
|
||||
temp = ((u16) D_8018D920[arg1] / 364);
|
||||
if (temp < 71) {
|
||||
@@ -1314,7 +1314,7 @@ void func_8008F1B8(Player* player, s8 arg1) {
|
||||
player->unk_044 &= ~0x40;
|
||||
return;
|
||||
}
|
||||
player->unk_02C[1] += 364;
|
||||
player->rotation[1] += 364;
|
||||
D_8018D920[arg1] += 364;
|
||||
temp = ((u16) D_8018D920[arg1] / 364);
|
||||
if (temp >= 110) {
|
||||
@@ -1800,7 +1800,7 @@ void func_80090778(Player* player) {
|
||||
player->unk_0A8 = 0;
|
||||
player->unk_07C = 0;
|
||||
player->unk_0C0 = 0;
|
||||
player->unk_02C[1] = player->unk_0AE;
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
}
|
||||
func_8008E3C0(player, playerIndex);
|
||||
}
|
||||
@@ -1896,7 +1896,7 @@ void func_80090970(Player *player, s8 arg1, s8 arg2) {
|
||||
player->unk_0CA &= ~0x0001;
|
||||
}
|
||||
} else {
|
||||
move_f32_towards(&player->pos[1], player->rotY + 40.0f, 0.02f);
|
||||
move_f32_towards(&player->pos[1], player->copy_rotation_y + 40.0f, 0.02f);
|
||||
player->unk_0C6 -= 8;
|
||||
if (player->unk_0C6 < 9) {
|
||||
player->unk_0C6 = 0;
|
||||
@@ -1908,7 +1908,7 @@ void func_80090970(Player *player, s8 arg1, s8 arg2) {
|
||||
case 2:
|
||||
func_80090178(player, arg1, sp44, sp38);
|
||||
// Fakematch found by Verti, who knows what's going on here
|
||||
player->unk_02C[1] = (u16) -get_angle_between_points(sp44, sp38) & 0xFFFF;
|
||||
player->rotation[1] = (u16) -get_angle_between_points(sp44, sp38) & 0xFFFF;
|
||||
player->pos[0] = sp44[0];
|
||||
player->pos[1] = sp44[1] + 40.0f;
|
||||
player->pos[2] = sp44[2];
|
||||
@@ -1923,8 +1923,8 @@ void func_80090970(Player *player, s8 arg1, s8 arg2) {
|
||||
player->pos[0] = sp44[0];
|
||||
player->pos[1] = sp44[1] + 40.0f;
|
||||
player->pos[2] = sp44[2];
|
||||
player->pos[2] = player->pos[2] + coss((arg1 * 0x1C70) - player->unk_02C[1]) * -5.0f;
|
||||
player->pos[0] = player->pos[0] + sins((arg1 * 0x1C70) - player->unk_02C[1]) * -5.0f;
|
||||
player->pos[2] = player->pos[2] + coss((arg1 * 0x1C70) - player->rotation[1]) * -5.0f;
|
||||
player->pos[0] = player->pos[0] + sins((arg1 * 0x1C70) - player->rotation[1]) * -5.0f;
|
||||
player->unk_0C6 += 8;
|
||||
if (player->unk_0C6 >= 0xF0) {
|
||||
player->unk_0C6 = 0x00FF;
|
||||
@@ -1935,8 +1935,8 @@ void func_80090970(Player *player, s8 arg1, s8 arg2) {
|
||||
break;
|
||||
case 4:
|
||||
if ((player->unk_0C8 == 0x0096) || (player->unk_0C8 == 0x00C8) || (player->unk_0C8 == 0x00FA)) {
|
||||
player->pos[2] = player->pos[2] + coss(-player->unk_02C[1]) * -10.0f;
|
||||
player->pos[0] = player->pos[0] + sins(-player->unk_02C[1]) * -10.0f;
|
||||
player->pos[2] = player->pos[2] + coss(-player->rotation[1]) * -10.0f;
|
||||
player->pos[0] = player->pos[0] + sins(-player->rotation[1]) * -10.0f;
|
||||
}
|
||||
if (player->unk_0C8 == 0x00FC) {
|
||||
waypoint = D_80164550[0];
|
||||
@@ -2019,7 +2019,7 @@ func_800910E4_label:
|
||||
void func_800911B4(Player* player, s8 arg1) {
|
||||
s32 temp_v0;
|
||||
|
||||
player->unk_0AE = player->unk_02C[1];
|
||||
player->unk_0AE = player->rotation[1];
|
||||
player->unk_044 |= 0x1800;
|
||||
player->unk_044 &= ~0x0400;
|
||||
player->unk_044 |= 0x2000;
|
||||
@@ -2066,7 +2066,7 @@ void func_80091298(Player *player, s8 arg1) {
|
||||
if (player->unk_0B2 == 0) {
|
||||
var_v1 = 0;
|
||||
} else {
|
||||
player->unk_02C[1] -= 0xE38;
|
||||
player->rotation[1] -= 0xE38;
|
||||
D_8018D920[arg1] -= 0xE38;
|
||||
var_v1 = (u16)D_8018D920[arg1] / 3640;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user