More documenting and labelling things I've learned, suddenly and unsuddenly. (#645)

* ooh

* race

* Update menu.c

* fix more menu UB

* fix some warns

* fix symbols

* more model stuff

* confusion

* format le code

* Update racer.h

* Update src/objects.c

Co-authored-by: Ryan Myers <ryan.p.myers@gmail.com>

* Update src/racer.c

Co-authored-by: Ryan Myers <ryan.p.myers@gmail.com>

* improve vehicle anim func

* clean up another function

* Update tools/python/calc_func_checksums.py

Co-authored-by: Dominik Peters <github@d-peters.com>

* Update tools/python/calc_func_checksums.py

Co-authored-by: Dominik Peters <github@d-peters.com>

* oop

* Update object_functions.c

---------

Co-authored-by: Ryan Myers <ryan.p.myers@gmail.com>
Co-authored-by: Dominik Peters <github@d-peters.com>
This commit is contained in:
Fazana
2025-06-25 17:57:50 +01:00
committed by GitHub
co-authored by Ryan Myers Dominik Peters
parent 9e9b607722
commit 9fd0885200
21 changed files with 498 additions and 450 deletions
+8 -8
View File
@@ -5,11 +5,11 @@ This repo contains a work-in-progress decompilation of Diddy Kong Racing for the
All versions are supported, and the US 1.0 version (SHA1 = 0cb115d8716dbbc2922fda38e533b9fe63bb9670) of the game is the default if not specified.
<!-- README_SCORE_SUMMARY_BEGIN -->
As of June 24, 2025, this is our current score:
As of June 25, 2025, this is our current score:
&emsp;&emsp;&emsp;&emsp;Decomp progress: 94.29%
&emsp;&emsp;&emsp;&emsp;Documentation progress: 59.95%
&emsp;&emsp;&emsp;&emsp;Documentation progress: 61.33%
<!-- README_SCORE_SUMMARY_END -->
---
@@ -117,7 +117,7 @@ s32 is_drumstick_unlocked(void) {
```
<!-- README_SCORE_BEGIN -->
As of June 24, 2025, this is our current score:
As of June 25, 2025, this is our current score:
```
=====================================================================
ADVENTURE ONE (ASM -> C Decompilation)
@@ -133,14 +133,14 @@ As of June 24, 2025, this is our current score:
We are collecting silver coins in Spaceport Alpha. (2/8 silver coins)
=====================================================================
ADVENTURE TWO (Cleanup & Documentation)
-------------------------- 59.95% Complete --------------------------
# Documented functions: 1210
# Undocumented remaining: 440
-------------------------- 61.33% Complete --------------------------
# Documented functions: 1218
# Undocumented remaining: 432
---------------------------- Game Status ----------------------------
Balloons: 29/47, Keys: 3/4, Trophies: 2/5
Balloons: 30/47, Keys: 3/4, Trophies: 2/5
T.T. Amulets: 3/4, Wizpig Amulets: 2/4
---------------------------------------------------------------------
We are collecting silver coins in Treasure Caves. (5/8 silver coins)
We are racing in the rematch against Bubbler. (Lap 2/3)
=====================================================================
```
<!-- README_SCORE_END -->
+10 -10
View File
@@ -665,7 +665,7 @@ typedef struct ObjectModel {
/* 0x34 */ u8 pad34[4];
/* 0x38 */ TriangleBatchInfo* batches;
/* 0x3C */ f32 unk3C;
/* 0x40 */ Vec3s* unk40;
/* 0x40 */ Vec3s* normals;
/* 0x44 */ ObjectModel_44* animations;
/* 0x48 */ s16 numberOfAnimations;
/* 0x4A */ s16 unk4A;
@@ -841,7 +841,7 @@ typedef struct ObjectHeader {
/* 0x53 */ s8 modelType;
/* 0x54 */ s8 behaviorId;
/* 0x55 */ s8 numberOfModelIds; // size of array pointed by Object->unk68
/* 0x56 */ s8 unk56;
/* 0x56 */ s8 attachPointCount;
/* 0x57 */ s8 particleCount; // Number of different particle types that are attached
/* 0x58 */ s8 unk58;
/* 0x59 */ u8 pad59;
@@ -940,11 +940,11 @@ typedef struct Object_5C {
/* 0x0108 */ s32 unk108;
} Object_5C;
typedef struct Object_60 {
s32 unk0;
struct Object *unk4[10];
s8 *unk2C;
} Object_60;
typedef struct AttachPoint {
s32 count; // Number of active attach points.
struct Object *obj[10]; // Object Ptr List for attachments.
s8 *unk2C; // Attachment indices.
} AttachPoint;
typedef struct Object_LaserGun {
/* 0x00 */ s32 unk0;
@@ -1378,9 +1378,9 @@ typedef struct Object_Racer {
/* 0x1A4 */ s16 x_rotation_vel;
/* 0x1A6 */ s16 z_rotation_vel;
/* 0x1A8 */ s16 unk1A8;
/* 0x1AA */ s16 unk1AA;
/* 0x1AA */ s16 racerOrder; // Current racer index order, but doesn't necessarily mean their exact race place.
/* 0x1AC */ s16 finishPosition;
/* 0x1AE */ s16 racePosition;
/* 0x1AE */ s16 racePosition; // Current decided race position.
/* 0x1B0 */ s16 unk1B0;
/* 0x1B2 */ s16 unk1B2;
/* 0x1B4 */ s32 unk1B4;
@@ -1840,7 +1840,7 @@ typedef struct Object {
/* 0x0054 */ ShadeProperties *shading; //player + 0x2C0
/* 0x0058 */ WaterEffect *waterEffect; //player + 0x304
/* 0x005C */ Object_5C *unk5C;
/* 0x0060 */ Object_60 *unk60; //player + 0x340
/* 0x0060 */ AttachPoint *attachPoints; // Object attachments. This includes vehicle parts.
/* 0x0064 */ Object_64 *unk64; //player + 0x98
/* 0x0068 */ union {
ModelInstance **modelInstances;
+5 -5
View File
@@ -78,8 +78,8 @@ s32 gAudioCmdLen; // Set but not used
/**** Anti Piracy - Sets random audio frequency ****/
s16 gAntiPiracyCRCStart;
s8 gAntiPiracyAudioFreq = FALSE;
s32 gFunc80019808Checksum = Func80019808Checksum;
s32 gFunc80019808Length = 0xFD0;
s32 gRaceCheckFinishChecksum = Func80019808Checksum;
s32 gRaceCheckFinishFuncLength = 0xFD0;
/** Queues and storage for use with audio DMA's ****/
OSIoMesg audDMAIOMesgBuf[NUM_DMA_MESSAGES];
@@ -162,16 +162,16 @@ void amCreateAudioMgr(ALSynConfig *c, OSPri pri, OSSched *audSched) {
#ifdef ANTI_TAMPER
// Antipiracy measure
gAntiPiracyCRCStart = DMA_BUFFER_LENGTH;
checksum = (s32) &func_80019808 - gAntiPiracyCRCStart;
checksum = (s32) &race_check_finish - gAntiPiracyCRCStart;
crc_region_start = (u8 *) checksum;
crc_region = &crc_region_start[gAntiPiracyCRCStart];
gAntiPiracyAudioFreq = FALSE;
i = 0;
for (checksum = 0; i < gFunc80019808Length; i++) {
for (checksum = 0; i < gRaceCheckFinishFuncLength; i++) {
checksum += crc_region[i];
gAntiPiracyCRCStart++;
}
if (checksum != gFunc80019808Checksum) {
if (checksum != gRaceCheckFinishChecksum) {
gAntiPiracyAudioFreq = TRUE;
}
#endif
+24 -15
View File
@@ -135,11 +135,10 @@ UNUSED s32 D_80127FE4_EE794;
SavefileInfo gSavefileInfo[4];
s32 gCpakGhostData;
s32 gGhostMenuTotal;
u8 gGhostLevelIDsPak[4];
UNUSED s32 D_80128024_EE7D4;
u8 gGhostCharacterIDsPak[4];
u8 gGhostLevelIDsPak[6];
u8 gGhostCharacterIDsPak[6];
void *gMenuAssets[128]; // lookup table? Contains Textures, Objects, and Sprites. Need to change name and type.
u8 gGhostVehicleIDsPak[4];
u8 gGhostVehicleIDsPak[6];
u8 gMenuAssetActive[128];
u16 gGhostChecksumIDsPak[6];
u8 gGhostLevelIDsMenu[6];
@@ -344,14 +343,10 @@ SavefileInfo gSavefileInfo[4];
s32 gCpakGhostData;
s32 gGhostMenuTotal;
s8 gDialogueSubmenu;
u8 gGhostLevelIDsPak[4];
UNUSED s8 D_801264E0;
UNUSED s8 D_801264E1;
u8 gGhostLevelIDsPak[6];
s8 sCurrentMenuID;
u8 gGhostCharacterIDsPak[4];
UNUSED s32 D_801264E8;
u8 gGhostVehicleIDsPak[4];
UNUSED s32 D_801264F0[2];
u8 gGhostCharacterIDsPak[6];
u8 gGhostVehicleIDsPak[6];
u16 gGhostChecksumIDsPak[6];
s8 sDialogueOptionMax;
u8 gGhostLevelIDsMenu[6];
@@ -1433,8 +1428,11 @@ s16 gTrophyRaceImageIndices[3] = { 0, 1, -1 };
MenuElement gTrophyRankingsTitle[] = {
{ 320 + 160 + 1, 35, SCREEN_WIDTH_HALF + 1, 35, -159, 35, 0, 0, 0, 255, 128, ASSET_FONTS_BIGFONT, 12, 0, { 0 }, { { 0, 0, 0, 0 } } },
{ 320 + 160, 32, SCREEN_WIDTH_HALF, 32, -160, 32, 255, 255, 255, 0, 255, ASSET_FONTS_BIGFONT, 12, 0, { 0 }, { { 0, 0, 0, 0 } } },
// Not the most glamourous approach, but the least worst one without a proper rematching solution.
#ifndef AVOID_UB
};
MenuElement gTrophyRankingsRacers[] = {
#endif
{ 64, -192, 64, 48, 64, 288, 255, 255, 255, 0, 255, ASSET_FONTS_FUNFONT, 0, 3, { &gMenuPortraitKrunch }, { { 0, 0, 0, 0 } } },
{ 32, -192, 32, 48, 32, 288, 255, 255, 255, 0, 255, ASSET_FONTS_FUNFONT, 0, 0, { gFirstPlace }, { { 0, 0, 0, 0 } } },
{ 130, -172, 130, 68, 130, 308, 255, 255, 255, 0, 255, ASSET_FONTS_FUNFONT, 4, 2, { &gTrophyRacePointsArray[0] }, { { 0, 0, 0, 0 } } },
@@ -10416,7 +10414,9 @@ void menu_racer_portraits(void) {
}
/**
*
* Initialises the post race variables.
* Sets different defaults based on being in adventure mode, tracks mode, or multiplayer.
* Loads the menu assets for the postrace too.
*/
void postrace_start(s32 finishState, s32 worldID) {
s16 *var_v1;
@@ -10582,8 +10582,11 @@ void postrace_music_fade(s32 updateRate) {
}
}
// postrace_render
void func_80094D28(UNUSED s32 updateRate) {
/**
* Resizes the viewport when shrinking it down.
* Renders race order, lap times and text options beneath.
*/
void postrace_viewport(UNUSED s32 updateRate) {
s32 temp;
s32 var_s3;
Settings *settings;
@@ -10852,7 +10855,7 @@ s32 menu_postrace(Gfx **dList, Mtx **matrices, Vertex **vertices, s32 updateRate
postrace_music_fade(updateRate);
if (gMenuDelay < 20 && gPostraceFinishState == 0) {
if (gPostRace.unk0_s32 < 0) {
func_80094D28(updateRate);
postrace_viewport(updateRate);
}
} else {
bgdraw_texture_init(NULL, NULL, 0);
@@ -12232,9 +12235,15 @@ void rankings_render_order(s32 updateRate) {
(gMenuStage != POSTRACE_ENTER && gRankingsPlayers[i]))) {
fade = (highlight >> 1) + 128;
}
#ifdef AVOID_UB
gTrophyRankingsTitle[2 + (i * 3)].filterRed = fade;
gTrophyRankingsTitle[2 + (i * 3)].filterGreen = fade;
gTrophyRankingsTitle[2 + (i * 3)].filterBlue = fade;
#else
gTrophyRankingsRacers[i * 3].filterRed = fade;
gTrophyRankingsRacers[i * 3].filterGreen = fade;
gTrophyRankingsRacers[i * 3].filterBlue = fade;
#endif
}
stage = gMenuStage;
if (stage == RANKINGS_ORDER || stage == RANKINGS_EXIT) {
+1 -1
View File
@@ -692,7 +692,7 @@ void func_80080E90(Gfx **dList, s32 startX, s32 startY, s32 width, s32 height, s
s32 colour0, s32 colour1, s32 colour2, s32 colour3);
void func_80084854(s32 updateRate);
void func_80098774(s32);
void func_80094D28(UNUSED s32 updateRate);
void postrace_viewport(UNUSED s32 updateRate);
void func_80082BC8_837C8(s32 dialogueBoxID, s32 xPos1, s32 yPos1, s32 xPos2,
s32 yPos2, char *text, AlignmentFlags alignment, s32 textColour, s32 alpha);
+27 -23
View File
@@ -269,7 +269,7 @@ void obj_loop_fireball_octoweapon(Object *obj, s32 updateRate) {
racer->bubbleTrapTimer = 60;
obj->properties.fireball.timer = -60;
obj->properties.fireball.obj = someObj;
sound_play(SOUND_BUBBLE_RISE, &weapon->soundMask);
sound_play(SOUND_BUBBLE_RISE, (SoundHandle *) &weapon->soundMask);
}
}
}
@@ -304,7 +304,7 @@ void obj_loop_fireball_octoweapon(Object *obj, s32 updateRate) {
}
}
if (obj->properties.fireball.timer == 0) {
soundMask = weapon->soundMask;
soundMask = (SoundHandle) weapon->soundMask;
if (soundMask != NULL) {
sndp_stop(soundMask);
}
@@ -1056,7 +1056,7 @@ void obj_loop_timetrialghost(Object *obj, s32 updateRate) {
Object *someObj;
Object *someOtherObj;
Object_UnkId58 *someOtherObj64;
Object_60 *obj60;
AttachPoint *attachPoint;
s8 vehicleID;
obj->segment.object.animationID = 0;
@@ -1068,11 +1068,11 @@ void obj_loop_timetrialghost(Object *obj, s32 updateRate) {
obj_spawn_particle(obj, updateRate);
someOtherObj = get_racer_object(PLAYER_ONE);
someOtherObj64 = &someOtherObj->unk64->unkid58;
obj60 = obj->unk60;
if (obj60->unk0 == 1) {
attachPoint = obj->attachPoints;
if (attachPoint->count == 1) {
vehicleID = someOtherObj64->vehicleID;
if (vehicleID == VEHICLE_HOVERCRAFT || vehicleID == VEHICLE_PLANE) {
someObj = (Object *) obj60->unk4[0];
someObj = (Object *) attachPoint->obj[0];
someObj->segment.trans.rotation.y_rotation = 0x4000;
someObj->segment.object.modelIndex++;
someObj->segment.object.modelIndex &= 1;
@@ -1905,7 +1905,7 @@ void obj_loop_wizpigship(Object *wizShipObj, s32 updateRate) {
} else {
wizShipObj->properties.fireball.timer = 0;
}
if ((wizShipObj->unk60 != NULL) && (wizShipObj->properties.fireball.timer == 0)) {
if (wizShipObj->attachPoints != NULL && wizShipObj->properties.fireball.timer == 0) {
if (wizShipObj->particleEmittersEnabled & OBJ_EMIT_1) {
wizShipObj->properties.fireball.timer = 20;
mtxf_from_transform(&shipMtx, &wizShipObj->segment.trans);
@@ -1918,8 +1918,8 @@ void obj_loop_wizpigship(Object *wizShipObj, s32 updateRate) {
trans.rotation.z_rotation = 0;
mtxf_from_transform(&laserMtx, &trans);
for (i = 0; i < wizShipObj->unk60->unk0; i++) {
index = wizShipObj->unk60->unk2C[i];
for (i = 0; i < wizShipObj->attachPoints->count; i++) {
index = wizShipObj->attachPoints->unk2C[i];
if ((index >= 0) && (index < wizShipModel->unk18)) {
if (wizShipObj->curVertData != NULL) {
posX = wizShipObj->curVertData[wizShipModel->unk14[index]].x;
@@ -1954,21 +1954,25 @@ void obj_loop_wizpigship(Object *wizShipObj, s32 updateRate) {
}
}
/**
* Cutscene Vehicle loop behaviour.
* Performs its set behaviour while having its own handler for the attached vehicle parts.
*/
void obj_loop_vehicleanim(Object *obj, s32 updateRate) {
Object_60_800380F8 *obj60;
Object *someObj;
AttachPoint *attachPoint;
Object *attachObj;
func_8001F460(obj, updateRate, obj);
obj60 = (Object_60_800380F8 *) obj->unk60;
if (obj60 != NULL) {
if (obj60->unk0 > 0) {
someObj = obj60->unk0 == 3 ? obj60->unkC : obj60->unk4;
someObj->segment.trans.rotation.y_rotation = 0x4000;
someObj->segment.object.modelIndex++;
if (someObj->segment.object.modelIndex == someObj->segment.header->numberOfModelIds) {
someObj->segment.object.modelIndex = 0;
}
}
attachPoint = obj->attachPoints;
if (attachPoint == NULL || attachPoint->count <= 0) {
return;
}
attachObj = attachPoint->count == 3 ? attachPoint->obj[2] : attachPoint->obj[0];
attachObj->segment.trans.rotation.y_rotation = 0x4000;
attachObj->segment.object.modelIndex++;
if (attachObj->segment.object.modelIndex == attachObj->segment.header->numberOfModelIds) {
attachObj->segment.object.modelIndex = 0;
}
}
@@ -4963,8 +4967,8 @@ void weapon_projectile(Object *obj, s32 updateRate) {
}
block_37:
obj->properties.projectile.unk4 += updateRate;
if (obj->unk60 != NULL) {
temp_s1_2 = obj->unk60->unk4[0];
if (obj->attachPoints != NULL) {
temp_s1_2 = obj->attachPoints->obj[0];
if (obj->properties.projectile.unk4 < 8) {
temp_s1_2->segment.trans.scale = obj->properties.projectile.unk4 * 0.5f;
} else if (obj->properties.projectile.unk4 < 16) {
-8
View File
@@ -135,14 +135,6 @@ typedef struct unk80037D08_arg0 {
unk80037D08_arg0_64 *unk64;
} unk80037D08_arg0;
// Not sure if Object_60 differs between objects yet.
typedef struct Object_60_800380F8 {
s32 unk0;
Object *unk4;
s32 pad8;
Object *unkC;
} Object_60_800380F8;
typedef struct unk80038B74 {
u8 pad0[8];
s8 unk8;
+69 -52
View File
@@ -13,8 +13,8 @@
/************ .data ************/
s32 gTractionTableChecksum = TractionTableChecksum;
s32 gTrackRenderFuncLength = 1980;
s32 gRenderSceneChecksum = TractionTableChecksum;
s32 gRenderSceneFuncLength = 1980;
/*******************************/
@@ -39,7 +39,7 @@ s32 gNumModelIDs;
s32 D_8011D634;
s16 *gAnimationTable;
s32 *gObjectAnimationTable;
s32 D_8011D640;
s32 gModelAnimOffsetID;
s32 D_8011D644;
/******************************/
@@ -64,15 +64,15 @@ void allocate_object_model_pools(void) {
gAnimationTable = (s16 *) load_asset_section_from_rom(ASSET_ANIMATION_IDS);
gObjectAnimationTable = (s32 *) load_asset_section_from_rom(ASSET_OBJECT_ANIMATIONS_TABLE);
D_8011D644 = (s32) mempool_alloc_safe(0xC00, COLOUR_TAG_GREEN);
D_8011D640 = 0;
gModelAnimOffsetID = 0;
#ifdef ANTI_TAMPER
// Antipiracy measure
checksum = 0;
for (i = 0; i < gTrackRenderFuncLength; i++) {
for (i = 0; i < gRenderSceneFuncLength; i++) {
checksum += *(u8 *) (((s32) &render_scene) + i);
}
if (checksum != gTractionTableChecksum) {
if (checksum != gRenderSceneChecksum) {
drm_vehicle_traction();
}
#endif
@@ -107,7 +107,7 @@ ModelInstance *object_model_init(s32 modelID, s32 flags) {
for (i = 0; i < gModelCacheCount; i++) {
if (modelID == gModelCache[ASSETCACHE_ID(i)]) {
objMdl = (ObjectModel *) gModelCache[ASSETCACHE_PTR(i)];
instance = model_init_type(objMdl, flags);
instance = model_instance_init(objMdl, flags);
if (instance != NULL) {
objMdl->references++;
}
@@ -163,7 +163,7 @@ ModelInstance *object_model_init(s32 modelID, s32 flags) {
objMdl->unk10 = 0;
objMdl->unk32 = 0;
objMdl->texOffsetUpdateRate = 0;
objMdl->unk40 = 0;
objMdl->normals = NULL;
objMdl->numberOfAnimations = 0;
objMdl->animations = NULL;
sp3F = 0;
@@ -181,8 +181,8 @@ ModelInstance *object_model_init(s32 modelID, s32 flags) {
goto block_30;
}
}
if (func_80060EA8(objMdl) == 0 && func_80061A00(objMdl, modelID) == 0) {
instance = model_init_type(objMdl, flags);
if (model_calc_normals(objMdl) == 0 && model_anim_init(objMdl, modelID) == 0) {
instance = model_instance_init(objMdl, flags);
if (instance != NULL) {
gModelCache[ASSETCACHE_ID(cacheIndex)] = modelID;
gModelCache[ASSETCACHE_PTR(cacheIndex)] = (s32) objMdl;
@@ -208,7 +208,13 @@ block_30:
return NULL;
}
ModelInstance *model_init_type(ObjectModel *model, s32 flags) {
/**
* Initialises the model instance.
* Objects that do nothing special get a standard instance assigned,
* otherwise, ones that utilise shading or animation will have their own copies of the vertex data.
* Returns null if it failed.
*/
ModelInstance *model_instance_init(ObjectModel *model, s32 flags) {
s32 temp;
ModelInstance *result;
Vertex *var_v1;
@@ -226,7 +232,7 @@ ModelInstance *model_init_type(ObjectModel *model, s32 flags) {
(Vertex *) ((u8 *) result + (model->numberOfVertices * sizeof(Vertex)) + sizeof(ModelInstance));
result->vertices[2] = (Vertex *) ((u8 *) result + temp);
result->modelType = MODELTYPE_ANIMATED;
} else if (model->unk40 != NULL && (flags & OBJECT_BEHAVIOUR_SHADED)) {
} else if (model->normals != NULL && (flags & OBJECT_BEHAVIOUR_SHADED)) {
temp = (model->numberOfVertices * sizeof(Vertex)) + sizeof(ModelInstance);
result = (ModelInstance *) mempool_alloc(temp, COLOUR_TAG_BLUE);
if (result == NULL) {
@@ -356,9 +362,9 @@ void free_model_data(ObjectModel *mdl) {
if (mdl->unk10 != NULL) {
mempool_free(mdl->unk10);
}
// ???
if (mdl->unk40 != NULL) {
mempool_free(mdl->unk40);
if (mdl->normals != NULL) {
mempool_free(mdl->normals);
}
// free the animations
if (mdl->animations != NULL) {
@@ -672,13 +678,13 @@ s32 func_80060C58(Vertex *vertices, s32 i1, s32 i2, s32 i3, s32 i4) {
}
// Returns 0 if successful, or 1 if an error occured.
s32 func_80060EA8(ObjectModel *model) {
s32 model_calc_normals(ObjectModel *model) {
Vertex *vertices;
Triangle *triangles;
Vec3f *spAC;
Vec3f *floatNorms;
s16 i;
TriangleBatchInfo *batches;
Vec3s *spA0;
Vec3s *normals;
s16 s6;
s16 l;
s16 q;
@@ -693,7 +699,7 @@ s32 func_80060EA8(ObjectModel *model) {
s16 vx, vy, vz;
batches = model->batches;
model->unk40 = NULL;
model->normals = NULL;
k = 0;
for (i = 0; i < model->numberOfBatches; i++) {
@@ -706,17 +712,18 @@ s32 func_80060EA8(ObjectModel *model) {
vertices = model->vertices;
triangles = model->triangles;
spAC = (Vec3f *) mempool_alloc(model->numberOfTriangles * sizeof(Vec3f), COLOUR_TAG_ORANGE);
if (spAC == NULL) {
floatNorms = (Vec3f *) mempool_alloc(model->numberOfTriangles * sizeof(Vec3f), COLOUR_TAG_ORANGE);
if (floatNorms == NULL) {
return 1;
}
spA0 = (Vec3s *) mempool_alloc(k * sizeof(Vec3s), COLOUR_TAG_ORANGE);
if (spA0 == NULL) {
mempool_free(spAC);
normals = (Vec3s *) mempool_alloc(k * sizeof(Vec3s), COLOUR_TAG_ORANGE);
if (normals == NULL) {
mempool_free(floatNorms);
return 1;
}
// Calculate vertex normals and store them as floating point.
for (i = 0; i < model->numberOfBatches; i++) {
vertOffset = batches[i].verticesOffset;
for (j = batches[i].facesOffset; j < batches[i + 1].facesOffset; j++) {
@@ -730,22 +737,23 @@ s32 func_80060EA8(ObjectModel *model) {
sp58[k] = vertices[a2].z;
}
spAC[j].x = (sp58[0] - sp58[2]) * (sp64[0] - sp64[1]) - (sp64[0] - sp64[2]) * (sp58[0] - sp58[1]);
spAC[j].y = (sp58[0] - sp58[1]) * (sp70[0] - sp70[2]) - (sp70[0] - sp70[1]) * (sp58[0] - sp58[2]);
spAC[j].z = (sp70[0] - sp70[1]) * (sp64[0] - sp64[2]) - (sp70[0] - sp70[2]) * (sp64[0] - sp64[1]);
length = sqrtf(spAC[j].x * spAC[j].x + spAC[j].y * spAC[j].y + spAC[j].z * spAC[j].z);
floatNorms[j].x = (sp58[0] - sp58[2]) * (sp64[0] - sp64[1]) - (sp64[0] - sp64[2]) * (sp58[0] - sp58[1]);
floatNorms[j].y = (sp58[0] - sp58[1]) * (sp70[0] - sp70[2]) - (sp70[0] - sp70[1]) * (sp58[0] - sp58[2]);
floatNorms[j].z = (sp70[0] - sp70[1]) * (sp64[0] - sp64[2]) - (sp70[0] - sp70[2]) * (sp64[0] - sp64[1]);
length = sqrtf(floatNorms[j].x * floatNorms[j].x + floatNorms[j].y * floatNorms[j].y +
floatNorms[j].z * floatNorms[j].z);
if (length != 0.0f) {
spAC[j].x /= length;
spAC[j].y /= length;
spAC[j].z /= length;
floatNorms[j].x /= length;
floatNorms[j].y /= length;
floatNorms[j].z /= length;
}
}
}
v0 = (s16 *) mempool_alloc(model->numberOfVertices * sizeof(s16), COLOUR_TAG_ORANGE);
if (v0 == NULL) {
mempool_free(spAC);
mempool_free(spA0);
mempool_free(floatNorms);
mempool_free(normals);
return 1;
}
@@ -807,8 +815,8 @@ s32 func_80060EA8(ObjectModel *model) {
v06 = (Vec3f *) mempool_alloc(s6 * sizeof(Vec3f), COLOUR_TAG_ORANGE);
if (v06 == NULL) {
mempool_free(spAC);
mempool_free(spA0);
mempool_free(floatNorms);
mempool_free(normals);
mempool_free(v0);
return 1;
}
@@ -828,9 +836,9 @@ s32 func_80060EA8(ObjectModel *model) {
a2 = v0[a2];
if (a2 >= 0) {
v06[a2].x += spAC[j].x;
v06[a2].y += spAC[j].y;
v06[a2].z += spAC[j].z;
v06[a2].x += floatNorms[j].x;
v06[a2].y += floatNorms[j].y;
v06[a2].z += floatNorms[j].z;
}
}
}
@@ -850,27 +858,36 @@ s32 func_80060EA8(ObjectModel *model) {
for (k = 0; k < model->numberOfVertices; k++) {
a2 = v0[k];
if (a2 >= 0) {
spA0[a0].x = v06[a2].x;
spA0[a0].y = v06[a2].y;
spA0[a0].z = v06[a2].z;
normals[a0].x = v06[a2].x;
normals[a0].y = v06[a2].y;
normals[a0].z = v06[a2].z;
a0++;
}
}
model->unk40 = spA0;
model->normals = normals;
mempool_free(v0);
mempool_free(v06);
mempool_free(spAC);
mempool_free(floatNorms);
}
return 0;
}
void func_800619F4(s32 arg0) {
D_8011D640 = arg0;
/**
* Sets the animation end offset for new models when loading.
* This lets you choose to load more animations than the model normally would.
*/
void model_anim_offset(s32 offset) {
gModelAnimOffsetID = offset;
}
// Returns 0 if successful, or 1 if an error occured.
s32 func_80061A00(ObjectModel *model, s32 animTableIndex) {
/**
* Checks the animation table for the model ID for animation entries.
* Zero entries just set the anim count to zero and return early.
* Otherwise, allocate space for animation data for each animation and loads each into each data slot.
* Returns nonzero if something went wrong.
*/
s32 model_anim_init(ObjectModel *model, s32 modelID) {
s32 j;
s32 end;
ObjectModel_44 *allocAnimData;
@@ -883,15 +900,15 @@ s32 func_80061A00(ObjectModel *model, s32 animTableIndex) {
u32 animAddress;
s32 *temp;
start = gAnimationTable[animTableIndex];
end = gAnimationTable[animTableIndex + 1];
start = gAnimationTable[modelID];
end = gAnimationTable[modelID + 1];
if (start == end) {
model->numberOfAnimations = 0;
return 0;
}
if (D_8011D640 != 0) {
if (start + D_8011D640 < end) {
end = start + D_8011D640;
if (gModelAnimOffsetID != 0) {
if (start + gModelAnimOffsetID < end) {
end = start + gModelAnimOffsetID;
}
}
model->numberOfAnimations = end - start;
+6 -6
View File
@@ -17,22 +17,22 @@ typedef struct unk8011D624 {
ObjectModel *model;
} unk8011D624;
extern s32 gTractionTableChecksum;
extern s32 gTrackRenderFuncLength;
extern s32 gRenderSceneChecksum;
extern s32 gRenderSceneFuncLength;
void allocate_object_model_pools(void);
void func_800619F4(s32 arg0);
void model_anim_offset(s32 offset);
void func_80061C0C(Object* obj);
void free_3d_model(ModelInstance *modInst);
s32 func_80061A00(ObjectModel *model, s32 animTableIndex);
s32 model_anim_init(ObjectModel *model, s32 modelID);
s32 check_nearby_vertices(Vertex *vertices, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
ModelInstance *model_init_type(ObjectModel *model, s32 flags);
ModelInstance *model_instance_init(ObjectModel *model, s32 flags);
ModelInstance *object_model_init(s32 modelID, s32 flags);
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 *);
s32 func_80060AC8(ObjectModel *mdl, s32 arg1, s32 arg2, s32 arg3, s32 *outBatchIndex, s32 *outVertexIndex);
s32 func_80060EA8(ObjectModel *);
s32 model_calc_normals(ObjectModel *);
#endif
+150 -133
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -491,7 +491,7 @@ void render_bubble_trap(ObjectTransform *trans, Sprite *gfxData, Object *obj, s3
void gParticlePtrList_flush(void);
s32 init_object_shading(Object *obj, ShadeProperties *shadeData);
ObjectHeader *load_object_header(s32 index);
s32 func_8000F99C(Object *);
s32 obj_init_attachpoint(Object *);
void try_free_object_header(s32 index);
s32 get_object_property_size(Object *obj, Object_64 *obj64);
void light_setup_light_sources(Object *obj);
@@ -513,7 +513,7 @@ void render_3d_model(Object *obj);
void mode_end_taj_race(s32 reason);
void ainode_update(void);
void func_8001E6EC(s8);
Object *func_8000FD54(s32 objectHeaderIndex);
Object *obj_spawn_attachment(s32 objID);
void sort_objects_by_dist(s32 startIndex, s32 lastIndex);
void func_80016748(Object *obj0, Object *obj1);
void race_finish_time_trial(void);
@@ -551,7 +551,7 @@ Object *spawn_object(LevelObjectEntryCommon *entry, s32);
s32 func_8001F460(Object*, s32, Object*);
void func_8000B750(Object *racerObj, s32 racerIndex, s32 vehicleIDPrev, s32 boostType, s32 arg4);
void func_80018CE0(Object* racerObj, f32 xPos, f32 yPos, f32 zPos, s32 updateRate);
s32 func_800185E4(s32 checkpointIndex, Object *obj, f32 objX, f32 objY, f32 objZ, f32 *checkpointDistance, u8 *arg6);
s32 func_800185E4(s32 checkpointIndex, Object *obj, f32 objX, f32 objY, f32 objZ, f32 *arg5, u8 *arg6);
void obj_tex_animate(Object *, s32);
Object *find_furthest_telepoint(f32 x, f32 z);
void func_8006017C(ObjectModel *);
@@ -562,7 +562,7 @@ void func_8000CC7C(Vehicle, u32, s32);
void func_80017E98(void);
void spectate_update(void);
void func_8001E93C(void);
void func_80019808(s32 updateRate);
void race_check_finish(s32 updateRate);
void func_80014090(Object*, s32);
void audspat_update_all(Object**, s32, s32);
void func_8001E89C(void);
+18 -18
View File
@@ -96,8 +96,8 @@ s32 gMaxRectangleParticles = 0;
s32 gMaxSpriteParticles = 0;
s32 gMaxLineParticles = 0;
s32 gMaxPointParticles = 0;
Sprite **D_800E2E60 = NULL; // Sprites loaded from asset 47; appears to be unused
s32 D_800E2E64 = 0; // Number of sprites in D_800E2E60
Sprite **gParticleDummys = NULL; // Sprites loaded from asset 47; appears to be unused
s32 gParticleDummyCount = 0; // Number of sprites in gParticleDummys
Vec2s gParticleCoordListTri[3] = {
{ { { 0, 8 } } },
@@ -157,7 +157,7 @@ s16 gHovercraftParticleOpacities[8];
void reset_particles(void) {
free_particle_buffers();
free_particle_vertices_triangles();
free_unknown_particle_sprites();
particle_free_dummy();
}
/**
@@ -167,21 +167,21 @@ void reset_particles_with_assets(void) {
free_particle_buffers();
free_particle_vertices_triangles();
free_particle_assets();
free_unknown_particle_sprites();
particle_free_dummy();
}
/**
* Deallocate buffers used for sprites from asset 47.
* Free dummy particles from RAM.
*/
void free_unknown_particle_sprites(void) {
void particle_free_dummy(void) {
s32 i;
if (D_800E2E60 != NULL) {
for (i = 0; i < D_800E2E64; i++) {
sprite_free(D_800E2E60[i]);
if (gParticleDummys != NULL) {
for (i = 0; i < gParticleDummyCount; i++) {
sprite_free(gParticleDummys[i]);
}
mempool_free(D_800E2E60);
D_800E2E60 = 0;
mempool_free(gParticleDummys);
gParticleDummys = NULL;
}
}
@@ -412,16 +412,16 @@ void init_particle_buffers(s32 maxTriangleParticles, s32 maxRectangleParticles,
gPointParticleBuffer[i].base.kind = PARTICLE_KIND_NONE;
}
if (D_800E2E60 == NULL) {
if (gParticleDummys == NULL) {
asset2F = (s16 *) load_asset_section_from_rom(ASSET_BINARY_47);
D_800E2E64 = 0;
while (asset2F[D_800E2E64] != -1) {
D_800E2E64++;
gParticleDummyCount = 0;
while (asset2F[gParticleDummyCount] != -1) {
gParticleDummyCount++;
}
D_800E2E60 = mempool_alloc_safe(D_800E2E64 * 4, COLOUR_TAG_BLUE);
for (i = 0; i < D_800E2E64; i++) {
D_800E2E60[i] = (Sprite *) tex_load_sprite(asset2F[i] & 0x3FFF, 1);
gParticleDummys = mempool_alloc_safe(gParticleDummyCount * 4, COLOUR_TAG_BLUE);
for (i = 0; i < gParticleDummyCount; i++) {
gParticleDummys[i] = (Sprite *) tex_load_sprite(asset2F[i] & 0x3FFF, 1);
}
mempool_free(asset2F);
+1 -1
View File
@@ -281,7 +281,7 @@ typedef struct PointParticle {
void reset_particles(void);
void reset_particles_with_assets(void);
void free_unknown_particle_sprites(void);
void particle_free_dummy(void);
void free_particle_buffers(void);
void free_particle_vertices_triangles(void);
void free_particle_assets(void);
+58 -45
View File
@@ -610,10 +610,10 @@ void racer_AI_pathing_inputs(Object *obj, Object_Racer *racer, s32 updateRate) {
switch (raceType) {
case RACETYPE_CHALLENGE_BATTLE:
case RACETYPE_CHALLENGE_BANANAS:
func_8004447C(obj, racer, updateRate);
racer_ai_challenge(obj, racer, updateRate);
break;
case RACETYPE_CHALLENGE_EGGS:
func_800452A0(obj, racer, updateRate);
racer_ai_eggs(obj, racer, updateRate);
break;
default:
func_80045C48(obj, racer, updateRate);
@@ -675,7 +675,7 @@ s32 roll_percent_chance(s32 chance) {
}
// Handles the opponent A.I. for battle & banana challenges.
void func_8004447C(Object *aiRacerObj, Object_Racer *aiRacer, s32 updateRate) {
void racer_ai_challenge(Object *aiRacerObj, Object_Racer *aiRacer, s32 updateRate) {
Object *sp74;
Object_64 *tempRacer;
LevelObjectEntry *sp6C;
@@ -1016,7 +1016,11 @@ void func_8004447C(Object *aiRacerObj, Object_Racer *aiRacer, s32 updateRate) {
}
}
void func_80045128(Object **racerObjs) {
/**
* Manage the global flags for the egg challenge.
* Includes hatch progress, being held by a player, and number of hatched eggs.
*/
void racer_update_eggs(Object **racerObjs) {
Object_Racer *racer;
s32 i;
@@ -1024,15 +1028,24 @@ void func_80045128(Object **racerObjs) {
racer = &racerObjs[i]->unk64->racer;
gEggChallengeFlags[i] = racer->lap;
if (racer->eggHudCounter != 0) {
gEggChallengeFlags[i] |= 0x40;
gEggChallengeFlags[i] |= RACER_EGG_HATCHING;
}
if (racer->held_obj != NULL) {
gEggChallengeFlags[i] |= 0x80;
gEggChallengeFlags[i] |= RACER_EGG_HELD;
}
}
}
void func_800452A0(Object *obj, Object_Racer *racer, s32 updateRate) {
/**
* A custom AI handler for the egg challenge.
* As a result of the open area design of Fire Mountain, the AI does not use pathing nodes.
* Instead, they use a simple positional targeting system that takes their current priority,
* then moves towards it until that objective is complete.
* They will first search for any eggs in the centre of the arena, then failing that, find one
* from another players nest to steal.
* If they're holding an egg, they'll attempt to take it to their nest.
*/
void racer_ai_eggs(Object *obj, Object_Racer *racer, s32 updateRate) {
f32 diffX;
f32 diffY;
f32 diffZ;
@@ -1087,10 +1100,10 @@ void func_800452A0(Object *obj, Object_Racer *racer, s32 updateRate) {
flags = 0;
bestTick = 0;
for (i = 3; i >= 0; i--) {
tickCount = (gEggChallengeFlags[i] & 0xF) * 3;
if (gEggChallengeFlags[i] & 0x40) {
tickCount = (gEggChallengeFlags[i] & RACER_EGG_MASK) * 3;
if (gEggChallengeFlags[i] & RACER_EGG_HATCHING) {
tickCount += 2;
} else if (gEggChallengeFlags[i] & 0x80) {
} else if (gEggChallengeFlags[i] & RACER_EGG_HELD) {
tickCount += 1;
}
if (bestTick < tickCount) {
@@ -1114,7 +1127,7 @@ void func_800452A0(Object *obj, Object_Racer *racer, s32 updateRate) {
}
if (bestTick == 2) {
for (i = 0; i < 4; i++) {
if (racer->racerIndex != i && gEggChallengeFlags[i] & 0x40) {
if (racer->racerIndex != i && gEggChallengeFlags[i] & RACER_EGG_HATCHING) {
racerID = i;
}
}
@@ -1574,7 +1587,7 @@ void func_80046524(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
s32 iTemp; // Seems to be reused for some reason
s32 var_a3;
s32 var_v1;
Unknown80046524 *temp_v0_16;
Object *vehiclePart;
s32 var_t0;
Object_Boost *asset20;
s8 lastWheelSurface;
@@ -2250,11 +2263,11 @@ void func_80046524(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
if (waterHeight > 40.0f) {
racer->unkC4 = 0.11f;
}
if (obj->unk60->unk0 == 1) {
temp_v0_16 = (Unknown80046524 *) obj->unk60->unk4[0];
temp_v0_16->unk0 = (gCurrentStickX * 20) + 0x4000;
temp_v0_16->unk3A++;
temp_v0_16->unk3A &= 1;
if (obj->attachPoints->count == 1) {
vehiclePart = obj->attachPoints->obj[0];
vehiclePart->segment.trans.rotation.y_rotation = (gCurrentStickX * 20) + 0x4000;
vehiclePart->segment.object.modelIndex++;
vehiclePart->segment.object.modelIndex &= 1;
}
second_racer_camera_update(obj, racer, CAMERA_HOVERCRAFT, updateRateF);
if (playerObjectHasMoved) {
@@ -3295,24 +3308,24 @@ void func_80049794(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
mtxf_from_inverse_transform((MtxF *) &sp60, &gCurrentRacerTransform);
mtxf_transform_point((MtxF *) &sp60, obj->segment.x_velocity, obj->segment.y_velocity, obj->segment.z_velocity,
&racer->lateral_velocity, &racer->unk34, &racer->velocity);
if (obj->unk60 != NULL && obj->unk60->unk0 >= 3) {
temp_v0_obj = obj->unk60->unk4[2];
if (obj->attachPoints != NULL && obj->attachPoints->count >= 3) {
temp_v0_obj = obj->attachPoints->obj[2];
temp_v0_obj->segment.trans.rotation.y_rotation = 0x4000;
temp_v0_obj->segment.object.modelIndex += 1;
if (temp_v0_obj->segment.object.modelIndex == temp_v0_obj->segment.header->numberOfModelIds) {
temp_v0_obj->segment.object.modelIndex = 0;
}
}
if (obj->unk60 != NULL && obj->unk60->unk0 >= 3) {
if (obj->attachPoints != NULL && obj->attachPoints->count >= 3) {
if (racer->groundedWheels != 0 || spA2 != FALSE) {
temp_v0_obj = obj->unk60->unk4[0];
temp_v0_obj = obj->attachPoints->obj[0];
if (temp_v0_obj->segment.trans.y_position > 0.0f) {
temp_v0_obj->segment.trans.y_position = temp_v0_obj->segment.trans.y_position - 2.0;
} else {
temp_v0_obj->segment.trans.y_position = 0.0f;
}
temp_v0_obj->segment.trans.flags &= ~OBJ_FLAGS_INVISIBLE;
temp_v0_obj = obj->unk60->unk4[1];
temp_v0_obj = obj->attachPoints->obj[1];
if (temp_v0_obj->segment.trans.y_position > 0.0f) {
temp_v0_obj->segment.trans.y_position = temp_v0_obj->segment.trans.y_position - 2.0;
} else {
@@ -3320,13 +3333,13 @@ void func_80049794(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
}
temp_v0_obj->segment.trans.flags &= ~OBJ_FLAGS_INVISIBLE;
} else {
temp_v0_obj = obj->unk60->unk4[0];
temp_v0_obj = obj->attachPoints->obj[0];
if (temp_v0_obj->segment.trans.y_position < 20.0f) {
temp_v0_obj->segment.trans.y_position = temp_v0_obj->segment.trans.y_position + 1.0f;
} else {
temp_v0_obj->segment.trans.flags |= OBJ_FLAGS_INVISIBLE;
}
temp_v0_obj = obj->unk60->unk4[1];
temp_v0_obj = obj->attachPoints->obj[1];
if (temp_v0_obj->segment.trans.y_position < 20.0f) {
temp_v0_obj->segment.trans.y_position = temp_v0_obj->segment.trans.y_position + 1.0f;
} else {
@@ -3892,10 +3905,10 @@ void func_8004CC20(s32 updateRate, f32 updateRateF, Object *racerObj, Object_Rac
mtxf_transform_point(&mtx, racerObj->segment.x_velocity, racerObj->segment.y_velocity, racerObj->segment.z_velocity,
&racer->lateral_velocity, &racer->unk34, &racer->velocity);
second_racer_camera_update(racerObj, racer, CAMERA_LOOP, updateRateF);
if (racerObj->unk60 != NULL && racer->vehicleIDPrev == VEHICLE_CAR && racerObj->unk60->unk0 >= 4) {
obj = racerObj->unk60->unk4[2];
if (racerObj->attachPoints != NULL && racer->vehicleIDPrev == VEHICLE_CAR && racerObj->attachPoints->count >= 4) {
obj = racerObj->attachPoints->obj[2];
obj->segment.trans.rotation.y_rotation = 0;
obj = racerObj->unk60->unk4[3];
obj = racerObj->attachPoints->obj[3];
obj->segment.trans.rotation.y_rotation = 0;
}
if (objectMoved) {
@@ -4063,7 +4076,7 @@ void obj_init_racer(Object *obj, LevelObjectEntry_Racer *racer) {
obj->interactObj->y_position = obj->segment.trans.y_position;
obj->interactObj->z_position = obj->segment.trans.z_position;
tempRacer->groundedWheels = 3;
tempRacer->unk1AA = 1;
tempRacer->racerOrder = 1;
tempRacer->racePosition = 1;
tempRacer->miscAnimCounter = tempRacer->playerIndex * 5;
tempRacer->checkpoint_distance = 1.0f;
@@ -5099,7 +5112,7 @@ void func_80050A28(Object *obj, Object_Racer *racer, s32 updateRate, f32 updateR
f32 traction;
f32 surfaceTraction;
f32 *miscAsset;
ObjectTransform *temp_v0;
ObjectTransform *attachmentTrans;
f32 topSpeed;
UNUSED s32 pad1;
UNUSED s32 pad2;
@@ -5118,13 +5131,13 @@ void func_80050A28(Object *obj, Object_Racer *racer, s32 updateRate, f32 updateR
racer->carBobX = -racer->roll * tempVel;
racer->carBobY = -racer->yaw * tempVel;
racer->carBobZ = -racer->pitch * tempVel;
if (obj->unk60 != NULL) {
for (i = 0; i < ((unk_Object_60 *) obj->unk60)->count; i++) {
if (obj->attachPoints != NULL) {
for (i = 0; i < obj->attachPoints->count; i++) {
tempVel = 1.0f / obj->segment.trans.scale;
temp_v0 = ((unk_Object_60 *) obj->unk60)->transforms[i];
temp_v0->x_position = (f32) (-racer->carBobX * tempVel);
temp_v0->y_position = (f32) (-racer->carBobY * tempVel);
temp_v0->z_position = (f32) (-racer->carBobZ * tempVel);
attachmentTrans = &obj->attachPoints->obj[i]->segment.trans;
attachmentTrans->x_position = (f32) (-racer->carBobX * tempVel);
attachmentTrans->y_position = (f32) (-racer->carBobY * tempVel);
attachmentTrans->z_position = (f32) (-racer->carBobZ * tempVel);
}
}
} else {
@@ -6111,14 +6124,14 @@ void func_80053750(Object *objRacer, Object_Racer *racer, f32 updateRateF) {
s32 isNotHardBraking;
s32 i;
if (objRacer->unk60 == NULL) {
if (objRacer->attachPoints == NULL) {
return;
}
temp_v1 = objRacer->unk60->unk0;
temp_v1 = objRacer->attachPoints->count;
if (temp_v1 == 2) {
someObj = objRacer->unk60->unk4[0];
someObj = objRacer->attachPoints->obj[0];
someObj->segment.trans.rotation.y_rotation = 0x4000;
someObj = objRacer->unk60->unk4[1];
someObj = objRacer->attachPoints->obj[1];
someObj->segment.trans.rotation.y_rotation = 0x4000;
}
if (temp_v1 >= 4) {
@@ -6141,7 +6154,7 @@ void func_80053750(Object *objRacer, Object_Racer *racer, f32 updateRateF) {
racer->unkB0 -= 5.0;
for (i = 0; i < 4; i++) {
if (i < 2 || isNotHardBraking) {
someObj = objRacer->unk60->unk4[i];
someObj = objRacer->attachPoints->obj[i];
if ((racer->unk1FB != 0 && i >= 3) || racer->unk1FB == 0) {
if (someObj->properties.common.unk0 != 0) {
someObj->segment.object.modelIndex--;
@@ -6162,7 +6175,7 @@ void func_80053750(Object *objRacer, Object_Racer *racer, f32 updateRateF) {
racer->unkB0 += 5.0;
for (i = 0; i < 4; i++) {
if (i < 2 || isNotHardBraking) {
someObj = objRacer->unk60->unk4[i];
someObj = objRacer->attachPoints->obj[i];
if ((racer->unk1FB != 0 && i >= 3) || racer->unk1FB == 0) {
if (someObj->properties.common.unk0 == 0) {
someObj->segment.object.modelIndex--;
@@ -6182,7 +6195,7 @@ void func_80053750(Object *objRacer, Object_Racer *racer, f32 updateRateF) {
flags = 1;
if (racer->unk1FB != 0) {
for (i = 0; i < 2; i++) {
someObj = objRacer->unk60->unk4[i];
someObj = objRacer->attachPoints->obj[i];
if (someObj->properties.racer.unk0 != 0) {
someObj->segment.object.modelIndex--;
if (someObj->segment.object.modelIndex < 0) {
@@ -6199,7 +6212,7 @@ void func_80053750(Object *objRacer, Object_Racer *racer, f32 updateRateF) {
}
temp_f0 = someObj->segment.trans.y_position; // Fake
for (i = 0; i < 4; i++) {
someObj = objRacer->unk60->unk4[i];
someObj = objRacer->attachPoints->obj[i];
if (!(racer->unk1E3 & flags)) {
someObj->segment.trans.y_position += ((-10.0f - someObj->segment.trans.y_position) * 0.125);
if (racer->waterTimer != 0) {
@@ -6213,9 +6226,9 @@ void func_80053750(Object *objRacer, Object_Racer *racer, f32 updateRateF) {
}
flags <<= 1;
}
someObj = objRacer->unk60->unk4[2];
someObj = objRacer->attachPoints->obj[2];
someObj->segment.trans.rotation.y_rotation = gCurrentStickX * 100;
someObj = objRacer->unk60->unk4[3];
someObj = objRacer->attachPoints->obj[3];
someObj->segment.trans.rotation.y_rotation = gCurrentStickX * 100;
}
}
+10 -14
View File
@@ -126,6 +126,13 @@ typedef enum TajInteraction {
TAJ_TELEPORT,
} TajInteraction;
typedef enum RacerEggFlags {
RACER_EGG_NONE,
RACER_EGG_MASK = 0xF, // Bitmask used for the egg HUD fade counting.
RACER_EGG_HATCHING = (1 << 6), // Egg has hatch progress
RACER_EGG_HELD = (1 << 7) // Egg is held by a racer.
} RacerEggFlags;
#define AI_MIN 0
#define AI_MAX 1
#define AI_MIN_STEP 2
@@ -137,17 +144,6 @@ typedef struct AIBehaviourTable {
s8 percentages[4][4];
} AIBehaviourTable;
typedef struct Unknown80046524 {
s16 unk0;
u8 pad2[0x38];
s8 unk3A;
} Unknown80046524;
typedef struct unk_Object_60 {
s32 count;
ObjectTransform *transforms[1];
} unk_Object_60;
s32 roll_percent_chance(s32 chance);
void apply_plane_tilt_anim(s32 updateRate, Object *obj, Object_Racer *racer);
void racer_attack_handler_plane(Object *obj, Object_Racer *racer);
@@ -214,7 +210,7 @@ void func_80042D20(Object *obj, Object_Racer *racer, s32 updateRate);
void handle_racer_items(Object *obj, Object_Racer *racer, s32 updateRate);
void drop_bananas(Object *obj, Object_Racer *racer, s32 number);
void update_player_racer(Object *obj, s32 updateRate);
void func_80045128(Object **racerObjs);
void racer_update_eggs(Object **racerObjs);
void timetrial_ghost_write(Object *obj, s32 updateRate);
void func_80046524(s32 updateRate, f32 updateRateF, Object* obj, Object_Racer* racer);
void func_80053750(Object *objRacer, Object_Racer *racer, f32 updateRateF);
@@ -228,8 +224,8 @@ s32 func_80017248(Object *obj, s32, s32 *, Vec3f *, f32 *, f32 *, s8 *surface);
void func_80059208(Object* obj, Object_Racer* racer, s32 updateRate); /* extern */
void func_80049794(s32 updateRate, f32 updateRateF, Object* obj, Object_Racer* racer); /* extern */
void func_8004CC20(s32 updateRate, f32 updateRateF, Object *racerObj, Object_Racer *racer); /* extern */
void func_8004447C(Object *aiRacerObj, Object_Racer *aiRacer, s32 updateRate);
void func_800452A0(Object *obj, Object_Racer *racer, s32 updateRate);
void racer_ai_challenge(Object *aiRacerObj, Object_Racer *aiRacer, s32 updateRate);
void racer_ai_eggs(Object *obj, Object_Racer *racer, s32 updateRate);
void func_80045C48(Object *obj, Object_Racer *racer, s32 updateRate);
void racer_activate_magnet(Object *obj, Object_Racer *racer, s32 updateRate);
Object *func_8005698C(Object *racerObj, Object_Racer *racer, f32 *outDistance);
+2 -2
View File
@@ -12,8 +12,8 @@ ROM_FILEPATH = f'build/dkr.{REGION}.{VERSION}.z64'
FUNCTIONS_TO_CALC = [
# function checksum variable func size variable
('func_80019808', 'gFunc80019808Checksum', 'gFunc80019808Length'),
('render_scene', 'gTractionTableChecksum', 'gTrackRenderFuncLength'),
('race_check_finish', 'gRaceCheckFinishChecksum', 'gRaceCheckFinishFuncLength'),
('render_scene', 'gRenderSceneChecksum', 'gRenderSceneFuncLength'),
('obj_loop_goldenballoon', 'gObjLoopGoldenBalloonChecksum', 'gObjLoopGoldenBalloonLength'),
('viewport_rsp_set', 'gViewportFuncChecksum', 'gViewportFuncLength')
]
+21 -21
View File
@@ -221,13 +221,13 @@ spawn_object = 0x8000EA54;
objFreeAssets = 0x8000F648;
light_setup_light_sources = 0x8000F758;
init_object_shading = 0x8000F7EC;
func_8000F99C = 0x8000F99C;
obj_init_attachpoint = 0x8000F99C;
obj_init_emitter = 0x8000FAC4;
init_object_shadow = 0x8000FBCC;
init_object_water_effect = 0x8000FC6C;
init_object_interaction_data = 0x8000FD20;
func_8000FD34 = 0x8000FD34;
func_8000FD54 = 0x8000FD54;
obj_spawn_attachment = 0x8000FD54;
free_object = 0x8000FFB8;
obj_table_ids = 0x80010018;
obj_id_valid = 0x80010028;
@@ -290,7 +290,7 @@ func_800185E4 = 0x800185E4;
find_taj_object = 0x80018C6C;
func_80018CE0 = 0x80018CE0;
func_8001955C = 0x8001955C;
func_80019808 = 0x80019808;
race_check_finish = 0x80019808;
set_course_finish_flags = 0x8001A7D8;
race_finish_adventure = 0x8001A8D4;
race_transition_adventure = 0x8001A8F4;
@@ -674,9 +674,9 @@ func_80042D20 = 0x80042D20;
increment_ai_behaviour_chances = 0x80043ECC;
racer_AI_pathing_inputs = 0x80044170;
roll_percent_chance = 0x80044450;
func_8004447C = 0x8004447C;
func_80045128 = 0x80045128;
func_800452A0 = 0x800452A0;
racer_ai_challenge = 0x8004447C;
racer_update_eggs = 0x80045128;
racer_ai_eggs = 0x800452A0;
func_80045C48 = 0x80045C48;
func_80046524 = 0x80046524;
racer_attack_handler_hovercraft = 0x80048C7C;
@@ -784,16 +784,16 @@ update_rocket = 0x8005F340;
// object_models.c .text
allocate_object_model_pools = 0x8005F880;
object_model_init = 0x8005F9CC;
model_init_type = 0x8005FDA0;
model_instance_init = 0x8005FDA0;
free_3d_model = 0x80060010;
free_model_data = 0x80060128;
func_8006017C = 0x8006024C;
func_80060910 = 0x800609E0;
func_80060AC8 = 0x80060B98;
func_80060C58 = 0x80060D28;
func_80060EA8 = 0x80060F78;
func_800619F4 = 0x80061AC4;
func_80061A00 = 0x80061AD0;
model_calc_normals = 0x80060F78;
model_anim_offset = 0x80061AC4;
model_anim_init = 0x80061AD0;
func_80061C0C = 0x80061CDC;
// obj_animate.c .text
@@ -1435,7 +1435,7 @@ menu_racer_portraits = 0x80094D00;
postrace_start = 0x80094D84;
postrace_load = 0x80095158;
postrace_music_fade = 0x80095310;
func_80094D28 = 0x80095424;
postrace_viewport = 0x80095424;
postrace_message = 0x80095D20;
menu_postrace = 0x80095E24;
postrace_free = 0x80096E8C;
@@ -1624,7 +1624,7 @@ rain_render = 0x800AE2BC;
// particles.c .text
reset_particles = 0x800AE870;
reset_particles_with_assets = 0x800AE8A0;
free_unknown_particle_sprites = 0x800AE8D8;
particle_free_dummy = 0x800AE8D8;
free_particle_buffers = 0x800AE974;
free_particle_vertices_triangles = 0x800AEA38;
free_particle_assets = 0x800AEA90;
@@ -2182,8 +2182,8 @@ audFrameCt = 0x800DE010;
nextDMA = 0x800DE014;
curAcmdList = 0x800DE018;
gAntiPiracyAudioFreq = 0x800DE01C;
gFunc80019808Checksum = 0x800DE020;
gFunc80019808Length = 0x800DE024;
gRaceCheckFinishChecksum = 0x800DE020;
gRaceCheckFinishFuncLength = 0x800DE024;
// audiosfx.c .data
gSoundStateLists = 0x800DE040; // size:0xC
@@ -2318,8 +2318,8 @@ gWizpigVoiceTable = 0x800DE800;
gRocketVoiceTable = 0x800DE820;
// object_models.c .data
gTractionTableChecksum = 0x800DE840;
gTrackRenderFuncLength = 0x800DE844;
gRenderSceneChecksum = 0x800DE840;
gRenderSceneFuncLength = 0x800DE844;
// al/reverb.c .data
alFXEnabled = 0x800DE850;
@@ -2855,8 +2855,8 @@ gMaxRectangleParticles = 0x800E4940;
gMaxSpriteParticles = 0x800E4944;
gMaxLineParticles = 0x800E4948;
gMaxPointParticles = 0x800E494C;
D_800E2E60 = 0x800E4950;
D_800E2E64 = 0x800E4954;
gParticleDummys = 0x800E4950;
gParticleDummyCount = 0x800E4954;
gParticleCoordListTri = 0x800E4958;
gParticleCoordListQuad = 0x800E4964;
D_800E2E84 = 0x800E4974;
@@ -3617,10 +3617,10 @@ D_8011ADA4 = 0x8011C814;
gObjectUpdateRateF = 0x8011C818;
gPathUpdateOff = 0x8011C81C;
gEventCountdown = 0x8011C820;
D_8011ADB4 = 0x8011C824;
gRaceFinishTriggered = 0x8011C824;
gEventStartTimer = 0x8011C828;
D_8011ADBC = 0x8011C82C;
D_8011ADC0 = 0x8011C830;
gNumFinishedRacers = 0x8011C830;
gFirstTimeFinish = 0x8011C834;
D_8011ADC5 = 0x8011C835;
gBalloonCutsceneTimer = 0x8011C838;
@@ -3923,7 +3923,7 @@ gNumModelIDs = 0x8011F0A0;
D_8011D634 = 0x8011F0A4;
gAnimationTable = 0x8011F0A8;
gObjectAnimationTable = 0x8011F0AC;
D_8011D640 = 0x8011F0B0;
gModelAnimOffsetID = 0x8011F0B0;
D_8011D644 = 0x8011F0B4;
// main .bss
+21 -21
View File
@@ -221,13 +221,13 @@ spawn_object = 0x8000EA54;
objFreeAssets = 0x8000F648;
light_setup_light_sources = 0x8000F758;
init_object_shading = 0x8000F7EC;
func_8000F99C = 0x8000F99C;
obj_init_attachpoint = 0x8000F99C;
obj_init_emitter = 0x8000FAC4;
init_object_shadow = 0x8000FBCC;
init_object_water_effect = 0x8000FC6C;
init_object_interaction_data = 0x8000FD20;
func_8000FD34 = 0x8000FD34;
func_8000FD54 = 0x8000FD54;
obj_spawn_attachment = 0x8000FD54;
free_object = 0x8000FFB8;
obj_table_ids = 0x80010018;
obj_id_valid = 0x80010028;
@@ -290,7 +290,7 @@ func_800185E4 = 0x800185E4;
find_taj_object = 0x80018C6C;
func_80018CE0 = 0x80018CE0;
func_8001955C = 0x8001955C;
func_80019808 = 0x80019808;
race_check_finish = 0x80019808;
set_course_finish_flags = 0x8001A7D8;
race_finish_adventure = 0x8001A8D4;
race_transition_adventure = 0x8001A8F4;
@@ -674,9 +674,9 @@ func_80042D20 = 0x80042D20;
increment_ai_behaviour_chances = 0x80043ECC;
racer_AI_pathing_inputs = 0x80044170;
roll_percent_chance = 0x80044450;
func_8004447C = 0x8004447C;
func_80045128 = 0x80045128;
func_800452A0 = 0x800452A0;
racer_ai_challenge = 0x8004447C;
racer_update_eggs = 0x80045128;
racer_ai_eggs = 0x800452A0;
func_80045C48 = 0x80045C48;
func_80046524 = 0x80046524;
racer_attack_handler_hovercraft = 0x80048C7C;
@@ -782,16 +782,16 @@ update_rocket = 0x8005F310;
// object_models.c .text
allocate_object_model_pools = 0x8005F850;
object_model_init = 0x8005F99C;
model_init_type = 0x8005FCD0;
model_instance_init = 0x8005FCD0;
free_3d_model = 0x8005FF40;
free_model_data = 0x80060058;
func_8006017C = 0x8006017C;
func_80060910 = 0x80060910;
func_80060AC8 = 0x80060AC8;
func_80060C58 = 0x80060C58;
func_80060EA8 = 0x80060EA8;
func_800619F4 = 0x800619F4;
func_80061A00 = 0x80061A00;
model_calc_normals = 0x80060EA8;
model_anim_offset = 0x800619F4;
model_anim_init = 0x80061A00;
func_80061C0C = 0x80061C0C;
// obj_animate.c .text
@@ -1430,7 +1430,7 @@ menu_racer_portraits = 0x80094698;
postrace_start = 0x8009471C;
postrace_load = 0x80094AF0;
postrace_music_fade = 0x80094CA8;
func_80094D28 = 0x80094DBC;
postrace_viewport = 0x80094DBC;
postrace_message = 0x800956B8;
menu_postrace = 0x800957BC;
postrace_free = 0x80096824;
@@ -1613,7 +1613,7 @@ rain_sound = 0x800ADC58;
rain_render = 0x800ADD4C;
reset_particles = 0x800AE300;
reset_particles_with_assets = 0x800AE330;
free_unknown_particle_sprites = 0x800AE368;
particle_free_dummy = 0x800AE368;
free_particle_buffers = 0x800AE404;
free_particle_vertices_triangles = 0x800AE4C8;
free_particle_assets = 0x800AE520;
@@ -2090,8 +2090,8 @@ audFrameCt = 0x800DC710;
nextDMA = 0x800DC714;
curAcmdList = 0x800DC718;
gAntiPiracyAudioFreq = 0x800DC71C;
gFunc80019808Checksum = 0x800DC720;
gFunc80019808Length = 0x800DC724;
gRaceCheckFinishChecksum = 0x800DC720;
gRaceCheckFinishFuncLength = 0x800DC724;
gSoundStateLists = 0x800DC740; // size:0xC
gSoundPlayerPtr = 0x800DC74C;
gSoundGlobalVolume = 0x800DC750;
@@ -2196,8 +2196,8 @@ gSmokeyVoiceTable = 0x800DCEB0;
gBubblerVoiceTable = 0x800DCED0;
gWizpigVoiceTable = 0x800DCEF0;
gRocketVoiceTable = 0x800DCF10;
gTractionTableChecksum = 0x800DCF30;
gTrackRenderFuncLength = 0x800DCF34;
gRenderSceneChecksum = 0x800DCF30;
gRenderSceneFuncLength = 0x800DCF34;
alFXEnabled = 0x800DCF40;
gStereoPanMode = 0x800DD0E0;
gAntiPiracyViewport = 0x800DD0F0;
@@ -2686,8 +2686,8 @@ gMaxRectangleParticles = 0x800E2EE0;
gMaxSpriteParticles = 0x800E2EE4;
gMaxLineParticles = 0x800E2EE8;
gMaxPointParticles = 0x800E2EEC;
D_800E2E60 = 0x800E2EF0;
D_800E2E64 = 0x800E2EF4;
gParticleDummys = 0x800E2EF0;
gParticleDummyCount = 0x800E2EF4;
gParticleCoordListTri = 0x800E2EF8;
gParticleCoordListQuad = 0x800E2F04;
D_800E2E84 = 0x800E2F14;
@@ -3355,10 +3355,10 @@ D_8011ADA4 = 0x8011AE34;
gObjectUpdateRateF = 0x8011AE38;
gPathUpdateOff = 0x8011AE3C;
gEventCountdown = 0x8011AE40;
D_8011ADB4 = 0x8011AE44;
gRaceFinishTriggered = 0x8011AE44;
gEventStartTimer = 0x8011AE48;
D_8011ADBC = 0x8011AE4C;
D_8011ADC0 = 0x8011AE50;
gNumFinishedRacers = 0x8011AE50;
gFirstTimeFinish = 0x8011AE54;
D_8011ADC5 = 0x8011AE55;
gBalloonCutsceneTimer = 0x8011AE58;
@@ -3639,7 +3639,7 @@ gNumModelIDs = 0x8011D6C0;
D_8011D634 = 0x8011D6C4;
gAnimationTable = 0x8011D6C8;
gObjectAnimationTable = 0x8011D6CC;
D_8011D640 = 0x8011D6D0;
gModelAnimOffsetID = 0x8011D6D0;
D_8011D644 = 0x8011D6D4;
gThread1Stack = 0x8011D6E0;
gThread3Stack = 0x8011D7E8;
+21 -21
View File
@@ -221,13 +221,13 @@ spawn_object = 0x8000EA54;
objFreeAssets = 0x8000F648;
light_setup_light_sources = 0x8000F758;
init_object_shading = 0x8000F7EC;
func_8000F99C = 0x8000F99C;
obj_init_attachpoint = 0x8000F99C;
obj_init_emitter = 0x8000FAC4;
init_object_shadow = 0x8000FBCC;
init_object_water_effect = 0x8000FC6C;
init_object_interaction_data = 0x8000FD20;
func_8000FD34 = 0x8000FD34;
func_8000FD54 = 0x8000FD54;
obj_spawn_attachment = 0x8000FD54;
free_object = 0x8000FFB8;
obj_table_ids = 0x80010018;
obj_id_valid = 0x80010028;
@@ -290,7 +290,7 @@ func_800185E4 = 0x80018618;
find_taj_object = 0x80018CA0;
func_80018CE0 = 0x80018D14;
func_8001955C = 0x80019590;
func_80019808 = 0x8001983C;
race_check_finish = 0x8001983C;
set_course_finish_flags = 0x8001A80C;
race_finish_adventure = 0x8001A908;
race_transition_adventure = 0x8001A928;
@@ -662,9 +662,9 @@ func_80042D20 = 0x80042D60;
increment_ai_behaviour_chances = 0x80043F0C;
racer_AI_pathing_inputs = 0x800441B0;
roll_percent_chance = 0x80044490;
func_8004447C = 0x800444BC;
func_80045128 = 0x80045168;
func_800452A0 = 0x800452E0;
racer_ai_challenge = 0x800444BC;
racer_update_eggs = 0x80045168;
racer_ai_eggs = 0x800452E0;
func_80045C48 = 0x80045C88;
func_80046524 = 0x80046564;
racer_attack_handler_hovercraft = 0x80048CBC;
@@ -756,16 +756,16 @@ update_wizpig = 0x8005EC30;
update_rocket = 0x8005F4B0;
allocate_object_model_pools = 0x8005F9F0;
object_model_init = 0x8005FB3C; // has a diff from v1
model_init_type = 0x8005FF10;
model_instance_init = 0x8005FF10;
free_3d_model = 0x80060180;
free_model_data = 0x80060298;
func_8006017C = 0x800603BC;
func_80060910 = 0x80060B50;
func_80060AC8 = 0x80060D08;
func_80060C58 = 0x80060E98;
func_80060EA8 = 0x800610E8;
func_800619F4 = 0x80061C34;
func_80061A00 = 0x80061C40;
model_calc_normals = 0x800610E8;
model_anim_offset = 0x80061C34;
model_anim_init = 0x80061C40;
func_80061C0C = 0x80061E4C;
obj_animate = 0x80061F70;
alCSPNew = 0x800624D0;
@@ -1349,7 +1349,7 @@ menu_racer_portraits = 0x80094B9C;
postrace_start = 0x80094C20;
postrace_load = 0x80094FF4;
postrace_music_fade = 0x800951AC;
func_80094D28 = 0x800952C0;
postrace_viewport = 0x800952C0;
postrace_message = 0x80095BBC;
menu_postrace = 0x80095CC0;
postrace_free = 0x80096D28;
@@ -1534,7 +1534,7 @@ rain_sound = 0x800AE1B8;
rain_render = 0x800AE2AC;
reset_particles = 0x800AE860;
reset_particles_with_assets = 0x800AE890;
free_unknown_particle_sprites = 0x800AE8C8;
particle_free_dummy = 0x800AE8C8;
free_particle_buffers = 0x800AE964;
free_particle_vertices_triangles = 0x800AEA28;
free_particle_assets = 0x800AEA80;
@@ -2017,8 +2017,8 @@ audFrameCt = 0x800DCC80;
nextDMA = 0x800DCC84;
curAcmdList = 0x800DCC88;
gAntiPiracyAudioFreq = 0x800DCC8C;
gFunc80019808Checksum = 0x800DCC90;
gFunc80019808Length = 0x800DCC94;
gRaceCheckFinishChecksum = 0x800DCC90;
gRaceCheckFinishFuncLength = 0x800DCC94;
gSoundStateLists = 0x800DCCB0; // size:0xC
gSoundPlayerPtr = 0x800DCCBC;
gSoundGlobalVolume = 0x800DCCC0;
@@ -2123,8 +2123,8 @@ gSmokeyVoiceTable = 0x800DD420;
gBubblerVoiceTable = 0x800DD440;
gWizpigVoiceTable = 0x800DD460;
gRocketVoiceTable = 0x800DD480;
gTractionTableChecksum = 0x800DD4A0;
gTrackRenderFuncLength = 0x800DD4A4;
gRenderSceneChecksum = 0x800DD4A0;
gRenderSceneFuncLength = 0x800DD4A4;
alFXEnabled = 0x800DD4B0;
gStereoPanMode = 0x800DD650;
gAntiPiracyViewport = 0x800DD660;
@@ -2615,8 +2615,8 @@ gMaxRectangleParticles = 0x800E3470;
gMaxSpriteParticles = 0x800E3474;
gMaxLineParticles = 0x800E3478;
gMaxPointParticles = 0x800E347C;
D_800E2E60 = 0x800E3480;
D_800E2E64 = 0x800E3484;
gParticleDummys = 0x800E3480;
gParticleDummyCount = 0x800E3484;
gParticleCoordListTri = 0x800E3488;
gParticleCoordListQuad = 0x800E3494;
D_800E2E84 = 0x800E34A4;
@@ -3285,10 +3285,10 @@ D_8011ADA4 = 0x8011B3B4;
gObjectUpdateRateF = 0x8011B3B8;
gPathUpdateOff = 0x8011B3BC;
gEventCountdown = 0x8011B3C0;
D_8011ADB4 = 0x8011B3C4;
gRaceFinishTriggered = 0x8011B3C4;
gEventStartTimer = 0x8011B3C8;
D_8011ADBC = 0x8011B3CC;
D_8011ADC0 = 0x8011B3D0;
gNumFinishedRacers = 0x8011B3D0;
gFirstTimeFinish = 0x8011B3D4;
D_8011ADC5 = 0x8011B3D5;
gBalloonCutsceneTimer = 0x8011B3D8;
@@ -3569,7 +3569,7 @@ gNumModelIDs = 0x8011DC40;
D_8011D634 = 0x8011DC44;
gAnimationTable = 0x8011DC48;
gObjectAnimationTable = 0x8011DC4C;
D_8011D640 = 0x8011DC50;
gModelAnimOffsetID = 0x8011DC50;
D_8011D644 = 0x8011DC54;
gThread1Stack = 0x8011DC60;
gThread3Stack = 0x8011DD68;
+21 -21
View File
@@ -221,13 +221,13 @@ spawn_object = 0x8000EA54;
objFreeAssets = 0x8000F648;
light_setup_light_sources = 0x8000F758;
init_object_shading = 0x8000F7EC;
func_8000F99C = 0x8000F99C;
obj_init_attachpoint = 0x8000F99C;
obj_init_emitter = 0x8000FAC4;
init_object_shadow = 0x8000FBCC;
init_object_water_effect = 0x8000FC6C;
init_object_interaction_data = 0x8000FD20;
func_8000FD34 = 0x8000FD34;
func_8000FD54 = 0x8000FD54;
obj_spawn_attachment = 0x8000FD54;
free_object = 0x8000FFB8;
obj_table_ids = 0x80010018;
obj_id_valid = 0x80010028;
@@ -290,7 +290,7 @@ func_800185E4 = 0x800185E4;
find_taj_object = 0x80018C6C;
func_80018CE0 = 0x80018CE0;
func_8001955C = 0x8001955C;
func_80019808 = 0x80019808;
race_check_finish = 0x80019808;
set_course_finish_flags = 0x8001A7D8;
race_finish_adventure = 0x8001A8D4;
race_transition_adventure = 0x8001A8F4;
@@ -674,9 +674,9 @@ func_80042D20 = 0x80042D20;
increment_ai_behaviour_chances = 0x80043ECC;
racer_AI_pathing_inputs = 0x80044170;
roll_percent_chance = 0x80044450;
func_8004447C = 0x8004447C;
func_80045128 = 0x80045128;
func_800452A0 = 0x800452A0;
racer_ai_challenge = 0x8004447C;
racer_update_eggs = 0x80045128;
racer_ai_eggs = 0x800452A0;
func_80045C48 = 0x80045C48;
func_80046524 = 0x80046524;
racer_attack_handler_hovercraft = 0x80048C7C;
@@ -782,16 +782,16 @@ update_rocket = 0x8005F310;
// object_models.c .text
allocate_object_model_pools = 0x8005F850;
object_model_init = 0x8005F99C;
model_init_type = 0x8005FCD0;
model_instance_init = 0x8005FCD0;
free_3d_model = 0x8005FF40;
free_model_data = 0x80060058;
func_8006017C = 0x8006017C;
func_80060910 = 0x80060910;
func_80060AC8 = 0x80060AC8;
func_80060C58 = 0x80060C58;
func_80060EA8 = 0x80060EA8;
func_800619F4 = 0x800619F4;
func_80061A00 = 0x80061A00;
model_calc_normals = 0x80060EA8;
model_anim_offset = 0x800619F4;
model_anim_init = 0x80061A00;
func_80061C0C = 0x80061C0C;
// obj_animate.c .text
@@ -1430,7 +1430,7 @@ menu_racer_portraits = 0x80094604;
postrace_start = 0x80094688;
postrace_load = 0x80094A5C;
postrace_music_fade = 0x80094C14;
func_80094D28 = 0x80094D28;
postrace_viewport = 0x80094D28;
postrace_message = 0x80095624;
menu_postrace = 0x80095728;
postrace_free = 0x80096790;
@@ -1619,7 +1619,7 @@ rain_render = 0x800ADCBC;
// particles.c .text
reset_particles = 0x800AE270;
reset_particles_with_assets = 0x800AE2A0;
free_unknown_particle_sprites = 0x800AE2D8;
particle_free_dummy = 0x800AE2D8;
free_particle_buffers = 0x800AE374;
free_particle_vertices_triangles = 0x800AE438;
free_particle_assets = 0x800AE490;
@@ -2177,8 +2177,8 @@ audFrameCt = 0x800DC680;
nextDMA = 0x800DC684;
curAcmdList = 0x800DC688;
gAntiPiracyAudioFreq = 0x800DC68C;
gFunc80019808Checksum = 0x800DC690;
gFunc80019808Length = 0x800DC694;
gRaceCheckFinishChecksum = 0x800DC690;
gRaceCheckFinishFuncLength = 0x800DC694;
// audiosfx.c .data
gSoundStateLists = 0x800DC6B0; // size:0xC
@@ -2313,8 +2313,8 @@ gWizpigVoiceTable = 0x800DCE60;
gRocketVoiceTable = 0x800DCE80;
// object_models.c .data
gTractionTableChecksum = 0x800DCEA0;
gTrackRenderFuncLength = 0x800DCEA4;
gRenderSceneChecksum = 0x800DCEA0;
gRenderSceneFuncLength = 0x800DCEA4;
// al/reverb.c .data
alFXEnabled = 0x800DCEB0;
@@ -2837,8 +2837,8 @@ gMaxRectangleParticles = 0x800E2E50;
gMaxSpriteParticles = 0x800E2E54;
gMaxLineParticles = 0x800E2E58;
gMaxPointParticles = 0x800E2E5C;
D_800E2E60 = 0x800E2E60;
D_800E2E64 = 0x800E2E64;
gParticleDummys = 0x800E2E60;
gParticleDummyCount = 0x800E2E64;
gParticleCoordListTri = 0x800E2E68;
gParticleCoordListQuad = 0x800E2E74;
D_800E2E84 = 0x800E2E84;
@@ -3732,10 +3732,10 @@ D_8011ADA4 = 0x8011ADA4;
gObjectUpdateRateF = 0x8011ADA8;
gPathUpdateOff = 0x8011ADAC;
gEventCountdown = 0x8011ADB0;
D_8011ADB4 = 0x8011ADB4;
gRaceFinishTriggered = 0x8011ADB4;
gEventStartTimer = 0x8011ADB8;
D_8011ADBC = 0x8011ADBC;
D_8011ADC0 = 0x8011ADC0;
gNumFinishedRacers = 0x8011ADC0;
gFirstTimeFinish = 0x8011ADC4;
D_8011ADC5 = 0x8011ADC5;
gBalloonCutsceneTimer = 0x8011ADC8;
@@ -4038,7 +4038,7 @@ gNumModelIDs = 0x8011D630;
D_8011D634 = 0x8011D634;
gAnimationTable = 0x8011D638;
gObjectAnimationTable = 0x8011D63C;
D_8011D640 = 0x8011D640;
gModelAnimOffsetID = 0x8011D640;
D_8011D644 = 0x8011D644;
// main .bss

Some files were not shown because too many files have changed in this diff Show More