mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Upgrade IDO Static Recomp to fix a bug, and slip in a few other minor changes (#384)
This commit is contained in:
@@ -146,6 +146,9 @@ OSMesgQueue *osScGetInterruptQ(OSSched *sc) {
|
||||
return &sc->interruptQ;
|
||||
}
|
||||
|
||||
/**
|
||||
* Official Name: osScGetAudioSPStats
|
||||
*/
|
||||
UNUSED void scGetAudioTaskTimers(f32 *timer0, f32 *timer1, f32 *timer2) {
|
||||
*timer0 = gAudTaskTimer0;
|
||||
*timer1 = gAudTaskTimer2;
|
||||
|
||||
+1
-1
@@ -345,7 +345,6 @@ s8 check_if_showing_cutscene_camera(void) {
|
||||
|
||||
/**
|
||||
* Disable the cutscene camera, returning it to the conventional mode.
|
||||
* Official name: camSetUserView
|
||||
*/
|
||||
void disable_cutscene_camera(void) {
|
||||
gCutsceneCameraActive = FALSE;
|
||||
@@ -485,6 +484,7 @@ s32 check_viewport_background_flag(s32 viewPortIndex) {
|
||||
|
||||
/**
|
||||
* Sets the intended viewport to the size passed through by arguments.
|
||||
* Official Name: camSetUserView
|
||||
*/
|
||||
void resize_viewport(s32 viewPortIndex, s32 x1, s32 y1, s32 x2, s32 y2) {
|
||||
s32 widthAndHeight, width, height;
|
||||
|
||||
@@ -867,6 +867,7 @@ s32 func_8006C300(void) {
|
||||
|
||||
/**
|
||||
* Main looping function for the main thread.
|
||||
* Official Name: mainThread
|
||||
*/
|
||||
void thread3_main(UNUSED void *unused) {
|
||||
init_game();
|
||||
@@ -1511,6 +1512,7 @@ RenderContext get_render_context(void) {
|
||||
|
||||
/**
|
||||
* Unused function used to set the render context from outside this file
|
||||
* Official Name: mainSetMode?
|
||||
*/
|
||||
UNUSED void set_render_context(s32 changeTo) {
|
||||
sRenderContext = changeTo;
|
||||
|
||||
@@ -47,6 +47,7 @@ void thread1_main(UNUSED void *unused) {
|
||||
/**
|
||||
* Increments the start and endpoint of the stack.
|
||||
* They should have an equal value, so if they don't, that triggers a printout saying a stack wraparound has occured.
|
||||
* Official Name: bootCheckStack
|
||||
*/
|
||||
void thread3_verify_stack(void) {
|
||||
gThread3Stack[0x400]++;
|
||||
|
||||
@@ -9089,6 +9089,7 @@ u64 get_eeprom_settings(void) {
|
||||
/**
|
||||
* Returns the current language being used by the game.
|
||||
* 0 = English, 1 = German, 2 = French, 3 = Japanese
|
||||
* Official Name: frontGetLanguage
|
||||
*/
|
||||
s32 get_language(void) {
|
||||
s32 language = LANGUAGE_ENGLISH;
|
||||
|
||||
+7
-3
@@ -217,6 +217,7 @@ UNUSED void func_8007267C(s16 controllerIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Official Name: RumbleKill? */
|
||||
void func_80072708(void) {
|
||||
D_800DE48C = 3;
|
||||
}
|
||||
@@ -1717,6 +1718,7 @@ SIDeviceStatus reformat_controller_pak(s32 controllerIndex) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Official Name: packDirectory */
|
||||
s32 get_controller_pak_file_list(s32 controllerIndex, s32 maxNumOfFilesToGet, char **fileNames, char **fileExtensions, u32 *fileSizes, u8 *fileTypes) {
|
||||
OSPfsState state;
|
||||
s32 ret;
|
||||
@@ -1811,7 +1813,8 @@ void packDirectoryFree(void) {
|
||||
}
|
||||
|
||||
//Get Available Space in Controller Pak
|
||||
//Upper bytes of return value couldl be controllerIndex
|
||||
//Upper bytes of return value could be controllerIndex
|
||||
/* Official Name: packFreeSpace */
|
||||
s32 get_free_space(s32 controllerIndex, u32 *bytesFree, s32 *notesFree) {
|
||||
s32 ret;
|
||||
s32 bytesNotUsed;
|
||||
@@ -1847,6 +1850,7 @@ s32 get_free_space(s32 controllerIndex, u32 *bytesFree, s32 *notesFree) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Official Name: packDeleteFile */
|
||||
s32 delete_file(s32 controllerIndex, s32 fileNum) {
|
||||
OSPfsState state;
|
||||
s32 ret;
|
||||
@@ -1871,6 +1875,7 @@ s32 delete_file(s32 controllerIndex, s32 fileNum) {
|
||||
}
|
||||
|
||||
// Copies a file from one controller pak to the other
|
||||
/* Official Name: packCopyFile */
|
||||
s32 copy_controller_pak_data(s32 controllerIndex, s32 fileNumber, s32 secondControllerIndex) {
|
||||
UNUSED s32 pad;
|
||||
char fileName[PFS_FILE_NAME_LEN];
|
||||
@@ -2030,8 +2035,7 @@ SIDeviceStatus write_controller_pak_file(s32 controllerIndex, s32 fileNumber, ch
|
||||
ret = CONTROLLER_PAK_GOOD;
|
||||
} else if (temp == PFS_DATA_FULL || temp == PFS_DIR_FULL) {
|
||||
ret = CONTROLLER_PAK_FULL;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
ret = CONTROLLER_PAK_BAD_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ void create_and_start_thread30(void) {
|
||||
|
||||
/**
|
||||
* Stop thread30()
|
||||
* Official Name: amStop
|
||||
*/
|
||||
void stop_thread30(void) {
|
||||
osStopThread(&gThread30);
|
||||
@@ -62,7 +63,7 @@ void tick_thread30(void) {
|
||||
gThread30LoadDelay--;
|
||||
if (gThread30LoadDelay == 0) {
|
||||
// Signal thread30 that the level needs to load.
|
||||
osSendMesg(&gThread30MesgQueue, (OSMesg *) OS_MESG_TYPE_LOOPBACK, 0);
|
||||
osSendMesg(&gThread30MesgQueue, (OSMesg *) OS_MESG_TYPE_LOOPBACK, OS_MESG_NOBLOCK);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,9 +97,10 @@ void thread30_track_loading(UNUSED void *arg) {
|
||||
OSMesg mesg = 0;
|
||||
while (TRUE) {
|
||||
// Wait for a signal from the main thread
|
||||
do {
|
||||
osRecvMesg(&gThread30MesgQueue, &mesg, OS_MESG_BLOCK);
|
||||
} while (mesg != (OSMesg) OS_MESG_TYPE_LOOPBACK);
|
||||
osRecvMesg(&gThread30MesgQueue, &mesg, OS_MESG_BLOCK);
|
||||
if (mesg != (OSMesg) OS_MESG_TYPE_LOOPBACK) {
|
||||
continue;
|
||||
}
|
||||
// -1 means there won't be any racers loaded.
|
||||
load_level_for_menu(gThread30LevelIdToLoad, -1, gThread30CutsceneIdToLoad);
|
||||
gThread30NeedToLoadLevel = FALSE;
|
||||
|
||||
@@ -377,6 +377,7 @@ UNUSED void setup_ostask_fifo_2(Gfx* dlBegin, Gfx* dlEnd, s32 recvMesg) {
|
||||
* Called from the main game loop, will halt until a message comes through saying the graphics task
|
||||
* has finished.
|
||||
* Alternatively, if no task is active, then it will just skip.
|
||||
* Official Name: rcpWaitDP
|
||||
*/
|
||||
s32 wait_for_gfx_task(void) {
|
||||
OSMesg *mesg = NULL;
|
||||
@@ -418,6 +419,7 @@ void set_background_fill_colour(s32 red, s32 green, s32 blue) {
|
||||
* Clears the ZBuffer first, then decides how to draw the background which goes directly
|
||||
* over the colour buffer. DrawBG if set to 0 (which never happens) will completely skip
|
||||
* over clearing the colour buffer.
|
||||
* Official Name: rcpClearScreen
|
||||
*/
|
||||
void render_background(Gfx **dList, Matrix *mtx, s32 drawBG) {
|
||||
s32 widthAndHeight;
|
||||
@@ -513,8 +515,11 @@ void func_80078170(TextureHeader *arg0, TextureHeader *arg1, u32 arg2) {
|
||||
}
|
||||
|
||||
#ifdef NON_EQUIVALENT
|
||||
//Seems to render the background screen after a race finishes while you're at the menu deciding what to do next.
|
||||
//https://i.imgur.com/MHbUD2a.png is an example. The left is correct, and the right is incorrect rendering.
|
||||
/**
|
||||
* Seems to render the background screen after a race finishes while you're at the menu deciding what to do next.
|
||||
* https://i.imgur.com/MHbUD2a.png is an example. The left is correct, and the right is incorrect rendering.
|
||||
* Official Name: rcpMosaicClear
|
||||
*/
|
||||
void func_80078190(Gfx **dlist) {
|
||||
s32 texture1And2UpperHeight;
|
||||
s32 videoHeight;
|
||||
@@ -647,6 +652,7 @@ UNUSED void disable_chequer_background(void) {
|
||||
/**
|
||||
* Uses global chequerboard settings to render a background using two different alternating colours.
|
||||
* Goes unused.
|
||||
* Official Name: rcpCheckClear
|
||||
*/
|
||||
void render_chequer_background(Gfx **dList) {
|
||||
s32 height;
|
||||
|
||||
+4
-4
@@ -43,10 +43,10 @@ u16 *gVideoFramebuffers[2];
|
||||
s32 gVideoCurrFbIndex;
|
||||
s32 gVideoModeIndex;
|
||||
s32 sBlackScreenTimer;
|
||||
u16 *gVideoCurrFramebuffer;
|
||||
u16 *gVideoLastFramebuffer;
|
||||
u16 *gVideoCurrFramebuffer; //Official Name: currentScreen
|
||||
u16 *gVideoLastFramebuffer; //Official Name: otherScreen
|
||||
u16 *gVideoCurrDepthBuffer;
|
||||
u16 *gVideoLastDepthBuffer;
|
||||
u16 *gVideoLastDepthBuffer; //Official Name: otherZbuf
|
||||
u8 D_801262E4;
|
||||
UNUSED OSMesg D_801262E8[8];
|
||||
u8 gVideoDeltaCounter;
|
||||
@@ -126,7 +126,7 @@ UNUSED void set_video_width_and_height_from_index(s32 fbIndex) {
|
||||
/**
|
||||
* Return the current framebuffer dimensions as a single s32 value.
|
||||
* The high 16 bits are the height of the frame, and the low 16 bits are the width.
|
||||
* Official Name: viGetCurrentSize?
|
||||
* Official Name: viGetCurrentSize
|
||||
*/
|
||||
s32 get_video_width_and_height_as_s32(void) {
|
||||
return (gVideoFbHeights[gVideoCurrFbIndex] << 16) | gVideoFbWidths[gVideoCurrFbIndex];
|
||||
|
||||
+1
-1
Submodule tools/ido-static-recomp updated: a64576b869...d14d08e5ae
Reference in New Issue
Block a user