Skip to content

Instantly share code, notes, and snippets.

@0x0ade
0x0ade / fez_readers_strip.sh
Last active August 29, 2015 14:27
Strips most of the code from the decompiled FEZ content readers, making them easier to parse when automatically creating writers.
#!/bin/bash
for file in *.cs; do
perl -0777 -pi -e 's/(^(.|\n)*\{)|(\ \ )|(existingInstance\.)|((= |)input\.Read)|(\(.*\);)|(\ *return.*;)|(\ *\})|(if(.|\n)*new\ .*\);)//g' $file
perl -0777 -pi -e 's/^\s*\n//gm' $file
mv "$file" "`basename $file .cs`.txt"
done
Name String
Triles Object<Dictionary<int, Trile>>
TextureAtlas Object<Texture2D>
OnDeserialization
@0x0ade
0x0ade / +External mode, working
Created August 29, 2015 10:36
Two debug logs of FmbLib - one in +Unity mode, one in +External mode.
pre all: True: 3
Base typehandler: FmbLib.TypeHandlerBases.Fez.TrileSet.txt
Base typehandler: FmbLib.TypeHandlerBases.Fez.Trile.txt
pre: main: 2448
pre: Dictionary`2: 2457
Base typehandler: FmbLib.TypeHandlerBases.Fez.Trile.txt
pre: Vector3: 2498
post: Vector3: 2510
pre: Vector3: 2510
post: Vector3: 2522
@0x0ade
0x0ade / FmbLib position dump
Created September 5, 2015 15:23
To be diffed with the FEZMod patch_ContentReader position dump
Position pre main: 5617
Position pre String: 5618
Position post String: 5622
Position pre Vector3: 5622
Position post Vector3: 5634
Base typehandler: FmbLib.TypeHandlerBases.Fez.TrileFace.txt
Position pre TrileFace: 5635
Base typehandler: FmbLib.TypeHandlerBases.Fez.TrileEmplacement.txt
Position pre TrileEmplacement: 5636
Position post TrileEmplacement: 5648
@0x0ade
0x0ade / XnaToFna dependency list.txt
Last active November 14, 2015 21:44
Order in which assemblies need to be input to XnaToFna, ignoring the main game assembly (last one).
#Order in which assemblies need to be input to XnaToFna.
#The main game assembly (.exe) is not listed as it is always the last one.
#Non-game dependencies (System.*, XNA itself) aren't listed.
#This file may get parsed by XnaToFna in the future. Who knows.
#Escape from Minimalism (LD26)
LudumDare26GameLogic.dll #none
#Take Arms (Discord.* "framework"?)
diff --git a/src/Graphics/OpenGLDevice.cs b/src/Graphics/OpenGLDevice.cs
index f2451ec..d830a73 100644
--- a/src/Graphics/OpenGLDevice.cs
+++ b/src/Graphics/OpenGLDevice.cs
@@ -8,7 +8,7 @@
#endregion
#region DISABLE_FAUXBACKBUFFER Option
-#define DISABLE_FAUXBACKBUFFER
+// #define DISABLE_FAUXBACKBUFFER
@0x0ade
0x0ade / xna-touch-data.md
Last active June 22, 2018 14:57
XNA4 touch data

Main data:

XNA FNADroid FNA
ID Ascending HW / system identifier (1) Ascending, next free (Android-esque) Ascending, n-th touch
Desktop support None (Win7 only, stub) Disabled by default; FNA_TOUCH_FORCE_ENABLE Enabled
Multi-touch-capable Yes Yes Broken
MT Drag gestures First touch only Additional touches inherit first touch gesture ----

|

@0x0ade
0x0ade / throttle.sh
Last active September 20, 2019 01:16
#!/bin/bash
# throttle - utility throttling applications according to CPU temperature.
# Usage: throttle.sh <PID>
# Alternatively: throttle.sh <your command here>
# Version: 1
# Changelog:
# 1:
# * Configuration vars are only set if not already set (per-app config. via env.)
# * Added QUIET configuration
# * Added notify-send support
diff --git a/mojoshader.c b/mojoshader.c
index 90f0cf9..d897637 100644
--- a/mojoshader.c
+++ b/mojoshader.c
@@ -2205,9 +2205,11 @@ static void emit_GLSL_start(Context *ctx, const char *profilestr)
else
output_line(ctx, "precision mediump float;");
output_line(ctx, "precision mediump int;");
- output_line(ctx, "varying vec4 v_FrontColor;");
- output_line(ctx, "varying vec4 v_FrontSecondaryColor;");
@0x0ade
0x0ade / FNADroid-Graphics-Log.md
Last active January 20, 2017 14:29
Alternate title: "This could become a fun drinking game.md"

FNADroid graphics bug debugging log:

  • glDrawElements instead of glDrawRangeElements: Nope. Android monitor GL ES profiler behaves differently - glDrawElements calls are blue.
  • Manual texture mode changes: Changes got applied on both PC and Android, but it didn't magically fix any issues.

  • Replacing the effect of the vibrating membrane in the FEZ 32 bit ending with another one used in the game: MESH VISIBLE!
  • Textures and geometry seem fine (except when using HW instancing). Issue seems to be effect related.