Skip to content

Instantly share code, notes, and snippets.

@HumanGamer
HumanGamer / poke.bat
Created November 20, 2019 22:55
Scripts for building Pokemon Ruby from pret through WSL
@echo off
set distro=Debian
pushd %~dp0
if "%1"=="initwsl" (
echo Configuring WSL...
wsl -d %distro% -u root -e bash -l -i -c "sudo ln -s /proc/self/mounts /etc/mtab"
wsl -d %distro% -u root -e bash -l -i -c "apt update && apt -y install wget xz-utils libxml2 gnupg build-essential libpng-dev"
@HumanGamer
HumanGamer / configure-pret.sh
Created November 20, 2019 22:08
Configures WSL for pret
#!/bin/sh
wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb
dpkg -i devkitpro-pacman.deb
rm devkitpro-pacman.deb
dkp-pacman -Sy --noconfirm
dkp-pacman -S --noconfirm gba-dev
@HumanGamer
HumanGamer / make-max
Created November 20, 2019 21:47
Shell script to run make with all logical cores
#!/bin/sh
cores=$(nproc)
make -j$cores $@
@HumanGamer
HumanGamer / FlyffTerribleCode.md
Last active August 5, 2019 17:10
The worst code I think I've ever seen...

Worst Code Ever

This is the worst code I've ever seen, even worse than Terraria and it's in an MMORPG called flyff.

Basically, when compiling under x64 it fails to save the game due to an invalid pointer.

How does this happen?

Sending the value to the other thread: