mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
add comments for some official names
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
glabel gzip_inflate_block
|
||||
glabel gzip_inflate_block /* Official name: inflate_block */
|
||||
/* 0C74C0 800C68C0 3C0B8013 */ lui $t3, %hi(gzip_num_bits) # $t3, 0x8013
|
||||
/* 0C74C4 800C68C4 8D6BAAD4 */ lw $t3, %lo(gzip_num_bits)($t3)
|
||||
/* 0C74C8 800C68C8 3C018013 */ lui $at, %hi(D_8012AAD8) # $at, 0x8013
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
glabel gzip_inflate_codes
|
||||
glabel gzip_inflate_codes /* Official name: inflate_codes */
|
||||
/* 0C7C40 800C7040 27BDFFF0 */ addiu $sp, $sp, -0x10
|
||||
/* 0C7C44 800C7044 3C0B800F */ lui $t3, %hi(gzip_mask_bits) # $t3, 0x800f
|
||||
/* 0C7C48 800C7048 AFB20008 */ sw $s2, 8($sp)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
glabel gzip_inflate_dynamic
|
||||
glabel gzip_inflate_dynamic /* Official name: inflate_dynamic */
|
||||
/* 0C75C4 800C69C4 27BDFAC0 */ addiu $sp, $sp, -0x540
|
||||
/* 0C75C8 800C69C8 AFB30028 */ sw $s3, 0x28($sp)
|
||||
/* 0C75CC 800C69CC 3C138013 */ lui $s3, %hi(gzip_num_bits) # $s3, 0x8013
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
glabel gzip_inflate_fixed
|
||||
glabel gzip_inflate_fixed /* Official name: inflate_fixed */
|
||||
/* 0C79DC 800C6DDC 27BDFAD0 */ addiu $sp, $sp, -0x530
|
||||
/* 0C79E0 800C6DE0 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 0C79E4 800C6DE4 23AB0044 */ addi $t3, $sp, 0x44
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
glabel gzip_inflate_stored
|
||||
glabel gzip_inflate_stored /* Official name: inflate_stored */
|
||||
/* 0C7B34 800C6F34 3C0D8013 */ lui $t5, %hi(gzip_num_bits) # $t5, 0x8013
|
||||
/* 0C7B38 800C6F38 8DADAAD4 */ lw $t5, %lo(gzip_num_bits)($t5)
|
||||
/* 0C7B3C 800C6F3C 3C0C8013 */ lui $t4, %hi(gzip_bit_buffer) # $t4, 0x8013
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
glabel clear_status_register_flags
|
||||
glabel clear_status_register_flags /* Official name: disableInterrupts */
|
||||
/* 070110 8006F510 3C08800E */ lui $t0, %hi(D_800DD430) # $t0, 0x800e
|
||||
/* 070114 8006F514 8108D430 */ lb $t0, %lo(D_800DD430)($t0)
|
||||
/* 070118 8006F518 11000006 */ beqz $t0, .L8006F534
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
glabel coss
|
||||
/* 07142C 8007082C 24844000 */ addiu $a0, $a0, 0x4000
|
||||
glabel sins
|
||||
glabel sins /* Official name: mathSinInterp */
|
||||
/* 071430 80070830 00041440 */ sll $v0, $a0, 0x11
|
||||
/* 071434 80070834 04430003 */ bgezl $v0, .L80070844
|
||||
/* 071438 80070838 000450C2 */ srl $t2, $a0, 3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
glabel set_status_register_flags
|
||||
glabel set_status_register_flags /* Official name: enableInterrupts */
|
||||
/* 07013C 8006F53C 3C08800E */ lui $t0, %hi(D_800DD430) # $t0, 0x800e
|
||||
/* 070140 8006F540 8108D430 */ lb $t0, %lo(D_800DD430)($t0)
|
||||
/* 070144 8006F544 11000005 */ beqz $t0, .L8006F55C # Identical to __osRestoreInt below this line
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
glabel coss_2
|
||||
/* 07148C 8007088C 24844000 */ addiu $a0, $a0, 0x4000
|
||||
glabel sins_2
|
||||
glabel sins_2 /* Official name: mathSin */
|
||||
/* 071490 80070890 00041440 */ sll $v0, $a0, 0x11
|
||||
/* 071494 80070894 04430003 */ bgezl $v0, .L800708A4
|
||||
/* 071498 80070898 000450C2 */ srl $t2, $a0, 3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
glabel render_printf
|
||||
glabel render_printf /* official name: diPrintf */
|
||||
/* 0B6ADC 800B5EDC 3C0E8013 */ lui $t6, %hi(gDebugPrintBufferEnd) # $t6, 0x8013
|
||||
/* 0B6AE0 800B5EE0 8DCE85D8 */ lw $t6, %lo(gDebugPrintBufferEnd)($t6)
|
||||
/* 0B6AE4 800B5EE4 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
||||
float sinf(float);
|
||||
float sinf(float); //official name: fsin
|
||||
double sin(double);
|
||||
float cosf(float);
|
||||
double cos(double);
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
.set noreorder # dont insert nops after branches
|
||||
.set gp=64 # 64-bit instructions are used
|
||||
|
||||
glabel bcopy
|
||||
glabel bcopy /* Official name: _bcopy */
|
||||
/* 0CA9A0 800C9DA0 10C0001A */ beqz $a2, .L800C9E0C
|
||||
/* 0CA9A4 800C9DA4 00A03825 */ move $a3, $a1
|
||||
/* 0CA9A8 800C9DA8 10850018 */ beq $a0, $a1, .L800C9E0C
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
.set noreorder # dont insert nops after branches
|
||||
.set gp=64 # 64-bit instructions are used
|
||||
|
||||
glabel bzero
|
||||
glabel bzero /* Official name: _blkclr */
|
||||
/* 0D10E0 800D04E0 28A1000C */ slti $at, $a1, 0xc
|
||||
/* 0D10E4 800D04E4 1420001D */ bnez $at, .L800D055C
|
||||
/* 0D10E8 800D04E8 00041823 */ negu $v1, $a0
|
||||
|
||||
@@ -18,6 +18,7 @@ static char *is_proutSyncPrintf(UNUSED char *str, UNUSED const char *buf, UNUSED
|
||||
* Like sprintf, but simpler. It just hardcodes NULL for the dst,
|
||||
* and calls a function that just hardcodes a fake pointer.
|
||||
* Could still be an earlier version of osSyncPrintf
|
||||
* Official name: osSyncPrintf
|
||||
*/
|
||||
void rmonPrintf(const char *format, ...) {
|
||||
va_list args;
|
||||
|
||||
@@ -14,6 +14,7 @@ OSPifRam _MotorStopData[MAXCONTROLLERS];
|
||||
OSPifRam _MotorStartData[MAXCONTROLLERS];
|
||||
u8 _motorstopbuf[BLOCKSIZE];
|
||||
u8 _motorstartbuf[BLOCKSIZE];
|
||||
/* Official name: nosMotorStop */
|
||||
s32 osMotorStop(OSPfs *pfs) {
|
||||
int i;
|
||||
s32 ret;
|
||||
@@ -97,6 +98,7 @@ static void _MakeMotorData(int channel, u16 address, u8 *buffer, OSPifRam *mdata
|
||||
ptr[0] = CONT_CMD_END;
|
||||
}
|
||||
|
||||
/* Official name: nosMotorInit */
|
||||
s32 osMotorInit(OSMesgQueue *mq, OSPfs *pfs, int channel) {
|
||||
int i;
|
||||
s32 ret;
|
||||
|
||||
@@ -63,6 +63,7 @@ u32 *load_asset_section_from_rom(u32 assetIndex) {
|
||||
/**
|
||||
* Loads a gzip compressed asset from the ROM file.
|
||||
* Returns a pointer to the decompressed data.
|
||||
* Official name: piRomLoadCompressed
|
||||
*/
|
||||
UNUSED u8 *load_compressed_asset_from_rom(u32 assetIndex, s32 extraMemory) {
|
||||
s32 size;
|
||||
@@ -115,6 +116,7 @@ UNUSED s32 load_asset_section_from_rom_to_address(u32 assetIndex, u32 address) {
|
||||
/**
|
||||
* Loads part of an asset section to a specific memory address.
|
||||
* Returns the size argument.
|
||||
* Official name: piRomLoadSection
|
||||
*/
|
||||
s32 load_asset_to_address(u32 assetIndex, u32 address, s32 assetOffset, s32 size) {
|
||||
u32 *index;
|
||||
@@ -133,6 +135,7 @@ s32 load_asset_to_address(u32 assetIndex, u32 address, s32 assetOffset, s32 size
|
||||
|
||||
/**
|
||||
* Returns a rom offset of an asset given its asset section and a local offset.
|
||||
* Official name: piRomGetSectionPtr
|
||||
*/
|
||||
u8 *get_rom_offset_of_asset(u32 assetIndex, u32 assetOffset) {
|
||||
u32 *index;
|
||||
@@ -150,6 +153,7 @@ u8 *get_rom_offset_of_asset(u32 assetIndex, u32 assetOffset) {
|
||||
|
||||
/**
|
||||
* Returns the size of an asset section.
|
||||
* Official name: piRomGetFileSize
|
||||
*/
|
||||
s32 get_size_of_asset_section(u32 assetIndex) {
|
||||
u32 *index;
|
||||
@@ -167,6 +171,7 @@ s32 get_size_of_asset_section(u32 assetIndex) {
|
||||
|
||||
/**
|
||||
* Copies data from the game cartridge to a ram address.
|
||||
* Official name: romCopy
|
||||
*/
|
||||
void dmacopy(u32 romOffset, u32 ramAddress, s32 numBytes) {
|
||||
OSMesg dmaMesg;
|
||||
|
||||
@@ -480,6 +480,7 @@ void camDisableUserView(s32 viewPortIndex, s32 arg1) {
|
||||
/**
|
||||
* Return's the current viewport's flag status for extended backgrounds.
|
||||
* Required to draw some extra things used in menus.
|
||||
* Official name: camIsUserView
|
||||
*/
|
||||
s32 check_viewport_background_flag(s32 viewPortIndex) {
|
||||
return gScreenViewports[viewPortIndex].flags & VIEWPORT_EXTRA_BG;
|
||||
@@ -543,6 +544,7 @@ void resize_viewport(s32 viewPortIndex, s32 x1, s32 y1, s32 x2, s32 y2) {
|
||||
/**
|
||||
* Set the selected viewport's coordinate offsets and view size.
|
||||
* If you pass VIEWPORT_AUTO through, then the property will be automatically set when the game creates the viewports.
|
||||
* Official name: camSetUserViewSpecial
|
||||
*/
|
||||
void set_viewport_properties(s32 viewPortIndex, s32 posX, s32 posY, s32 width, s32 height) {
|
||||
if (posX != VIEWPORT_AUTO) {
|
||||
@@ -576,6 +578,7 @@ void set_viewport_properties(s32 viewPortIndex, s32 posX, s32 posY, s32 width, s
|
||||
/**
|
||||
* Sets the passed values to be equal to the selected viewports scissor size, before drawing the background elements.
|
||||
* Usually, this is the same size as the viewport's size.
|
||||
* Official name: camGetVisibleUserView
|
||||
*/
|
||||
s32 copy_viewport_background_size_to_coords(s32 viewPortIndex, s32 *x1, s32 *y1, s32 *x2, s32 *y2) {
|
||||
//gDPFillRectangle values
|
||||
@@ -591,6 +594,7 @@ s32 copy_viewport_background_size_to_coords(s32 viewPortIndex, s32 *x1, s32 *y1,
|
||||
|
||||
/**
|
||||
* Sets the passed values to the coordinate size of the passed viewport.
|
||||
* Official name: camGetUserView
|
||||
*/
|
||||
void copy_viewport_frame_size_to_coords(s32 viewPortIndex, s32 *x1, s32 *y1, s32 *x2, s32 *y2) {
|
||||
*x1 = gScreenViewports[viewPortIndex].x1;
|
||||
@@ -1410,6 +1414,7 @@ GLOBAL_ASM("asm/non_matchings/camera/func_8006A1C4.s")
|
||||
|
||||
/**
|
||||
* Set the first 4 player ID's to the controller numbers, so players can input in the menus after boot.
|
||||
* Official name: joyResetMap
|
||||
*/
|
||||
void initialise_player_ids(void) {
|
||||
s32 i;
|
||||
@@ -1421,6 +1426,7 @@ void initialise_player_ids(void) {
|
||||
/**
|
||||
* Assign the first four player ID's to the index of the connected players.
|
||||
* Assign the next four player ID's to the index of the players who are not connected.
|
||||
* Official name: joyCreateMap
|
||||
*/
|
||||
void assign_player_ids(s8 *activePlayers) {
|
||||
s32 i;
|
||||
@@ -1439,6 +1445,7 @@ void assign_player_ids(s8 *activePlayers) {
|
||||
|
||||
/**
|
||||
* Returns the id of the selected index.
|
||||
* Official name: joyGetController
|
||||
*/
|
||||
u8 get_player_id(s32 player) {
|
||||
return sPlayerID[player];
|
||||
@@ -1456,6 +1463,7 @@ void swap_player_1_and_2_ids(void) {
|
||||
|
||||
/**
|
||||
* Returns the buttons that are currently pressed down on the controller.
|
||||
* Official name: joyGetButtons
|
||||
*/
|
||||
u16 get_buttons_held_from_player(s32 player) {
|
||||
return sControllerData[sPlayerID[player]].button;
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ enum ViewportCount {
|
||||
};
|
||||
|
||||
enum ViewPortFlags {
|
||||
VIEWPORT_EXTRA_BG = 0x0001,
|
||||
VIEWPORT_EXTRA_BG = 0x0001, //official name (guessed): VIEWPORT_IS_USER_VIEW
|
||||
VIEWPORT_UNK_02 = 0x0002,
|
||||
VIEWPORT_UNK_04 = 0x0004,
|
||||
VIEWPORT_X_CUSTOM = 0x0008,
|
||||
|
||||
@@ -672,6 +672,7 @@ s32 func_8006BD88(void) {
|
||||
|
||||
/**
|
||||
* Return the race type ID of the current level.
|
||||
* Official name: levelGetType
|
||||
*/
|
||||
u8 get_current_level_race_type(void) {
|
||||
return gCurrentLevelHeader->race_type;
|
||||
@@ -1881,6 +1882,7 @@ s8 is_postrace_viewport_active(void) {
|
||||
|
||||
/**
|
||||
* Sets and returns (nonzero) the message set when pressing the reset button.
|
||||
* Official name: mainResetPressed
|
||||
*/
|
||||
s32 is_reset_pressed(void) {
|
||||
if (gNMIMesgBuf[0] == 0) {
|
||||
@@ -2107,6 +2109,7 @@ void pre_intro_loop(void) {
|
||||
|
||||
/**
|
||||
* Returns TRUE if the game doesn't detect any controllers.
|
||||
* Official name: mainDemoOnly
|
||||
*/
|
||||
s32 is_controller_missing(void) {
|
||||
if (sControllerStatus == CONTROLLER_MISSING) {
|
||||
|
||||
@@ -29,6 +29,8 @@ void rzipInit(void) {
|
||||
|
||||
/**
|
||||
* Converts a little endian value to big endian.
|
||||
* Official name: rzipUncompressSize
|
||||
* (so, this probably expects a gzip header)
|
||||
*/
|
||||
s32 byteswap32(u8 *arg0) {
|
||||
s32 value;
|
||||
@@ -41,6 +43,7 @@ s32 byteswap32(u8 *arg0) {
|
||||
|
||||
/**
|
||||
* Returns the uncompressed size of a gzip compressed asset.
|
||||
* Official name: rzipUncompressSizeROM
|
||||
*/
|
||||
s32 get_asset_uncompressed_size(s32 assetIndex, s32 assetOffset) {
|
||||
load_asset_to_address(assetIndex, (u32) gAssetAddress, assetOffset, 8);
|
||||
@@ -50,6 +53,7 @@ s32 get_asset_uncompressed_size(s32 assetIndex, s32 assetOffset) {
|
||||
/**
|
||||
* Decompresses gzip data.
|
||||
* Returns the pointer to the decompressed data.
|
||||
* Official name: rzipUncompress
|
||||
*/
|
||||
u8 *gzip_inflate(u8 *compressedInput, u8 *decompressedOutput) {
|
||||
gzip_inflate_input = compressedInput + 5; // The compression header is 5 bytes.
|
||||
@@ -60,6 +64,7 @@ u8 *gzip_inflate(u8 *compressedInput, u8 *decompressedOutput) {
|
||||
return decompressedOutput;
|
||||
}
|
||||
|
||||
/* Official name: huft_build */
|
||||
void gzip_huft_build(u32 *b, u32 n, u32 s, u16 *d, u16 *e, huft **t, s32 *m) {
|
||||
u32 a; /* counter for codes of length k */
|
||||
u32 c[BMAX+1]; /* bit length count table */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user