This file contains 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
; Retro-Halo by Eddy Fries - edf@halcyon.com | |
processor 6502 | |
include vcs.h | |
org $F000 | |
; Compile switches | |
NTSC = 0 | |
PAL = 1 | |
PAL60 = 2 |
This file contains 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
// CRC tables, generated at compile time using C++11 constexpr, C++14 utility library, variadic template, initializer list | |
// Compiled and tested using msvc 2015, gcc 6.2, and clang 3.9.0. | |
// clang requires -std=c++14 -ftemplate-depth=512 | |
#include <stdint.h> | |
#include <utility> | |
template<typename T, T Poly> | |
struct CrcTable { | |
static constexpr T Generate(T v, int r = 8) { |
This file contains 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) 2016 StagPoint Software | |
namespace StagPoint.Networking | |
{ | |
using System; | |
using UnityEngine; | |
using UnityEngine.Networking; | |
/// <summary> | |
/// Provides some commonly-used functions for transferring compressed data over the network using |
This file contains 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
## Unity ## | |
*.cs diff=csharp text | |
*.cginc text | |
*.shader text | |
*.mat merge=unityyamlmerge eol=lf | |
*.anim merge=unityyamlmerge eol=lf | |
*.unity merge=unityyamlmerge eol=lf | |
*.prefab merge=unityyamlmerge eol=lf |
Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
This file contains 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
#pragma once | |
// This provides a library for stubbing and mocking C++ code as is. It works by requiring | |
// explicit hooks to be inserted into the code that is to be mocked. In a regular build, | |
// these hooks will do nothing. In a testing build, they will expand to calls into the | |
// framework here to allow the code being executed to be hijacked from outside. | |
// | |
// NOTE: Thread-safety! Arranging fakes must be done on a single thread. Using fakes can | |
// be done from multiple threads concurrently. | |
// |
This file contains 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
max(-x,-y) = -min(x,y) | |
min(-x,-y) = -max(x,y) | |
abs(x) = abs(-x) | |
abs(x) = max(x,-x) = -min(x,-x) | |
abs(x*a) = if (a >= 0) abs(x)*a | |
(a < 0) -abs(x)*a | |
// basically any commutative operation | |
min(x,y) + max(x,y) = x + y |
This file contains 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
public static class EvilStringHelper | |
{ | |
private static readonly Action<string, int, char> _setChar; | |
private static readonly Action<string, int> _setLength; | |
static EvilStringHelper() | |
{ | |
if (Environment.Version.Major < 4) | |
{ | |
MethodInfo setCharMethod = typeof(string).GetMethod( |