summaryrefslogtreecommitdiffstats
path: root/src/core/FileLoader.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2020-08-03 00:03:24 +0200
committerGitHub <noreply@github.com>2020-08-03 00:03:24 +0200
commit4b614333c6778ae49cef688f6ef691dd58384d13 (patch)
treeced50966eaaf373f8733547046baf2bdc558662d /src/core/FileLoader.cpp
parentcleanup (diff)
parentMove sdk and eax (diff)
downloadre3-4b614333c6778ae49cef688f6ef691dd58384d13.tar
re3-4b614333c6778ae49cef688f6ef691dd58384d13.tar.gz
re3-4b614333c6778ae49cef688f6ef691dd58384d13.tar.bz2
re3-4b614333c6778ae49cef688f6ef691dd58384d13.tar.lz
re3-4b614333c6778ae49cef688f6ef691dd58384d13.tar.xz
re3-4b614333c6778ae49cef688f6ef691dd58384d13.tar.zst
re3-4b614333c6778ae49cef688f6ef691dd58384d13.zip
Diffstat (limited to 'src/core/FileLoader.cpp')
-rw-r--r--src/core/FileLoader.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp
index 3c4ed040..b4da1a5e 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);
}
@@ -262,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;
}