View SheetSetup.js
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
var SheetSetup = SheetSetup || (function() { | |
'use strict'; | |
var settings = { | |
/** | |
* Set null to disable chat. | |
*/ | |
chatName: "Sheet Setup", | |
/** | |
* Set null to leave player name blank. |
View ShowAllScale.hx
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
package; | |
import openfl.display.Stage; | |
import openfl.Lib; | |
class ShowAllScale { | |
private static var nominalWidth:Int; | |
private static var nominalHeight:Int; | |
/** |
View CPPRandomSeed.hx
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
@:cppInclude('time.h') | |
class CPPRandomSeed { | |
public static function seed() { | |
#if cpp | |
untyped __cpp__('srand(time(NULL))'); | |
#end | |
} | |
} |
View SortFunctions.hx
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
class SortFunctions { | |
public static function alphabetical(a:String, b:String):Int { | |
if(a < b) { | |
return -1; | |
} else if(a > b) { | |
return 1; | |
} else { | |
return 0; | |
} | |
} |
View Tiles in View
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
package; | |
import openfl.Assets; | |
import openfl.Lib; | |
import openfl.display.Shape; | |
import openfl.display.Sprite; | |
import openfl.display.Tile; | |
import openfl.display.Tilemap; | |
import openfl.display.Tileset; | |
import openfl.events.Event; |
View ISODate.hx
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 2016 Joseph Cloutier | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
View GLCheck.hx
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
#if !flash | |
import openfl.errors.Error; | |
import openfl.gl.GL; | |
import haxe.PosInfos; | |
import haxe.Log; | |
/** | |
* Usage: Put "GLCheck.check()" before and after anything that you suspect is causing a | |
* GL error. If the second call displays the error, you've found the problem. If the |
View OrMacro.hx
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
import haxe.macro.Expr; | |
class OrMacro { | |
/** | |
* @return The first non-null argument. | |
*/ | |
public static macro function or(options:Array<Expr>):Expr { | |
var ifElseStatements:Expr = options[options.length - 1]; | |
var i:Int = options.length - 1; | |
while(i --> 0) { |