This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdint.h> | |
| #define C_INF (double)(1e+300 * 1e+300) | |
| #define C_NAN (double)(C_INF * 0.0) | |
| // probably faster square root | |
| // 0x1FF7A3BEA91D9B00 -- 0.5*4503599627370496*(1023-0.0450465) | |
| double C_sqrt(double num) | |
| { | |
| // number should be positive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // interface.h implementation shit | |
| #include <cstring> // strcmp, strncpy | |
| #include "platform.h" | |
| #include "interface.h" | |
| #ifdef _WIN32 | |
| #include <Windows.h> | |
| static constexpr char FS_CORRECT_SEP = '\\'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdint> // uint32_t | |
| #include <cstddef> // size_t | |
| #include <cstring> // strcmp, strncpy | |
| #include <cstdlib> // atoi, atof | |
| #include <string> // std::to_string | |
| #include "cvardef.h" | |
| #include "cvar.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <GL/glew.h> | |
| #include <GLFW/glfw3.h> | |
| #include <glm/glm.hpp> | |
| #include <glm/gtc/matrix_transform.hpp> | |
| #include <glm/gtc/type_ptr.hpp> | |
| #include <cmath> | |
| #include "gfx/glsl.h" | |
| #include "gfx/img.h" | |
| #include "gfx/camera.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //----------------------------------------------------------------------------- | |
| // /src/engine/gfx/glsl.cpp | |
| // The GLSL Shader Helper functions & classes | |
| //----------------------------------------------------------------------------- | |
| #include <string> // std::string | |
| #include <fstream> // std::ifstream | |
| #include <sstream> // std::stringstream | |
| #include <glm/gtc/type_ptr.hpp> | |
| #include "gfx/glsl.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extends KinematicBody | |
| # the user command structure | |
| # this contains wish directions for player | |
| var cmd = { | |
| move_forward = 0.0, | |
| move_right = 0.0, | |
| move_up = 0.0, # is this actually needed here? Carmack, why? | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // VoxelGame -- Unititled voxel game project | |
| // (c) 2020, undbsd | |
| // File: Player.cs | |
| // Info: Player movement & input script | |
| // Lastchange: Free-fly camera implemented | |
| using Godot; | |
| using System; | |
| //------------------------------------------------------------------------------ | |
| // Player |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //============================================================================== | |
| // Copyright (c) 2020, undbsd | |
| // All rights reserved. | |
| // | |
| // Redistribution and use in source and binary forms, with or without | |
| // modification, are permitted provided that the following conditions are met: | |
| // | |
| // 1. Redistributions of source code must retain the above copyright notice, this | |
| // list of conditions and the following disclaimer. | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "chunk.h" | |
| namespace rg | |
| { | |
| TileChunk::TileChunk(sf::Texture &tileSet, const size_t tileSize) : m_tileSize(tileSize) | |
| { | |
| m_tileSet = &tileSet; | |
| m_vbo = sf::VertexBuffer(sf::Quads, sf::VertexBuffer::Dynamic); | |
| m_vbo.create(CHUNK_SIZE * CHUNK_SIZE * 4); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ---------------------------------------------------------------------------- | |
| // CHROMATICABERRATION.CPP | |
| // | |
| // This file defines the C++ component of the chromatic aberration post processing shader. | |
| // ---------------------------------------------------------------------------- | |
| #include "BaseVSShader.h" | |
| #include "SDK_screenspaceeffect_vs20.inc" | |
| #include "chromatic_aberration_ps20.inc" | |
| #include "chromatic_aberration_ps20b.inc" |