Skip to content

Instantly share code, notes, and snippets.

View lardratboy's full-sized avatar

Brad P. Taylor lardratboy

View GitHub Profile
@lardratboy
lardratboy / BPTRenderMaterialAs.cs
Last active November 23, 2015 23:28
Unity3d Utility Extension to render a Material to a .PNG (or JPG)
using UnityEngine;
#if UNITY_EDITOR
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
#endif
@lardratboy
lardratboy / Test
Created February 4, 2015 23:11
Test
package test;
public class Test {
static int[][] MAP_A = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,1,1,0},
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ironictest
{
class Program
{
@lardratboy
lardratboy / PSD.h
Created December 11, 2014 02:26
This is an expanded version of the my PSD reader - handles layers, named alphas it is a bit messy but what living code isn't...
// Adobe Photoshop .PSD bitmap file loader
//
// Copyright (c) 2002, Brad P. Taylor, LLC
//
// All rights reserved, unauthorized reproduction prohibited
//
// -- FILE NOTES --
//
//////////////////////////////////////////////////////////////////////
@lardratboy
lardratboy / BPTDib.h
Created December 11, 2014 02:03
Another bit of code from BPainT this time from the windows display code
// BPTDib.h: interface for the BPTDib class.
//
// Copyright (c) 2000, Brad P. Taylor, LLC
//
// All rights reserved, unauthorized reproduction prohibited
//
// -- FILE NOTES --
//
//////////////////////////////////////////////////////////////////////
@lardratboy
lardratboy / BPTSRL.h
Created December 11, 2014 01:59
Adding some sample code for people to look at, here is a piece from BPainT this time
// BPTSRL.h: interface for the CBPTSRL class.
//
// Copyright (c) 2000, Brad P. Taylor, LLC
//
// All rights reserved, unauthorized reproduction prohibited
//
// -- FILE NOTES --
//
//////////////////////////////////////////////////////////////////////
@lardratboy
lardratboy / BPT_Pixels_2003.h
Last active August 29, 2015 14:09
Started looking at upgrading the pixel types used by the LSD engine, using this as an archive/reference.
// BPTLLC_Pixels.h
//
// Copyright (c) 2003, Brad P. Taylor, LLC
//
// All rights reserved, unauthorized reproduction prohibited
//
// -- FILE NOTES --
//
// **Portablilty warning**
//
@lardratboy
lardratboy / bpt_basic_phaser_prefabs.ts
Created August 29, 2014 19:59
my default base types for creating Phaser.Sprite and Phaser.Image prefabs for use with bpt_prefab.ts
// Author Brad P. Taylor (bradptaylor+github@gmail.com) license MIT
///<reference path="../../../../bower_components/phaser-official/build/phaser.d.ts"/>
///<reference path="./prefab.ts"/>
module bpt {
// ------------------------------------------------------------------------
export class SpritePrefab extends Phaser.Sprite {
@lardratboy
lardratboy / bpt_rope.ts
Created August 28, 2014 19:51
Phaser + PIXI Rope (quick hack until official support)
class Rope extends Phaser.Group {
constructor(game, texture, points) {
PIXI.Rope.call(this, texture, points);
super(game);
}
}
bpt.prefab.applyMixins_( Rope,[PIXI.Strip,PIXI.Rope] );
@lardratboy
lardratboy / bpt_widget.ts
Created August 28, 2014 18:44
Phaser bpt widget base (work in progress)
// Author Brad P. Taylor (bradptaylor+github@gmail.com) license MIT
export class WidgetPartDef<T> {
constructor( public Type:T, public regex:RegExp, public required:boolean = true ) {}
}
export class Widget<T> extends Panel {
constructor(game, public parts:T ) {