create gzip.h

This commit is contained in:
Ryan Myers
2021-09-12 11:59:27 -04:00
parent eadc711a1d
commit 928ece073f
5 changed files with 34 additions and 18 deletions
+1
View File
@@ -2,6 +2,7 @@
#define _UNKNOWN_0777A0_H_
#include "types.h"
#include "gzip.h"
void func_80076BA0(void);
s32 *load_asset_section_from_rom(u32 assetIndex);
+1 -18
View File
@@ -1,22 +1,7 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800C6170 */
#include "memory.h"
#include "types.h"
#include "macros.h"
typedef struct huft {
u8 e; /* number of extra bits or operation */
u8 b; /* number of bits in this code or subcode */
union {
u16 n; /* literal, length base, or distance base */
struct huft *t; /* pointer to next level of table */
} v;
} huft;
/* If BMAX needs to be larger than 16, then h and x[] should be ulg. */
#define BMAX 16 /* maximum bit length of any code (16 for explode) */
#define N_MAX 288 /* maximum number of codes in any set */
#include "gzip.h"
/************ .data ************/
@@ -60,8 +45,6 @@ s32 get_asset_uncompressed_size(s32 assetIndex, s32 assetOffset) {
return byteswap32(D_800E3764);
}
s32 gzip_inflate_block(void);
/**
* Decompresses gzip data.
* Returns the pointer to the decompressed data.
+30
View File
@@ -0,0 +1,30 @@
#ifndef _GZIP_H_
#define _GZIP_H_
#include "memory.h"
#include "types.h"
#include "macros.h"
typedef struct huft {
u8 e; /* number of extra bits or operation */
u8 b; /* number of bits in this code or subcode */
union {
u16 n; /* literal, length base, or distance base */
struct huft *t; /* pointer to next level of table */
} v;
} huft;
/* If BMAX needs to be larger than 16, then h and x[] should be ulg. */
#define BMAX 16 /* maximum bit length of any code (16 for explode) */
#define N_MAX 288 /* maximum number of codes in any set */
void func_800C6170(void);
s32 byteswap32(u8 *arg0);
s32 get_asset_uncompressed_size(s32 assetIndex, s32 assetOffset);
u8 *gzip_inflate(u8 *compressedInput, u8 *decompressedOutput);
s32 gzip_inflate_block(void); // Non Matching
void gzip_huft_build(u32 *b, u32 n, u32 s, u16 *d, u16 *e, huft **t, s32 *m); // Non Matching
#endif
+1
View File
@@ -2,6 +2,7 @@
/* RAM_POS: 0x8007AC70 */
#include "textures_sprites.h"
#include "gzip.h"
/************ .data ************/
+1
View File
@@ -14,6 +14,7 @@
#include "menu.h"
#include "video.h"
#include "lib/src/mips1/sc/sched.h"
#include "gzip.h"
/************ .rodata ************/