1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Decompile jpegdecoder.c, padsetup.c and code_800C3C20.c (#217)

* Decompile jpegdecoder.c, padsetup.c and code_800C3C20.c

* change func_800C3C20's prototype and rename some fields in jpeg related structs

* Fix comment in Jpeg_GetU16 and change func_800C3C20

* use a switch in padsetup.c
This commit is contained in:
Random 2020-06-22 00:43:14 +02:00 committed by GitHub
parent afce6a3c36
commit ab1ec89f22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 389 additions and 653 deletions

View file

@ -1841,17 +1841,21 @@ typedef struct {
} JpegHuffmanTableOld; // size = 0x300
typedef struct {
/* 0x00 */ u32 unk_00;
/* 0x04 */ u32 unk_04;
/* 0x08 */ u32 unk_08;
/* 0x0C */ u32 qTablePtrs[3];
/* 0x00 */ u32 address;
/* 0x04 */ u32 mbCount;
/* 0x08 */ u32 mode;
/* 0x0C */ u32 qTableYPtr;
/* 0x10 */ u32 qTableUPtr;
/* 0x14 */ u32 qTableVPtr;
/* 0x18 */ char unk_18[0x8];
} JpegTaskData; // size = 0x20
typedef struct {
/* 0x000 */ JpegTaskData taskData;
/* 0x020 */ char yieldData[0x200];
/* 0x220 */ JpegQuantizationTable qTables[3];
/* 0x220 */ JpegQuantizationTable qTableY;
/* 0x2A0 */ JpegQuantizationTable qTableU;
/* 0x320 */ JpegQuantizationTable qTableV;
/* 0x3A0 */ u8 codesLengths[0x110];
/* 0x4B0 */ u16 codes[0x108];
/* 0x6C0 */ u16 unk_6C0[4][0x180];
@ -1859,7 +1863,7 @@ typedef struct {
typedef struct {
/* 0x00 */ void* imageData;
/* 0x04 */ u8 unk_04;
/* 0x04 */ u8 mode;
/* 0x05 */ u8 unk_05;
/* 0x08 */ JpegHuffmanTable* hTablePtrs[4];
/* 0x18 */ u8 unk_18;
@ -1871,7 +1875,7 @@ typedef struct {
/* 0x10 */ u8 dhtCount;
/* 0x14 */ u8* dhtPtr[4];
/* 0x24 */ void* imageData;
/* 0x28 */ u32 unk_28; // 0 if Y V0 is 0 and 2 if Y V0 is 2
/* 0x28 */ u32 mode; // 0 if Y V0 is 1 and 2 if Y V0 is 2
/* 0x2C */ char unk_2C[4];
/* 0x30 */ OSScTask scTask;
/* 0x88 */ char unk_88[0x10];
@ -1880,6 +1884,15 @@ typedef struct {
/* 0xB4 */ JpegWork* workBuf;
} JpegContext; // size = 0xB8
typedef struct {
/* 0x00 */ u32 byteIdx;
/* 0x04 */ u8 bitIdx;
/* 0x05 */ u8 dontSkip;
/* 0x08 */ u32 curWord;
/* 0x0C */ s16 unk_0C;
/* 0x0E */ s16 unk_0E;
/* 0x10 */ s16 unk_10;
} JpegDecoderState; // size = 0x14
// Vis...
typedef struct {