Moved over from Win32 resources to purely nfpack; Included primitives and default shader in base.nfpack; Camera fixes

This commit is contained in:
Grayson Riffe (Laptop) 2021-09-01 13:08:21 -05:00
parent 48821afd76
commit c0f7634b5f
32 changed files with 5062 additions and 224 deletions

View File

@ -105,8 +105,6 @@
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalLibraryDirectories>$(ProjectDir)dep\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>nf.res;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd "$(SolutionDir)NFPackCreator\AssetBuild" &amp;&amp; "$(SolutionDir)NFPackCreator\bin\Win32$(Configuration)\NFPackCreator.exe" &amp;&amp; del "$(OutDir)assets\" /Q /S &amp;&amp; move "$(SolutionDir)NFPackCreator\AssetBuild\*.nfpack" "$(OutDir)assets\"</Command>
@ -131,8 +129,6 @@
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalLibraryDirectories>$(ProjectDir)dep\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>nf.res;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd "$(SolutionDir)NFPackCreator\AssetBuild" &amp;&amp; "$(SolutionDir)NFPackCreator\bin\Win32$(Configuration)\NFPackCreator.exe" &amp;&amp; del "$(OutDir)assets\" /Q /S &amp;&amp; move "$(SolutionDir)NFPackCreator\AssetBuild\*.nfpack" "$(OutDir)assets\"</Command>
@ -153,8 +149,6 @@
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalLibraryDirectories>$(ProjectDir)dep\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>nf.res;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd "$(SolutionDir)NFPackCreator\AssetBuild" &amp;&amp; "$(SolutionDir)NFPackCreator\bin\Win32$(Configuration)\NFPackCreator.exe" &amp;&amp; del "$(OutDir)assets\" /Q /S &amp;&amp; move "$(SolutionDir)NFPackCreator\AssetBuild\*.nfpack" "$(OutDir)assets\"</Command>
@ -179,8 +173,6 @@
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalLibraryDirectories>$(ProjectDir)dep\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>nf.res;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd "$(SolutionDir)NFPackCreator\AssetBuild" &amp;&amp; "$(SolutionDir)NFPackCreator\bin\Win32$(Configuration)\NFPackCreator.exe" &amp;&amp; del "$(OutDir)assets\" /Q /S &amp;&amp; move "$(SolutionDir)NFPackCreator\AssetBuild\*.nfpack" "$(OutDir)assets\"</Command>

View File

@ -0,0 +1,40 @@
# Blender v2.93.3 OBJ File: ''
# www.blender.org
o Cube_Cube.001
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 -1.000000
v 1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 1.000000 1.000000
v 1.000000 -1.000000 1.000000
v 1.000000 1.000000 1.000000
vt 0.375961 -0.006421
vt 0.625961 0.243579
vt 0.375961 0.243579
vt 0.880422 0.750500
vt 0.630422 0.500500
vt 0.880422 0.500500
vt 0.630422 0.750500
vt 0.380422 0.500500
vt 0.380422 0.750500
vt 0.130422 0.500500
vt 0.380422 0.250500
vt 0.630422 0.250500
vt 0.630422 1.000500
vt 0.625961 -0.006421
vt 0.130422 0.750500
vt 0.380422 1.000500
s off
f 2/1 3/2 1/3
f 4/4 7/5 3/6
f 8/7 5/8 7/5
f 6/9 1/10 5/8
f 7/5 1/11 3/12
f 4/13 6/9 8/7
f 2/1 4/14 3/2
f 4/4 8/7 7/5
f 8/7 6/9 5/8
f 6/9 2/15 1/10
f 7/5 5/8 1/11
f 4/13 2/16 6/9

View File

@ -0,0 +1,164 @@
# Blender v2.93.3 OBJ File: ''
# www.blender.org
o Cone
v 0.000000 -1.000000 -1.000000
v 0.195090 -1.000000 -0.980785
v 0.382683 -1.000000 -0.923880
v 0.555570 -1.000000 -0.831470
v 0.707107 -1.000000 -0.707107
v 0.831470 -1.000000 -0.555570
v 0.923880 -1.000000 -0.382683
v 0.980785 -1.000000 -0.195090
v 1.000000 -1.000000 0.000000
v 0.980785 -1.000000 0.195090
v 0.923880 -1.000000 0.382683
v 0.831470 -1.000000 0.555570
v 0.707107 -1.000000 0.707107
v 0.555570 -1.000000 0.831470
v 0.382683 -1.000000 0.923880
v 0.195090 -1.000000 0.980785
v -0.000000 -1.000000 1.000000
v -0.195090 -1.000000 0.980785
v -0.382683 -1.000000 0.923880
v -0.555570 -1.000000 0.831470
v -0.707107 -1.000000 0.707107
v -0.831469 -1.000000 0.555570
v -0.923880 -1.000000 0.382684
v -0.980785 -1.000000 0.195090
v -1.000000 -1.000000 -0.000000
v -0.980785 -1.000000 -0.195090
v -0.923879 -1.000000 -0.382684
v -0.831470 -1.000000 -0.555570
v -0.707107 -1.000000 -0.707107
v -0.555570 -1.000000 -0.831470
v -0.382683 -1.000000 -0.923880
v -0.195090 -1.000000 -0.980785
v 0.000000 1.000000 0.000000
vt 0.250000 0.490000
vt 0.250000 0.250000
vt 0.296822 0.485388
vt 0.341844 0.471731
vt 0.383337 0.449553
vt 0.419706 0.419706
vt 0.449553 0.383337
vt 0.471731 0.341844
vt 0.485388 0.296822
vt 0.490000 0.250000
vt 0.485388 0.203178
vt 0.471731 0.158156
vt 0.449553 0.116663
vt 0.419706 0.080294
vt 0.383337 0.050447
vt 0.341844 0.028269
vt 0.296822 0.014612
vt 0.250000 0.010000
vt 0.203178 0.014612
vt 0.158156 0.028269
vt 0.116663 0.050447
vt 0.080294 0.080294
vt 0.050447 0.116663
vt 0.028269 0.158156
vt 0.014612 0.203178
vt 0.010000 0.250000
vt 0.014612 0.296822
vt 0.028269 0.341844
vt 0.050447 0.383337
vt 0.080294 0.419706
vt 0.116663 0.449553
vt 0.158156 0.471731
vt 0.985388 0.296822
vt 0.796822 0.014612
vt 0.514612 0.203178
vt 0.203178 0.485388
vt 0.703178 0.485388
vt 0.750000 0.490000
vt 0.796822 0.485388
vt 0.841844 0.471731
vt 0.883337 0.449553
vt 0.919706 0.419706
vt 0.949553 0.383337
vt 0.971731 0.341844
vt 0.990000 0.250000
vt 0.985388 0.203178
vt 0.971731 0.158156
vt 0.949553 0.116663
vt 0.919706 0.080294
vt 0.883337 0.050447
vt 0.841844 0.028269
vt 0.750000 0.010000
vt 0.703178 0.014612
vt 0.658156 0.028269
vt 0.616663 0.050447
vt 0.580294 0.080294
vt 0.550447 0.116663
vt 0.528269 0.158156
vt 0.510000 0.250000
vt 0.514612 0.296822
vt 0.528269 0.341844
vt 0.550447 0.383337
vt 0.580294 0.419706
vt 0.616663 0.449553
vt 0.658156 0.471731
s off
f 1/1 33/2 2/3
f 2/3 33/2 3/4
f 3/4 33/2 4/5
f 4/5 33/2 5/6
f 5/6 33/2 6/7
f 6/7 33/2 7/8
f 7/8 33/2 8/9
f 8/9 33/2 9/10
f 9/10 33/2 10/11
f 10/11 33/2 11/12
f 11/12 33/2 12/13
f 12/13 33/2 13/14
f 13/14 33/2 14/15
f 14/15 33/2 15/16
f 15/16 33/2 16/17
f 16/17 33/2 17/18
f 17/18 33/2 18/19
f 18/19 33/2 19/20
f 19/20 33/2 20/21
f 20/21 33/2 21/22
f 21/22 33/2 22/23
f 22/23 33/2 23/24
f 23/24 33/2 24/25
f 24/25 33/2 25/26
f 25/26 33/2 26/27
f 26/27 33/2 27/28
f 27/28 33/2 28/29
f 28/29 33/2 29/30
f 29/30 33/2 30/31
f 30/31 33/2 31/32
f 8/33 16/34 24/35
f 31/32 33/2 32/36
f 32/36 33/2 1/1
f 32/37 1/38 2/39
f 2/39 3/40 4/41
f 4/41 5/42 6/43
f 6/43 7/44 8/33
f 8/33 9/45 10/46
f 10/46 11/47 12/48
f 12/48 13/49 14/50
f 14/50 15/51 16/34
f 16/34 17/52 18/53
f 18/53 19/54 20/55
f 20/55 21/56 22/57
f 22/57 23/58 24/35
f 24/35 25/59 26/60
f 26/60 27/61 24/35
f 27/61 28/62 24/35
f 28/62 29/63 30/64
f 30/64 31/65 28/62
f 31/65 32/37 28/62
f 32/37 2/39 8/33
f 2/39 4/41 8/33
f 4/41 6/43 8/33
f 8/33 10/46 12/48
f 12/48 14/50 8/33
f 14/50 16/34 8/33
f 16/34 18/53 24/35
f 18/53 20/55 24/35
f 20/55 22/57 24/35
f 24/35 28/62 32/37
f 32/37 8/33 24/35

View File

@ -1,40 +1,38 @@
# Blender v2.93.3 OBJ File: ''
# www.blender.org
o Cube_Cube.001
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 -1.000000
v 1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v 1.000000 1.000000 1.000000
vt 0.375000 0.003906
vt 0.625000 0.253906
vt 0.375000 0.253906
vt 0.875000 0.750000
vt 0.625000 0.500000
vt 0.875000 0.500000
vt 0.625000 0.750000
vt 0.375000 0.500000
vt 0.375000 0.750000
vt 0.125000 0.500000
v 1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -1.000000
vt 0.625000 0.000000
vt 0.375000 0.250000
vt 0.375000 0.000000
vt 0.625000 0.250000
vt 0.625000 1.000000
vt 0.625000 0.003906
vt 0.125000 0.750000
vt 0.375000 0.500000
vt 0.625000 0.500000
vt 0.375000 0.750000
vt 0.625000 0.750000
vt 0.375000 1.000000
vt 0.125000 0.750000
vt 0.125000 0.500000
vt 0.875000 0.500000
vt 0.625000 1.000000
vt 0.875000 0.750000
s off
f 2/1 3/2 1/3
f 4/4 7/5 3/6
f 8/7 5/8 7/5
f 6/9 1/10 5/8
f 7/5 1/11 3/12
f 4/13 6/9 8/7
f 2/1 4/14 3/2
f 4/4 8/7 7/5
f 8/7 6/9 5/8
f 6/9 2/15 1/10
f 7/5 5/8 1/11
f 4/13 2/16 6/9
f 4/4 7/5 3/2
f 8/6 5/7 7/5
f 6/8 1/9 5/7
f 7/5 1/10 3/11
f 4/12 6/8 8/6
f 2/1 4/4 3/2
f 4/4 8/6 7/5
f 8/6 6/8 5/7
f 6/8 2/13 1/9
f 7/5 5/7 1/10
f 4/12 2/14 6/8

View File

@ -0,0 +1,322 @@
# Blender v2.93.3 OBJ File: ''
# www.blender.org
o Cylinder
v 0.000000 -1.000000 -1.000000
v 0.000000 1.000000 -1.000000
v 0.195090 -1.000000 -0.980785
v 0.195090 1.000000 -0.980785
v 0.382683 -1.000000 -0.923880
v 0.382683 1.000000 -0.923880
v 0.555570 -1.000000 -0.831470
v 0.555570 1.000000 -0.831470
v 0.707107 -1.000000 -0.707107
v 0.707107 1.000000 -0.707107
v 0.831470 -1.000000 -0.555570
v 0.831470 1.000000 -0.555570
v 0.923880 -1.000000 -0.382683
v 0.923880 1.000000 -0.382683
v 0.980785 -1.000000 -0.195090
v 0.980785 1.000000 -0.195090
v 1.000000 -1.000000 0.000000
v 1.000000 1.000000 0.000000
v 0.980785 -1.000000 0.195090
v 0.980785 1.000000 0.195090
v 0.923880 -1.000000 0.382683
v 0.923880 1.000000 0.382683
v 0.831470 -1.000000 0.555570
v 0.831470 1.000000 0.555570
v 0.707107 -1.000000 0.707107
v 0.707107 1.000000 0.707107
v 0.555570 -1.000000 0.831470
v 0.555570 1.000000 0.831470
v 0.382683 -1.000000 0.923880
v 0.382683 1.000000 0.923880
v 0.195090 -1.000000 0.980785
v 0.195090 1.000000 0.980785
v -0.000000 -1.000000 1.000000
v -0.000000 1.000000 1.000000
v -0.195090 -1.000000 0.980785
v -0.195090 1.000000 0.980785
v -0.382683 -1.000000 0.923880
v -0.382683 1.000000 0.923880
v -0.555570 -1.000000 0.831470
v -0.555570 1.000000 0.831470
v -0.707107 -1.000000 0.707107
v -0.707107 1.000000 0.707107
v -0.831469 -1.000000 0.555570
v -0.831469 1.000000 0.555570
v -0.923880 -1.000000 0.382684
v -0.923880 1.000000 0.382684
v -0.980785 -1.000000 0.195090
v -0.980785 1.000000 0.195090
v -1.000000 -1.000000 -0.000000
v -1.000000 1.000000 -0.000000
v -0.980785 -1.000000 -0.195090
v -0.980785 1.000000 -0.195090
v -0.923879 -1.000000 -0.382684
v -0.923879 1.000000 -0.382684
v -0.831470 -1.000000 -0.555570
v -0.831470 1.000000 -0.555570
v -0.707107 -1.000000 -0.707107
v -0.707107 1.000000 -0.707107
v -0.555570 -1.000000 -0.831470
v -0.555570 1.000000 -0.831470
v -0.382683 -1.000000 -0.923880
v -0.382683 1.000000 -0.923880
v -0.195090 -1.000000 -0.980785
v -0.195090 1.000000 -0.980785
vt 1.000000 1.000000
vt 0.968750 0.500000
vt 1.000000 0.500000
vt 0.968750 1.000000
vt 0.937500 0.500000
vt 0.937500 1.000000
vt 0.906250 0.500000
vt 0.906250 1.000000
vt 0.875000 0.500000
vt 0.875000 1.000000
vt 0.843750 0.500000
vt 0.843750 1.000000
vt 0.812500 0.500000
vt 0.812500 1.000000
vt 0.781250 0.500000
vt 0.781250 1.000000
vt 0.750000 0.500000
vt 0.750000 1.000000
vt 0.718750 0.500000
vt 0.718750 1.000000
vt 0.687500 0.500000
vt 0.687500 1.000000
vt 0.656250 0.500000
vt 0.656250 1.000000
vt 0.625000 0.500000
vt 0.625000 1.000000
vt 0.593750 0.500000
vt 0.593750 1.000000
vt 0.562500 0.500000
vt 0.562500 1.000000
vt 0.531250 0.500000
vt 0.531250 1.000000
vt 0.500000 0.500000
vt 0.500000 1.000000
vt 0.468750 0.500000
vt 0.468750 1.000000
vt 0.437500 0.500000
vt 0.437500 1.000000
vt 0.406250 0.500000
vt 0.406250 1.000000
vt 0.375000 0.500000
vt 0.375000 1.000000
vt 0.343750 0.500000
vt 0.343750 1.000000
vt 0.312500 0.500000
vt 0.312500 1.000000
vt 0.281250 0.500000
vt 0.281250 1.000000
vt 0.250000 0.500000
vt 0.250000 1.000000
vt 0.218750 0.500000
vt 0.218750 1.000000
vt 0.187500 0.500000
vt 0.187500 1.000000
vt 0.156250 0.500000
vt 0.156250 1.000000
vt 0.125000 0.500000
vt 0.125000 1.000000
vt 0.093750 0.500000
vt 0.093750 1.000000
vt 0.062500 0.500000
vt 0.028269 0.341844
vt 0.158156 0.028269
vt 0.471731 0.158156
vt 0.062500 1.000000
vt 0.031250 0.500000
vt 0.031250 1.000000
vt 0.000000 0.500000
vt 0.985388 0.296822
vt 0.796822 0.014612
vt 0.514612 0.203178
vt 0.341844 0.471731
vt 0.296822 0.485388
vt 0.158156 0.471731
vt 0.250000 0.490000
vt 0.203178 0.485388
vt 0.116663 0.449553
vt 0.080294 0.419706
vt 0.050447 0.383337
vt 0.014612 0.296822
vt 0.010000 0.250000
vt 0.014612 0.203178
vt 0.028269 0.158156
vt 0.050447 0.116663
vt 0.080294 0.080294
vt 0.116663 0.050447
vt 0.203178 0.014612
vt 0.250000 0.010000
vt 0.296822 0.014612
vt 0.341844 0.028269
vt 0.383337 0.050447
vt 0.419706 0.080294
vt 0.449553 0.116663
vt 0.485388 0.203178
vt 0.490000 0.250000
vt 0.485388 0.296822
vt 0.471731 0.341844
vt 0.449553 0.383337
vt 0.419706 0.419706
vt 0.383337 0.449553
vt 0.000000 1.000000
vt 0.703178 0.485388
vt 0.750000 0.490000
vt 0.796822 0.485388
vt 0.841844 0.471731
vt 0.883337 0.449553
vt 0.919706 0.419706
vt 0.949553 0.383337
vt 0.971731 0.341844
vt 0.990000 0.250000
vt 0.985388 0.203178
vt 0.971731 0.158156
vt 0.949553 0.116663
vt 0.919706 0.080294
vt 0.883337 0.050447
vt 0.841844 0.028269
vt 0.750000 0.010000
vt 0.703178 0.014612
vt 0.658156 0.028269
vt 0.616663 0.050447
vt 0.580294 0.080294
vt 0.550447 0.116663
vt 0.528269 0.158156
vt 0.510000 0.250000
vt 0.514612 0.296822
vt 0.528269 0.341844
vt 0.550447 0.383337
vt 0.580294 0.419706
vt 0.616663 0.449553
vt 0.658156 0.471731
s off
f 2/1 3/2 1/3
f 4/4 5/5 3/2
f 6/6 7/7 5/5
f 8/8 9/9 7/7
f 10/10 11/11 9/9
f 12/12 13/13 11/11
f 14/14 15/15 13/13
f 16/16 17/17 15/15
f 18/18 19/19 17/17
f 20/20 21/21 19/19
f 22/22 23/23 21/21
f 24/24 25/25 23/23
f 26/26 27/27 25/25
f 28/28 29/29 27/27
f 30/30 31/31 29/29
f 32/32 33/33 31/31
f 34/34 35/35 33/33
f 36/36 37/37 35/35
f 38/38 39/39 37/37
f 40/40 41/41 39/39
f 42/42 43/43 41/41
f 44/44 45/45 43/43
f 46/46 47/47 45/45
f 48/48 49/49 47/47
f 50/50 51/51 49/49
f 52/52 53/53 51/51
f 54/54 55/55 53/53
f 56/56 57/57 55/55
f 58/58 59/59 57/57
f 60/60 61/61 59/59
f 54/62 38/63 22/64
f 62/65 63/66 61/61
f 64/67 1/68 63/66
f 15/69 31/70 47/71
f 2/1 4/4 3/2
f 4/4 6/6 5/5
f 6/6 8/8 7/7
f 8/8 10/10 9/9
f 10/10 12/12 11/11
f 12/12 14/14 13/13
f 14/14 16/16 15/15
f 16/16 18/18 17/17
f 18/18 20/20 19/19
f 20/20 22/22 21/21
f 22/22 24/24 23/23
f 24/24 26/26 25/25
f 26/26 28/28 27/27
f 28/28 30/30 29/29
f 30/30 32/32 31/31
f 32/32 34/34 33/33
f 34/34 36/36 35/35
f 36/36 38/38 37/37
f 38/38 40/40 39/39
f 40/40 42/42 41/41
f 42/42 44/44 43/43
f 44/44 46/46 45/45
f 46/46 48/48 47/47
f 48/48 50/50 49/49
f 50/50 52/52 51/51
f 52/52 54/54 53/53
f 54/54 56/56 55/55
f 56/56 58/58 57/57
f 58/58 60/60 59/59
f 60/60 62/65 61/61
f 6/72 4/73 62/74
f 4/73 2/75 62/74
f 2/75 64/76 62/74
f 62/74 60/77 58/78
f 58/78 56/79 62/74
f 56/79 54/62 62/74
f 54/62 52/80 50/81
f 50/81 48/82 46/83
f 46/83 44/84 42/85
f 42/85 40/86 38/63
f 38/63 36/87 34/88
f 34/88 32/89 30/90
f 30/90 28/91 26/92
f 26/92 24/93 22/64
f 22/64 20/94 18/95
f 18/95 16/96 14/97
f 14/97 12/98 10/99
f 10/99 8/100 6/72
f 54/62 50/81 38/63
f 50/81 46/83 38/63
f 46/83 42/85 38/63
f 38/63 34/88 30/90
f 30/90 26/92 38/63
f 26/92 22/64 38/63
f 22/64 18/95 6/72
f 18/95 14/97 6/72
f 14/97 10/99 6/72
f 6/72 62/74 54/62
f 6/72 54/62 22/64
f 62/65 64/67 63/66
f 64/67 2/101 1/68
f 63/102 1/103 3/104
f 3/104 5/105 7/106
f 7/106 9/107 11/108
f 11/108 13/109 15/69
f 15/69 17/110 19/111
f 19/111 21/112 23/113
f 23/113 25/114 27/115
f 27/115 29/116 31/70
f 31/70 33/117 35/118
f 35/118 37/119 39/120
f 39/120 41/121 43/122
f 43/122 45/123 47/71
f 47/71 49/124 51/125
f 51/125 53/126 47/71
f 53/126 55/127 47/71
f 55/127 57/128 59/129
f 59/129 61/130 55/127
f 61/130 63/102 55/127
f 63/102 3/104 15/69
f 3/104 7/106 15/69
f 7/106 11/108 15/69
f 15/69 19/111 23/113
f 23/113 27/115 15/69
f 27/115 31/70 15/69
f 31/70 35/118 47/71
f 35/118 39/120 47/71
f 39/120 43/122 47/71
f 47/71 55/127 63/102
f 63/102 15/69 47/71

View File

@ -0,0 +1,14 @@
# Blender v2.93.3 OBJ File: ''
# www.blender.org
o Plane
v -1.000000 0.000000 1.000000
v 1.000000 0.000000 1.000000
v -1.000000 0.000000 -1.000000
v 1.000000 0.000000 -1.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
s off
f 2/1 3/2 1/3
f 2/1 4/4 3/2

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -75,7 +75,7 @@ int main(int argc, char* argv[]) {
}
std::set<std::string> extensions;
extensions.insert({ "obj", "png" });
extensions.insert({ "obj", "png", "shader" });
unsigned int dirCount = 0;
const std::filesystem::path workingDir = std::filesystem::current_path();

View File

@ -1,71 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "src/include/resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"src/include/resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// SHADER
//
IDR_DEFAULTVERTEX RCDATA "res\\defaultShader\\vertex.shader"
IDR_DEFAULTFRAGMENT RCDATA "res\\defaultShader\\fragment.shader"
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -112,10 +112,7 @@
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
<PostBuildEvent>
<Command>copy "$(IntDir)$(ProjectName).res" "$(SolutionDir)Game\dep\nf.res"</Command>
<Message>Copying default NF resources</Message>
</PostBuildEvent>
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@ -143,10 +140,7 @@
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
<PostBuildEvent>
<Command>copy "$(IntDir)$(ProjectName).res" "$(SolutionDir)Game\dep\nf.res"</Command>
<Message>Copying default NF resources</Message>
</PostBuildEvent>
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
@ -170,10 +164,7 @@
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
<PostBuildEvent>
<Command>copy "$(IntDir)$(ProjectName).res" "$(SolutionDir)Game\dep\nf.res"</Command>
<Message>Copying default NF resources</Message>
</PostBuildEvent>
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
@ -201,10 +192,7 @@
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
<PostBuildEvent>
<Command>copy "$(IntDir)$(ProjectName).res" "$(SolutionDir)Game\dep\nf.res"</Command>
<Message>Copying default NF resources</Message>
</PostBuildEvent>
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src\Application.cpp" />
@ -227,7 +215,6 @@
<ClInclude Include="src\include\Assets.h" />
<ClInclude Include="src\include\Camera.h" />
<ClInclude Include="src\include\Entity.h" />
<ClInclude Include="src\include\resource.h" />
<ClInclude Include="src\include\Application.h" />
<ClInclude Include="src\include\Config.h" />
<ClInclude Include="src\include\Drawable.h" />
@ -251,9 +238,6 @@
<None Include="res\defaultShader\fragment.shader" />
<None Include="res\defaultShader\vertex.shader" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="NothinFancy.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -104,9 +104,6 @@
<ClInclude Include="src\include\Model.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\include\resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\include\Entity.h">
<Filter>Header Files</Filter>
</ClInclude>
@ -127,9 +124,4 @@
<None Include="res\defaultShader\vertex.shader" />
<None Include="res\defaultShader\fragment.shader" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="NothinFancy.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

View File

@ -137,6 +137,8 @@ namespace nf {
void Application::trackMouse(bool track) {
m_trackingMouse = track;
if (m_trackingMouse == true)
m_mouseTrackFirst = true;
}
void Application::getMouseDiff(int& x, int& y) {
@ -183,7 +185,7 @@ namespace nf {
x = monX - (m_currentConfig.width / 2);
y = monY - (m_currentConfig.height / 2);
}
//TODO: Test fullscreen graphics
void Application::toggleFullscreen() {
DWORD wndStyle = GetWindowLong(m_window, GWL_STYLE);
if (wndStyle & WS_OVERLAPPEDWINDOW) {
@ -223,15 +225,14 @@ namespace nf {
m_mouseY = 0;
if (m_trackingMouse) {
static bool first = true;
int middleX = m_currentConfig.width / 2;
int middleY = m_currentConfig.height / 2;
m_mouseDiffX += m_mouseX - middleX;
m_mouseDiffY += middleY - m_mouseY;
if (first) {
if (m_mouseTrackFirst) {
m_mouseDiffX = 0;
m_mouseDiffY = 0;
first = false;
m_mouseTrackFirst = false;
}
POINT middle = { middleX, middleY };
ClientToScreen(m_window, &middle);
@ -286,7 +287,7 @@ namespace nf {
m_currentState = m_states[m_nextState];
m_currentState->onEnter();
}
//TODO: mouse position input
LRESULT CALLBACK Application::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
Application* app = (Application*)GetProp(hWnd, L"App");
switch (uMsg) {

View File

@ -16,6 +16,10 @@ namespace nf {
delete[] data;
}
AShader::~AShader() {
}
AssetPack::AssetPack() {
}
@ -55,12 +59,20 @@ namespace nf {
}
if (extension == "png") {
ATexture* texture = new ATexture;
texture->data = new unsigned char[assetSize];
texture->data = new char[assetSize];
std::memcpy(texture->data, &assetContents[0], assetSize);
texture->size = assetSize;
m_assets[assetName] = texture;
continue;
}
if (extension == "shader") {
AShader* shader = new AShader;
shader->data = new char[assetSize + 1];
std::memcpy(shader->data, &assetContents[0], assetSize);
shader->data[assetSize] = '\0';
m_assets[assetName] = shader;
continue;
}
Error("Invalid asset extention in pack \"" + (std::string)packName + (std::string)"\"!");
}
}
@ -81,4 +93,11 @@ namespace nf {
delete curr.second;
}
}
AModel* BaseAssets::cube;
AModel* BaseAssets::plane;
AModel* BaseAssets::sphere;
AModel* BaseAssets::cone;
AModel* BaseAssets::cylinder;
AModel* BaseAssets::torus;
}

View File

@ -7,17 +7,26 @@
namespace nf {
Camera::Camera(Application* app) :
m_app(app)
m_app(app),
m_type(Type::NF_CAMERA_UI),
m_position(0.0),
m_front(0.0, 0.0, -1.0),
m_yaw(-90.0f),
m_pitch(0.0)
{
m_type = Type::NF_CAMERA_UI;
}
void Camera::setType(Type cameraType) {
m_type = cameraType;
if (m_type == Type::NF_CAMERA_FIRST_PERSON || m_type == Type::NF_CAMERA_ORBIT)
m_app->trackMouse(true);
else
m_app->trackMouse(false);
if (cameraType != m_type) {
m_type = cameraType;
if (m_type == Type::NF_CAMERA_FIRST_PERSON || m_type == Type::NF_CAMERA_ORBIT)
m_app->trackMouse(true);
else
m_app->trackMouse(false);
m_yaw = -90.0f;
m_pitch = 0.0f;
}
}
Camera::Type Camera::getType() const {
@ -26,24 +35,26 @@ namespace nf {
void Camera::moveForward(double speed) {
Vec3 temp = m_front * speed;
m_position = { m_position.x + temp.x, m_position.y + temp.y, m_position.z + temp.z };
m_position += temp;
}
void Camera::moveBackward(double speed) {
Vec3 temp = m_front * speed;
m_position = { m_position.x - temp.x, m_position.y - temp.y, m_position.z - temp.z };
m_position -= temp;
}
void Camera::moveRight(double speed) {
glm::vec3 front = { m_front.x, m_front.y, m_front.z };
glm::vec3 temp = glm::normalize(glm::cross(front, glm::vec3(0.0, 1.0, 0.0))) * (float)speed;
m_position = { m_position.x + temp.x, m_position.y + temp.y, m_position.z + temp.z };
Vec3 move = { temp.x, temp.y, temp.z };
m_position += move;
}
void Camera::moveLeft(double speed) {
glm::vec3 front = { m_front.x, m_front.y, m_front.z };
glm::vec3 temp = glm::normalize(glm::cross(front, glm::vec3(0.0, 1.0, 0.0))) * (float)speed;
m_position = { m_position.x - temp.x, m_position.y - temp.y, m_position.z - temp.z };
Vec3 move = { temp.x, temp.y, temp.z };
m_position -= move;
}
void Camera::setPosition(double x, double y, double z) {
@ -68,18 +79,16 @@ namespace nf {
m_app->getMouseDiff(mouseDiffx, mouseDiffy);
float mouseX = (float)mouseDiffx * 0.1f;
float mouseY = (float)mouseDiffy * 0.1f;
static float yaw = -90.0f;
static float pitch = 0.0f;
yaw += mouseX;
pitch += mouseY;
if (pitch > 89.0f)
pitch = 89.0f;
if (pitch < -89.0f)
pitch = -89.0f;
m_yaw += mouseX;
m_pitch += mouseY;
if (m_pitch > 89.0f)
m_pitch = 89.0f;
if (m_pitch < -89.0f)
m_pitch = -89.0f;
glm::vec3 rotation;
rotation.x = std::cos(glm::radians(yaw)) * std::cos(glm::radians(pitch));
rotation.y = std::sin(glm::radians(pitch));
rotation.z = std::sin(glm::radians(yaw)) * std::cos(glm::radians(pitch));
rotation.x = std::cos(glm::radians(m_yaw)) * std::cos(glm::radians(m_pitch));
rotation.y = std::sin(glm::radians(m_pitch));
rotation.z = std::sin(glm::radians(m_yaw)) * std::cos(glm::radians(m_pitch));
rotation = glm::normalize(rotation);
m_front = { rotation.x, rotation.y, rotation.z };
glm::vec3 position(m_position.x, m_position.y, m_position.z);

View File

@ -14,7 +14,7 @@ namespace nf {
void Entity::create(Asset* modelAsset, Asset* textureAsset) {
AModel& model = *(AModel*)modelAsset;
if (model.alreadyLoaded) {
if (model.alreadyLoaded && textureAsset == nullptr) {
m_model = model.loadedModel;
return;
}

View File

@ -10,7 +10,7 @@ namespace nf {
Model::Model() {
}
void Model::create(const void* vertexBufferData, const size_t vertexBufferSize, const void* indexBufferData, size_t indexBufferCount, const void* textureCoordinatesBufferData, size_t textureCoordinatesBufferSize, const unsigned char* textureData, size_t textureSize) {
void Model::create(const void* vertexBufferData, const size_t vertexBufferSize, const void* indexBufferData, size_t indexBufferCount, const void* textureCoordinatesBufferData, size_t textureCoordinatesBufferSize, const char* textureData, size_t textureSize) {
m_vao = new VertexArray;
m_vao->addBuffer(vertexBufferData, vertexBufferSize);
m_vao->push<float>(3);

View File

@ -6,7 +6,6 @@
#include "Application.h"
#include "Utility.h"
#include "resource.h"
namespace nf {
Renderer::Renderer(Application* app) {
@ -55,19 +54,24 @@ namespace nf {
glEnable(GL_CULL_FACE);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
Win32Res vs(IDR_DEFAULTVERTEX);
const char* defaultVertex = (const char*)vs.ptr;
Win32Res fs(IDR_DEFAULTFRAGMENT);
const char* defaultFragment = (const char*)fs.ptr;
if (defaultVertex == nullptr || defaultFragment == nullptr)
Error("Default engine resources not found! Please link nf.res to your application!");
baseAP.load("base.nfpack");
const char* defaultVertex = baseAP["defaultVertex.shader"]->data;
const char* defaultFragment = baseAP["defaultFragment.shader"]->data;
m_defaultShader = new Shader(defaultVertex, defaultFragment);
BaseAssets::cube = (AModel*)baseAP["cube.obj"];
BaseAssets::plane = (AModel*)baseAP["plane.obj"];
BaseAssets::sphere = (AModel*)baseAP["sphere.obj"];
BaseAssets::cone = (AModel*)baseAP["cone.obj"];
BaseAssets::cylinder = (AModel*)baseAP["cylinder.obj"];
BaseAssets::torus = (AModel*)baseAP["torus.obj"];
}
void Renderer::render(Entity& in) {
if (&in == nullptr)
Error("Tried to render Entity before being created!");
m_lGame.push_back(&in);
//TODO: Sort transparent objects by distance; Farthest first
}
void Renderer::doFrame(Camera* camera) {

View File

@ -11,10 +11,10 @@ namespace nf {
glGenTextures(1, &m_id);
}
void Texture::create(const unsigned char* textureData, size_t textureSize) {
void Texture::create(const char* textureData, size_t textureSize) {
int width, height, nChannels;
stbi_set_flip_vertically_on_load(true);
unsigned char* texture = stbi_load_from_memory(textureData, textureSize, &width, &height, &nChannels, 0);
unsigned char* texture = stbi_load_from_memory((unsigned char*)textureData, textureSize, &width, &height, &nChannels, 0);
if (!texture)
Error("Texture failed to load from memory!");
glBindTexture(GL_TEXTURE_2D, m_id);

View File

@ -53,20 +53,6 @@ namespace nf {
}
#endif
Win32Res::Win32Res(int id) :
ptr(nullptr),
size(0)
{
HRSRC src = FindResource(NULL, MAKEINTRESOURCE(id), RT_RCDATA);
if (src) {
HGLOBAL temp = LoadResource(NULL, src);
if (temp) {
ptr = LockResource(temp);
size = (size_t)SizeofResource(NULL, src);
}
}
}
const wchar_t* toWide(const char* in) {
int length = std::strlen(in) + 1;
wchar_t* out = new wchar_t[length];

View File

@ -77,6 +77,7 @@ namespace nf {
bool m_input[164];
int m_mouseX, m_mouseY;
bool m_trackingMouse;
bool m_mouseTrackFirst;
int m_mouseDiffX, m_mouseDiffY;
//Renderer object to use OpenGL to render the current state

View File

@ -5,11 +5,12 @@ namespace nf {
class Model;
struct Asset {
char* data;
virtual ~Asset();
};
struct AModel : Asset {
char* data;
bool alreadyLoaded;
Model* loadedModel;
@ -17,12 +18,15 @@ namespace nf {
};
struct ATexture : Asset {
unsigned char* data;
size_t size;
~ATexture() override;
};
struct AShader : Asset {
~AShader() override;
};
class AssetPack {
public:
AssetPack();
@ -35,4 +39,15 @@ namespace nf {
private:
std::unordered_map<std::string, Asset*> m_assets;
};
struct BaseAssets {
static AModel* cube;
static AModel* plane;
static AModel* sphere;
static AModel* cone;
static AModel* cylinder;
static AModel* torus;
static ATexture* logo;
};
}

View File

@ -34,5 +34,7 @@ namespace nf {
Vec3 m_position;
Vec3 m_front;
float m_yaw;
float m_pitch;
};
}

View File

@ -8,7 +8,7 @@ namespace nf {
public:
Model();
void create(const void* vertexBufferData, const size_t vertexBufferSize, const void* indexBufferData, size_t indexBufferCount, const void* textureCoordinates, size_t textureCoordinatesBufferSize, const unsigned char* textureData, size_t textureSize);
void create(const void* vertexBufferData, const size_t vertexBufferSize, const void* indexBufferData, size_t indexBufferCount, const void* textureCoordinates, size_t textureCoordinatesBufferSize, const char* textureData, size_t textureSize);
void bind() override;
~Model();

View File

@ -132,6 +132,7 @@ namespace nf {
bool m_input[164];
int m_mouseX, m_mouseY;
bool m_trackingMouse;
bool m_mouseTrackFirst;
int m_mouseDiffX, m_mouseDiffY;
//Renderer object to use OpenGL to render the current state

View File

@ -24,6 +24,8 @@ namespace nf {
HDC m_hdc;
HGLRC m_hglrc;
AssetPack baseAP;
std::vector<Entity*> m_lGame;
std::vector<Drawable*> m_lUI;
Shader* m_defaultShader;

View File

@ -5,7 +5,7 @@ namespace nf {
public:
Texture();
void create(const unsigned char* textureData, size_t textureSize);
void create(const char* textureData, size_t textureSize);
void bind();
~Texture();

View File

@ -39,20 +39,25 @@ __debugbreak();}
std::exit(-1);}
#endif
//TODO: Delete this after moving everything to base.nfpack
struct Win32Res {
Win32Res(int id);
void* ptr;
size_t size;
};
struct Vec3 {
Vec3() {}
Vec3() : x(0.0), y(0.0), z(0.0) {}
Vec3(double x1) : x(x1), y(x1), z(x1) {}
Vec3(double x1, double y1, double z1) : x(x1), y(y1), z(z1) {}
Vec3 operator*(const double scalar) {
return Vec3(x * scalar, y * scalar, z * scalar);
}
Vec3& operator+=(const Vec3& rhs) {
this->x += rhs.x;
this->y += rhs.y;
this->z += rhs.z;
return *this;
}
Vec3& operator-=(const Vec3& rhs) {
this->x -= rhs.x;
this->y -= rhs.y;
this->z -= rhs.z;
return *this;
}
double x, y, z;
};

View File

@ -1,17 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by NothinFancy.rc
//
#define IDR_DEFAULTVERTEX 201
#define IDR_DEFAULTFRAGMENT 202
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 103
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@ -26,17 +26,18 @@ Refactor NothinFancy.h to ONLY include stuff the frontend needs (Does deleteing
*Keyboard and mouse click input
Check for memory leaks in deconstructors
Separate Model and UIElement from Drawable
Entity and Camera classes
Mouse position input
*Entity and Camera classes
*Mouse position input
Audio
*Game states
Text rendering
UI elements
Resource system and custom format
Read model objs and animations (Is this realistic?)
*Resource system and custom format
*Read model objs
And animations (Is this realistic?)
Layered batch renderer
Lighting? (Or is this part of the game's shaders?)
Multithreading and async tasks (For audio and loading?)
Figure out format for storing resources OUTSIDE of exe (compressed format?)
And separate tool to write those?
*Figure out format for storing resources OUTSIDE of exe (compressed format?)
*And separate tool to write those?