Skip to content

Instantly share code, notes, and snippets.

Jon Ong jonongjs

Block or report user

Report or block jonongjs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jonongjs
jonongjs / Entity.hx
Last active Mar 28, 2016 — forked from back2dos/Entity.hx
Macro based entity.
View Entity.hx
package;
import haxe.macro.Expr;
#if macro
using haxe.macro.Context;
using haxe.macro.Tools;
#end
class Entity {
@jonongjs
jonongjs / FRESteamWorks.hx
Last active Mar 20, 2016
Native Steam integration in Haxe, FRESteamWorks-style
View FRESteamWorks.hx
package com.amanitadesign.steam;
/*
* Adapted from FRESteamWorks (https://github.com/Ventero/FRESteamWorks).
* TODO: refactor by implementing with @:native instead.
* Original copyright notices below.
*
* Created by Ventero <http://github.com/Ventero>
* Copyright (c) 2012-2013 Level Up Labs, LLC. All rights reserved.
*/
@jonongjs
jonongjs / PKGBUILD
Created Aug 27, 2015
Haxe 3.1.3 PKGBUILD
View PKGBUILD
# Contributor: Dmitry V. Luciv <dluciv@dluciv.name>
# Maintainer: Dmitry V. Luciv <dluciv@dluciv.name>
pkgname=haxe3-bin
pkgver=3.1.3
pkgrel=2
pkgdesc="HaXe (pronounced as hex) is an open source programming language, multiple backends, mostly web-targeted."
url="http://haxe.org/"
license=('GPL')
arch=("i686" "x86_64")
@jonongjs
jonongjs / Main.hx
Last active Aug 29, 2015
Getting started with Heaps
View Main.hx
class Main extends hxd.App {
var bmp : h2d.Bitmap;
override function init() {
var tile = h2d.Tile.fromColor(0xFF0000, 100, 100);
bmp = new h2d.Bitmap(tile, s2d);
bmp.x = s2d.width * 0.5;
bmp.y = s2d.height * 0.5;
}
@jonongjs
jonongjs / OpenALChannel::release
Last active Aug 29, 2015
Hacks to fix OpenFL 1.4.0 audio problems
View OpenALChannel::release
--- a/project/src/openal/OpenALSound.cpp
+++ b/project/src/openal/OpenALSound.cpp
+ void OpenALChannel::release()
+ {
+ if (mSourceID)
+ alDeleteSources(1, &mSourceID);
+ mSourceID = 0;
+ }
@jonongjs
jonongjs / checkerboard.sh
Created May 15, 2014
Quick and dirty script to generate a checkerboard transition spritesheet with ImageMagick.
View checkerboard.sh
#!/bin/bash
# Quick script to generate a checkerboard transition spritesheet with ImageMagick.
# This script makes PNGs with the names 'tile*.png', 'tmp.png', 'phase1_*.png',
# 'phase2_*.png' and 'checkerboard.png' in the current directory.
SIDE=20 # Width in pixels for each square
MAXN=5 # Number of steps - 1 to fill a square
TILES_ACROSS=16 # Number of squares across the checkerboard
TILES_DOWN=9 # Number of squares down the checkerboard
You can’t perform that action at this time.