aboutsummaryrefslogtreecommitdiff
path: root/examples/demos/n00bdemo/main.c
diff options
context:
space:
mode:
authorJohn "Lameguy" Wilbert Villamor <lameguy64@gmail.com>2021-10-15 09:22:45 +0800
committerGitHub <noreply@github.com>2021-10-15 09:22:45 +0800
commitdd0f088aaa4c6bf013643be2d1d8621dbffdb000 (patch)
treed848d6ce007d8bb9357c8b99d6a0a39ec41d244e /examples/demos/n00bdemo/main.c
parent9e08d1047fa8deeb3ccb3ce9bb11d69e25a52d56 (diff)
parenteb719a424e6a16fb64209139a32c9f8a7235a929 (diff)
downloadpsn00bsdk-dd0f088aaa4c6bf013643be2d1d8621dbffdb000.tar.gz
Merge pull request #38 from spicyjpeg/cmake
Full CMake support (in place of makefiles)
Diffstat (limited to 'examples/demos/n00bdemo/main.c')
-rw-r--r--examples/demos/n00bdemo/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/demos/n00bdemo/main.c b/examples/demos/n00bdemo/main.c
index 623d8cc..ba21d88 100644
--- a/examples/demos/n00bdemo/main.c
+++ b/examples/demos/n00bdemo/main.c
@@ -29,8 +29,8 @@
#include <psxspu.h>
#include <inline_c.h>
#include <string.h>
-#include <lzp.h>
-#include <lzqlp.h>
+#include <lzp/lzp.h>
+#include <lzp/lzqlp.h>
#include "malloc.h"
#include "smd.h"
@@ -85,11 +85,12 @@ void loadTextures() {
Unpack textures from an embedded LZP archive and upload them to VRAM.
*/
int i;
- int *tex_buff,*ttim,j;
+ int *ttim,j;
+ QLP_HEAD *tex_buff;
TIM_IMAGE tim;
i = lzpSearchFile( "textures", lz_resources );
- tex_buff = (int*)malloc( lzpFileSize( lz_resources, i ) );
+ tex_buff = (QLP_HEAD*)malloc( lzpFileSize( lz_resources, i ) );
lzpUnpackFile( tex_buff, lz_resources, i );
@@ -148,6 +149,7 @@ void loadTextures() {
font_tpage = getTPage( 0, 1, tim.prect->x, tim.prect->y )|0x200;
font_clut = getClut( tim.crect->x, tim.crect->y );
+ free( tex_buff );
}
void unpackModels() {