From 949d0c8853d31ae88fdf3427bae05ec337ab4b0b Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Fri, 17 Jul 2020 13:48:25 +0300 Subject: Add audio cache for faster initialization --- src/core/FileLoader.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/FileLoader.cpp') diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp index 3c4ed040..63be2e7b 100644 --- a/src/core/FileLoader.cpp +++ b/src/core/FileLoader.cpp @@ -104,7 +104,9 @@ CFileLoader::LoadLevel(const char *filename) LoadingScreenLoadingFile(line + 8); LoadMapZones(line + 8); }else if(strncmp(line, "SPLASH", 6) == 0){ +#ifndef DISABLE_LOADING_SCREEN LoadSplash(GetRandomSplashScreen()); +#endif }else if(strncmp(line, "CDIMAGE", 7) == 0){ CdStreamAddImage(line + 8); } -- cgit v1.2.3 From 2e8048d0feacbfb5a8e3d75be8d00b3f8d45c3be Mon Sep 17 00:00:00 2001 From: aap Date: Mon, 27 Jul 2020 15:38:12 +0200 Subject: collision fixes --- src/core/FileLoader.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/FileLoader.cpp') diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp index 63be2e7b..b4da1a5e 100644 --- a/src/core/FileLoader.cpp +++ b/src/core/FileLoader.cpp @@ -264,12 +264,12 @@ CFileLoader::LoadCollisionModel(uint8 *buf, CColModel &model, char *modelname) int32 numVertices = *(int16*)buf; buf += 4; if(numVertices > 0){ - model.vertices = (CVector*)RwMalloc(numVertices*sizeof(CVector)); + model.vertices = (CompressedVector*)RwMalloc(numVertices*sizeof(CompressedVector)); for(i = 0; i < numVertices; i++){ - model.vertices[i] = *(CVector*)buf; - if(Abs(model.vertices[i].x) >= 256.0f || - Abs(model.vertices[i].y) >= 256.0f || - Abs(model.vertices[i].z) >= 256.0f) + model.vertices[i].Set(*(float*)buf, *(float*)(buf+4), *(float*)(buf+8)); + if(Abs(*(float*)buf) >= 256.0f || + Abs(*(float*)(buf+4)) >= 256.0f || + Abs(*(float*)(buf+8)) >= 256.0f) printf("%s:Collision volume too big\n", modelname); buf += 12; } -- cgit v1.2.3