aboutsummaryrefslogtreecommitdiff
path: root/Source/Models.cpp
diff options
context:
space:
mode:
authorrelnev <relnev@5198baeb-e213-0410-be47-fc2ff85ca46f>2003-01-08 09:05:22 +0000
committerrelnev <relnev@5198baeb-e213-0410-be47-fc2ff85ca46f>2003-01-08 09:05:22 +0000
commit8efed35df02822682576bae088f5b6a5c78e8dc9 (patch)
treeda099501696fe5456a95e85c98d5b746176419ee /Source/Models.cpp
parent9c22203ab6b1f6f61ec4b7c52a7c9c51da9e5844 (diff)
downloadblackshades-8efed35df02822682576bae088f5b6a5c78e8dc9.tar.gz
start of serialization
git-svn-id: svn://svn.icculus.org/blackshades/trunk@44 5198baeb-e213-0410-be47-fc2ff85ca46f
Diffstat (limited to 'Source/Models.cpp')
-rw-r--r--Source/Models.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/Models.cpp b/Source/Models.cpp
index 430f052..89b08e4 100644
--- a/Source/Models.cpp
+++ b/Source/Models.cpp
@@ -1,5 +1,7 @@
#include "Models.h"
+#include "Serialize.h"
+
//Functions
void Model::UpdateVertexArray(){
int i;
@@ -71,17 +73,13 @@ bool Model::load(Str255 Name)
// read model settings
- count=2;
- err=FSRead(tfile,&count,&vertexNum);
- count=2;
- err=FSRead(tfile,&count,&TriangleNum);
+ err=ReadShort(tfile,1,&vertexNum);
+ err=ReadShort(tfile,1,&TriangleNum);
// read the model data
- count=(long)vertexNum*sizeof(XYZ);
- err=FSRead(tfile,&count,&vertex);
- count=(long)TriangleNum*sizeof(TexturedTriangle);
- err=FSRead(tfile,&count,&Triangles);
+ err=ReadXYZ(tfile,vertexNum,vertex);
+ err=ReadTexturedTriangle(tfile,TriangleNum,Triangles);
FSClose(tfile);