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 os.path | |
import struct | |
import sys | |
import traceback | |
import zlib | |
if len(sys.argv) < 2: | |
print >> sys.stderr, "usage: %s <filename>" % sys.argv[0] | |
sys.exit(1) | |
filename = sys.argv[1] |
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 | |
/** | |
* Return true if the email address is valid. | |
* From http://www.linuxjournal.com/article/9585. | |
* | |
* @return bool | |
*/ | |
function isValidEmail($email) { | |
$isValid = true; |
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
/** | |
* Spinning cube in Molehill. | |
* http://ltslashgt.com/2011/02/28/molehill-spinning-cube/ | |
*/ | |
package { | |
import com.adobe.utils.AGALMiniAssembler; | |
import flash.display.Sprite; | |
import flash.display.Stage3D; | |
import flash.display.StageAlign; | |
import flash.display.StageScaleMode; |
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
// ================================================================================ | |
// | |
// ADOBE SYSTEMS INCORPORATED | |
// Copyright 2010 Adobe Systems Incorporated | |
// All Rights Reserved. | |
// | |
// NOTICE: Adobe permits you to use, modify, and distribute this file | |
// in accordance with the terms of the license agreement accompanying it. | |
// | |
// ================================================================================ |
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 flash.Boot; | |
import flash.display.Sprite; | |
import flash.display.StageAlign; | |
import flash.display.StageQuality; | |
import flash.display.StageScaleMode; | |
import flash.events.Event; | |
import nape.callbacks.Callback; | |
import nape.callbacks.CbType; | |
import nape.dynamics.Arbiter; |
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
diff --git a/nape/cx-src/nape/dynamics/Collide.cx b/nape/cx-src/nape/dynamics/Collide.cx | |
index a9159c6..713de8c 100644 | |
--- a/nape/cx-src/nape/dynamics/Collide.cx | |
+++ b/nape/cx-src/nape/dynamics/Collide.cx | |
@@ -395,22 +395,28 @@ class RayCast { | |
static public inline var FAIL:Float = 10.0; //>1 for easy comparisons | |
static public inline function rayCircle(r:Ray,c:Circle) { | |
- vec_new(ac); vec_sub(r.a,c.centre.p,ac); | |
- var A = vec_lsq(r.v); |
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
<type name="Test_TEST_BITMAP" base="Class" isDynamic="true" isFinal="true" isStatic="true"> | |
<extendsClass type="Class"/> | |
<extendsClass type="Object"/> | |
<accessor name="prototype" access="readonly" type="*" declaredBy="Class"/> | |
<factory type="Test_TEST_BITMAP"> | |
<extendsClass type="mx.core::BitmapAsset"/> | |
<extendsClass type="mx.core::FlexBitmap"/> | |
<extendsClass type="flash.display::Bitmap"/> | |
<extendsClass type="flash.display::DisplayObject"/> |
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 flash.display.Bitmap; | |
import flash.display.BitmapData; | |
import flash.display.Sprite; | |
import flash.display.StageAlign; | |
import flash.display.StageQuality; | |
import flash.display.StageScaleMode; | |
import flash.geom.Point; | |
import flash.geom.Rectangle; | |
import flash.events.Event; |
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 flash.display.Sprite; | |
import flash.display.StageAlign; | |
import flash.display.StageScaleMode; | |
import flash.events.Event; | |
import flash.utils.getTimer; | |
public class Game extends Sprite { | |
private var _ballX:Number; | |
private var _ballY:Number; |
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
// Extract a PAK file (from Quake 1 and 2) | |
#include <errno.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/stat.h> | |
typedef struct { | |
char id[4]; |