Skip to content

Instantly share code, notes, and snippets.

View flibitijibibo's full-sized avatar

Ethan Lee flibitijibibo

View GitHub Profile
public class SomeThang
{
int whoCares;
public SomeThang(int whatever)
{
whoCares = whatever;
}
static public implicit operator bool(SomeThang someThang)
{
@flibitijibibo
flibitijibibo / NotProgram.cs
Created June 25, 2014 20:26
FNA Save Migration Code Pile
/* This is a snippet of code from the FNA version of Rogue Legacy.
*
* A recent FNA update fixed Storage accuracy, affecting save locations:
* https://plus.google.com/102593483001615978126/posts/7qE6nJGcdL2
* As a result, games like Rogue Legacy now need a migration process.
*
* This is the first one I've written, and I'm posting it here for when
* I take care of the rest of my affected ports.
*
* -flibit
@flibitijibibo
flibitijibibo / SpriteFontTest.cs
Created July 26, 2014 16:17
SpriteFont Accuracy Test
/* SpriteFont Accuracy Test
* Written by Ethan "flibitijibibo" Lee
* http://www.flibitijibibo.com/
*
* Released under public domain.
* No warranty implied; use at your own risk.
*/
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@flibitijibibo
flibitijibibo / ContentCaseCheck.cs
Created February 26, 2015 18:19
I wrote this for one of my smaller ports. Seems to work well enough for basic content management!
/* ContentCaseCheck - XNA Content Case Sensitivity Verification Tool
* Written by Ethan "flibitijibibo" Lee
* http://www.flibitijibibo.com/
*
* Released under public domain.
* No warranty implied; use at your own risk.
*/
using System;
using System.IO;
@flibitijibibo
flibitijibibo / SDL_GameController.txt
Last active November 1, 2015 23:20
These changes allow for a working experience out of the box with SDL_GameController.
export SDL_GAMECONTROLLERCONFIG="0600000057696920552047616d655000,Wii U GamePad (libdrc),platform:Linux,x:b12,a:b14,b:b15,y:b13,back:b2,guide:b1,start:b3,dpleft:b11,dpdown:b8,dpright:b10,dpup:b9,leftshoulder:b5,lefttrigger:b7,rightshoulder:b4,righttrigger:b6,leftstick:b23,rightstick:b22,leftx:a0,lefty:a1,rightx:a2,righty:a3,"
@flibitijibibo
flibitijibibo / Makefile
Created April 27, 2013 14:02
Why do I even have this
# Makefile for "int main;" C Program
# Written by Ethan "flibitijibibo" Lee
ifeq ($(shell uname), Darwin)
ASMPARAM = -mllvm --x86-asm-syntax=intel
else
ASMPARAM = -masm=intel
endif
all:
@flibitijibibo
flibitijibibo / fix_steam_linux.sh
Created December 18, 2015 08:31
If the Steam runtime is giving you trouble, add this to the game's launcher script. Originally used in The Cave, ported by Edward Rudd.
# Thanks Edward!
remove_runtime() {
# strip out STEAM RUNTIME from the path
VAR="$1"
declare -a paths
good_paths=""
OLDIFS=$IFS
IFS=:
paths=(${VAR})
IFS=$OLDIFS
@flibitijibibo
flibitijibibo / jacket.c
Created January 29, 2016 17:54
"Nascar Jacket" Generator, which I wrote to make an image for my MAGFest 2016 slides
/* "Nascar Jacket" Image Generator
* Written by Ethan "flibitijibibo" Lee
*
* Released under public domain.
* No warranty implied, use at your own risk.
*
* Directions:
* - Grab a bunch of header.jpg files from Steam store pages
* - Line them up in zero-indexed numerical order (0.jpg, 1.jpg, ...)
* - Edit the defines below to get the jacket you want
@flibitijibibo
flibitijibibo / flibitSave.c
Last active November 21, 2017 23:31
flibit's XDG/OSX Save and Config Folder Thing
/* XDG/OSX Save and Config Folder Thing
* Written by Ethan "flibitijibibo" Lee
* http://www.flibitijibibo.com/
*
* Released under public domain.
* No warranty implied; use at your own risk.
*/
#include <stdio.h>
#include <stdlib.h>
@flibitijibibo
flibitijibibo / Event_SDL.h
Last active April 11, 2018 18:15
I needed an equivalent to Win32's Event object, so here's an SDL version. Probably isn't good.
/* SDL-based Event Object Copycat
* Written by Ethan "flibitijibibo" Lee
*
* Released under public domain.
* No warranty implied; use at your own risk.
*/
#include <SDL2/SDL.h>
typedef struct EventObject EventObject;