Skip to content

Instantly share code, notes, and snippets.

Avatar

Ethan Lee flibitijibibo

View GitHub Profile
@flibitijibibo
flibitijibibo / glon12.md
Last active March 21, 2023 18:08
GLon12 Instructions
View glon12.md
@flibitijibibo
flibitijibibo / MultiWindow.cs
Created February 8, 2022 17:38
FNA with Multiple Windows
View MultiWindow.cs
/* FNA MultiWindow Example
* Written by Ethan "flibitijibibo" Lee
* https://www.flibitijibibo.com/
*
* Released under public domain.
* No warranty implied; use at your own risk.
*/
using System;
using SDL2;
View titlebar.c
/* gcc -g -o titlebar titlebar.c `sdl2-config --cflags --libs`
* SDL_VIDEODRIVER=wayland ./titlebar
*/
#include <SDL.h>
int main(int argc, char **argv)
{
SDL_Window *window;
SDL_Renderer *renderer;
@flibitijibibo
flibitijibibo / SDLDirectPInvoke.cs
Last active July 13, 2021 21:01
Barfs out all the SDL P/Invoke functions needed to dynamically link
View SDLDirectPInvoke.cs
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)
{
@flibitijibibo
flibitijibibo / buildfnalibs.sh
Created May 20, 2021 19:31
Build script for FNA3D/FAudio
View buildfnalibs.sh
#!/bin/bash
run_builds() {
cd ~/libraries/$1
cd flibitBuild
make -j8
cd ../flibitBuildWin32
make -j8
cd ../flibitBuildWin64
make -j8
View steelassaultLinux.sh
#!/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 / 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
View avSpecFix.sh
#!/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
View AxiomVerge.diff
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
View SpriteDepthTest.cs
/* 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;
View adobesucks.c
/* 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
*/