Skip to content

Instantly share code, notes, and snippets.

@npretto
npretto / MacroTools.hx
Last active August 29, 2015 14:12
MacroTools
package;
import haxe.macro.Context;
import haxe.macro.Expr;
import sys.FileSystem;
using sys.io.File;
type direction = Up | Right | Down | Left;;
type position = Pos of int * int * direction;;
let point_of (Pos(x,y,dir)) = (x,y);;
let p = Pos(3,4,Up);;
point_of p;;
@npretto
npretto / Slice9.hx
Last active December 29, 2015 03:29
9path/slice9 class for flambe
package tools;
import flambe.display.ImageSprite;
import flambe.display.Texture;
import flambe.System;
/**
* ...
* @author lordkryss
*/