Moved to MSVC v143, moved headers into a folder, and added texts to the example
This commit is contained in:
parent
3b5b608ae9
commit
9101000b97
@ -21,13 +21,13 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@ -1,13 +1,13 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl grass
|
||||
Ns 225.000000
|
||||
newmtl mat
|
||||
Ns 100.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
illum 2
|
||||
map_Kd grass.jpg
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl mat
|
||||
Ns 100.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Bump brickwall_normal.jpg
|
||||
map_Kd brickwall.jpg
|
@ -1,17 +0,0 @@
|
||||
# Blender v2.93.3 OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib normal.mtl
|
||||
o Plane_Plane.001
|
||||
v -1.000000 -1.000000 -0.000000
|
||||
v 1.000000 -1.000000 -0.000000
|
||||
v -1.000000 1.000000 0.000000
|
||||
v 1.000000 1.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vn 0.0000 -0.0000 1.0000
|
||||
usemtl mat
|
||||
s off
|
||||
f 2/1/1 3/2/1 1/3/1
|
||||
f 2/1/1 4/4/1 3/2/1
|
@ -1,14 +0,0 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl Material.001
|
||||
Ns 750.283502
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd diff.png
|
||||
map_Ks spec.png
|
@ -1,46 +0,0 @@
|
||||
# Blender v2.93.3 OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib spec.mtl
|
||||
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 -2.000000 -1.000000
|
||||
vt -1.000000 0.000000
|
||||
vt -2.000000 0.000000
|
||||
vt -1.000000 -1.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 -1.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 -1.000000
|
||||
vt 2.000000 -0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 -2.000000
|
||||
vt 2.000000 -1.000000
|
||||
vt 1.000000 -2.000000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
usemtl Material.001
|
||||
s off
|
||||
f 2/1/1 3/2/1 1/3/1
|
||||
f 4/4/2 7/5/2 3/2/2
|
||||
f 8/6/3 5/7/3 7/5/3
|
||||
f 6/8/4 1/9/4 5/7/4
|
||||
f 7/5/5 1/10/5 3/11/5
|
||||
f 4/12/6 6/8/6 8/6/6
|
||||
f 2/1/1 4/4/1 3/2/1
|
||||
f 4/4/2 8/6/2 7/5/2
|
||||
f 8/6/3 6/8/3 5/7/3
|
||||
f 6/8/4 2/13/4 1/9/4
|
||||
f 7/5/5 5/7/5 1/10/5
|
||||
f 4/12/6 2/14/6 6/8/6
|
Binary file not shown.
Before Width: | Height: | Size: 36 KiB |
Binary file not shown.
Before Width: | Height: | Size: 275 KiB After Width: | Height: | Size: 329 KiB |
@ -5,22 +5,33 @@ void MainState::onEnter() {
|
||||
currCamType = nf::Camera::Type::FIRST_PERSON;
|
||||
camera->setType(currCamType);
|
||||
ap.load("example.nfpack");
|
||||
|
||||
test.create(ap.get("2mats.obj"), nf::Entity::Type::DYNAMIC);
|
||||
test.setPosition(nf::Vec3(0.0, 1.5, -5.0));
|
||||
plane.create(ap.get("env.obj"), nf::Entity::Type::MAP);
|
||||
plane.setScale(20.0);
|
||||
plane.setPosition(0.0, -20.0, 0.0);
|
||||
text.create("", nf::Vec2(0.1, 0.025), nf::Vec3(0.8));
|
||||
text.centered(true);
|
||||
gravText.create("", nf::Vec2(0.025, 0.2), nf::Vec3(0.8), 1.0f, 0.5f);
|
||||
uiTex.create(nf::BaseAssets::logo, nf::Vec2(0.025, 0.025), 0.5);
|
||||
button.create(nf::Vec2(0.8, 0.025), "Reset");
|
||||
button2.create(nf::Vec2(0.6, 0.025), "Play Sound");
|
||||
|
||||
light.create(nf::Vec3(0.0, 20.0, 0.0), nf::Vec3(1.0, 1.0, 1.0));
|
||||
light2.create(nf::Vec3(-10.0, 20.0, -10.0), nf::Vec3(1.0, 1.0, 1.0));
|
||||
light3.create(nf::Vec3(10.0, 20.0, 10.0), nf::Vec3(1.0, 1.0, 1.0));
|
||||
cm.create(nf::BaseAssets::cubemap);
|
||||
|
||||
text.create("", nf::Vec2(0.1, 0.025), nf::Vec3(0.8));
|
||||
text.centered(true);
|
||||
moveText.create("WASD - move", nf::Vec2(0.025, 0.8), nf::Vec3(0.8), 0.5f);
|
||||
lookText.create("Mouse - look", nf::Vec2(0.025, 0.75), nf::Vec3(0.8), 0.5f);
|
||||
leftClickText.create("Left Click - Shoot single sphere", nf::Vec2(0.025, 0.7), nf::Vec3(0.8), 0.5f);
|
||||
rightClickText.create("Right Click - Shoot many spheres", nf::Vec2(0.025, 0.65), nf::Vec3(0.8), 0.5f);
|
||||
upAndDownText.create("Up and Down - Change the gravity", nf::Vec2(0.025, 0.6), nf::Vec3(0.8), 0.5f);
|
||||
leftAndRightText.create("Left and Right - Change the default ambient light", nf::Vec2(0.025, 0.55), nf::Vec3(0.8), 0.5f);
|
||||
escText.create("ESC - Quit", nf::Vec2(0.025, 0.5), nf::Vec3(0.8), 0.5f);
|
||||
currGravText.create("", nf::Vec2(0.025, 0.25), nf::Vec3(0.8), 0.5f);
|
||||
currLightText.create("", nf::Vec2(0.025, 0.2), nf::Vec3(0.8), 0.5f);
|
||||
uiTex.create(nf::BaseAssets::logo, nf::Vec2(0.025, 0.025), 0.5);
|
||||
button.create(nf::Vec2(0.8, 0.025), "Reset");
|
||||
button2.create(nf::Vec2(0.6, 0.025), "Play Sound");
|
||||
|
||||
sound.create(ap.get("sound.wav"));
|
||||
sound.setEntity(test);
|
||||
sound2.create(ap.get("test.ogg"));
|
||||
@ -31,7 +42,7 @@ void MainState::onEnter() {
|
||||
for (int y = 0; y < 3; y++) {
|
||||
for (int z = 0; z < 3; z++) {
|
||||
entities.push_back(new nf::Entity);
|
||||
entities.back()->create(nf::BaseAssets::cone, nf::Entity::Type::DYNAMIC);
|
||||
entities.back()->create(nf::BaseAssets::cube, nf::Entity::Type::DYNAMIC);
|
||||
entities.back()->setPosition(nf::Vec3(5.0 + x * 2.05, 1.0 + y * 2.05, -5.0 + z * 2.05));
|
||||
}
|
||||
}
|
||||
@ -40,9 +51,9 @@ void MainState::onEnter() {
|
||||
grav = 2.0f;
|
||||
setGravity(grav);
|
||||
|
||||
amb = 0.1f;
|
||||
amb = 0.5f;
|
||||
|
||||
camera->setPosition(-20.0, 15.0, 0.0);
|
||||
camera->setPosition(-20.0, 7.0, 0.0);
|
||||
camera->setRotation(85.0, -30.0);
|
||||
}
|
||||
|
||||
@ -104,7 +115,7 @@ void MainState::update(float deltaTime) {
|
||||
grav = 2.0f;
|
||||
setGravity(1.0f);
|
||||
}
|
||||
gravText.setText("Gravity Scale: " + std::to_string(grav));
|
||||
currGravText.setText("Gravity Scale: " + std::to_string(grav));
|
||||
|
||||
if (app->isKeyHeld(NFI_LEFT))
|
||||
amb -= 0.01f;
|
||||
@ -112,6 +123,7 @@ void MainState::update(float deltaTime) {
|
||||
amb += 0.01f;
|
||||
if (amb >= 0.0f)
|
||||
setAmbientLight(amb);
|
||||
currLightText.setText("Ambient Light Multiplier: " + std::to_string(amb));
|
||||
|
||||
if (app->isKeyPressed(NFI_ESCAPE))
|
||||
app->quit();
|
||||
@ -124,7 +136,15 @@ void MainState::render(nf::Renderer& renderer) {
|
||||
renderer.render(light2);
|
||||
renderer.render(light3);
|
||||
renderer.render(text);
|
||||
renderer.render(gravText);
|
||||
renderer.render(moveText);
|
||||
renderer.render(lookText);
|
||||
renderer.render(leftClickText);
|
||||
renderer.render(rightClickText);
|
||||
renderer.render(upAndDownText);
|
||||
renderer.render(currGravText);
|
||||
renderer.render(leftAndRightText);
|
||||
renderer.render(currLightText);
|
||||
renderer.render(escText);
|
||||
renderer.render(uiTex);
|
||||
renderer.render(button);
|
||||
renderer.render(button2);
|
||||
|
@ -16,7 +16,15 @@ private:
|
||||
nf::Entity test;
|
||||
nf::Entity plane;
|
||||
nf::Text text;
|
||||
nf::Text gravText;
|
||||
nf::Text moveText;
|
||||
nf::Text lookText;
|
||||
nf::Text leftClickText;
|
||||
nf::Text rightClickText;
|
||||
nf::Text upAndDownText;
|
||||
nf::Text currGravText;
|
||||
nf::Text leftAndRightText;
|
||||
nf::Text currLightText;
|
||||
nf::Text escText;
|
||||
nf::UITexture uiTex;
|
||||
nf::Button button;
|
||||
nf::Button button2;
|
||||
|
@ -21,13 +21,13 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@ -8,8 +8,6 @@
|
||||
#include <Windows.h>
|
||||
#include <compressapi.h>
|
||||
|
||||
#define COMPRESS 1
|
||||
|
||||
COMPRESSOR_HANDLE cHandle;
|
||||
|
||||
void Log(const std::string& in) {
|
||||
@ -20,7 +18,8 @@ void Log(const char* in) {
|
||||
std::cout << "[NFPackCreator] Info: " << in << "\n";
|
||||
}
|
||||
|
||||
__declspec(noreturn) void Error(const std::string& in) {
|
||||
[[noreturn]]
|
||||
void Error(const std::string& in) {
|
||||
HANDLE cmd = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
SetConsoleTextAttribute(cmd, FOREGROUND_RED);
|
||||
std::cout << "[NFPackCreator] Error: " + in + "\n";
|
||||
@ -65,7 +64,6 @@ void writeFile(const std::string& filename, const std::string& in, bool encrypte
|
||||
}
|
||||
write.insert(0, "NFEF");
|
||||
}
|
||||
#if COMPRESS
|
||||
Log("Compressing...");
|
||||
size_t compSize;
|
||||
Compress(cHandle, &write[0], write.size(), NULL, 0, &compSize);
|
||||
@ -74,9 +72,7 @@ void writeFile(const std::string& filename, const std::string& in, bool encrypte
|
||||
|
||||
out.write(buff, compSize);
|
||||
delete[] buff;
|
||||
#else
|
||||
out << write;
|
||||
#endif
|
||||
out.close();
|
||||
}
|
||||
|
||||
@ -120,8 +116,6 @@ int main(int argc, char* argv[]) {
|
||||
if (!currDir.is_directory())
|
||||
continue;
|
||||
std::string filename = currDir.path().filename().string().append(".nfpack");
|
||||
/*if (filename == "base.nfpack")
|
||||
Error("Cannot create a pack called base.nfpack!");*/
|
||||
Log("Creating pack \"" + filename + (std::string)"\"");
|
||||
std::vector<std::string> packFilenames;
|
||||
std::string currFileExtension;
|
||||
|
@ -21,13 +21,13 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@ -71,7 +71,7 @@
|
||||
<AdditionalDependencies>glew32s.lib;opengl32.lib;freetype.lib;xaudio2.lib;Cabinet.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;PhysXFoundation.lib;PhysXCommon.lib;PhysX.lib;PhysXCooking.lib;PhysXExtensions.lib;PhysXPvdSDK.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Lib>
|
||||
<Lib>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)dep\lib\Shared;$(ProjectDir)dep\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)dep\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>/ignore:4006 %(AdditionalOptions)</AdditionalOptions>
|
||||
</Lib>
|
||||
<ProjectReference>
|
||||
@ -105,7 +105,7 @@
|
||||
<AdditionalDependencies>glew32s.lib;opengl32.lib;freetype.lib;xaudio2.lib;Cabinet.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;PhysXFoundation.lib;PhysXCommon.lib;PhysX.lib;PhysXCooking.lib;PhysXExtensions.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Lib>
|
||||
<Lib>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)dep\lib\Shared;$(ProjectDir)dep\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)dep\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>/ignore:4006 %(AdditionalOptions)</AdditionalOptions>
|
||||
</Lib>
|
||||
<ProjectReference>
|
||||
@ -145,35 +145,35 @@
|
||||
<ClCompile Include="src\Utility.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\include\Assets.h" />
|
||||
<ClInclude Include="src\include\AudioEngine.h" />
|
||||
<ClInclude Include="src\include\Button.h" />
|
||||
<ClInclude Include="src\include\Camera.h" />
|
||||
<ClInclude Include="src\include\Cubemap.h" />
|
||||
<ClInclude Include="src\include\Entity.h" />
|
||||
<ClInclude Include="src\include\Application.h" />
|
||||
<ClInclude Include="src\include\Config.h" />
|
||||
<ClInclude Include="src\include\Drawable.h" />
|
||||
<ClInclude Include="src\include\Gamestate.h" />
|
||||
<ClInclude Include="src\include\GBuffer.h" />
|
||||
<ClInclude Include="src\include\IndexBuffer.h" />
|
||||
<ClInclude Include="src\include\IntroGamestate.h" />
|
||||
<ClInclude Include="src\include\Input.h" />
|
||||
<ClInclude Include="src\include\Light.h" />
|
||||
<ClInclude Include="src\include\Model.h" />
|
||||
<ClInclude Include="src\include\NFObject.h" />
|
||||
<ClInclude Include="src\include\nf\Assets.h" />
|
||||
<ClInclude Include="src\include\nf\AudioEngine.h" />
|
||||
<ClInclude Include="src\include\nf\Button.h" />
|
||||
<ClInclude Include="src\include\nf\Camera.h" />
|
||||
<ClInclude Include="src\include\nf\Cubemap.h" />
|
||||
<ClInclude Include="src\include\nf\Entity.h" />
|
||||
<ClInclude Include="src\include\nf\Application.h" />
|
||||
<ClInclude Include="src\include\nf\Config.h" />
|
||||
<ClInclude Include="src\include\nf\Drawable.h" />
|
||||
<ClInclude Include="src\include\nf\Gamestate.h" />
|
||||
<ClInclude Include="src\include\nf\GBuffer.h" />
|
||||
<ClInclude Include="src\include\nf\IndexBuffer.h" />
|
||||
<ClInclude Include="src\include\nf\IntroGamestate.h" />
|
||||
<ClInclude Include="src\include\nf\Input.h" />
|
||||
<ClInclude Include="src\include\nf\Light.h" />
|
||||
<ClInclude Include="src\include\nf\Model.h" />
|
||||
<ClInclude Include="src\include\nf\NFObject.h" />
|
||||
<ClInclude Include="src\include\NothinFancy.h" />
|
||||
<ClInclude Include="src\include\PhysicsEngine.h" />
|
||||
<ClInclude Include="src\include\Renderer.h" />
|
||||
<ClInclude Include="src\include\Shader.h" />
|
||||
<ClInclude Include="src\include\Sound.h" />
|
||||
<ClInclude Include="src\include\Text.h" />
|
||||
<ClInclude Include="src\include\Texture.h" />
|
||||
<ClInclude Include="src\include\UIElement.h" />
|
||||
<ClInclude Include="src\include\UITexture.h" />
|
||||
<ClInclude Include="src\include\Utility.h" />
|
||||
<ClInclude Include="src\include\VertexArray.h" />
|
||||
<ClInclude Include="src\include\VertexBuffer.h" />
|
||||
<ClInclude Include="src\include\nf\PhysicsEngine.h" />
|
||||
<ClInclude Include="src\include\nf\Renderer.h" />
|
||||
<ClInclude Include="src\include\nf\Shader.h" />
|
||||
<ClInclude Include="src\include\nf\Sound.h" />
|
||||
<ClInclude Include="src\include\nf\Text.h" />
|
||||
<ClInclude Include="src\include\nf\Texture.h" />
|
||||
<ClInclude Include="src\include\nf\UIElement.h" />
|
||||
<ClInclude Include="src\include\nf\UITexture.h" />
|
||||
<ClInclude Include="src\include\nf\Utility.h" />
|
||||
<ClInclude Include="src\include\nf\VertexArray.h" />
|
||||
<ClInclude Include="src\include\nf\VertexBuffer.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Natvis Include="NatvisFile.natvis" />
|
||||
|
@ -92,91 +92,91 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\include\Config.h">
|
||||
<ClInclude Include="src\include\nf\Config.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\NothinFancy.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Utility.h">
|
||||
<ClInclude Include="src\include\nf\Utility.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Application.h">
|
||||
<ClInclude Include="src\include\nf\Application.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Gamestate.h">
|
||||
<ClInclude Include="src\include\nf\Gamestate.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\IntroGamestate.h">
|
||||
<ClInclude Include="src\include\nf\IntroGamestate.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Input.h">
|
||||
<ClInclude Include="src\include\nf\Input.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Renderer.h">
|
||||
<ClInclude Include="src\include\nf\Renderer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\VertexBuffer.h">
|
||||
<ClInclude Include="src\include\nf\VertexBuffer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\IndexBuffer.h">
|
||||
<ClInclude Include="src\include\nf\IndexBuffer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\VertexArray.h">
|
||||
<ClInclude Include="src\include\nf\VertexArray.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Shader.h">
|
||||
<ClInclude Include="src\include\nf\Shader.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Drawable.h">
|
||||
<ClInclude Include="src\include\nf\Drawable.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Model.h">
|
||||
<ClInclude Include="src\include\nf\Model.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Entity.h">
|
||||
<ClInclude Include="src\include\nf\Entity.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Texture.h">
|
||||
<ClInclude Include="src\include\nf\Texture.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Assets.h">
|
||||
<ClInclude Include="src\include\nf\Assets.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Camera.h">
|
||||
<ClInclude Include="src\include\nf\Camera.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\UIElement.h">
|
||||
<ClInclude Include="src\include\nf\UIElement.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Text.h">
|
||||
<ClInclude Include="src\include\nf\Text.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\UITexture.h">
|
||||
<ClInclude Include="src\include\nf\UITexture.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Light.h">
|
||||
<ClInclude Include="src\include\nf\Light.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Cubemap.h">
|
||||
<ClInclude Include="src\include\nf\Cubemap.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\NFObject.h">
|
||||
<ClInclude Include="src\include\nf\NFObject.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Button.h">
|
||||
<ClInclude Include="src\include\nf\Button.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\AudioEngine.h">
|
||||
<ClInclude Include="src\include\nf\AudioEngine.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\Sound.h">
|
||||
<ClInclude Include="src\include\nf\Sound.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\GBuffer.h">
|
||||
<ClInclude Include="src\include\nf\GBuffer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\include\PhysicsEngine.h">
|
||||
<ClInclude Include="src\include\nf\PhysicsEngine.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
NothinFancy/dep/lib/Debug/freetype.lib
Normal file
BIN
NothinFancy/dep/lib/Debug/freetype.lib
Normal file
Binary file not shown.
BIN
NothinFancy/dep/lib/Debug/glew32s.lib
Normal file
BIN
NothinFancy/dep/lib/Debug/glew32s.lib
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
NothinFancy/dep/lib/Release/freetype.lib
Normal file
BIN
NothinFancy/dep/lib/Release/freetype.lib
Normal file
Binary file not shown.
BIN
NothinFancy/dep/lib/Release/glew32s.lib
Normal file
BIN
NothinFancy/dep/lib/Release/glew32s.lib
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,12 +1,10 @@
|
||||
#include "Application.h"
|
||||
#include "nf/Application.h"
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include "Utility.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
NFDEBUGINIT;
|
||||
|
||||
Application::Application(Config& config) :
|
||||
m_currentConfig(config),
|
||||
m_running(false),
|
||||
@ -83,6 +81,8 @@ namespace nf {
|
||||
#ifdef _DEBUG
|
||||
SetThreadDescription(GetCurrentThread(), L"Input Thread");
|
||||
#endif
|
||||
if (m_defaultState.empty())
|
||||
NFError("No default gamestate has been set!");
|
||||
m_hInst = GetModuleHandle(NULL);
|
||||
registerWindowClass();
|
||||
RECT windowSize = getWindowRect();
|
||||
@ -129,10 +129,7 @@ namespace nf {
|
||||
}
|
||||
|
||||
void Application::showWindow(bool show) {
|
||||
if (show)
|
||||
ShowWindow(m_window, SW_SHOW);
|
||||
else
|
||||
ShowWindow(m_window, SW_HIDE);
|
||||
show ? ShowWindow(m_window, SW_SHOW) : ShowWindow(m_window, SW_HIDE);
|
||||
}
|
||||
|
||||
const HWND& Application::getWindow() {
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include "Assets.h"
|
||||
#include "nf/Assets.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "Application.h"
|
||||
#include "Model.h"
|
||||
#include "Utility.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Model.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
Asset::~Asset() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "AudioEngine.h"
|
||||
#include "nf/AudioEngine.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Entity.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Entity.h"
|
||||
|
||||
namespace nf {
|
||||
AudioEngine::AudioEngine(Application* app) :
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "Gamestate.h"
|
||||
#include "nf/Gamestate.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "PhysicsEngine.h"
|
||||
#include "Entity.h"
|
||||
#include "Model.h"
|
||||
#include "Texture.h"
|
||||
#include "Utility.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/PhysicsEngine.h"
|
||||
#include "nf/Entity.h"
|
||||
#include "nf/Model.h"
|
||||
#include "nf/Texture.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
Gamestate::Gamestate() :
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "IntroGamestate.h"
|
||||
#include "nf/IntroGamestate.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Utility.h"
|
||||
#include "Input.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Utility.h"
|
||||
#include "nf/Input.h"
|
||||
|
||||
namespace nf {
|
||||
void IntroGamestate::onEnter() {
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "Button.h"
|
||||
#include "nf/Button.h"
|
||||
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Input.h"
|
||||
#include "Texture.h"
|
||||
#include "Shader.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Input.h"
|
||||
#include "nf/Texture.h"
|
||||
#include "nf/Shader.h"
|
||||
|
||||
namespace nf {
|
||||
Button::Button() :
|
||||
|
@ -1,12 +1,12 @@
|
||||
#include "Cubemap.h"
|
||||
#include "nf/Cubemap.h"
|
||||
|
||||
#include <vector>
|
||||
#include "GL/glew.h"
|
||||
#include "stb_image.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Shader.h"
|
||||
#include "Assets.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Shader.h"
|
||||
#include "nf/Assets.h"
|
||||
|
||||
namespace nf {
|
||||
Cubemap::Cubemap() :
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "Entity.h"
|
||||
#include "nf/Entity.h"
|
||||
|
||||
#include<vector>
|
||||
#include "glm/gtx/quaternion.hpp"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Model.h"
|
||||
#include "Shader.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Model.h"
|
||||
#include "nf/Shader.h"
|
||||
|
||||
namespace nf {
|
||||
Entity::Entity() :
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "Light.h"
|
||||
#include "nf/Light.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Shader.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Shader.h"
|
||||
|
||||
namespace nf {
|
||||
Light::Light() :
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include "Sound.h"
|
||||
#include "nf/Sound.h"
|
||||
|
||||
#include "vorbis/vorbisfile.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Assets.h"
|
||||
#include "Entity.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Assets.h"
|
||||
#include "nf/Entity.h"
|
||||
|
||||
namespace nf {
|
||||
#pragma region Ogg File Loading
|
||||
|
@ -1,12 +1,12 @@
|
||||
#include "Text.h"
|
||||
#include "nf/Text.h"
|
||||
|
||||
#include "GL/glew.h"
|
||||
#include "ft2build.h"
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
#include "Application.h"
|
||||
#include "UIElement.h"
|
||||
#include "Shader.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/UIElement.h"
|
||||
#include "nf/Shader.h"
|
||||
|
||||
namespace nf {
|
||||
Text::Text() :
|
||||
@ -17,7 +17,7 @@ namespace nf {
|
||||
|
||||
}
|
||||
|
||||
void Text::create(const std::string& string, const Vec2& position, const Vec3& color, float opacity, float scale, Asset* fontAsset) {
|
||||
void Text::create(const std::string& string, const Vec2& position, const Vec3& color, float scale, float opacity, Asset* fontAsset) {
|
||||
if (m_constructed)
|
||||
NFError("Text already created!");
|
||||
m_constructed = true;
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "UITexture.h"
|
||||
#include "nf/UITexture.h"
|
||||
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Assets.h"
|
||||
#include "Texture.h"
|
||||
#include "Shader.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Assets.h"
|
||||
#include "nf/Texture.h"
|
||||
#include "nf/Shader.h"
|
||||
|
||||
namespace nf {
|
||||
UITexture::UITexture() :
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "PhysicsEngine.h"
|
||||
#include "nf/PhysicsEngine.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Entity.h"
|
||||
#include "Model.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Entity.h"
|
||||
#include "nf/Model.h"
|
||||
|
||||
namespace nf {
|
||||
class PhysicsErrorCallback : public PxErrorCallback {
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "Camera.h"
|
||||
#include "nf/Camera.h"
|
||||
|
||||
#include "glm/glm.hpp"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Shader.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Shader.h"
|
||||
|
||||
namespace nf {
|
||||
Camera::Camera(Application* app) :
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "Drawable.h"
|
||||
#include "nf/Drawable.h"
|
||||
|
||||
#include "Utility.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
Drawable::Drawable() :
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "GBuffer.h"
|
||||
#include "nf/GBuffer.h"
|
||||
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Entity.h"
|
||||
#include "Model.h"
|
||||
#include "Shader.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Entity.h"
|
||||
#include "nf/Model.h"
|
||||
#include "nf/Shader.h"
|
||||
|
||||
namespace nf {
|
||||
GBuffer::GBuffer() :
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "IndexBuffer.h"
|
||||
#include "nf/IndexBuffer.h"
|
||||
|
||||
#include "GL/glew.h"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "Model.h"
|
||||
#include "nf/Model.h"
|
||||
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
@ -7,10 +7,10 @@
|
||||
#include "glm/gtc/matrix_transform.hpp"
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Texture.h"
|
||||
#include "Shader.h"
|
||||
#include "Utility.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Texture.h"
|
||||
#include "nf/Shader.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
Model::Model(AModel* model, bool physicsConvex, bool physicsTriangle) :
|
||||
|
@ -1,22 +1,22 @@
|
||||
#include "Renderer.h"
|
||||
#include "nf/Renderer.h"
|
||||
|
||||
#include "GL/glew.h"
|
||||
#include "GL\wglew.h"
|
||||
#include "glm/glm.hpp"
|
||||
#include "stb_image.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "GBuffer.h"
|
||||
#include "Shader.h"
|
||||
#include "Light.h"
|
||||
#include "Entity.h"
|
||||
#include "Model.h"
|
||||
#include "Cubemap.h"
|
||||
#include "UIElement.h"
|
||||
#include "Button.h"
|
||||
#include "Camera.h"
|
||||
#include "Utility.h"
|
||||
#include "Texture.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/GBuffer.h"
|
||||
#include "nf/Shader.h"
|
||||
#include "nf/Light.h"
|
||||
#include "nf/Entity.h"
|
||||
#include "nf/Model.h"
|
||||
#include "nf/Cubemap.h"
|
||||
#include "nf/UIElement.h"
|
||||
#include "nf/Button.h"
|
||||
#include "nf/Camera.h"
|
||||
#include "nf/Utility.h"
|
||||
#include "nf/Texture.h"
|
||||
|
||||
namespace nf {
|
||||
Renderer::Renderer(Application* app) :
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "Shader.h"
|
||||
#include "nf/Shader.h"
|
||||
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "Utility.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
Shader::Shader(const char* vertexSource, const char* fragmentSource, const char* geometrySource) {
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "Texture.h"
|
||||
#include "nf/Texture.h"
|
||||
|
||||
#include "GL/glew.h"
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "stb_image.h"
|
||||
|
||||
#include "Assets.h"
|
||||
#include "Utility.h"
|
||||
#include "nf/Assets.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
Texture::Texture(ATexture* tex, bool linear) :
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "UIElement.h"
|
||||
#include "nf/UIElement.h"
|
||||
|
||||
namespace nf {
|
||||
UIElement::UIElement() :
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "VertexArray.h"
|
||||
#include "nf/VertexArray.h"
|
||||
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "Utility.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
VertexArray::VertexArray() {
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "VertexBuffer.h"
|
||||
#include "nf/VertexBuffer.h"
|
||||
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "Utility.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
VertexBuffer::VertexBuffer(const void* data, const size_t size) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "Utility.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
@ -8,7 +9,7 @@
|
||||
#include <compressapi.h>
|
||||
#include "glm/glm.hpp"
|
||||
|
||||
#include "Config.h"
|
||||
#include "nf/Config.h"
|
||||
|
||||
namespace nf {
|
||||
static DECOMPRESSOR_HANDLE s_dHandle;
|
||||
@ -16,32 +17,34 @@ namespace nf {
|
||||
static const float deg2rad = (float)M_PI / 180.0f;
|
||||
|
||||
#ifdef _DEBUG
|
||||
NFDEBUGINIT;
|
||||
|
||||
void Debug::LogImp(const char* in) {
|
||||
std::chrono::duration<float> time = getCurrentTime();
|
||||
std::printf("[%.4f] Debug: %s\n", time.count(), in);
|
||||
std::printf("[%.4f] NF Log: %s\n", time.count(), in);
|
||||
}
|
||||
|
||||
void Debug::LogImp(const std::string& in) {
|
||||
std::chrono::duration<float> time = getCurrentTime();
|
||||
std::printf("[%.4f] Debug: ", time.count());
|
||||
std::printf("[%.4f] NF Log: ", time.count());
|
||||
std::cout << in << "\n";
|
||||
}
|
||||
|
||||
void Debug::LogImp(int in) {
|
||||
std::chrono::duration<float> time = getCurrentTime();
|
||||
std::printf("[%.4f] Debug: %i\n", time.count(), in);
|
||||
std::printf("[%.4f] NF Log: %i\n", time.count(), in);
|
||||
}
|
||||
|
||||
void Debug::LogImp(float in) {
|
||||
std::chrono::duration<float> time = getCurrentTime();
|
||||
std::printf("[%.4f] Debug: %.4f\n", time.count(), in);
|
||||
std::printf("[%.4f] NF Log: %.4f\n", time.count(), in);
|
||||
}
|
||||
//TODO: Test every Error in release mode
|
||||
void Debug::ErrorImp(const char* in, const char* filename, int line) {
|
||||
std::chrono::duration<float> time = getCurrentTime();
|
||||
static HANDLE cmd = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
SetConsoleTextAttribute(cmd, FOREGROUND_RED);
|
||||
std::printf("[%.4f] Error (%s, %i): %s\n", time.count(), filename, line, in);
|
||||
std::printf("[%.4f] NF Error (%s, %i): %s\n", time.count(), filename, line, in);
|
||||
SetConsoleTextAttribute(cmd, 7);
|
||||
}
|
||||
|
||||
@ -49,7 +52,7 @@ namespace nf {
|
||||
std::chrono::duration<float> time = getCurrentTime();
|
||||
static HANDLE cmd = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
SetConsoleTextAttribute(cmd, FOREGROUND_RED);
|
||||
std::printf("[%.4f] Error (%s, %i): ", time.count(), filename, line);
|
||||
std::printf("[%.4f] NF Error (%s, %i): ", time.count(), filename, line);
|
||||
std::cout << in << "\n";
|
||||
SetConsoleTextAttribute(cmd, 7);
|
||||
}
|
||||
|
@ -8,16 +8,16 @@
|
||||
#define NFIMPL 1
|
||||
#endif
|
||||
|
||||
#include "Config.h"
|
||||
#include "Application.h"
|
||||
#include "Renderer.h"
|
||||
#include "Utility.h"
|
||||
#include "Assets.h"
|
||||
#include "Entity.h"
|
||||
#include "Light.h"
|
||||
#include "Cubemap.h"
|
||||
#include "Text.h"
|
||||
#include "UITexture.h"
|
||||
#include "Button.h"
|
||||
#include "Sound.h"
|
||||
#include "Input.h"
|
||||
#include "nf/Config.h"
|
||||
#include "nf/Application.h"
|
||||
#include "nf/Renderer.h"
|
||||
#include "nf/Utility.h"
|
||||
#include "nf/Assets.h"
|
||||
#include "nf/Entity.h"
|
||||
#include "nf/Light.h"
|
||||
#include "nf/Cubemap.h"
|
||||
#include "nf/Text.h"
|
||||
#include "nf/UITexture.h"
|
||||
#include "nf/Button.h"
|
||||
#include "nf/Sound.h"
|
||||
#include "nf/Input.h"
|
@ -2,18 +2,16 @@
|
||||
#include <chrono>
|
||||
#include <unordered_map>
|
||||
#include <array>
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
|
||||
#include "Config.h"
|
||||
#include "Renderer.h"
|
||||
#include "Gamestate.h"
|
||||
#include "nf/Config.h"
|
||||
#include "nf/Renderer.h"
|
||||
#include "nf/Gamestate.h"
|
||||
#ifndef NFIMPL
|
||||
#include "IntroGamestate.h"
|
||||
#include "AudioEngine.h"
|
||||
#include "PhysicsEngine.h"
|
||||
#include "nf/IntroGamestate.h"
|
||||
#include "nf/AudioEngine.h"
|
||||
#include "nf/PhysicsEngine.h"
|
||||
#endif
|
||||
//TODO: Document ALL frontend functions in new include files for the frontend only
|
||||
|
||||
namespace nf {
|
||||
class AudioEngine;
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include <unordered_map>
|
||||
|
||||
#include "NFObject.h"
|
||||
#include "nf/NFObject.h"
|
||||
|
||||
namespace nf {
|
||||
class Model;
|
@ -4,7 +4,7 @@
|
||||
#include <xaudio2.h>
|
||||
#include <x3daudio.h>
|
||||
|
||||
#include "Utility.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
class Entity;
|
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
#include "UIElement.h"
|
||||
#include "NFObject.h"
|
||||
#include "Text.h"
|
||||
#include "nf/UIElement.h"
|
||||
#include "nf/NFObject.h"
|
||||
#include "nf/Text.h"
|
||||
|
||||
namespace nf {
|
||||
class Application;
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "NFObject.h"
|
||||
#include "Drawable.h"
|
||||
#include "nf/NFObject.h"
|
||||
#include "nf/Drawable.h"
|
||||
|
||||
namespace nf {
|
||||
struct Asset;
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "VertexArray.h"
|
||||
#include "IndexBuffer.h"
|
||||
#include "nf/VertexArray.h"
|
||||
#include "nf/IndexBuffer.h"
|
||||
|
||||
namespace nf {
|
||||
class Drawable {
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "Assets.h"
|
||||
#include "NFObject.h"
|
||||
#include "Utility.h"
|
||||
#include "nf/Assets.h"
|
||||
#include "nf/NFObject.h"
|
||||
#include "nf/Utility.h"
|
||||
#ifndef NFIMPL
|
||||
#include "glm/glm.hpp"
|
||||
#endif
|
||||
@ -53,7 +53,7 @@ namespace nf {
|
||||
/**
|
||||
* @brief Creates an entity
|
||||
* @param modelAsset A model Asset pointer
|
||||
* @param type @ref Type of entity; Defaults to Type::STATIC
|
||||
* @param type Type of entity; Defaults to Type::STATIC
|
||||
*
|
||||
* This function will initialize an entity by loading its associated model from
|
||||
* the modelAsset parameter.
|
@ -2,7 +2,7 @@
|
||||
#include <vector>
|
||||
#include <array>
|
||||
#include <unordered_map>
|
||||
#include "glm\glm.hpp"
|
||||
#include "glm/glm.hpp"
|
||||
|
||||
namespace nf {
|
||||
class Entity;
|
@ -2,8 +2,8 @@
|
||||
#include <vector>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "Camera.h"
|
||||
#include "NFObject.h"
|
||||
#include "nf/Camera.h"
|
||||
#include "nf/NFObject.h"
|
||||
|
||||
namespace nf {
|
||||
class Application;
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "Drawable.h"
|
||||
#include "Assets.h"
|
||||
#include "Utility.h"
|
||||
#include "nf/Drawable.h"
|
||||
#include "nf/Assets.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
class Texture;
|
@ -3,7 +3,7 @@
|
||||
#include <PxConfig.h>
|
||||
#include <PxPhysicsAPI.h>
|
||||
|
||||
#include "Utility.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
using namespace physx;
|
||||
|
@ -2,8 +2,8 @@
|
||||
#include <vector>
|
||||
#include <Windows.h>
|
||||
|
||||
#include "Assets.h"
|
||||
#include "Text.h"
|
||||
#include "nf/Assets.h"
|
||||
#include "nf/Text.h"
|
||||
|
||||
namespace nf {
|
||||
class Application;
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "NFObject.h"
|
||||
#include "AudioEngine.h"
|
||||
#include "Utility.h"
|
||||
#include "nf/NFObject.h"
|
||||
#include "nf/AudioEngine.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
struct Asset;
|
@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
#include <map>
|
||||
|
||||
#include "UIElement.h"
|
||||
#include "NFObject.h"
|
||||
#include "Assets.h"
|
||||
#include "Utility.h"
|
||||
#include "nf/UIElement.h"
|
||||
#include "nf/NFObject.h"
|
||||
#include "nf/Assets.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
struct Character {
|
||||
@ -37,11 +37,11 @@ namespace nf {
|
||||
* @param string The text itself
|
||||
* @param position Position vector in screen space
|
||||
* @param color Color vector; Optional
|
||||
* @param opacity Opacity of the text; Optional
|
||||
* @param scale Scale of the text; Optional
|
||||
* @param opacity Opacity of the text; Optional
|
||||
* @param fontAsset Custom font asset; Optional
|
||||
*/
|
||||
void create(const std::string& string, const Vec2& position, const Vec3& color = {1.0, 1.0, 1.0}, float opacity = 1.0f, float scale = 1.0f, Asset* fontAsset = BaseAssets::font);
|
||||
void create(const std::string& string, const Vec2& position, const Vec3& color = {1.0, 1.0, 1.0}, float scale = 1.0f, float opacity = 1.0f, Asset* fontAsset = BaseAssets::font);
|
||||
/**
|
||||
* @brief Sets the displayed text
|
||||
* @param string The new text to display
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "Utility.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
struct ATexture;
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "Drawable.h"
|
||||
#include "nf/Drawable.h"
|
||||
|
||||
#include "Utility.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
class Shader;
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "UIElement.h"
|
||||
#include "NFObject.h"
|
||||
#include "Utility.h"
|
||||
#include "nf/UIElement.h"
|
||||
#include "nf/NFObject.h"
|
||||
#include "nf/Utility.h"
|
||||
|
||||
namespace nf {
|
||||
class Texture;
|
@ -47,16 +47,18 @@ __debugbreak();}
|
||||
* @brief Handles NFLog and NFError calls
|
||||
*/
|
||||
class Debug {
|
||||
private:
|
||||
static std::chrono::steady_clock::time_point m_initTime;
|
||||
static std::chrono::duration<float> getCurrentTime();
|
||||
public:
|
||||
static void LogImp(const char* in);
|
||||
static void LogImp(const std::string& in);
|
||||
static void LogImp(int in);
|
||||
static void LogImp(float in);
|
||||
[[noreturn]]
|
||||
static void ErrorImp(const char* in, const char* filename, int line);
|
||||
[[noreturn]]
|
||||
static void ErrorImp(const std::string& in, const char* filename, int line);
|
||||
private:
|
||||
static std::chrono::steady_clock::time_point m_initTime;
|
||||
static std::chrono::duration<float> getCurrentTime();
|
||||
};
|
||||
#else
|
||||
#define NFDEBUGINIT
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
|
||||
#include "VertexBuffer.h"
|
||||
#include "nf/VertexBuffer.h"
|
||||
|
||||
namespace nf {
|
||||
|
@ -166,7 +166,7 @@ GENERATE_HTML = YES
|
||||
HTML_OUTPUT = manual
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER = header.html
|
||||
HTML_FOOTER =
|
||||
HTML_FOOTER = footer.html
|
||||
HTML_STYLESHEET =
|
||||
HTML_EXTRA_STYLESHEET = theme.css
|
||||
HTML_EXTRA_FILES = favicon.png
|
||||
|
18
docs/footer.html
Normal file
18
docs/footer.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!-- HTML footer for doxygen 1.9.2-->
|
||||
<!-- start footer part -->
|
||||
<!--BEGIN GENERATE_TREEVIEW-->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
$navpath
|
||||
<li class="footer">$generatedby <a href="https://www.doxygen.org/index.html"><img class="footer" src="$relpath^doxygen.svg" width="104" height="31" alt="doxygen"/></a> $doxygenversion </li>
|
||||
<li class="footer">Copyright Grayson Riffe 2021</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--END GENERATE_TREEVIEW-->
|
||||
<!--BEGIN !GENERATE_TREEVIEW-->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
$generatedby <a href="https://www.doxygen.org/index.html"><img class="footer" src="$relpath^doxygen.svg" width="104" height="31" alt="doxygen"/></a> $doxygenversion
|
||||
</small></address>
|
||||
<!--END !GENERATE_TREEVIEW-->
|
||||
</body>
|
||||
</html>
|
@ -5,8 +5,8 @@
|
||||
<tab type="mainpage" visible="yes" title=""/>
|
||||
<tab type="pages" visible="yes" title="" intro=""/>
|
||||
<tab type="modules" visible="yes" title="" intro=""/>
|
||||
<tab type="namespaces" visible="yes" title="API">
|
||||
<tab type="namespacelist" visible="yes" title="Class List" intro="Here, you can find a list of every useful class to use in NF."/>
|
||||
<tab type="namespaces" visible="no" title="API">
|
||||
<tab type="namespacelist" visible="yes" title="API" intro="Here, you can find a list of every useful class to use in NF."/>
|
||||
<tab type="namespacemembers" visible="no" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="concepts" visible="yes" title="">
|
||||
@ -19,7 +19,7 @@
|
||||
<tab type="classes" visible="no" title="API">
|
||||
<tab type="classlist" visible="no" title="Classes" intro=""/>
|
||||
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="hierarchy" visible="yes" title="" intro=""/>
|
||||
<tab type="hierarchy" visible="no" title="" intro=""/>
|
||||
<tab type="classmembers" visible="no" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="structs" visible="yes" title="">
|
||||
|
@ -1,19 +1,28 @@
|
||||
@page install Installation
|
||||
@tableofcontents
|
||||
|
||||
This page details how to install NF in a MSVC project.
|
||||
This page details how to get started with the engine by using the template project.
|
||||
|
||||
@section prereq Prerequisites
|
||||
|
||||
In order to create an NF application, you must first have the following:
|
||||
In order to develop an NF application, you must first have the following:
|
||||
|
||||
- Visual Studio 2022 or later (MSVC v143 or later)
|
||||
- A 64 bit computer as NF is 64 bit only
|
||||
- A 64 bit computer as **NF is 64 bit only**
|
||||
- A compatible graphics card (See @ref issues)
|
||||
- Apt C++ knowledge
|
||||
- The engine itself
|
||||
@todo Link download here?
|
||||
|
||||
@section projSetup Step One: Project Setup
|
||||
The current version of the engine can be downloaded [here](http://mrgrapedave.com/nf/nf.zip).
|
||||
|
||||
---
|
||||
|
||||
@section projSetup Step One: Template Setup
|
||||
|
||||
Inside the zip file, you will find:
|
||||
|
||||
- **example** - The example app complete with the source and a build
|
||||
- **manual** - An offline version of this manual
|
||||
- **index.html** - The homepage
|
||||
- **template** - A template MSVC project with options already setup to work well with the engine
|
||||
|
||||
@note kdlsjfldksjf
|
@ -2,5 +2,7 @@
|
||||
|
||||
This page includes the known issues of the engine in order of importance.
|
||||
|
||||
1. Shader compilation errors
|
||||
- This issue is caused by differences in graphics drivers and what exact OpenGL shader code they will compile. **This issue will be attended to soon.**
|
||||
1. Shader compilation errors and black objects
|
||||
- This issue is caused by differences in graphics drivers and what exact OpenGL shader code
|
||||
they expect. Currently, Nvidia work perfectly, Intel partially works,
|
||||
and AMD doesn't run. **This issue will be attended to soon.**
|
@ -2,8 +2,8 @@
|
||||
|
||||
Nothin' Fancy (abbreviated as NF) is an experimental 3D game engine written in C++
|
||||
for Windows. It was created by Grayson Riffe in 2021. This manual aims to aid the end-user
|
||||
with using this engine to create games and visualizations. It contains a user guide and
|
||||
the API reference.
|
||||
with using this engine to create games and visualizations. It contains the
|
||||
[user guide](tutorial.html) and the [API reference](namespaces.html).
|
||||
|
||||
@image html logofull.png "Engine Logo" width=200px
|
||||
|
||||
|
Reference in New Issue
Block a user