mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
document: remaining funcs, add decomp.me links (#612)
This commit is contained in:
@@ -5,9 +5,9 @@ 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 9, 2025, this is our current score:
|
||||
As of June 10, 2025, this is our current score:
|
||||
|
||||
    Decomp progress: 90.34%
|
||||
    Decomp progress: 90.32%
|
||||
|
||||
    Documentation progress: 59.17%
|
||||
<!-- README_SCORE_SUMMARY_END -->
|
||||
@@ -117,15 +117,15 @@ s32 is_drumstick_unlocked(void) {
|
||||
```
|
||||
|
||||
<!-- README_SCORE_BEGIN -->
|
||||
As of June 9, 2025, this is our current score:
|
||||
As of June 10, 2025, this is our current score:
|
||||
```
|
||||
====================================================================
|
||||
ADVENTURE ONE (ASM -> C Decompilation)
|
||||
-------------- 90.34% Complete (91.67% NON_MATCHING) ---------------
|
||||
-------------- 90.32% Complete (91.65% NON_MATCHING) ---------------
|
||||
# Decompiled functions: 1911
|
||||
# GLOBAL_ASM remaining: 40
|
||||
# GLOBAL_ASM remaining: 39
|
||||
# NON_MATCHING functions: 6
|
||||
# NON_EQUIVALENT WIP functions: 19
|
||||
# NON_EQUIVALENT WIP functions: 29
|
||||
--------------------------- Game Status ----------------------------
|
||||
Balloons: 42/47, Keys: 4/4, Trophies: 4/5
|
||||
T.T. Amulets: 4/4, Wizpig Amulets: 4/4
|
||||
@@ -135,7 +135,7 @@ As of June 9, 2025, this is our current score:
|
||||
ADVENTURE TWO (Cleanup & Documentation)
|
||||
------------------------- 59.17% Complete --------------------------
|
||||
# Documented functions: 1206
|
||||
# Undocumented remaining: 448
|
||||
# Undocumented remaining: 447
|
||||
--------------------------- Game Status ----------------------------
|
||||
Balloons: 29/47, Keys: 3/4, Trophies: 2/5
|
||||
T.T. Amulets: 3/4, Wizpig Amulets: 2/4
|
||||
|
||||
+12
-1
@@ -837,7 +837,11 @@ typedef struct ObjectHeader {
|
||||
/* 0x70 */ u8 unk70;
|
||||
/* 0x71 */ u8 directionalPointLighting; // If enabled, the model is lit from the direction of the light source; if disabled, lighting is applied evenly from all sides
|
||||
/* 0x72 */ u8 unk72;
|
||||
u8 pad73[0x5];
|
||||
/* 0x73 */ u8 unk73;
|
||||
/* 0x74 */ s8 unk74;
|
||||
/* 0x75 */ s8 unk75;
|
||||
/* 0x76 */ u8 unk76;
|
||||
/* 0x77 */ u8 unk77;
|
||||
} ObjectHeader;
|
||||
|
||||
typedef struct ObjectInteraction {
|
||||
@@ -1517,6 +1521,12 @@ typedef struct Object_MidiFadePoint {
|
||||
/* 0x1C */ u8 unk1C;
|
||||
} Object_MidiFadePoint;
|
||||
|
||||
typedef struct Object_MidiChannelSet {
|
||||
s16 unk0;
|
||||
u8 unk2;
|
||||
u8 unk3;
|
||||
} Object_MidiChannelSet;
|
||||
|
||||
typedef struct Object_PosArrow {
|
||||
/* 0x000 */ s16 unk0;
|
||||
/* 0x004 */ u8 pad4[0x14E];
|
||||
@@ -1699,6 +1709,7 @@ typedef struct Object_64 {
|
||||
Object_Audio audio;
|
||||
Object_MidiFade midi_fade;
|
||||
Object_MidiFadePoint midi_fade_point;
|
||||
Object_MidiChannelSet midi_channel_set;
|
||||
Object_PosArrow pos_arrow;
|
||||
Object_Banana banana;
|
||||
Object_FogChanger fog_changer;
|
||||
|
||||
@@ -8782,6 +8782,7 @@ void trackmenu_render_2D(s32 x, s32 y, char *hubName, char *trackName, s32 rectO
|
||||
rendermode_reset(&sMenuCurrDisplayList);
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/L6qKV
|
||||
#ifdef NON_MATCHING
|
||||
// trackmenu_render_names
|
||||
void func_8008FF1C(UNUSED s32 updateRate) {
|
||||
|
||||
+1
-2
@@ -376,8 +376,8 @@ void free_model_data(ObjectModel *mdl) {
|
||||
mempool_free(mdl);
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/VJ34p
|
||||
#ifdef NON_EQUIVALENT
|
||||
// url: https://decomp.me/scratch/VJ34p
|
||||
void func_8006017C(ObjectModel *arg0) {
|
||||
s32 facesOffset; // v1
|
||||
s32 verticesOffset; // s5
|
||||
@@ -543,7 +543,6 @@ void func_8006017C(ObjectModel *arg0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/object_models/func_8006017C.s")
|
||||
#endif
|
||||
|
||||
+2484
-12
File diff suppressed because it is too large
Load Diff
+22
-3
@@ -333,6 +333,21 @@ typedef struct RacerFXData {
|
||||
u8 unk3;
|
||||
} RacerFXData;
|
||||
|
||||
typedef struct unk80017A18_10 {
|
||||
f32 unk0;
|
||||
f32 unk4;
|
||||
f32 unk8;
|
||||
f32 unkC;
|
||||
} unk80017A18_10;
|
||||
|
||||
typedef struct unk80017A18 {
|
||||
u8 pad0[0xC];
|
||||
u16 *unkC;
|
||||
unk80017A18_10 *unk10;
|
||||
u8 pad14[0x1E];
|
||||
s16 unk32;
|
||||
} unk80017A18;
|
||||
|
||||
extern s32 osCicId; // Used for an Anti-Piracy check in render_3d_model
|
||||
|
||||
Object *racerfx_get_boost(s32 boostID);
|
||||
@@ -502,6 +517,10 @@ void func_8001E4C4(void);
|
||||
void racerfx_alloc(s32 numberOfVertices, s32 numberOfTriangles);
|
||||
s32 func_80014B50(s32 arg0, s32 arg1, f32 arg2, u32 arg3);
|
||||
s32 ainode_find_next(s32 nodeId, s32 nextNodeId, s32 direction);
|
||||
unk800179D0 *func_8001790C(u32 *arg0, u32 *arg1);
|
||||
unk800179D0 *func_80017978(s32 arg0, s32 arg1);
|
||||
s8 func_800214E4(Object *obj, s32 updateRate);
|
||||
f32 lerp_and_get_derivative(f32 *data, u32 index, f32 t, f32 *derivative);
|
||||
|
||||
/**
|
||||
* Faster variant of the shading function for objects.
|
||||
@@ -523,7 +542,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* obj, f32 xPos, f32 yPos, f32 zPos, s32 updateRate);
|
||||
s32 func_800185E4(s8, Object* obj, f32 xPos, f32 yPos, f32 zPos, f32* checkpointDistance, u8*);
|
||||
s32 func_800185E4(s32, Object* obj, f32 xPos, f32 yPos, f32 zPos, f32* checkpointDistance, u8*);
|
||||
void obj_tex_animate(Object *, s32);
|
||||
Object *find_furthest_telepoint(f32 x, f32 z);
|
||||
void func_8006017C(ObjectModel *);
|
||||
@@ -535,7 +554,7 @@ void func_80017E98(void);
|
||||
void spectate_update(void);
|
||||
void func_8001E93C(void);
|
||||
void func_80019808(s32 updateRate);
|
||||
void func_80014090(Object*, s32, ObjectHeader*);
|
||||
void func_80014090(Object*, s32);
|
||||
void audspat_update_all(Object**, s32, s32);
|
||||
void func_8001E89C(void);
|
||||
CheckpointNode *func_800230D0(Object*, Object_Racer*);
|
||||
@@ -544,5 +563,5 @@ void func_800159C8(Object *, Object *);
|
||||
void obj_door_number(ObjectModel *, Object *);
|
||||
s16 func_8001CD28(s32 arg0, s32 arg1, s32 arg2, s32 arg3); // NON MATCHING
|
||||
f32 func_8001C6C4(Object_NPC *, Object *, f32, f32, s32);
|
||||
|
||||
s32 func_80017A18(ObjectModel *, s32, s32*, f32*, f32*, f32*, f32*, f32*, f32*, f32*, s8*, f32); // NON EQUIVALENT
|
||||
#endif
|
||||
|
||||
@@ -283,6 +283,8 @@ void init_particle_assets(void) {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://decomp.me/scratch/z60XZ
|
||||
*
|
||||
* Allocate buffers for particle objects.
|
||||
* Generate particle shapes.
|
||||
* Load sprites from asset 47.
|
||||
|
||||
+1
-1
@@ -209,7 +209,7 @@ UNUSED int sprintf(char *s, const char *format, ...) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Official Name: vsprintf
|
||||
// https://decomp.me/scratch/ygrLR
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/printf/vsprintf.s")
|
||||
|
||||
/**
|
||||
|
||||
+11
-2
@@ -676,6 +676,7 @@ s32 roll_percent_chance(s32 chance) {
|
||||
return rand_range(0, 99) < chance;
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/jtFDz
|
||||
#ifdef NON_MATCHING
|
||||
#define FAKEMATCH
|
||||
// Handles the opponent A.I. for battle & banana challenges.
|
||||
@@ -1106,7 +1107,10 @@ void func_800452A0(Object *obj, Object_Racer *racer, s32 updateRate) {
|
||||
racer->unk1CE = 3;
|
||||
}
|
||||
} else {
|
||||
if (1) { } if (1) { } if (1) { } if (1) { } // Fake
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
if (1) {} // Fake
|
||||
racer->unk1C6 = 0;
|
||||
}
|
||||
|
||||
@@ -1369,6 +1373,7 @@ void func_800452A0(Object *obj, Object_Racer *racer, s32 updateRate) {
|
||||
}
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/O7Ton
|
||||
#ifdef NON_EQUIVALENT
|
||||
void func_80045C48(Object *obj, Object_Racer *racer, s32 updateRate) {
|
||||
s32 overrideMagnitude;
|
||||
@@ -3503,6 +3508,7 @@ void racer_attack_handler_plane(Object *obj, Object_Racer *racer) {
|
||||
}
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/CQwF9
|
||||
#ifdef NON_EQUIVALENT
|
||||
void update_camera_plane(f32 updateRate, Object *obj, Object_Racer *racer) {
|
||||
s32 segmentIndex;
|
||||
@@ -3710,7 +3716,7 @@ void update_camera_plane(f32 updateRate, Object *obj, Object_Racer *racer) {
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/racer/update_camera_plane.s")
|
||||
#endif
|
||||
|
||||
// https://decomp.me/scratch/yfGqf - 97.27%
|
||||
// https://decomp.me/scratch/nVftv
|
||||
#ifdef NON_EQUIVALENT
|
||||
// Handles loop de loops
|
||||
void func_8004CC20(s32 updateRate, f32 updateRateF, Object *racerObj, Object_Racer *racer) {
|
||||
@@ -7861,6 +7867,7 @@ void second_racer_camera_update(Object *obj, Object_Racer *racer, s32 mode, f32
|
||||
}
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/NYLzW
|
||||
#ifdef NON_EQUIVALENT
|
||||
void update_camera_car(f32 updateRate, Object *obj, Object_Racer *racer) {
|
||||
s64 pad;
|
||||
@@ -8202,6 +8209,7 @@ void set_position_goal_from_path(UNUSED Object *obj, Object_Racer *racer, f32 *x
|
||||
*z = catmull_rom_interpolation(splineZ, destReached, magnitude);
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/6WBdX
|
||||
#ifdef NON_MATCHING
|
||||
void func_80059208(Object *obj, Object_Racer *racer, s32 updateRate) {
|
||||
UNUSED s32 pad[2];
|
||||
@@ -8508,6 +8516,7 @@ s16 timetrial_ghost_full(void) {
|
||||
return gGhostNodeFull[gCurrentGhostIndex];
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/yMObT
|
||||
#ifdef NON_EQUIVALENT
|
||||
// timetrial_ghost_read
|
||||
s32 set_ghost_position_and_rotation(Object *obj) {
|
||||
|
||||
+1
-1
@@ -224,7 +224,7 @@ void func_8004F7F4(s32 updateRate, f32 updateRateF, Object* racerObj, Object_Rac
|
||||
//Non Matching
|
||||
s32 set_ghost_position_and_rotation(Object *obj);
|
||||
void update_car_velocity_offground(Object *obj, Object_Racer *racer, s32, f32);
|
||||
s32 func_80017248(void*, s32, s32*, Vec3f*, f32*, f32*, s8* surface);
|
||||
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 */
|
||||
|
||||
+9
-3
@@ -1083,6 +1083,7 @@ typedef struct Unk80027568_1 {
|
||||
Vec4f *unk18;
|
||||
} Unk80027568_1;
|
||||
|
||||
// https://decomp.me/scratch/duMgr
|
||||
s32 func_80027568(void) {
|
||||
f32 projectedRacerPos;
|
||||
f32 projectedCamPos;
|
||||
@@ -1349,10 +1350,10 @@ void set_skydome_visbility(s32 renderSky) {
|
||||
gSceneRenderSkyDome = renderSky;
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/E1DFy
|
||||
#ifdef NON_MATCHING
|
||||
// This function creates the flashy sky effect in the wizpig 2 race.
|
||||
// init_skydome
|
||||
// https://decomp.me/scratch/E1DFy
|
||||
void func_80028050(void) {
|
||||
Triangle *tris;
|
||||
Vertex *verts;
|
||||
@@ -2481,6 +2482,7 @@ s32 get_wave_properties(f32 yPos, f32 *waterHeight, Vec3f *rotation) {
|
||||
return gTrackWaves[index]->type;
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/X1SBi
|
||||
#ifdef NON_EQUIVALENT
|
||||
s32 func_8002B0F4(s32 levelSegmentIndex, f32 xIn, f32 zIn, WaterProperties ***arg3) {
|
||||
LevelModelSegment *currentSegment;
|
||||
@@ -2684,6 +2686,7 @@ s32 func_8002B9BC(Object *obj, f32 *arg1, Vec3f *arg2, s32 arg3) {
|
||||
}
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/Y39p2
|
||||
#ifdef NON_MATCHING
|
||||
// Collision: Returns the Y Values in yOut, and the number of values in the array as the return.
|
||||
// Get's the Y Offset acrross a surface.
|
||||
@@ -2823,6 +2826,7 @@ s32 func_8002BAB0(s32 levelSegmentIndex, f32 xIn, f32 zIn, f32 *yOut) {
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/tracks/func_8002BAB0.s")
|
||||
#endif
|
||||
|
||||
// https://decomp.me/scratch/tdASx
|
||||
#ifdef NON_MATCHING
|
||||
// generate_track
|
||||
// Loads a level track from the index in the models table.
|
||||
@@ -3069,6 +3073,7 @@ void func_8002C954(LevelModelSegment *segment, LevelModelSegmentBoundingBox *bbo
|
||||
}
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/0JT8R
|
||||
#ifdef NON_EQUIVALENT
|
||||
s32 func_8002CC30(LevelModelSegment *segment) {
|
||||
s32 spF4;
|
||||
@@ -4258,7 +4263,8 @@ s32 func_8002FF6C(s32 arg0, unk8011C8B8 *arg1, s32 arg2, Vec2f *arg3) {
|
||||
return var_s2;
|
||||
}
|
||||
|
||||
#ifdef NON_EQUIUVALENT
|
||||
// https://decomp.me/scratch/QF6FF
|
||||
#ifdef NON_EQUIVALENT
|
||||
void func_800304C8(unk8011C8B8 *arg0) {
|
||||
s16 found1;
|
||||
s16 found2;
|
||||
@@ -4294,7 +4300,7 @@ void func_800304C8(unk8011C8B8 *arg0) {
|
||||
if (found2 == found3) {
|
||||
f32 test = (-(((D_8011D0BC->x * gNewShadowObj->segment.trans.x_position) +
|
||||
(D_8011D0BC->z * gNewShadowObj->segment.trans.z_position)) +
|
||||
D_8011D0BC->w)) /
|
||||
D_8011D0BC->unkC_union.w)) /
|
||||
D_8011D0BC->y;
|
||||
if (D_8011D0D0 < test) {
|
||||
D_8011D0D0 = test;
|
||||
|
||||
@@ -1834,6 +1834,7 @@ void func_800BCC70(LevelModel *model) {
|
||||
mempool_free(spA0);
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/1AO88
|
||||
#ifdef NON_EQUIVALENT
|
||||
s32 func_800BDC80(s32 arg0, unk8011C3B8 *arg1, unk8011C8B8 *arg2, f32 shadowXNegPosition, f32 shadowZNegPosition,
|
||||
f32 shadowXPosition, f32 shadowZPosition) {
|
||||
|
||||
Reference in New Issue
Block a user