mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 01:34:18 +00:00
[headers 11] stackcheck.h, jpeg functions (#2171)
* [headers 11] stackcheck.h, jpeg functions * bss
This commit is contained in:
parent
c39323a336
commit
de1a08c061
9 changed files with 47 additions and 37 deletions
|
@ -25,10 +25,6 @@ NORETURN void func_80002384(const char* exp, const char* file, int line);
|
|||
#endif
|
||||
OSPiHandle* osDriveRomInit(void);
|
||||
void Mio0_Decompress(u8* src, u8* dst);
|
||||
void StackCheck_Init(StackEntry* entry, void* stackBottom, void* stackTop, u32 initValue, s32 minSpace,
|
||||
const char* name);
|
||||
void StackCheck_Cleanup(StackEntry* entry);
|
||||
u32 StackCheck_Check(StackEntry* entry);
|
||||
#if OOT_DEBUG
|
||||
void LogUtils_LogHexDump(void* ptr, s32 size0);
|
||||
void LogUtils_CheckNullPointer(const char* exp, void* ptr, const char* file, int line);
|
||||
|
@ -687,7 +683,7 @@ void func_8006D0EC(PlayState* play, Player* player);
|
|||
void func_8006D684(PlayState* play, Player* player);
|
||||
void func_8006DC68(PlayState* play, Player* player);
|
||||
void func_8006DD9C(Actor* actor, Vec3f* arg1, s16 arg2);
|
||||
s32 Jpeg_Decode(void* data, void* zbuffer, void* work, u32 workSize);
|
||||
|
||||
void KaleidoSetup_Update(PlayState* play);
|
||||
void KaleidoSetup_Init(PlayState* play);
|
||||
void KaleidoSetup_Destroy(PlayState* play);
|
||||
|
@ -1419,18 +1415,7 @@ void Sleep_Nsec(u32 nsec);
|
|||
void Sleep_Usec(u32 usec);
|
||||
void Sleep_Msec(u32 ms);
|
||||
void Sleep_Sec(u32 sec);
|
||||
void JpegUtils_ProcessQuantizationTable(u8* dqt, JpegQuantizationTable* qt, u8 count);
|
||||
s32 JpegUtils_ParseHuffmanCodesLengths(u8* ptr, u8* codesLengths);
|
||||
s32 JpegUtils_GetHuffmanCodes(u8* codesLengths, u16* codes);
|
||||
s32 JpegUtils_SetHuffmanTable(u8* data, JpegHuffmanTable* ht, u16* codes);
|
||||
u32 JpegUtils_ProcessHuffmanTableImpl(u8* data, JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 isAc);
|
||||
u32 JpegUtils_ProcessHuffmanTable(u8* dht, JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 count);
|
||||
void JpegUtils_SetHuffmanTableOld(u8* data, JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes, s16 count, u8 isAc);
|
||||
u32 JpegUtils_ProcessHuffmanTableImplOld(u8* dht, JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes);
|
||||
s32 JpegDecoder_Decode(JpegDecoder* decoder, u16* mcuBuff, s32 count, u8 isFollowing, JpegDecoderState* state);
|
||||
s32 JpegDecoder_ProcessMcu(JpegHuffmanTable* hTable0, JpegHuffmanTable* hTable1, u16* mcu, s16* unk);
|
||||
s32 JpegDecoder_ParseNextSymbol(JpegHuffmanTable* hTable, s16* outCoeff, s8* outZeroCount);
|
||||
u16 JpegDecoder_ReadBits(u8 len);
|
||||
|
||||
s32 osPfsFreeBlocks(OSPfs* pfs, s32* leftoverBytes);
|
||||
void guScale(Mtx* m, f32 x, f32 y, f32 z);
|
||||
OSTask* _VirtualToPhysicalTask(OSTask* intp);
|
||||
|
|
|
@ -77,4 +77,11 @@ typedef struct JpegDecoderState {
|
|||
/* 0x10 */ s16 unk_10;
|
||||
} JpegDecoderState; // size = 0x14
|
||||
|
||||
s32 Jpeg_Decode(void* data, void* zbuffer, void* work, u32 workSize);
|
||||
|
||||
void JpegUtils_ProcessQuantizationTable(u8* dqt, JpegQuantizationTable* qt, u8 count);
|
||||
u32 JpegUtils_ProcessHuffmanTable(u8* dht, JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 count);
|
||||
|
||||
s32 JpegDecoder_Decode(JpegDecoder* decoder, u16* mcuBuff, s32 count, u8 isFollowing, JpegDecoderState* state);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef STACK_H
|
||||
#define STACK_H
|
||||
|
||||
#include "alignment.h"
|
||||
|
||||
#define STACK(stack, size) \
|
||||
u64 stack[ALIGN8(size) / sizeof(u64)]
|
||||
|
||||
|
|
27
include/stackcheck.h
Normal file
27
include/stackcheck.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
#ifndef STACKCHECK_H
|
||||
#define STACKCHECK_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
typedef enum StackStatus {
|
||||
/* 0 */ STACK_STATUS_OK,
|
||||
/* 1 */ STACK_STATUS_WARNING,
|
||||
/* 2 */ STACK_STATUS_OVERFLOW
|
||||
} StackStatus;
|
||||
|
||||
typedef struct StackEntry {
|
||||
/* 0x00 */ struct StackEntry* next;
|
||||
/* 0x04 */ struct StackEntry* prev;
|
||||
/* 0x08 */ u32* head;
|
||||
/* 0x0C */ u32* tail;
|
||||
/* 0x10 */ u32 initValue;
|
||||
/* 0x14 */ s32 minSpace;
|
||||
/* 0x18 */ const char* name;
|
||||
} StackEntry;
|
||||
|
||||
void StackCheck_Init(StackEntry* entry, void* stackBottom, void* stackTop, u32 initValue, s32 minSpace,
|
||||
const char* name);
|
||||
void StackCheck_Cleanup(StackEntry* entry);
|
||||
u32 StackCheck_Check(StackEntry* entry);
|
||||
|
||||
#endif
|
|
@ -69,6 +69,7 @@
|
|||
#include "sys_matrix.h"
|
||||
#include "main.h"
|
||||
#include "segmented_address.h"
|
||||
#include "stackcheck.h"
|
||||
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
@ -397,22 +398,6 @@ typedef struct DebugDispObject {
|
|||
/* 0x28 */ struct DebugDispObject* next;
|
||||
} DebugDispObject; // size = 0x2C
|
||||
|
||||
typedef struct StackEntry {
|
||||
/* 0x00 */ struct StackEntry* next;
|
||||
/* 0x04 */ struct StackEntry* prev;
|
||||
/* 0x08 */ u32* head;
|
||||
/* 0x0C */ u32* tail;
|
||||
/* 0x10 */ u32 initValue;
|
||||
/* 0x14 */ s32 minSpace;
|
||||
/* 0x18 */ const char* name;
|
||||
} StackEntry;
|
||||
|
||||
typedef enum StackStatus {
|
||||
/* 0 */ STACK_STATUS_OK,
|
||||
/* 1 */ STACK_STATUS_WARNING,
|
||||
/* 2 */ STACK_STATUS_OVERFLOW
|
||||
} StackStatus;
|
||||
|
||||
typedef struct ISVDbg {
|
||||
/* 0x00 */ u32 magic; // IS64
|
||||
/* 0x04 */ u32 get;
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
*/
|
||||
#if PLATFORM_GC
|
||||
|
||||
#pragma increment_block_number "gc-eu:208 gc-eu-mq:208 gc-eu-mq-dbg:208 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224" \
|
||||
"gc-us-mq:224"
|
||||
#pragma increment_block_number "gc-eu:208 gc-eu-mq:208 gc-eu-mq-dbg:208 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208" \
|
||||
"gc-us-mq:208"
|
||||
|
||||
#include "global.h"
|
||||
#include "alloca.h"
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#include "global.h"
|
||||
|
||||
s32 JpegDecoder_ProcessMcu(JpegHuffmanTable* hTable0, JpegHuffmanTable* hTable1, u16* mcu, s16* unk);
|
||||
s32 JpegDecoder_ParseNextSymbol(JpegHuffmanTable* hTable, s16* outCoeff, s8* outZeroCount);
|
||||
u16 JpegDecoder_ReadBits(u8 len);
|
||||
|
||||
u8* sJpegBitStreamPtr;
|
||||
u32 sJpegBitStreamByteIdx;
|
||||
u8 sJpegBitStreamBitIdx;
|
||||
|
|
|
@ -1395,7 +1395,7 @@ void func_80B3F3D8(void) {
|
|||
Sfx_PlaySfxCentered2(NA_SE_PL_SKIP);
|
||||
}
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:64 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:64 gc-jp:128 gc-jp-ce:128 gc-jp-mq:64 gc-us:128 gc-us-mq:64"
|
||||
|
||||
void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) {
|
||||
static Vec3f D_80B42DA0;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "cic6105.h"
|
||||
#endif
|
||||
|
||||
#pragma increment_block_number "gc-eu:142 gc-eu-mq:142 gc-jp:144 gc-jp-ce:144 gc-jp-mq:144 gc-us:144 gc-us-mq:144"
|
||||
#pragma increment_block_number "gc-eu:141 gc-eu-mq:141 gc-jp:143 gc-jp-ce:143 gc-jp-mq:143 gc-us:143 gc-us-mq:143"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_4
|
||||
|
||||
|
|
Loading…
Reference in a new issue