Skip to content

Instantly share code, notes, and snippets.

Kyle Halladay khalladay

View GitHub Profile
@khalladay
khalladay / tiles.c
Created Apr 11, 2017
Header Tile Data for GBA By Example 3
View tiles.c
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 Mar 29, 2017
DevKitPro Test
View Test.c
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
View PackRGB.cs
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 Nov 13, 2016
Unity Texture Atlasser
View AtlasImporter.cs
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 Jun 2, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// 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 Dec 16, 2015
Bit Flag Example
View gist:5432282
enum ShipAttribute
{
EnergyShield = 0x1,
PlasmaCannon = 0x2,
IonThrusters = 0x4,
Teleporter = 0x8,
FireSuppression = 0x10
};
You can’t perform that action at this time.