Skip to content

Instantly share code, notes, and snippets.

View flibitijibibo's full-sized avatar

Ethan Lee flibitijibibo

View GitHub Profile
@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 / sa2unpak.c
Last active March 31, 2020 20:41
I wrote this because I really like Sonic Adventure 2, and I take games I like apart, nowadays to see how portable they might be. The shaders found in the PC version can be read and rebuilt by MojoShader! So that'd settle that part of it.
/* SA2UNPAK - Sonic Adventure 2 PC Shader obj.pak Extraction Program
* Written by Ethan "flibitijibibo" Lee
* http://www.flibitijibibo.com/
*
* Released under public domain.
* No warranty implied; use at your own risk.
*
* I wrote this to extract the D3D9 shader binary files for parsing
* in MojoShader. This may not work with any other file in the game.
* Also, I am not porting SA2 to Linux. Though I really would like to.
@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 / fnaUpdate.sh
Last active April 5, 2024 06:00
Use this to update a game's FNA installation!
#!/bin/bash
# FNA Update Script
# Written by Ethan "flibitijibibo" Lee
#
# Released under public domain.
# No warranty implied; use at your own risk.
#
# Run this script in the game's executable folder.
#
# This script requires the following programs:
@flibitijibibo
flibitijibibo / flibitPackaging.md
Created June 17, 2016 16:00
Hope you like reading ldd output!

A week ago I was CC'd in on a thread about Linux packaging, and how to avoid doing it the wrong way (i.e. RPM, Deb, etc.). I've always used MojoSetup and I've never forced distributions to do any additional work, but this is still a new concept to a lot of people. Additionally, Amos suggested that I expand on Itch's FNA appendix, so here's a guide on how I package my games.

This is a bit of an expansion on my MAGFest 2016 presentation, which you can find here:

http://www.flibitijibibo.com/magfest2016/

https://www.youtube.com/watch?v=B83CWUh0Log

I would recommend looking at that first! After that, read on...

@flibitijibibo
flibitijibibo / stardewFNA.sh
Last active February 27, 2024 04:35
Script for converting Stardew Valley for Windows (XNA) to Linux/macOS-compatible (FNA)
#!/bin/bash
# Stardew Valley XnaToFna Automation Script
# Written by Ethan "flibitijibibo" Lee
#
# Usage: Place in Stardew Valley folder, run from terminal.
# NOTE: Be sure you have Mono 4.4 or newer! Stardew's XML structures need it!
# Be smart. Be safe.
set -e
@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;
@flibitijibibo
flibitijibibo / steamedhams.cs
Created July 6, 2018 18:26
VideoPlayer demo with reflection used to access the sound stream directly
/* VideoPlayer DynamicSoundEffectInstance Reverb/Filter Test Program
* 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.Reflection;
@flibitijibibo
flibitijibibo / README.md
Last active December 18, 2018 19:45
flibit's game list for FAudio/XAudio2 research. Not official, not important, probably better off not reading it unless you're doing research yourself.

UPDATE: Thanks to my current partnerships I'm now able to access various games on Steam as I need them. This document is now (mostly) obsolete, unless you just want to give me keys for no reason at all.

This is my internal hit list for researching XAudio2, to aid in developing FAudio.

When working on large amounts of games in an unofficial capacity, it can be difficult finding which games even have XAudio2 in the first place, let alone use a feature set that we can take apart and implement. Generally you have to Google the game with variants of "xaudio2" and pray that a support ticket comes up (most of the time, nothing comes up), though occasionally you get lucky and it shows up in a database like this.

Even then, once you have a list, you have to figure out how to work with your budget - sure, it's a tax writeoff, but to spend money you usually need to... er, have money. The tradition up to now was to use a small Steam Wallet alon