From 5f31433c27fa49ace7310cd9816ccd2695e0b523 Mon Sep 17 00:00:00 2001 From: FantaX1911 Date: Wed, 22 Feb 2017 12:18:53 +0200 Subject: [PATCH] Initial commit --- .../2.5DHero/Resources/Models/BaseModel.vb | 6 ++++ .../Models/Blocks/DiagonalWallModel.vb | 33 ++++++++++++++++++ .../Models/Blocks/HalfDiagonalWallModel.vb | 33 ++++++++++++++++++ .../maps/TestMaps/EmbeddedTower.dat | Bin 0 -> 10340 bytes .../maps/TestMaps/test4models.dat | Bin 0 -> 10340 bytes 5 files changed, 72 insertions(+) create mode 100644 2.5DHero/2.5DHero/Resources/Models/Blocks/DiagonalWallModel.vb create mode 100644 2.5DHero/2.5DHero/Resources/Models/Blocks/HalfDiagonalWallModel.vb create mode 100644 2.5DHero/2.5DHeroContent/maps/TestMaps/EmbeddedTower.dat create mode 100644 2.5DHero/2.5DHeroContent/maps/TestMaps/test4models.dat diff --git a/2.5DHero/2.5DHero/Resources/Models/BaseModel.vb b/2.5DHero/2.5DHero/Resources/Models/BaseModel.vb index 7b9f16b7e..3207df978 100644 --- a/2.5DHero/2.5DHero/Resources/Models/BaseModel.vb +++ b/2.5DHero/2.5DHero/Resources/Models/BaseModel.vb @@ -98,6 +98,8 @@ Public Shared DoubleFloorModel As DoubleFloorModel = New DoubleFloorModel() Public Shared PyramidModel As PyramidModel = New PyramidModel() Public Shared StairsModel As StairsModel = New StairsModel() + Public Shared DiagonalWallModel As DiagonalWallModel = New DiagonalWallModel() + Public Shared HalfDiagonalWallModel As HalfDiagonalWallModel = New HalfDiagonalWallModel() Public Shared Function getModelbyID(ByVal ID As Integer) As BaseModel Select Case ID @@ -135,6 +137,10 @@ Return PyramidModel Case 16 Return StairsModel + Case 17 + Return DiagonalWallModel + Case 18 + Return HalfDiagonalWallModel Case Else Return BlockModel End Select diff --git a/2.5DHero/2.5DHero/Resources/Models/Blocks/DiagonalWallModel.vb b/2.5DHero/2.5DHero/Resources/Models/Blocks/DiagonalWallModel.vb new file mode 100644 index 000000000..7572c23b1 --- /dev/null +++ b/2.5DHero/2.5DHero/Resources/Models/Blocks/DiagonalWallModel.vb @@ -0,0 +1,33 @@ +Public Class DiagonalWallModel + + Inherits BaseModel + + Public Sub New() + vertexData.Clear() + + 'This wall will start from 1 point and end at the opposite point diagonally + + + vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0.5), New Vector3(0, 0, 1), New Vector2(0.0, 1.0))) 'A + vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, 1), New Vector2(1.0, 0.0))) 'H + vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, -0.5, 0.5), New Vector3(0, 0, 1), New Vector2(0.0, 0.0))) 'C + + vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0.5), New Vector3(0, 0, 1), New Vector2(0.0, 1.0))) 'A + vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, 0.5, -0.5), New Vector3(0, 0, 1), New Vector2(1.0, 1.0))) 'F + vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, 1), New Vector2(1.0, 0.0))) 'H + + 'These will be the same triangles but from the opposite direction, this way it can be rendered from both directions or just from one direction + vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0.5), New Vector3(0, 0, -1), New Vector2(0.0, 1.0))) 'A + vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, -0.5, 0.5), New Vector3(0, 0, -1), New Vector2(0.0, 0.0))) 'C + vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, -1), New Vector2(1.0, 0.0))) 'H + + vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0.5), New Vector3(0, 0, -1), New Vector2(0.0, 1.0))) 'A + vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, -1), New Vector2(1.0, 0.0))) 'H + vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, 0.5, -0.5), New Vector3(0, 0, -1), New Vector2(1.0, 1.0))) 'F + + Me.ID = 17 + + Setup() + End Sub + +End Class \ No newline at end of file diff --git a/2.5DHero/2.5DHero/Resources/Models/Blocks/HalfDiagonalWallModel.vb b/2.5DHero/2.5DHero/Resources/Models/Blocks/HalfDiagonalWallModel.vb new file mode 100644 index 000000000..bb6bdef77 --- /dev/null +++ b/2.5DHero/2.5DHero/Resources/Models/Blocks/HalfDiagonalWallModel.vb @@ -0,0 +1,33 @@ +Public Class HalfDiagonalWallModel + + Inherits BaseModel + + Public Sub New() + vertexData.Clear() + + 'This wall will start from 1 point and end at the opposite middle point diagonally + + + vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0), New Vector3(0, 0, 1), New Vector2(0.0, 1.0))) 'AB + vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, 1), New Vector2(1.0, 0.0))) 'H + vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, -0.5, 0), New Vector3(0, 0, 1), New Vector2(0.0, 0.0))) 'CD + + vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0), New Vector3(0, 0, 1), New Vector2(0.0, 1.0))) 'AB + vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, 0.5, -0.5), New Vector3(0, 0, 1), New Vector2(1.0, 1.0))) 'F + vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, 1), New Vector2(1.0, 0.0))) 'H + + 'These will be the same triangles but from the opposite direction, this way it can be rendered from both directions or just from one direction + vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0), New Vector3(0, 0, -1), New Vector2(0.0, 1.0))) 'AB + vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, -0.5, 0), New Vector3(0, 0, -1), New Vector2(0.0, 0.0))) 'CD + vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, -1), New Vector2(1.0, 0.0))) 'H + + vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0), New Vector3(0, 0, -1), New Vector2(0.0, 1.0))) 'AB + vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, -1), New Vector2(1.0, 0.0))) 'H + vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, 0.5, -0.5), New Vector3(0, 0, -1), New Vector2(1.0, 1.0))) 'F + + Me.ID = 18 + + Setup() + End Sub + +End Class \ No newline at end of file diff --git a/2.5DHero/2.5DHeroContent/maps/TestMaps/EmbeddedTower.dat b/2.5DHero/2.5DHeroContent/maps/TestMaps/EmbeddedTower.dat new file mode 100644 index 0000000000000000000000000000000000000000..5876981b4f09130a462f73e73ac6f6ae075e168b GIT binary patch literal 10340 zcmeHNZBH6O5T4IX`X3CROH;(Yq~B1nG110Us%=R>P#{Q3Il_xtjeouE^X%Ss=a4%g zQtaX8a>w4@%63Xv=IS?v{ae|a^K9k`+j5 zDfDyfPYePkXn|Y~7gksM%pcll@kP+4J!ldov*vg}TLJUhuYivoZJP_CZBxzKfVSY< zwD-AtB`q(AHXXkOv^_l9^0%70NJjgu5WC$sc6*~%fv}qToq~(q=0%(Kp25GR`L}>J zx64ZIOI_?XFWNL+KwChY_CE8+ZW={dD`|+`ZvJL&)3YF}^KH{PxSGj?ZeTCWjB67a z%O0{RL)kzsXM#Fr^s%2S~{c|wku=%fDn}?vs3$FYy_UK6xw4bDThJ;pVAk@@*Yg>EI1lb*AewHOs)|^l4r2ln=kR u&Y!2`{>1%rL$A9bBD`<5I{echJAcT%h+lcK@TPYv`Sfx=9$ANfw)_DH7*<07 literal 0 HcmV?d00001 diff --git a/2.5DHero/2.5DHeroContent/maps/TestMaps/test4models.dat b/2.5DHero/2.5DHeroContent/maps/TestMaps/test4models.dat new file mode 100644 index 0000000000000000000000000000000000000000..5876981b4f09130a462f73e73ac6f6ae075e168b GIT binary patch literal 10340 zcmeHNZBH6O5T4IX`X3CROH;(Yq~B1nG110Us%=R>P#{Q3Il_xtjeouE^X%Ss=a4%g zQtaX8a>w4@%63Xv=IS?v{ae|a^K9k`+j5 zDfDyfPYePkXn|Y~7gksM%pcll@kP+4J!ldov*vg}TLJUhuYivoZJP_CZBxzKfVSY< zwD-AtB`q(AHXXkOv^_l9^0%70NJjgu5WC$sc6*~%fv}qToq~(q=0%(Kp25GR`L}>J zx64ZIOI_?XFWNL+KwChY_CE8+ZW={dD`|+`ZvJL&)3YF}^KH{PxSGj?ZeTCWjB67a z%O0{RL)kzsXM#Fr^s%2S~{c|wku=%fDn}?vs3$FYy_UK6xw4bDThJ;pVAk@@*Yg>EI1lb*AewHOs)|^l4r2ln=kR u&Y!2`{>1%rL$A9bBD`<5I{echJAcT%h+lcK@TPYv`Sfx=9$ANfw)_DH7*<07 literal 0 HcmV?d00001