Skip to content

Instantly share code, notes, and snippets.

View Fireboyd78's full-sized avatar

Mark Ludwig Fireboyd78

View GitHub Profile
@Fireboyd78
Fireboyd78 / media\lua\client\UI\CTagsPanel.lua
Created February 8, 2024 05:13
PZ ContainerTags - Right-click and drag to move the icon around
--[[
Modded script for PZ ContainerTags mod:
- https://steamcommunity.com/sharedfiles/filedetails/?id=3066276504
- Original code belongs to Dismellion
Edited on 2/7/2024 by Dr. Spoonman/Fireboyd78:
- Added the ability to move the icon by holding down the right-mouse button and dragging.
- Refer to comments below for more information.
TODO: Save config options somewhere?
@Fireboyd78
Fireboyd78 / brainfuck.cpp
Created April 19, 2018 05:55
C++ Template Brain Fuck
struct badType;
template <typename TType = badType>
struct type_decl {
static constexpr const char * format_string() {
return (std::is_integral_v<TType>
? "%d"
: (std::is_floating_point_v<TType>
? "%f"
: (std::is_pointer_v<TType>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
namespace XBox.IO
{
@Fireboyd78
Fireboyd78 / unswizzle.cs
Created November 7, 2017 08:20
[PS2] 4-bit Texture Unswizzling Code
public static byte[] UnSwizzle4(byte[] buffer, int width, int height, int where)
{
// HUGE THANKS TO:
// L33TMasterJacob for finding the information on unswizzling 4-bit textures
// Dageron for his 4-bit unswizzling code; he's truly a genius!
//
// Source: https://gta.nick7.com/ps2/swizzling/unswizzle_delphi.txt
byte[] InterlaceMatrix = {
0x00, 0x10, 0x02, 0x12,