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
unit BitStream; | |
interface | |
uses fgl; | |
type | |
TBitReader = class | |
private | |
FBuffer: PByte; |
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
#define STB_IMAGE_IMPLEMENTATION | |
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#define STBI_ONLY_PNG | |
#define STBI_ONLY_JPEG | |
#define STBI_ONLY_BMP | |
#define STBI_ONLY_GIF | |
#include "stb_image.h" | |
#include "stb_image_write.h" |
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
// gcc -DHOOKDLL -shared -o bin/st-alt-hook.dll st-alt-hook.c | |
// gcc bin/st-alt-hook.dll -mwindows st-alt-hook.c -o bin/st-alt-hook.exe | |
#include <windows.h> | |
#ifdef HOOKDLL | |
// *************** DLL *************** | |
static HHOOK hKeyboardHook = 0; |
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
<?php | |
require_once 'vendor/autoload.php'; // or however you load Twig | |
require_once 'Lexer.php'; | |
require_once 'Indent.php'; | |
$twig = new Twig_Environment(new Twig_Loader_Filesystem('templates')); | |
$twig->addExtension(new Indent_Twig_Extension()); | |
$twig->setLexer(new Indent_Twig_Lexer($twig)); |
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
skeleton | |
bone l50 | |
@[red] :circle d30 t0 f#F00 | |
@[blue] :circle d30 t0 f#00F | |
@line :path | |
L 0,0:handle | |
bone.handle | |
anim "test" 20fps | |
bone 40:sio |
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
# overridable variables: | |
# * project -> defaults to parent dir basename | |
# * src-root -> defaults to src | |
# * out-root -> defaults to bin | |
# * debug -> define it to anything for debug mode | |
# * platform -> possible values are win32,osx,linux,ios,iossim | |
# * inc, inc-* -> where * is the platform | |
# * lib, lib-* -> where * is the platform | |
# * flg, flg-* -> where * is the platform | |
# * ios.version -> installed sdk version |
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
# overridable variables: | |
# * project -> defaults to parent dir basename | |
# * src-root -> defaults to src | |
# * out-root -> defaults to bin | |
# * debug -> define it to anything for debug mode | |
# * platform -> possible values are win32,osx,linux,ios,iossim | |
# * inc, inc-* -> where * is the platform | |
# * lib, lib-* -> where * is the platform | |
# * flg, flg-* -> where * is the platform | |
# * ios.version -> installed sdk version |
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
// 2D triangulation using ear clipping by urraka | |
// | |
// Usage: | |
// std::vector<vec2> polygon; | |
// std::vector<int> result = math::triangulate<int>(polygon); | |
// | |
// * vec2 is anything that has float x,y | |
// * result is a list of indices that point to the polygon vector (a triangle is defined every 3 indices). | |
#include <vector> |