mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-03 09:10:20 -05:00
const void* data
This commit is contained in:
parent
1e2ed281eb
commit
0108e666d8
|
|
@ -3,10 +3,17 @@
|
|||
|
||||
#include "file_system.h"
|
||||
|
||||
// size: 0x8
|
||||
typedef struct SiroArchive
|
||||
{
|
||||
/* 0x0 */ u32 magic;
|
||||
/* 0x4 */ const void *data;
|
||||
} SiroArchive;
|
||||
|
||||
u32 DecompressAT(u8 *dst, s32 dstLen, const u8 *src);
|
||||
u32 DecompressATFile(void *dst, s32 dstLen, OpenedFile *file);
|
||||
u32 DecompressATGlobalFile(u32 *result, s32 resultLength, OpenedFile *file);
|
||||
const u8 *GetSiroPtr(OpenedFile *openedFile);
|
||||
const void *GetSiroPtr(OpenedFile *openedFile);
|
||||
void nullsub_16(void);
|
||||
|
||||
// Returns FALSE if the ascii chars in both strings match, ignoring uppercase/lowercase differences.
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@
|
|||
typedef struct File
|
||||
{
|
||||
/* 0x0 */ char *name;
|
||||
/* 0x4 */ const u8 *data;
|
||||
/* 0x4 */ const void *data;
|
||||
} File;
|
||||
|
||||
// size: 0x8
|
||||
typedef struct OpenedFile
|
||||
{
|
||||
/* 0x0 */ const File *file;
|
||||
/* 0x4 */ const u8 *data;
|
||||
/* 0x4 */ const void *data;
|
||||
} OpenedFile;
|
||||
|
||||
// size: 0x10
|
||||
|
|
@ -23,13 +23,6 @@ typedef struct FileArchive
|
|||
/* 0xC */ const File *entries;
|
||||
} FileArchive;
|
||||
|
||||
// size: 0x8
|
||||
typedef struct SiroArchive
|
||||
{
|
||||
/* 0x0 */ u32 magic;
|
||||
/* 0x4 */ u8 *data;
|
||||
} SiroArchive;
|
||||
|
||||
// size: 0x8
|
||||
typedef struct UnkFileStruct
|
||||
{
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ s32 sub_803EF90(s32 a0, u8 a1)
|
|||
bitsNo = 0;
|
||||
for (id = 0; id < 4; id++) {
|
||||
u32 *dst = mainDst;
|
||||
const u32 *src = (u32 *)((&gUnknown_202EC9C->data[4] + r12[id] * 32));
|
||||
const u32 *src = (u32 *)((&((u8 *)gUnknown_202EC9C->data)[4] + r12[id] * 32));
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
u32 toOr1, toOr2;
|
||||
|
|
@ -546,13 +546,13 @@ s32 sub_803EF90(s32 a0, u8 a1)
|
|||
if (a0 > 999) a0 = 999;
|
||||
if (a0 < -999) a0 = -999;
|
||||
|
||||
r2 = (u32 *)(gUnknown_202EC9C->data + 0x184);
|
||||
r2 = (u32 *)((u8 *)gUnknown_202EC9C->data + 0x184);
|
||||
if (a1) {
|
||||
if (a0 > 0) {
|
||||
r2 = (u32 *)(gUnknown_202EC9C->data + 0x144);
|
||||
r2 = (u32 *)((u8 *)gUnknown_202EC9C->data + 0x144);
|
||||
}
|
||||
else if (a0 < 0) {
|
||||
r2 = (u32 *)(gUnknown_202EC9C->data + 0x164);
|
||||
r2 = (u32 *)((u8 *)gUnknown_202EC9C->data + 0x164);
|
||||
a0 = -a0;
|
||||
}
|
||||
}
|
||||
|
|
@ -608,7 +608,7 @@ s32 sub_803EF90(s32 a0, u8 a1)
|
|||
}
|
||||
|
||||
if (arrId == 9 && unkBool) {
|
||||
const u32 *src = (u32 *)(&gUnknown_202EC9C->data[4]);
|
||||
const u32 *src = (u32 *)(&((u8 *)gUnknown_202EC9C->data)[4]);
|
||||
u32 *dst = mainDst;
|
||||
for (i = 0; i < 8; i++) {
|
||||
u32 toOr1, toOr2;
|
||||
|
|
@ -638,7 +638,7 @@ s32 sub_803EF90(s32 a0, u8 a1)
|
|||
}
|
||||
|
||||
{
|
||||
const u32 *src = (u32 *)(&gUnknown_202EC9C->data[4] + (a0 * 32));
|
||||
const u32 *src = (u32 *)(&((u8 *)gUnknown_202EC9C->data)[4] + (a0 * 32));
|
||||
u32 *dst = mainDst;
|
||||
for (i = 0; i < 8; i++) {
|
||||
u32 toOr1, toOr2;
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ static void DecompressAT_Finish(void);
|
|||
static char DecompressAT_GetByte(s32);
|
||||
static void DecompressAT_Init(u32 *);
|
||||
static u32 DecompressATGlobal(u32 *, s32, const char *);
|
||||
static void NDS_DecompressRLE(const void *);
|
||||
static void NDS_DecompressRLE(const SiroArchive *);
|
||||
|
||||
const u8 *GetSiroPtr(OpenedFile *openedFile)
|
||||
const void *GetSiroPtr(OpenedFile *openedFile)
|
||||
{
|
||||
struct SiroArchive *siro = (struct SiroArchive *)openedFile->data;
|
||||
const SiroArchive *siro = (const SiroArchive *)openedFile->data;
|
||||
|
||||
if (siro->magic == MAGIC_SIR0)
|
||||
NDS_DecompressRLE(openedFile->data);
|
||||
|
|
@ -33,7 +33,7 @@ const u8 *GetSiroPtr(OpenedFile *openedFile)
|
|||
return openedFile->data;
|
||||
}
|
||||
|
||||
UNUSED static void *UnusedGetSir0Ptr(struct SiroArchive *siro)
|
||||
UNUSED static const void *UnusedGetSir0Ptr(const SiroArchive *siro)
|
||||
{
|
||||
if (siro->magic != MAGIC_SIR0)
|
||||
return siro;
|
||||
|
|
@ -42,7 +42,7 @@ UNUSED static void *UnusedGetSir0Ptr(struct SiroArchive *siro)
|
|||
return siro->data;
|
||||
}
|
||||
|
||||
static void NDS_DecompressRLE(const void *unused)
|
||||
static void NDS_DecompressRLE(const SiroArchive *siro)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user