From d8debd97c369f2279e9025dbb29ff377c21031ff Mon Sep 17 00:00:00 2001 From: ZeqMacaw Date: Sat, 14 Dec 2019 03:01:56 -0500 Subject: [PATCH 1/2] Decompile MDL 54 and 58. --- Crowbar/Core/GameModel/- Base/SourceModel.vb | 4 ++++ .../CompiledFiles/VvdFile/VvdFile04/SourceVvdFile04.vb | 8 +++++++- Crowbar/Core/GameModel/SourceModel49/SourceModel49.vb | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Crowbar/Core/GameModel/- Base/SourceModel.vb b/Crowbar/Core/GameModel/- Base/SourceModel.vb index 29efe09..375be78 100644 --- a/Crowbar/Core/GameModel/- Base/SourceModel.vb +++ b/Crowbar/Core/GameModel/- Base/SourceModel.vb @@ -78,6 +78,10 @@ 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 = 58 Then + model = New SourceModel49(mdlPathFileName, version) Else ' Version not implemented. model = Nothing diff --git a/Crowbar/Core/GameModel/CompiledFiles/VvdFile/VvdFile04/SourceVvdFile04.vb b/Crowbar/Core/GameModel/CompiledFiles/VvdFile/VvdFile04/SourceVvdFile04.vb index 6581ef2..3a3f9a3 100644 --- a/Crowbar/Core/GameModel/CompiledFiles/VvdFile/VvdFile04/SourceVvdFile04.vb +++ b/Crowbar/Core/GameModel/CompiledFiles/VvdFile/VvdFile04/SourceVvdFile04.vb @@ -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 @@ -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 = 58 Then + Me.theInputFileReader.ReadSingle() + Me.theInputFileReader.ReadSingle() + Me.theInputFileReader.ReadSingle() + Me.theInputFileReader.ReadSingle() + End If Me.theVvdFileData.theVertexes.Add(aStudioVertex) Next diff --git a/Crowbar/Core/GameModel/SourceModel49/SourceModel49.vb b/Crowbar/Core/GameModel/SourceModel49/SourceModel49.vb index 92ca162..907ca4a 100644 --- a/Crowbar/Core/GameModel/SourceModel49/SourceModel49.vb +++ b/Crowbar/Core/GameModel/SourceModel49/SourceModel49.vb @@ -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 From 315a037f842f4ab2dce5c6bdce5b880bc276f0c2 Mon Sep 17 00:00:00 2001 From: ZeqMacaw Date: Sun, 15 Dec 2019 02:18:42 -0500 Subject: [PATCH 2/2] Decompile MDL 55, 56, and 59. --- Crowbar/Core/GameModel/- Base/SourceModel.vb | 6 ++++++ .../CompiledFiles/VvdFile/VvdFile04/SourceVvdFile04.vb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Crowbar/Core/GameModel/- Base/SourceModel.vb b/Crowbar/Core/GameModel/- Base/SourceModel.vb index 375be78..d9e4f8b 100644 --- a/Crowbar/Core/GameModel/- Base/SourceModel.vb +++ b/Crowbar/Core/GameModel/- Base/SourceModel.vb @@ -80,8 +80,14 @@ Public MustInherit Class SourceModel 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 diff --git a/Crowbar/Core/GameModel/CompiledFiles/VvdFile/VvdFile04/SourceVvdFile04.vb b/Crowbar/Core/GameModel/CompiledFiles/VvdFile/VvdFile04/SourceVvdFile04.vb index 3a3f9a3..4987081 100644 --- a/Crowbar/Core/GameModel/CompiledFiles/VvdFile/VvdFile04/SourceVvdFile04.vb +++ b/Crowbar/Core/GameModel/CompiledFiles/VvdFile/VvdFile04/SourceVvdFile04.vb @@ -94,7 +94,7 @@ Public Class SourceVvdFile04 aStudioVertex.normalZ = Me.theInputFileReader.ReadSingle() aStudioVertex.texCoordX = Me.theInputFileReader.ReadSingle() aStudioVertex.texCoordY = Me.theInputFileReader.ReadSingle() - If mdlVersion = 54 OrElse mdlVersion = 58 Then + If mdlVersion >= 54 OrElse mdlVersion <= 59 Then Me.theInputFileReader.ReadSingle() Me.theInputFileReader.ReadSingle() Me.theInputFileReader.ReadSingle()