Skip to content

Instantly share code, notes, and snippets.

View vasumahesh1's full-sized avatar

Vasu Mahesh vasumahesh1

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>README</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
@vasumahesh1
vasumahesh1 / AzuraTimer.cpp
Last active October 26, 2016 18:19
Game Timer Source File
#include "AzuraTimer.h"
#include <exception>
#include <stdint.h>
using namespace Azura;
/// <summary>
/// Constructor for Default Stopwatch Config
/// </summary>
Timer::Timer() :
@vasumahesh1
vasumahesh1 / AzuraTimer.h
Last active October 26, 2016 18:19
Game Timer Header File
#pragma once
#include "Common.h"
#include "boost/function.hpp"
using namespace std;
namespace Azura
{
typedef boost::function<void()> AzuraBasicCallback;
@vasumahesh1
vasumahesh1 / scaled.h
Created October 23, 2016 11:33
Header file for the Perlin Terrain Gen.
#pragma once
namespace Scaled
{
class Generator
{
static int originalPermutation[256];
int perm[512];
int mapHeight;
int mapWidth;
@vasumahesh1
vasumahesh1 / perlin-2d.cpp
Created October 23, 2016 11:30
C++ Perlin Noise - Used in my ScaledC Library for terrain generation
#include "Scaled.h"
#include <stdexcept>
using namespace std;
namespace Scaled
{
// Hash Lookup defined by Ken Perlin.
// Randomly arranged array of all numbers from 0-255 inclusive.
cas, err := adapter.Bucket.Get(id, &document.Doc)
if err == "Key not found." {
// 404 Error
}
{
"error": true,
"code": "DOC_INSERT_ERROR",
"subCodes": [
"DOC_ALREADY_EXISTS",
"DB_INSERT_CONFLICT"
],
"report": true,
"object": {
"store_id": "1234"
@vasumahesh1
vasumahesh1 / BlendStateGuide1.cpp
Last active March 28, 2016 20:52
Gist explaining Blending State and where to put what while coding
// Step 1 is to add:
// The alpha state to your Mesh Object.
// In my case I have a base MeshObject which is derived to all other objects
// -- MeshObject.h
ref class MeshObject
{
//
// Other code
//
ref class ResourceManager
{
internal :
ResourceManager(std::shared_ptr<DX::DeviceResources>& deviceResources);
// Main Init Task
Concurrency::task<void> Init();
auto GetTiles() { return m_tiles; }