mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Document some Boost data (#593)
* Run formatter * Document some boost info
This commit is contained in:
@@ -172,7 +172,16 @@ typedef struct ObjPropertyTimeTrial {
|
||||
|
||||
typedef struct ObjPropertyBoost {
|
||||
struct Object *obj;
|
||||
s32 unk4;
|
||||
union {
|
||||
s32 indexes; // Keep this for compatibility
|
||||
// This is a bitfield definition for the bits in indexes.
|
||||
// It won't match when used, but it's useful for understanding the structure.
|
||||
struct {
|
||||
s32 racerIndex : 4; // bits 28-31 ((indexes >> 28) & 0xF)
|
||||
s32 vertIndex : 14; // bits 14-27 ((indexes >> 14) & 0x3FFF)
|
||||
s32 trisIndex : 14; // bits 0-13 (indexes & 0x3FFF)
|
||||
};
|
||||
};
|
||||
} ObjPropertyBoost;
|
||||
|
||||
typedef struct ObjProperties {
|
||||
|
||||
+12
-12
@@ -1086,18 +1086,18 @@ typedef struct Object_Boost_Inner {
|
||||
} Object_Boost_Inner;
|
||||
|
||||
typedef struct Object_Boost {
|
||||
Object_Boost_Inner unk0;
|
||||
Object_Boost_Inner unk24;
|
||||
Object_Boost_Inner unk48;
|
||||
s16 unk6C;
|
||||
s16 unk6E;
|
||||
u8 unk70;
|
||||
u8 unk71;
|
||||
u8 unk72;
|
||||
s8 unk73;
|
||||
f32 unk74;
|
||||
Sprite *unk78;
|
||||
TextureHeader *unk7C;
|
||||
/* 0x00 */ Object_Boost_Inner carBoostData;
|
||||
/* 0x24 */ Object_Boost_Inner hovercraftBoostData;
|
||||
/* 0x48 */ Object_Boost_Inner flyingBoostData;
|
||||
/* 0x6C */ s16 spriteId;
|
||||
/* 0x6E */ s16 textureId;
|
||||
/* 0x70 */ u8 unk70;
|
||||
/* 0x71 */ u8 unk71;
|
||||
/* 0x72 */ u8 unk72;
|
||||
/* 0x73 */ s8 unk73;
|
||||
/* 0x74 */ f32 unk74;
|
||||
/* 0x78 */ Sprite *sprite;
|
||||
/* 0x7C */ TextureHeader *tex;
|
||||
} Object_Boost;
|
||||
|
||||
typedef struct Object_EffectBox {
|
||||
|
||||
+2
-2
@@ -84,12 +84,12 @@ typedef struct VehicleSoundAsset {
|
||||
/* 0x4A */ u8 planeHovercraftBasePitch;
|
||||
} VehicleSoundAsset;
|
||||
|
||||
void racer_sound_update(Object *obj, u32 buttonsPressed, u32 buttonsHeld, s32 tickDelta);
|
||||
void racer_sound_update(Object *obj, u32 buttonsPressed, u32 buttonsHeld, s32 ticksDelta);
|
||||
void racer_sound_free(Object *obj);
|
||||
void racer_sound_doppler_effect(Object *observerObj, Camera *camera, Object *sourceObj, s32 tickDelta);
|
||||
f32 log(f32 x);
|
||||
VehicleSoundData *racer_sound_init(s32 characterId, s32 vehicleId);
|
||||
void racer_sound_car(Object *obj, u32 buttonsPressed, u32 buttonsHeld, s32 tickDelta);
|
||||
void racer_sound_car(Object *obj, u32 buttonsPressed, u32 buttonsHeld, s32 ticksDelta);
|
||||
void racer_sound_hovercraft(Object *, u32 buttonsPressed, u32 buttonsHeld, s32 tickDelta);
|
||||
void racer_sound_plane(Object *, u32 buttonsPressed, u32 buttonsHeld, s32 tickDelta);
|
||||
void racer_sound_update_all(Object **racerObjs, s32 numRacers, Camera *cameras, u8 numCameras, s32 tickDelta);
|
||||
|
||||
+1
-1
@@ -950,7 +950,7 @@ void set_ortho_matrix_view(Gfx **dList, MatrixS **mtx) {
|
||||
void func_8006807C(Gfx **dList, MatrixS **mtx) {
|
||||
object_inverse_transform_to_matrix(gCurrentModelMatrixF, &D_800DD288);
|
||||
f32_matrix_mult(&gCurrentModelMatrixF, &gPerspectiveMatrixF, &gViewMatrixF);
|
||||
object_inverse_transform_to_matrix((float (*)[4]) gModelMatrixF[0], &D_800DD2A0);
|
||||
object_inverse_transform_to_matrix((float(*)[4]) gModelMatrixF[0], &D_800DD2A0);
|
||||
f32_matrix_mult(gModelMatrixF[0], &gViewMatrixF, &gCurrentModelMatrixF);
|
||||
f32_matrix_to_s16_matrix(&gCurrentModelMatrixF, *mtx);
|
||||
gSPMatrixDKR((*dList)++, OS_K0_TO_PHYSICAL((*mtx)++), G_MTX_DKR_INDEX_0);
|
||||
|
||||
@@ -163,7 +163,7 @@ GLOBAL_ASM("asm/math_util/f32_matrix_mult.s")
|
||||
#ifdef NON_MATCHING
|
||||
/* Official name: mathMtxF2L */
|
||||
void f32_matrix_to_s16_matrix(Matrix *input, MatrixS *output) {
|
||||
guMtxF2L((float (*)[4]) input, (Mtx *) output);
|
||||
guMtxF2L((float(*)[4]) input, (Mtx *) output);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/math_util/f32_matrix_to_s16_matrix.s")
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ s32 func_80061A00(ObjectModel *model, s32 animTableIndex);
|
||||
s32 check_nearby_vertices(Vertex *vertices, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
|
||||
Object_68 *model_init_type(ObjectModel *model, s32 flags);
|
||||
Object_68 *object_model_init(s32 modelID, s32 flags);
|
||||
s32 func_80060C58(Vertex *vertices, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
|
||||
s32 func_80060C58(Vertex *vertices, s32 i1, s32 i2, s32 i3, s32 i4);
|
||||
|
||||
void free_model_data(ObjectModel *mdl); // Non Matching
|
||||
void func_80060910(ObjectModel *);
|
||||
|
||||
+86
-83
@@ -36,6 +36,8 @@
|
||||
#define OBJECT_SLOT_COUNT 512
|
||||
#define AINODE_COUNT 128
|
||||
#define CAMCONTROL_COUNT 20
|
||||
#define BOOST_VERT_COUNT 9
|
||||
#define BOOST_TRI_COUNT 8
|
||||
|
||||
#define SET_SHIFT_AND_MASK(varShift, varMask, x) \
|
||||
varShift = x; \
|
||||
@@ -316,13 +318,13 @@ TexCoords D_8011AF68[32];
|
||||
Vec3s gEnvmapPos[2];
|
||||
unk800179D0 *D_8011AFF4;
|
||||
s32 gBoostVertCount;
|
||||
s32 D_8011AFFC;
|
||||
s32 gNumOfBoostVerts;
|
||||
s32 gBoostTriCount;
|
||||
s32 D_8011B004;
|
||||
s32 gNumOfBoostTris;
|
||||
s32 gBoostVertFlip; // indexes gBoostVerts and gBoostTris
|
||||
u8 gShieldSineTime[16];
|
||||
Object *gBoostEffectObjects[NUMBER_OF_CHARACTERS];
|
||||
u8 D_8011B048[16];
|
||||
u8 D_8011B048[16]; // Vehicle IDs for the boost objects, used to determine which racer is using which boost object.
|
||||
u8 D_8011B058[16];
|
||||
u8 D_8011B068[16];
|
||||
RacerFXData gRacerFXData[NUMBER_OF_CHARACTERS];
|
||||
@@ -343,7 +345,7 @@ typedef struct LevelObjectEntry_unk8000B020 {
|
||||
* This function is called on every level load, but only racers use the stuff here.
|
||||
*/
|
||||
void racerfx_alloc(s32 numberOfVertices, s32 numberOfTriangles) {
|
||||
Object_Boost *miscAsset20;
|
||||
Object_Boost *boostObj;
|
||||
LevelObjectEntry_unk8000B020 objEntry;
|
||||
s32 i;
|
||||
|
||||
@@ -353,11 +355,11 @@ void racerfx_alloc(s32 numberOfVertices, s32 numberOfTriangles) {
|
||||
gBoostVerts[0] = (Vertex *) ((u32) gBoostTris[1] + numberOfTriangles * sizeof(Triangle));
|
||||
gBoostVerts[1] = (Vertex *) ((u32) gBoostVerts[0] + numberOfVertices * sizeof(Vertex));
|
||||
gBoostVertCount = numberOfVertices;
|
||||
D_8011AFFC = 0;
|
||||
gNumOfBoostVerts = 0;
|
||||
gBoostTriCount = numberOfTriangles;
|
||||
D_8011B004 = 0;
|
||||
gNumOfBoostTris = 0;
|
||||
gBoostVertFlip = 0;
|
||||
miscAsset20 = (Object_Boost *) get_misc_asset(ASSET_MISC_20);
|
||||
boostObj = (Object_Boost *) get_misc_asset(ASSET_MISC_20);
|
||||
// Makes 10 boost objects, but only 8 racers can actually exist at once.
|
||||
for (i = 0; i < NUMBER_OF_CHARACTERS; i++) {
|
||||
objEntry.common.objectID = ASSET_OBJECT_ID_BOOST;
|
||||
@@ -370,12 +372,12 @@ void racerfx_alloc(s32 numberOfVertices, s32 numberOfTriangles) {
|
||||
if (gBoostEffectObjects[i] != NULL) {
|
||||
gBoostEffectObjects[i]->properties.common.unk0 = 0;
|
||||
gBoostEffectObjects[i]->properties.common.unk4 = 0;
|
||||
miscAsset20[i].unk70 = 0;
|
||||
miscAsset20[i].unk74 = 0.0f;
|
||||
miscAsset20[i].unk78 = tex_load_sprite(miscAsset20[i].unk6C, 0);
|
||||
miscAsset20[i].unk7C = load_texture(miscAsset20[i].unk6E);
|
||||
miscAsset20[i].unk72 = get_random_number_from_range(0, 255);
|
||||
miscAsset20[i].unk73 = 0;
|
||||
boostObj[i].unk70 = 0;
|
||||
boostObj[i].unk74 = 0.0f;
|
||||
boostObj[i].sprite = tex_load_sprite(boostObj[i].spriteId, 0);
|
||||
boostObj[i].tex = load_texture(boostObj[i].textureId);
|
||||
boostObj[i].unk72 = get_random_number_from_range(0, 255);
|
||||
boostObj[i].unk73 = 0;
|
||||
// This is for shields, not boosts.
|
||||
gShieldSineTime[i] = get_random_number_from_range(0, 255);
|
||||
}
|
||||
@@ -408,7 +410,7 @@ void racerfx_alloc(s32 numberOfVertices, s32 numberOfTriangles) {
|
||||
void racerfx_free(void) {
|
||||
Sprite *sprite;
|
||||
TextureHeader *texture;
|
||||
Object_Boost *asset20;
|
||||
Object_Boost *objBoost;
|
||||
u32 i;
|
||||
|
||||
if (gBoostTris[0]) {
|
||||
@@ -418,17 +420,17 @@ void racerfx_free(void) {
|
||||
gBoostVerts[0] = NULL;
|
||||
gBoostVerts[1] = NULL;
|
||||
}
|
||||
asset20 = (Object_Boost *) get_misc_asset(ASSET_MISC_20);
|
||||
objBoost = (Object_Boost *) get_misc_asset(ASSET_MISC_20);
|
||||
for (i = 0; i < NUMBER_OF_CHARACTERS; i++) {
|
||||
sprite = asset20[i].unk78;
|
||||
sprite = objBoost[i].sprite;
|
||||
if (sprite != NULL) {
|
||||
sprite_free(sprite);
|
||||
asset20[i].unk78 = NULL;
|
||||
objBoost[i].sprite = NULL;
|
||||
}
|
||||
texture = asset20[i].unk7C;
|
||||
texture = objBoost[i].tex;
|
||||
if (texture != NULL) {
|
||||
tex_free(texture);
|
||||
asset20[i].unk7C = NULL;
|
||||
objBoost[i].tex = NULL;
|
||||
}
|
||||
}
|
||||
if (gShieldEffectObject != NULL) {
|
||||
@@ -527,16 +529,16 @@ void func_8000B750(Object *racerObj, s32 racerIndex, s32 vehicleIDPrev, s32 boos
|
||||
boostData = NULL;
|
||||
break;
|
||||
case VEHICLE_CAR:
|
||||
boostData = &objBoostRacer->unk0;
|
||||
boostData = &objBoostRacer->carBoostData;
|
||||
break;
|
||||
case VEHICLE_HOVERCRAFT:
|
||||
boostData = &objBoostRacer->unk24;
|
||||
boostData = &objBoostRacer->hovercraftBoostData;
|
||||
break;
|
||||
case VEHICLE_PLANE:
|
||||
boostData = &objBoostRacer->unk48;
|
||||
boostData = &objBoostRacer->flyingBoostData;
|
||||
break;
|
||||
case VEHICLE_ROCKET:
|
||||
boostData = &objBoostRacer->unk48;
|
||||
boostData = &objBoostRacer->flyingBoostData;
|
||||
break;
|
||||
}
|
||||
if (boostData != NULL) {
|
||||
@@ -561,12 +563,13 @@ void func_8000B750(Object *racerObj, s32 racerIndex, s32 vehicleIDPrev, s32 boos
|
||||
objTrans.rotation.y_rotation = -0x8000;
|
||||
objTrans.rotation.x_rotation = 0;
|
||||
objTrans.rotation.z_rotation = 0;
|
||||
func_8000B38C(&gBoostVerts[gBoostVertFlip][D_8011AFFC], &gBoostTris[gBoostVertFlip][D_8011B004],
|
||||
&objTrans, var_f2, temp_f0, objBoostRacer->unk72 << 12, objBoostType->unk7C);
|
||||
gBoostEffectObjects[racerIndex]->properties.boost.unk4 =
|
||||
(racerIndex << 28) | (D_8011AFFC << 14) | D_8011B004;
|
||||
D_8011AFFC += 9;
|
||||
D_8011B004 += 8;
|
||||
func_8000B38C(&gBoostVerts[gBoostVertFlip][gNumOfBoostVerts],
|
||||
&gBoostTris[gBoostVertFlip][gNumOfBoostTris], &objTrans, var_f2, temp_f0,
|
||||
objBoostRacer->unk72 << 12, objBoostType->tex);
|
||||
gBoostEffectObjects[racerIndex]->properties.boost.indexes =
|
||||
(racerIndex << 28) | (gNumOfBoostVerts << 14) | gNumOfBoostTris;
|
||||
gNumOfBoostVerts += BOOST_VERT_COUNT;
|
||||
gNumOfBoostTris += BOOST_TRI_COUNT;
|
||||
}
|
||||
gBoostEffectObjects[racerIndex]->properties.boost.obj = racerObj;
|
||||
gBoostEffectObjects[racerIndex]->segment.trans.x_position = 0.0f;
|
||||
@@ -593,15 +596,15 @@ void func_8000B750(Object *racerObj, s32 racerIndex, s32 vehicleIDPrev, s32 boos
|
||||
*/
|
||||
void racerfx_update(s32 updateRate) {
|
||||
s32 i;
|
||||
Object_Boost *asset20Part;
|
||||
Object_Boost *boostObj;
|
||||
s32 temp;
|
||||
Object_Boost *asset20;
|
||||
f32 updateRateF;
|
||||
Object_Racer *racer;
|
||||
|
||||
gBoostVertFlip = 1 - gBoostVertFlip;
|
||||
D_8011AFFC = 0;
|
||||
D_8011B004 = 0;
|
||||
gNumOfBoostVerts = 0;
|
||||
gNumOfBoostTris = 0;
|
||||
asset20 = (Object_Boost *) get_misc_asset(ASSET_MISC_20);
|
||||
gBoostObjOverrideID = 9;
|
||||
for (i = 0; i < NUMBER_OF_CHARACTERS; i++) {
|
||||
@@ -616,59 +619,59 @@ void racerfx_update(s32 updateRate) {
|
||||
updateRateF *= 1.2f;
|
||||
}
|
||||
racer = &(*gRacers)[i]->unk64->racer;
|
||||
asset20Part = &asset20[racer->racerIndex];
|
||||
boostObj = &asset20[racer->racerIndex];
|
||||
if (racer->shieldTimer != 0) {
|
||||
gShieldSineTime[racer->racerIndex] += updateRate;
|
||||
}
|
||||
asset20Part->unk72 += updateRate;
|
||||
boostObj->unk72 += updateRate;
|
||||
if (racer->boostTimer != 0) {
|
||||
asset20Part->unk73 = 20;
|
||||
if (asset20Part->unk70 == 0) {
|
||||
asset20Part->unk74 += updateRateF * 0.25f;
|
||||
boostObj->unk73 = 20;
|
||||
if (boostObj->unk70 == 0) {
|
||||
boostObj->unk74 += updateRateF * 0.25f;
|
||||
updateRateF = 0.0f;
|
||||
if (asset20Part->unk74 > 2.4f) {
|
||||
asset20Part->unk74 = (f32) (4.8f - asset20Part->unk74);
|
||||
asset20Part->unk70 = 1;
|
||||
if (boostObj->unk74 > 2.4f) {
|
||||
boostObj->unk74 = (f32) (4.8f - boostObj->unk74);
|
||||
boostObj->unk70 = 1;
|
||||
}
|
||||
}
|
||||
if (asset20Part->unk70 == 1) {
|
||||
asset20Part->unk74 -= updateRateF * 0.25f;
|
||||
if (boostObj->unk70 == 1) {
|
||||
boostObj->unk74 -= updateRateF * 0.25f;
|
||||
updateRateF = 0.0f;
|
||||
if (asset20Part->unk74 < 1.0f) {
|
||||
asset20Part->unk70 = 2;
|
||||
asset20Part->unk74 = 1.0f - asset20Part->unk74;
|
||||
if (boostObj->unk74 < 1.0f) {
|
||||
boostObj->unk70 = 2;
|
||||
boostObj->unk74 = 1.0f - boostObj->unk74;
|
||||
}
|
||||
}
|
||||
if (asset20Part->unk70 == 2) {
|
||||
if (asset20Part->unk74 < 1.0f) {
|
||||
asset20Part->unk74 += updateRateF * 0.125f;
|
||||
if (asset20Part->unk74 > 1.0f) {
|
||||
asset20Part->unk74 = 1.0f;
|
||||
if (boostObj->unk70 == 2) {
|
||||
if (boostObj->unk74 < 1.0f) {
|
||||
boostObj->unk74 += updateRateF * 0.125f;
|
||||
if (boostObj->unk74 > 1.0f) {
|
||||
boostObj->unk74 = 1.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (asset20Part->unk73 > 0) {
|
||||
asset20Part->unk73 -= updateRate;
|
||||
if (boostObj->unk73 > 0) {
|
||||
boostObj->unk73 -= updateRate;
|
||||
} else {
|
||||
if (asset20Part->unk70 == 2) {
|
||||
asset20Part->unk74 -= updateRateF * 0.05f;
|
||||
if (boostObj->unk70 == 2) {
|
||||
boostObj->unk74 -= updateRateF * 0.05f;
|
||||
updateRateF = 0.0f;
|
||||
if (asset20Part->unk74 < 0.0f) {
|
||||
asset20Part->unk70 = 0;
|
||||
asset20Part->unk74 += 1.0f;
|
||||
if (boostObj->unk74 < 0.0f) {
|
||||
boostObj->unk70 = 0;
|
||||
boostObj->unk74 += 1.0f;
|
||||
}
|
||||
}
|
||||
if (asset20Part->unk70 < 2) {
|
||||
asset20Part->unk74 -= (updateRateF * 0.1f);
|
||||
if (asset20Part->unk74 < 0.0f) {
|
||||
asset20Part->unk74 = 0.0f;
|
||||
if (boostObj->unk70 < 2) {
|
||||
boostObj->unk74 -= (updateRateF * 0.1f);
|
||||
if (boostObj->unk74 < 0.0f) {
|
||||
boostObj->unk74 = 0.0f;
|
||||
}
|
||||
asset20Part->unk70 = 0;
|
||||
boostObj->unk70 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((asset20Part->unk70 > 0) || (asset20Part->unk74 > 0.0f)) {
|
||||
if ((boostObj->unk70 > 0) || (boostObj->unk74 > 0.0f)) {
|
||||
func_8000B750((*gRacers)[i], racer->racerIndex, racer->vehicleIDPrev, racer->boostType, 0);
|
||||
}
|
||||
temp = racer->racerIndex;
|
||||
@@ -3522,23 +3525,23 @@ void func_800135B8(Object *boostObj) {
|
||||
Object_Boost *boost;
|
||||
Object_Boost *asset;
|
||||
s32 hasTexture;
|
||||
s32 idx;
|
||||
s32 racerIndex;
|
||||
|
||||
idx = (boostObj->properties.boost.unk4 >> 28) & 0xF;
|
||||
racerIndex = (boostObj->properties.boost.racerIndex) & 0xF;
|
||||
boost = &boostObj->unk64->boost;
|
||||
switch (D_8011B048[idx]) {
|
||||
case 0:
|
||||
boostData = &boost->unk0;
|
||||
switch (D_8011B048[racerIndex]) {
|
||||
case VEHICLE_CAR:
|
||||
boostData = &boost->carBoostData;
|
||||
break;
|
||||
case 1:
|
||||
boostData = &boost->unk24;
|
||||
case VEHICLE_HOVERCRAFT:
|
||||
boostData = &boost->hovercraftBoostData;
|
||||
break;
|
||||
default:
|
||||
boostData = &boost->unk48;
|
||||
boostData = &boost->flyingBoostData;
|
||||
break;
|
||||
}
|
||||
asset = (Object_Boost *) get_misc_asset(ASSET_MISC_20);
|
||||
asset = &asset[D_8011B058[idx]];
|
||||
asset = &asset[D_8011B058[racerIndex]];
|
||||
object_do_player_tumble(boostObj->properties.boost.obj);
|
||||
cam_push_model_mtx(&gObjectCurrDisplayList, &gObjectCurrMatrix, &boostObj->properties.boost.obj->segment.trans,
|
||||
1.0f, 0.0f);
|
||||
@@ -3550,7 +3553,7 @@ void func_800135B8(Object *boostObj) {
|
||||
if (boost->unk70 < 2) {
|
||||
objTransform.trans.scale *= boost->unk74;
|
||||
}
|
||||
if (D_8011B058[idx] != 0) {
|
||||
if (D_8011B058[racerIndex] != 0) {
|
||||
objTransform.trans.scale *= 1.15f;
|
||||
}
|
||||
objTransform.trans.rotation.z_rotation = 0;
|
||||
@@ -3560,21 +3563,21 @@ void func_800135B8(Object *boostObj) {
|
||||
gDPSetPrimColor(gObjectCurrDisplayList++, 0, 0, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(gObjectCurrDisplayList++, 255, 255, 255, 0);
|
||||
render_sprite_billboard(&gObjectCurrDisplayList, &gObjectCurrMatrix, &gObjectCurrVertexList,
|
||||
(Object *) &objTransform, asset->unk78,
|
||||
(Object *) &objTransform, asset->sprite,
|
||||
(RENDER_Z_COMPARE | RENDER_FOG_ACTIVE | RENDER_Z_UPDATE));
|
||||
if (boost->unk70 == 2) {
|
||||
material_set(&gObjectCurrDisplayList, asset->unk7C,
|
||||
material_set(&gObjectCurrDisplayList, asset->tex,
|
||||
(RENDER_Z_COMPARE | RENDER_SEMI_TRANSPARENT | RENDER_FOG_ACTIVE), 0);
|
||||
if (asset->unk7C != NULL) {
|
||||
if (asset->tex != NULL) {
|
||||
hasTexture = TRUE;
|
||||
} else {
|
||||
hasTexture = FALSE;
|
||||
}
|
||||
|
||||
vtx = &gBoostVerts[gBoostVertFlip][(boostObj->properties.boost.unk4 >> 14) & 0x3FFF];
|
||||
tri = &gBoostTris[gBoostVertFlip][boostObj->properties.boost.unk4 & 0x3FFF];
|
||||
gSPVertexDKR(gObjectCurrDisplayList++, OS_K0_TO_PHYSICAL(vtx), 9, 0);
|
||||
gSPPolygon(gObjectCurrDisplayList++, OS_K0_TO_PHYSICAL(tri), 8, hasTexture);
|
||||
vtx = &gBoostVerts[gBoostVertFlip][(boostObj->properties.boost.indexes >> 14) & 0x3FFF];
|
||||
tri = &gBoostTris[gBoostVertFlip][boostObj->properties.boost.indexes & 0x3FFF];
|
||||
gSPVertexDKR(gObjectCurrDisplayList++, OS_K0_TO_PHYSICAL(vtx), BOOST_VERT_COUNT, 0);
|
||||
gSPPolygon(gObjectCurrDisplayList++, OS_K0_TO_PHYSICAL(tri), BOOST_TRI_COUNT, hasTexture);
|
||||
}
|
||||
apply_matrix_from_stack(&gObjectCurrDisplayList);
|
||||
}
|
||||
@@ -4288,12 +4291,12 @@ void func_80016748(Object *obj0, Object *obj1) {
|
||||
if (!((objModel->unk3C + 50.0) < sqrtf((xDiff * xDiff) + (yDiff * yDiff) + (zDiff * zDiff)))) {
|
||||
obj0Interact = obj0->interactObj;
|
||||
obj1Interact = obj1->interactObj;
|
||||
object_transform_to_matrix((float (*)[4]) obj1TransformMtx, &obj1->segment.trans);
|
||||
object_transform_to_matrix((float(*)[4]) obj1TransformMtx, &obj1->segment.trans);
|
||||
for (i = 0; i < objModel->unk20; i += 2) {
|
||||
xDiff = obj1->curVertData[objModel->unk1C[i]].x;
|
||||
yDiff = obj1->curVertData[objModel->unk1C[i]].y;
|
||||
zDiff = obj1->curVertData[objModel->unk1C[i]].z;
|
||||
guMtxXFMF((float (*)[4]) obj1TransformMtx, xDiff, yDiff, zDiff, &xDiff, &yDiff, &zDiff);
|
||||
guMtxXFMF((float(*)[4]) obj1TransformMtx, xDiff, yDiff, zDiff, &xDiff, &yDiff, &zDiff);
|
||||
temp = (((f32) objModel->unk1C[i + 1] / 64) * obj1->segment.trans.scale) * 50.0;
|
||||
xDiff -= obj0->segment.trans.x_position;
|
||||
yDiff -= obj0->segment.trans.y_position;
|
||||
@@ -4460,7 +4463,7 @@ void func_8001709C(Object *obj) {
|
||||
sp78.x_position = -obj->segment.trans.x_position;
|
||||
sp78.y_position = -obj->segment.trans.y_position;
|
||||
sp78.z_position = -obj->segment.trans.z_position;
|
||||
object_inverse_transform_to_matrix((float (*)[4]) sp6C, &sp78);
|
||||
object_inverse_transform_to_matrix((float(*)[4]) sp6C, &sp78);
|
||||
inverseScale = 1.0 / obj->segment.trans.scale;
|
||||
i = 0;
|
||||
while (i < 16) {
|
||||
|
||||
@@ -328,7 +328,7 @@ s32 *gSpriteCache;
|
||||
Sprite *gCurrentSprite;
|
||||
s32 gSpriteTableSize;
|
||||
s32 gSpriteCacheCount;
|
||||
s32 D_8012635C;
|
||||
s32 D_8012635C; // Set but never used
|
||||
Vertex *D_80126360;
|
||||
Gfx *D_80126364;
|
||||
Triangle *D_80126368;
|
||||
|
||||
@@ -3699,9 +3699,9 @@ D_8011AFEE = 0x8011CA5E;
|
||||
D_8011AFF0 = 0x8011CA60;
|
||||
D_8011AFF4 = 0x8011CA64;
|
||||
gBoostVertCount = 0x8011CA68;
|
||||
D_8011AFFC = 0x8011CA6C;
|
||||
gNumOfBoostVerts = 0x8011CA6C;
|
||||
gBoostTriCount = 0x8011CA70;
|
||||
D_8011B004 = 0x8011CA74;
|
||||
gNumOfBoostTris = 0x8011CA74;
|
||||
gBoostVertFlip = 0x8011CA78;
|
||||
gShieldSineTime = 0x8011CA80;
|
||||
gBoostEffectObjects = 0x8011CA90;
|
||||
|
||||
@@ -3437,9 +3437,9 @@ D_8011AFEE = 0x8011B07E;
|
||||
D_8011AFF0 = 0x8011B080;
|
||||
D_8011AFF4 = 0x8011B084;
|
||||
gBoostVertCount = 0x8011B088;
|
||||
D_8011AFFC = 0x8011B08C;
|
||||
gNumOfBoostVerts = 0x8011B08C;
|
||||
gBoostTriCount = 0x8011B090;
|
||||
D_8011B004 = 0x8011B094;
|
||||
gNumOfBoostTris = 0x8011B094;
|
||||
gBoostVertFlip = 0x8011B098;
|
||||
gShieldSineTime = 0x8011B0A0;
|
||||
gBoostEffectObjects = 0x8011B0B0;
|
||||
|
||||
@@ -3367,9 +3367,9 @@ D_8011AFEE = 0x8011B5FE;
|
||||
D_8011AFF0 = 0x8011B600;
|
||||
D_8011AFF4 = 0x8011B604;
|
||||
gBoostVertCount = 0x8011B608;
|
||||
D_8011AFFC = 0x8011B60C;
|
||||
gNumOfBoostVerts = 0x8011B60C;
|
||||
gBoostTriCount = 0x8011B610;
|
||||
D_8011B004 = 0x8011B614;
|
||||
gNumOfBoostTris = 0x8011B614;
|
||||
gBoostVertFlip = 0x8011B618;
|
||||
gShieldSineTime = 0x8011B620;
|
||||
gBoostEffectObjects = 0x8011B630;
|
||||
|
||||
@@ -3814,9 +3814,9 @@ D_8011AFEE = 0x8011AFEE;
|
||||
D_8011AFF0 = 0x8011AFF0;
|
||||
D_8011AFF4 = 0x8011AFF4;
|
||||
gBoostVertCount = 0x8011AFF8;
|
||||
D_8011AFFC = 0x8011AFFC;
|
||||
gNumOfBoostVerts = 0x8011AFFC;
|
||||
gBoostTriCount = 0x8011B000;
|
||||
D_8011B004 = 0x8011B004;
|
||||
gNumOfBoostTris = 0x8011B004;
|
||||
gBoostVertFlip = 0x8011B008;
|
||||
gShieldSineTime = 0x8011B010;
|
||||
gBoostEffectObjects = 0x8011B020;
|
||||
|
||||
@@ -3363,9 +3363,9 @@ D_8011AFEE = 0x8011B56E;
|
||||
D_8011AFF0 = 0x8011B570;
|
||||
D_8011AFF4 = 0x8011B574;
|
||||
gBoostVertCount = 0x8011B578;
|
||||
D_8011AFFC = 0x8011B57C;
|
||||
gNumOfBoostVerts = 0x8011B57C;
|
||||
gBoostTriCount = 0x8011B580;
|
||||
D_8011B004 = 0x8011B584;
|
||||
gNumOfBoostTris = 0x8011B584;
|
||||
gBoostVertFlip = 0x8011B588;
|
||||
gShieldSineTime = 0x8011B590;
|
||||
gBoostEffectObjects = 0x8011B5A0;
|
||||
|
||||
Reference in New Issue
Block a user