Skip to content

Instantly share code, notes, and snippets.

View flibitijibibo's full-sized avatar

Ethan Lee flibitijibibo

View GitHub Profile
diff --git a/src/Color.cs b/src/Color.cs
index 2499edc..817b67e 100644
--- a/src/Color.cs
+++ b/src/Color.cs
@@ -1392,6 +1392,24 @@ namespace Microsoft.Xna.Framework
private set;
}
+ public static Color CustomRed
+ {
@flibitijibibo
flibitijibibo / SpriteDepthTest.cs
Created September 24, 2020 01:41
Batching/Sorting accruacy test for SpriteBatch
/* SpriteBatch Stress Test
* 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.Diagnostics;
/* Adobe Sucks - Image Comparison Program for Checking Creative Suite Fuckups
* Written by Ethan "flibitijibibo" Lee
* http://www.flibitijibibo.com/
*
* Released under public domain.
* No warranty implied; use at your own risk.
*
* How to Build:
* cc adobesucks.c `sdl2-config --cflags --libs` -lSDL2_image
*/
@flibitijibibo
flibitijibibo / flibitAMD.txt
Created August 20, 2019 19:19
Steam info for flibitAMD lab machine
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
@flibitijibibo
flibitijibibo / findDejaVuSans.h
Created July 18, 2019 16:40
Replacement for hardcoded font paths
/* findDejaVuSans - Quick function to find DejaVuSans.ttf
*
* Copyright (c) 2019 Ethan Lee
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
* the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
@flibitijibibo
flibitijibibo / wmpcvt.sh
Created April 14, 2019 23:24
Convert WMA/WMV to Vorbis/Theora, useful for XNA Windows games
#!/bin/bash
set -e
find -name "*.wma" -exec bash -c 'ffmpeg -i "{}" -q:a 10 "${0/.wma}.ogg"' {} \;
find -name "*.wmv" -exec bash -c 'ffmpeg -i "{}" -q:v 10 -q:a 10 "${0/.wmv}.ogv"' {} \;
@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

@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 / 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 / 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