mirror of
https://github.com/n64decomp/mk64
synced 2026-06-11 20:48:41 -04:00
Identify a credits related struct (#156)
Move some structs around, place them in more meaningful headers Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
+12
-40
@@ -88,21 +88,14 @@ glabel D_80284ED0
|
||||
.word 0x06000000, 0x070023F8, 0x06000000, 0x07002478
|
||||
.word 0x06000000, 0x07003790, 0xFC127E24, 0xFFFFF3F9
|
||||
.word 0xB900031D, 0x00553078, 0x06000000, 0x070006D0
|
||||
.word 0x06000000, 0x070004D0, 0x06000000
|
||||
.word 0x06000000, 0x070004D0, 0x06000000, 0x07000840
|
||||
.word 0xB8000000
|
||||
|
||||
# Likely an alignment artifact, a file split should happen here
|
||||
.word 0x00000000, 0x00000000, 0x00000000
|
||||
|
||||
.word 0x07000840
|
||||
.word 0xB8000000, 0x00000000
|
||||
|
||||
.word 0x00000000
|
||||
.word 0x00000000
|
||||
glabel D_802850C0
|
||||
|
||||
.word 0x3F4CCCCD, 0xFF380026
|
||||
.word 0x00A0001E
|
||||
|
||||
glabel D_802850CC
|
||||
.word 0x00040000
|
||||
.word 0x3F4CCCCD, 0xFF380026, 0x00A0001E, 0x00040000
|
||||
.word 0x3F666666, 0x020800C8, 0x00A000C8, 0x01000000
|
||||
.word 0x3F4CCCCD, 0xFF380026, 0x00A0001E, 0x00040000
|
||||
.word 0x3F666666, 0x020800C8, 0x00A000C8, 0x01030000
|
||||
@@ -162,17 +155,10 @@ glabel D_802850CC
|
||||
.word 0x3F333333, 0x02080096, 0x00A00096, 0x01000000
|
||||
.word 0x3F333333, 0x020800AA, 0x00A000AA, 0x01030000
|
||||
.word 0x3F333333, 0x020800BE, 0x00A000BE, 0x01020000
|
||||
.word 0x3EE66666, 0x020800CF, 0x00A000CF
|
||||
.word 0x3EE66666, 0x020800CF, 0x00A000CF, 0x01010000
|
||||
.word 0x40000000, 0x0B6D00D2, 0x009600D2, 0x01040000
|
||||
.word 0x3F666666, 0x02080082, 0x00A00082, 0x01030000
|
||||
|
||||
|
||||
.word 0x01010000
|
||||
.word 0x40000000, 0x0B6D00D2
|
||||
|
||||
.word 0x009600D2, 0x01040000
|
||||
.word 0x3F666666, 0x02080082
|
||||
|
||||
|
||||
.word 0x00A00082, 0x01030000
|
||||
glabel D_802854B0
|
||||
.word 0x80286BB0, 0x80286BC4, 0x80286BD8, 0x80286BE4
|
||||
.word 0x80286BF8, 0x80286C04, 0x80286C14, 0x80286C28
|
||||
@@ -204,25 +190,11 @@ glabel D_802854B0
|
||||
.word 0x80287314, 0x80287328, 0x80287338, 0x80287348
|
||||
.word 0x80287358, 0x80287374, 0x80287384, 0x80287394
|
||||
.word 0x802873A8, 0x802873B8, 0x802873CC, 0x802873DC
|
||||
.word 0x802873EC, 0x802873FC
|
||||
.word 0x802873EC, 0x802873FC, 0x80287414, 0x8028742C
|
||||
.word 0x8028743C, 0x80287448
|
||||
|
||||
|
||||
.word 0x80287414
|
||||
|
||||
|
||||
.word 0x8028742C
|
||||
|
||||
|
||||
.word 0x8028743C
|
||||
|
||||
|
||||
.word 0x80287448
|
||||
|
||||
|
||||
.word 0x00000000
|
||||
|
||||
|
||||
.word 0x00000000
|
||||
# Likely an alignment artifact, a file split should happen here
|
||||
.word 0x00000000, 0x00000000
|
||||
|
||||
|
||||
glabel D_802856B0
|
||||
|
||||
@@ -590,53 +590,6 @@ typedef struct {
|
||||
char unk_00[0x1000];
|
||||
} struct_D_802BFB80;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 type; // id maybe?
|
||||
/* 0x04 */ s32 unk4; // sound mode, maybe some other stuff
|
||||
/* 0x08 */ s32 unk8; // This is used but I can't tell what for
|
||||
/* 0x0C */ s32 column;
|
||||
/* 0x10 */ s32 row;
|
||||
/* 0x14 */ u8 priority; // priority/depth/z-level. Higher values are drawn on top of lower values
|
||||
// If equal, later entries in D_8018D9E0 are on top
|
||||
/* 0x15 */ u8 visible; // active? If 1 its displayed, if 0 its not
|
||||
// These seem to be generic space available for use by the struct, no 1 purpose for any given member
|
||||
/* 0x16 */ s16 unk16; // Potentially unused
|
||||
/* 0x18 */ s32 D_8018DEE0_index; // Index in D_8018DEE0, an array of some other struct type
|
||||
/* 0x1C */ s32 unk1C; // Multi use. Sometimes cup selection, sometimes course index.
|
||||
/* 0x20 */ s32 unk20; // Multi use, hard to tell what for though. Sometimes a random number, sometimes GP points
|
||||
/* 0x24 */ s32 unk24; // Multi use, x scaling for some things, rotation multiplier for the question box in some menus, probably some other things
|
||||
} struct_8018D9E0_entry; // size = 0x28
|
||||
|
||||
// Top byte is used as an index to gSegmentTable
|
||||
// The rest of the bytes are used as an offset
|
||||
typedef u32 segment_address_t;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 type;
|
||||
/* 0x02 */ s16 unused1;
|
||||
/* 0x04 */ u64 *textureData; // This should be interpreted as a segmented address
|
||||
/* 0x08 */ s16 width;
|
||||
/* 0x0A */ s16 height;
|
||||
/* 0x0C */ s16 dX;
|
||||
/* 0x0D */ s16 dY;
|
||||
/* 0x10 */ s16 size; // This size is NOT equal to width*height. Its likely the size of the compressed texture
|
||||
/* 0x12 */ s16 unused2;
|
||||
} MkTexture; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ MkTexture *mk64Texture; // This should be interpreted as a segmented address
|
||||
/* 0x04 */ s32 frame_length;
|
||||
} MkAnimation; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ MkAnimation *textureSequence;
|
||||
/* 0x04 */ s32 sequenceIndex; // Index in textureSequence that the animation is currently on
|
||||
/* 0x08 */ s32 frameCountDown; // Frames left for the given animation part
|
||||
/* 0x0C */ u32 visible; // visbile if 0x80000000, otherwise invisbile AND paused
|
||||
/* 0x10 */ s32 D_8018E118_index; // Don't know what D_8018E118 tracks
|
||||
/* 0x14 */ s32 unk14; // Flip flops between 0 and 1, use unknown
|
||||
} struct_8018DEE0_entry; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 red;
|
||||
/* 0x02 */ u16 green;
|
||||
@@ -644,17 +597,6 @@ typedef struct {
|
||||
/* 0x06 */ u16 alpha;
|
||||
} RGBA16; // size = 0x08
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u64 *textureData; // This should be interpreted as a segmented address
|
||||
/**
|
||||
* Its hard to tell what exactly what this is meant to be,
|
||||
* but it appears to be used as some sort of offset/index from the address stored in D_8018D9B0.
|
||||
* This value is (roughly) the sum of (width * height) of the
|
||||
* textures in all the previous entries in D_8018E118
|
||||
*/
|
||||
/* 0x04 */ s32 offset;
|
||||
} struct_8018E118_entry; // size = 0x08
|
||||
|
||||
// Something related to human players
|
||||
// Also might be used for the camera during the post race screens
|
||||
typedef struct {
|
||||
|
||||
@@ -26,7 +26,6 @@ extern s8 gCupSelection; // D_8018EE09
|
||||
extern u8 gCupSelectionByCourseId[NUM_COURSES]; // D_800E7664
|
||||
extern s16 gCurrentCourseId; // D_800DC5A0
|
||||
|
||||
extern s32 gD_8018E118TotalSize; // D_8018E110
|
||||
extern s8 gDebugMenuSelection; // D_8018EDEF
|
||||
extern char *gDebugSoundModeNames[NUM_SOUND_MODES]; // D_800E7700
|
||||
extern Gfx *gDisplayListHead; // D_80150298
|
||||
@@ -54,7 +53,6 @@ extern s32 gModeSelection; // D_800DC53C
|
||||
|
||||
// Indicates the ID of the next title screen demo that will be played
|
||||
extern u8 gNextDemoId; // D_800E86BC
|
||||
extern s32 gNumD_8018E118Entries; // D_8018E758
|
||||
|
||||
// Maps course IDs (as defined in the COURSES enum) to an index in a given cup's track order
|
||||
extern u8 gPerCupIndexByCourseId[NUM_COURSES]; // D_800EFD50
|
||||
|
||||
+4
-4
@@ -2789,7 +2789,7 @@ s32 func_8000B7E4(s32, u16); // extern
|
||||
? func_8002E4C4(void *, u16 *, f32 *, u16 *); // extern
|
||||
? func_8003680C(void *, s16, void *, s32, void *); // extern
|
||||
s32 func_802B5224(void *, ? *, void *, ? *); // extern
|
||||
void *segmented_to_virtual_dupe(segment_address_t); // extern
|
||||
void *segmented_to_virtual_dupe(void*); // extern
|
||||
? set_places(); // extern
|
||||
extern ? D_0D009418;
|
||||
extern ? D_0D009568;
|
||||
@@ -6289,7 +6289,7 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000F2DC.s")
|
||||
? func_80011A5C(); // extern
|
||||
? func_80011AB8(s32, s32); // extern
|
||||
? func_8001AB00(? *, s16, s16 *, s16); // extern
|
||||
void *segmented_to_virtual_dupe(segment_address_t); // extern
|
||||
void *segmented_to_virtual_dupe(void*); // extern
|
||||
extern ? D_0D009418;
|
||||
extern ? D_800DCAA0;
|
||||
extern f32 D_800ED050;
|
||||
@@ -6812,7 +6812,7 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000F628.s")
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s16 func_80011014(s16 *, u16 *, s32, s32); // extern
|
||||
s16 process_path_data(s16 *, u16 *); // extern
|
||||
void *segmented_to_virtual_dupe(segment_address_t); // extern
|
||||
void *segmented_to_virtual_dupe(void*); // extern
|
||||
extern ? D_800DC8D0;
|
||||
extern ? D_800DCA4C;
|
||||
extern ? D_801645C8;
|
||||
@@ -7823,7 +7823,7 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001168C.s")
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void *segmented_to_virtual_dupe(segment_address_t); // extern
|
||||
void *segmented_to_virtual_dupe(void*); // extern
|
||||
extern s32 D_800DC720;
|
||||
extern ? D_80162EB8;
|
||||
extern ? D_80162F08;
|
||||
|
||||
+706
-633
File diff suppressed because it is too large
Load Diff
+64
-3
@@ -5,6 +5,60 @@
|
||||
#include "textures.h"
|
||||
#include "main.h"
|
||||
|
||||
/* File specific types */
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 type; // id maybe?
|
||||
/* 0x04 */ s32 unk4; // sound mode, maybe some other stuff
|
||||
/* 0x08 */ s32 unk8; // This is used but I can't tell what for
|
||||
/* 0x0C */ s32 column;
|
||||
/* 0x10 */ s32 row;
|
||||
/* 0x14 */ u8 priority; // priority/depth/z-level. Higher values are drawn on top of lower values
|
||||
// If equal, later entries in D_8018D9E0 are on top
|
||||
/* 0x15 */ u8 visible; // active? If 1 its displayed, if 0 its not
|
||||
// These seem to be generic space available for use by the struct, no 1 purpose for any given member
|
||||
/* 0x16 */ s16 unk16; // Potentially unused
|
||||
/* 0x18 */ s32 D_8018DEE0_index; // Index in D_8018DEE0, an array of some other struct type
|
||||
/* 0x1C */ s32 unk1C; // Multi use. Sometimes cup selection, sometimes course index.
|
||||
/* 0x20 */ s32 unk20; // Multi use, hard to tell what for though. Sometimes a random number, sometimes GP points
|
||||
/* 0x24 */ f32 unk24; // Multi use, x scaling for some things, rotation multiplier for the question box in some menus, probably some other things
|
||||
} struct_8018D9E0_entry; // size = 0x28
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ MkAnimation *textureSequence;
|
||||
/* 0x04 */ s32 sequenceIndex; // Index in textureSequence that the animation is currently on
|
||||
/* 0x08 */ s32 frameCountDown; // Frames left for the given animation part
|
||||
/* 0x0C */ u32 visible; // visbile if 0x80000000, otherwise invisbile AND paused
|
||||
/* 0x10 */ s32 D_8018E118_index; // Don't know what D_8018E118 tracks
|
||||
/* 0x14 */ s32 unk14; // Flip flops between 0 and 1, use unknown
|
||||
} struct_8018DEE0_entry; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u64 *textureData; // This should be interpreted as a segmented address
|
||||
/**
|
||||
* Its hard to tell what exactly what this is meant to be,
|
||||
* but it appears to be used as some sort of offset/index from the address stored in D_8018D9B0.
|
||||
* This value is (roughly) the sum of (width * height) of the
|
||||
* textures in all the previous entries in D_8018E118
|
||||
*/
|
||||
/* 0x04 */ s32 offset;
|
||||
} struct_8018E118_entry; // size = 0x08
|
||||
|
||||
// In some way dictates how the text is written during the credit sequence
|
||||
typedef struct {
|
||||
// Scaling factor that affects the x/y scaling and tracking of printed text
|
||||
/* 0x00 */ f32 textScaling;
|
||||
// Column to start sliding in from
|
||||
/* 0x04 */ s16 startingColumn;
|
||||
/* 0x06 */ s16 row;
|
||||
// Extra distance added to the destination column
|
||||
/* 0x08 */ s16 columnExtra;
|
||||
/* 0x0A */ s16 unknown; // No idea what this is for, has a value but never seems to be read
|
||||
/* 0x0C */ s8 slideDirection; // 0 for slide right, 1 for slide left. May have other uses/effects
|
||||
/* 0x0D */ s8 textColor;
|
||||
/* 0x0E */ s16 padding; // Always seems to be 0, never read (that I can see)
|
||||
} struct_802850C0_entry; // size = 0x10
|
||||
|
||||
/* Function Prototypes */
|
||||
|
||||
f64 exponent_by_squaring(f64, s32);
|
||||
@@ -65,8 +119,8 @@ void func_80099E54();
|
||||
void func_80099E60(MkTexture *, s32, s32);
|
||||
void func_80099EC4();
|
||||
void func_80099A70();
|
||||
void func_8009A594(s32, s32, segment_address_t);
|
||||
void func_8009A640(s32, s32, s32, segment_address_t);
|
||||
void func_8009A594(s32, s32, MkAnimation*);
|
||||
void func_8009A640(s32, s32, s32, MkAnimation*);
|
||||
void func_8009A76C(s32, s32, s32, s32);
|
||||
void func_8009A7EC(s32, s32, s32, s32, s32);
|
||||
void func_8009A878(struct_8018DEE0_entry*);
|
||||
@@ -119,6 +173,9 @@ struct_8018D9E0_entry *func_800AAF30(s32);
|
||||
s32 func_800AAF70(s32);
|
||||
void func_800AAF94(struct_8018D9E0_entry*, s32);
|
||||
void func_800AC978(struct_8018D9E0_entry*);
|
||||
void func_800AF480(struct_8018D9E0_entry*);
|
||||
void func_800AF4DC(struct_8018D9E0_entry*);
|
||||
void func_800AF740(struct_8018D9E0_entry*);
|
||||
|
||||
// code_80057C60.c
|
||||
void func_80057CE4();
|
||||
@@ -128,6 +185,7 @@ void func_80057CE4();
|
||||
#define D_8018D9E0_SIZE 0x20
|
||||
#define D_8018DEE0_SIZE 0x10
|
||||
#define D_8018E118_SIZE 0xC8
|
||||
#define D_802850C0_SIZE 0x3F
|
||||
|
||||
/* This is where I'd put my static data, if I had any */
|
||||
|
||||
@@ -189,8 +247,11 @@ extern s32 D_80165754;
|
||||
extern s8 D_8018D9D9;
|
||||
extern struct_8018D9E0_entry D_8018D9E0[D_8018D9E0_SIZE]; // D_8018D9E0
|
||||
extern struct_8018DEE0_entry D_8018DEE0[D_8018DEE0_SIZE]; // D_8018DEE0
|
||||
extern s32 gD_8018E118TotalSize; // D_8018E110
|
||||
extern struct_8018E118_entry D_8018E118[D_8018E118_SIZE]; // D_8018E118
|
||||
extern s8 gTextColor; // D_8018E860
|
||||
extern s32 gNumD_8018E118Entries; // D_8018E758
|
||||
extern struct_802850C0_entry D_802850C0[D_802850C0_SIZE]; // D_802850C0
|
||||
extern s8 gTextColor; // D_8018E860
|
||||
extern s8 D_8018ED91;
|
||||
extern s32 D_8018E850;
|
||||
extern s32 D_8018E854;
|
||||
|
||||
+18
-1
@@ -1,7 +1,24 @@
|
||||
#ifndef TEXTURES_H
|
||||
#define TEXTURES_H
|
||||
|
||||
#include "common_structs.h"
|
||||
#include "PR/ultratypes.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 type;
|
||||
/* 0x02 */ s16 unused1;
|
||||
/* 0x04 */ u64 *textureData; // This should be interpreted as a segmented address
|
||||
/* 0x08 */ s16 width;
|
||||
/* 0x0A */ s16 height;
|
||||
/* 0x0C */ s16 dX;
|
||||
/* 0x0D */ s16 dY;
|
||||
/* 0x10 */ s16 size; // This size is NOT equal to width*height. Its likely the size of the compressed texture
|
||||
/* 0x12 */ s16 unused2;
|
||||
} MkTexture; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ MkTexture *mk64Texture; // This should be interpreted as a segmented address
|
||||
/* 0x04 */ s32 frame_length;
|
||||
} MkAnimation; // size = 0x8
|
||||
|
||||
extern MkTexture D_02000000[2];
|
||||
extern MkTexture D_02000028[2];
|
||||
|
||||
Reference in New Issue
Block a user