Home My Page Projects Code Snippets Project Openings 3D graphics for Standard ML
Summary Activity SCM

SCM Repository

[sml3d] Diff of /trunk/sml3d/examples/md3-viewer/load-md3.sml
ViewVC logotype

Diff of /trunk/sml3d/examples/md3-viewer/load-md3.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 403, Wed Jan 14 17:18:52 2009 UTC revision 404, Wed Jan 14 19:14:36 2009 UTC
# Line 340  Line 340 
340                }                }
341            end            end
342    
343      fun load inS = let      fun load (path, inS) = let
344            val {name, numFrames, numTags, numSurfaces,            val {name, numFrames, numTags, numSurfaces,
345                    framesOffset, tagsOffset, surfsOffset                    framesOffset, tagsOffset, surfsOffset
346                  } = readHdr inS                  } = readHdr inS
# Line 358  Line 358 
358            val surfs = readN readSurface (inS, numSurfaces)            val surfs = readN readSurface (inS, numSurfaces)
359            in            in
360              MD3.MODEL{              MD3.MODEL{
361                    path = path,
362                    name = name,
363                  tags = tags,                  tags = tags,
364                  surfs = surfs,                  surfs = surfs,
365                  frames = frames                  frames = frames
# Line 366  Line 368 
368    
369      fun loadFile file = let      fun loadFile file = let
370            val inS = BinIO.openIn file            val inS = BinIO.openIn file
371            val model = (load inS) handle ex => (BinIO.closeIn inS; raise ex)            val model = (load (file, inS)) handle ex => (BinIO.closeIn inS; raise ex)
372            in            in
373              BinIO.closeIn inS;              BinIO.closeIn inS;
374              model              model

Legend:
Removed from v.403  
changed lines
  Added in v.404

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0