Skip to content

Instantly share code, notes, and snippets.

View flibitijibibo's full-sized avatar

Ethan Lee flibitijibibo

View GitHub Profile
@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 / 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 / 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
/* 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 / 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;
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 / avSpecFix.sh
Last active January 17, 2021 18:49
Run this to fix weird bitrot in Axiom Verge and also update to FNA3D and stuff
#!/bin/bash
# Axiom Verge FNA Update and Also Work Around A Bunch of Spec Violations Script
# Written by Ethan "flibitijibibo" Lee
#
# Put this in the Axiom Verge directory and run it. Not much to see here.
#
# FNA patch, if anyone wants it:
# https://gist.github.com/flibitijibibo/ffdd7c6fe32b9846a83807dab24be8fd
set -ex
#!/bin/bash
set -ex
cd "`dirname "$0"`"
# Start with the Kick environment
curl -LO https://github.com/flibitijibibo/MonoKickstart/archive/master.zip
unzip -j master.zip MonoKickstart-master/precompiled/*
rm master.zip kick.bin.osx kick.bin.x86_64.debug System.Xml.Linq.dll
@flibitijibibo
flibitijibibo / buildfnalibs.sh
Created May 20, 2021 19:31
Build script for FNA3D/FAudio
#!/bin/bash
run_builds() {
cd ~/libraries/$1
cd flibitBuild
make -j8
cd ../flibitBuildWin32
make -j8
cd ../flibitBuildWin64
make -j8
@flibitijibibo
flibitijibibo / SDLDirectPInvoke.cs
Last active July 13, 2021 21:01
Barfs out all the SDL P/Invoke functions needed to dynamically link
using System;
using System.Reflection;
static class Program
{
static void Main(string[] args)
{
MethodInfo[] methods = typeof(SDL2.SDL).GetMethods(BindingFlags.Public | BindingFlags.Static);
foreach (MethodInfo m in methods)
{