Skip to content

Commit

Permalink
rui start
Browse files Browse the repository at this point in the history
  • Loading branch information
IJARika committed Sep 8, 2022
1 parent 49845c0 commit b6b0c2e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
15 changes: 15 additions & 0 deletions Crowbar/Core/GameModel/SourceModel53/SourceMdlFile53.vb
Original file line number Diff line number Diff line change
Expand Up @@ -3044,6 +3044,21 @@ Public Class SourceMdlFile53
Me.theMdlFileData.theFileSeekLog.Add(fileOffsetStart, fileOffsetEnd, "aFlexRule.theFlexOps " + aFlexRule.theFlexOps.Count.ToString())
End Sub

Public Sub ReadRui()
If Me.theMdlFileData.ruiCount > 0 Then
Dim fileOffsetStart As Long
Dim fileOffsetEnd As Long

Me.theInputFileReader.BaseStream.Seek(Me.theMdlFileData.ruiOffset, SeekOrigin.Begin)
fileOffsetStart = Me.theInputFileReader.BaseStream.Position

'Me.theInputFileReader.ReadBytes(Me.theMdlFileData.ikChainOffset - Me.theMdlFileData.ruiOffset)

fileOffsetEnd = Me.theInputFileReader.BaseStream.Position - 1
Me.theMdlFileData.theFileSeekLog.Add(fileOffsetStart, fileOffsetEnd, "theMdlFileData.theRuiMeshes")
End If
End Sub

Public Sub ReadIkChains()
If Me.theMdlFileData.ikChainCount > 0 Then
Dim ikChainInputFileStreamPosition As Long
Expand Down
7 changes: 3 additions & 4 deletions Crowbar/Core/GameModel/SourceModel53/SourceModel53.vb
Original file line number Diff line number Diff line change
Expand Up @@ -376,18 +376,17 @@ Public Class SourceModel53
mdlFile.ReadLocalNodes()

'NOTE: Read flex descs before body parts so that flexes (within body parts) can add info to flex descs.
mdlFile.ReadFlexDescs()
'mdlFile.ReadFlexDescs()
mdlFile.ReadBodyParts()
'mdlFile.ReadFlexControllers()
'NOTE: This must be after flex descs are read so that flex desc usage can be saved in flex desc.
'mdlFile.ReadFlexRules()
mdlFile.ReadIkChains()
'mdlFile.ReadIkLocks()
'mdlFile.ReadMouths()
mdlFile.ReadPoseParamDescs()
mdlFile.ReadModelGroups()
''TODO: Me.ReadAnimBlocks()
''TODO: Me.ReadAnimBlockName()

mdlFile.ReadRui()

'NOTE: V53 MDLs normally don't have more than one texture path due to how RPak materials work.
mdlFile.ReadTexturePaths()
Expand Down

0 comments on commit b6b0c2e

Please sign in to comment.