mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Added TextureHeader struct
This commit is contained in:
@@ -16,5 +16,4 @@ typedef struct Gfx {
|
||||
_g->w0 = word0; \
|
||||
_g->w1 = word1; \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,46 @@ typedef struct MenuElement {
|
||||
/* 0x1E */ u16 backgroundAlpha; // 0x0000 = No background, 0x00FF = full background color.
|
||||
} MenuElement;
|
||||
|
||||
/* Size: 0x20 bytes */
|
||||
typedef struct TextureHeader {
|
||||
/* 0x00 */ u8 width;
|
||||
/* 0x01 */ u8 height;
|
||||
/* 0x02 */ u8 format; // Lower 3 bits determines image format.
|
||||
// 0 = RGBA32
|
||||
// 1 = RGBA16
|
||||
// 2 = I8
|
||||
// 3 = I4
|
||||
// 4 = IA16
|
||||
// 5 = IA8
|
||||
// 6 = IA4
|
||||
// 7 = CI4 texture
|
||||
/* 0x03 */ u8 unk3;
|
||||
/* 0x04 */ u8 unk4;
|
||||
/* 0x05 */ u8 unk5; // Always 0x01?
|
||||
/* 0x06 */ u16 flags;
|
||||
// 0x04 = Interlaced texture
|
||||
// 0x40 = U clamp flag. 0 = Wrap, 1 = Clamp
|
||||
// 0x80 = V clamp flag. 0 = Wrap, 1 = Clamp
|
||||
/* 0x08 */ u16 ci4Palette; // Offset to CI4 palette
|
||||
/* 0x0A */ u8 unkA;
|
||||
/* 0x0B */ u8 numberOfCommands; // initialized in RAM; Number of commands in the texture display list. (Usually 0x07)
|
||||
/* 0x0C */ s32* cmd; // initialized in RAM; Pointer to texture display list.
|
||||
/* 0x10 */ u8 unk10;
|
||||
/* 0x11 */ u8 unk11;
|
||||
/* 0x12 */ u8 numOfTextures; // For animated textures, static textures are just 0x01. Each texture has it's own header.
|
||||
/* 0x13 */ u8 unk13;
|
||||
/* 0x14 */ u16 frameAdvanceDelay; // How many frames to delay before moving to the next texture.
|
||||
/* 0x16 */ u16 textureSize; // Size in number of bytes, including the header
|
||||
/* 0x18 */ u8 unk18;
|
||||
/* 0x19 */ u8 unk19;
|
||||
/* 0x1A */ u8 unk1A;
|
||||
/* 0x1B */ u8 unk1B;
|
||||
/* 0x1C */ u8 unk1C;
|
||||
/* 0x1D */ u8 isCompressed;
|
||||
/* 0x1E */ u8 unk1E;
|
||||
/* 0x1F */ u8 unk1F;
|
||||
} TextureHeader;
|
||||
|
||||
/* Size: 0x18 bytes */
|
||||
typedef struct Racer {
|
||||
/* 0x00 */ u32 trophy_points;
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
#include "structs.h"
|
||||
|
||||
/************ .data ************/
|
||||
|
||||
s32 D_800DC950 = 0;
|
||||
TextureHeader **D_800DC950 = NULL;
|
||||
s32 D_800DC954 = 0;
|
||||
s32 D_800DC958 = 0;
|
||||
s32 D_800DC95C = 0;
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
#define _UNKNOWN_032760_H_
|
||||
|
||||
#include "types.h"
|
||||
#include "structs.h"
|
||||
|
||||
extern s32 D_800DC950;
|
||||
extern TextureHeader **D_800DC950;
|
||||
extern s32 D_800DC954;
|
||||
extern s32 D_800DC958;
|
||||
extern s32 D_800DC95C;
|
||||
|
||||
@@ -107,7 +107,7 @@ void* func_80070C9C(s32, s32);
|
||||
s32 *func_8006F510(void);
|
||||
void func_8006F53C(s32*);
|
||||
|
||||
void func_80071440(LevelHeader *levelHeader);
|
||||
void func_80071440(TextureHeader *texHeader);
|
||||
|
||||
void func_80070B30(void) {
|
||||
s32 tmp = -1;
|
||||
@@ -253,12 +253,12 @@ void func_800710B0(s32 arg0) {
|
||||
func_8006F53C(sp2C);
|
||||
}
|
||||
|
||||
void func_80071140(LevelHeader *levelHeader) {
|
||||
void func_80071140(TextureHeader *texHeader) {
|
||||
s32 *sp1C = func_8006F510();
|
||||
if (D_80123DCC == 0) {
|
||||
func_80071278(levelHeader);
|
||||
func_80071278(texHeader);
|
||||
} else {
|
||||
func_80071440(levelHeader);
|
||||
func_80071440(texHeader);
|
||||
}
|
||||
func_8006F53C(sp1C);
|
||||
}
|
||||
@@ -266,8 +266,8 @@ void func_80071140(LevelHeader *levelHeader) {
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80071198.s")
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80071278.s")
|
||||
|
||||
void func_80071440(LevelHeader *levelHeader) {
|
||||
D_801235C8[D_80123DC8].unk0 = levelHeader;
|
||||
void func_80071440(TextureHeader *texHeader) {
|
||||
D_801235C8[D_80123DC8].unk0 = texHeader;
|
||||
D_801235C8[D_80123DC8].unk4 = D_80123DCC;
|
||||
D_80123DC8++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user