Skip to content

Instantly share code, notes, and snippets.

View khalladay's full-sized avatar

Kyle Halladay khalladay

View GitHub Profile
@khalladay
khalladay / tiles.c
Created April 11, 2017 11:13
Header Tile Data for GBA By Example 3
const unsigned short bgTiles[64] __attribute__((aligned(4)))=
{
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0101,0x0202,0x0101,0x0202,0x0101,0x0202,0x0101,0x0202,
0x0202,0x0101,0x0202,0x0101,0x0202,0x0101,0x0202,0x0101,
0x0101,0x0202,0x0101,0x0202,0x0101,0x0202,0x0101,0x0202,
0x0202,0x0101,0x0202,0x0101,0x0202,0x0101,0x0202,0x0101,
@khalladay
khalladay / Test.c
Created March 29, 2017 11:01
DevKitPro Test
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
#define REG_DISPLAYCONTROL *((volatile uint32*)(0x04000000))
#define VIDEOMODE_3 0x0003
#define BGMODE_2 0x0400
#define SCREENBUFFER ((volatile uint16*)0x06000000)
#define SCREEN_W 240
@khalladay
khalladay / PackRGB.cs
Created February 21, 2017 14:40
PackRGBTool
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEditor;
public class PackToRGB : EditorWindow
{
private Texture2D[] RGB;
@khalladay
khalladay / AtlasImporter.cs
Created November 13, 2016 01:04
Unity Texture Atlasser
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using System.IO;
public class AtlasImporter : AssetPostprocessor
{
private void OnPostprocessTexture(Texture2D import)
{
@khalladay
khalladay / 0_reuse_code.js
Created June 2, 2016 23:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@khalladay
khalladay / gist:5432282
Last active December 16, 2015 12:08
Bit Flag Example
enum ShipAttribute
{
EnergyShield = 0x1,
PlasmaCannon = 0x2,
IonThrusters = 0x4,
Teleporter = 0x8,
FireSuppression = 0x10
};