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 <iostream> | |
#include <string> | |
#include <vector> | |
static std::vector<int> map; | |
static int mapSize = 3; | |
int initMap() | |
{ | |
for (int i = 0; i < (mapSize * mapSize); i++) { |
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
# Run image and keep it going. | |
docker run --name alpine_os -it -d alpine tail -f /dev/null |
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
// Example program | |
#include <iostream> | |
#include <string> | |
#include <unordered_map> | |
#include <vector> | |
#include <cstring> | |
#include <assert.h> | |
using namespace std; | |
template<typename T> |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"os/exec" | |
"reflect" | |
"regexp" | |
"strings" |
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
// | |
// Created by Victor Holt on 3/18/2017. | |
// | |
#include <GameSencha/Game/Graphics/CustomMesh.h> | |
#include <GameSencha/Core/SenchaLogger.h> | |
gs_namespaces | |
//! Constructor. | |
//! \param context | |
//! \param isDynamic |
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
// | |
// Created by Victor Holt on 3/18/2017. | |
// Reference: (rbnpontes) http://discourse.urho3d.io/t/a-mesh-generator/2361 | |
// | |
#pragma once | |
#include <GameSencha/Common/GameSenchaBasePCH.h> | |
gs_nsstart | |
#define CM_MAX_FACES_PER_GEOM_SM 500 | |
#define CM_MAX_FACES_PER_GEOM_LG 25000 |
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
// Storage for our 16bit pixel. | |
union uimage_data | |
{ | |
uint16_t s; | |
uint8_t b[2]; | |
}; | |
Image* LoadHeightmap(const String& heightmapFilePath) | |
{ | |
std::vector<unsigned char> pngData; |
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
// | |
// Created by Victor Holt on 5/1/2017. | |
// | |
#include <cor-game/components/FoliageComponent.h> | |
#include <cor-game/GameEngine.h> | |
#include <cor-game/terrain/Grid.h> | |
#include <cor-game/terrain/GridCell.h> | |
#include <gs-common/helpers/NumberHelper.hpp> | |
#include <gs-common/helpers/MathHelper.h> | |
#include <gs-common/core/SenchaThreadManager.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
// | |
// Created by Victor Holt on 5/1/2017. | |
// | |
#pragma once | |
#include <gs-common/PreCompiledHeadersUrho.h> | |
#include <gs-common/helpers/SimplePerlin.h> | |
#include <gs-common/helpers/Array2D.h> | |
#include <gs-graphics/CustomMesh.h> | |
using namespace Urho3D; | |
gs_nsstart |
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
// | |
// Created by Victor Holt on 3/18/2017. | |
// | |
#include <gs-graphics/CustomMesh.h> | |
using namespace Urho3D; | |
using namespace Sencha; | |
//! Constructor. | |
//! \param context | |
//! \param isDynamic |
NewerOlder