Skip to content

Commit

Permalink
Merge branch 'fairy_tale_busters' into Version0.66
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeqMacaw committed Jan 22, 2020
2 parents 8c5c0f3 + 315a037 commit 5e4ee55
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
10 changes: 10 additions & 0 deletions Crowbar/Core/GameModel/- Base/SourceModel.vb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ Public MustInherit Class SourceModel
ElseIf version = 53 Then
'TODO: Finish.
model = New SourceModel53(mdlPathFileName, version)
ElseIf version = 54 Then
model = New SourceModel49(mdlPathFileName, version)
ElseIf version = 55 Then
model = New SourceModel49(mdlPathFileName, version)
ElseIf version = 56 Then
model = New SourceModel49(mdlPathFileName, version)
ElseIf version = 58 Then
model = New SourceModel49(mdlPathFileName, version)
ElseIf version = 59 Then
model = New SourceModel49(mdlPathFileName, version)
Else
' Version not implemented.
model = Nothing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Public Class SourceVvdFile04
Me.theVvdFileData.theFileSeekLog.Add(fileOffsetStart, fileOffsetEnd, "VVD File Header")
End Sub

Public Sub ReadVertexes()
Public Sub ReadVertexes(Optional ByVal mdlVersion As Integer = 0)
If Me.theVvdFileData.lodCount <= 0 Then
Exit Sub
End If
Expand Down Expand Up @@ -94,6 +94,12 @@ Public Class SourceVvdFile04
aStudioVertex.normalZ = Me.theInputFileReader.ReadSingle()
aStudioVertex.texCoordX = Me.theInputFileReader.ReadSingle()
aStudioVertex.texCoordY = Me.theInputFileReader.ReadSingle()
If mdlVersion >= 54 OrElse mdlVersion <= 59 Then
Me.theInputFileReader.ReadSingle()
Me.theInputFileReader.ReadSingle()
Me.theInputFileReader.ReadSingle()
Me.theInputFileReader.ReadSingle()
End If
Me.theVvdFileData.theVertexes.Add(aStudioVertex)
Next

Expand Down
2 changes: 1 addition & 1 deletion Crowbar/Core/GameModel/SourceModel49/SourceModel49.vb
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ Public Class SourceModel49
Dim vvdFile As New SourceVvdFile04(Me.theInputFileReader, Me.theVvdFileData49)

vvdFile.ReadSourceVvdHeader()
vvdFile.ReadVertexes()
vvdFile.ReadVertexes(Me.theMdlFileData.version)
vvdFile.ReadFixups()
vvdFile.ReadUnreadBytes()
End Sub
Expand Down

0 comments on commit 5e4ee55

Please sign in to comment.