Skip to content

Instantly share code, notes, and snippets.

@i30817
i30817 / dumpid.py
Created May 10, 2018 15:49
dump the serial/id of a rom.
#!/usr/bin/python3
import os.path
import hashlib
import signal
import sys
import re
import io
import traceback
import argparse
#!/usr/bin/env python3
from struct import pack, unpack
from datetime import date
from pathlib import Path
import os.path
import argparse
import sys
import re
from typing import List
#!/usr/bin/env python3
from struct import pack, unpack
from datetime import date
from pathlib import Path
import os.path
import argparse
import sys
import re
from typing import List
@i30817
i30817 / test_versions.sh
Created June 9, 2019 14:02
test hack versions in romhacking against local versions
#!/bin/bash
#cd to the script dir if executed from outside
SCRIPT_PATH=$(dirname "$(readlink -f "$0")")
cd "$SCRIPT_PATH"
if [ ! -t 1 ]; then #not from terminal
SCRIPT=$(basename "$(readlink -f "$0")")
SUBPROC=1 x-terminal-emulator --profile "$USER" --working-directory "$SCRIPT_PATH" -e "./$SCRIPT" &
exit 0
@i30817
i30817 / update_dats.sh
Created June 9, 2019 14:07
script to update romhacks dats using rhdnet and merging to a existing file
#!/bin/bash
#cd to the script dir if executed from outside
SCRIPT_PATH=$(dirname "$(readlink -f "$0")")
cd "$SCRIPT_PATH"
if [ ! -t 1 ]; then #not from terminal
SCRIPT=$(basename "$(readlink -f "$0")")
SUBPROC=1 x-terminal-emulator --profile "$USER" --working-directory "$SCRIPT_PATH" -e "./$SCRIPT" &
exit 0
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 472d69a..8225075 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -332,7 +332,22 @@ void ARX_Player_Rune_Add(RuneFlag _ulRune)
}
}
+ unsigned int v = player.rune_flags; // count the number of runes
+ unsigned int c;
@i30817
i30817 / retroplay_dat.sh
Created February 18, 2020 09:43
retroplay dat transformation test
#!/bin/bash
hash lftp 2>/dev/null || { echo >&2 "Program requires lftp but it's not installed. Aborting."; exit 1; }
hash xmlstarlet 2>/dev/null || { echo >&2 "Program requires xmlstarlet but it's not installed. Aborting."; exit 1; }
hash gunzip 2>/dev/null || { echo >&2 "Program requires gunzip but it's not installed. Aborting."; exit 1; }
hash mktemp 2>/dev/null || { echo >&2 "Program requires mktemp but it's not installed. Aborting."; exit 1; }
#cd to the script dir if executed from outside
SCRIPT_PATH=$(dirname "$(readlink -f "$0")")
cd "$SCRIPT_PATH"
@i30817
i30817 / create_m3u.sh
Last active September 8, 2022 21:29
create m3u for retroarch based on name
#!/usr/bin/env bash
me=$(basename "$0")
export me
function usage(){
cat >&2 <<ENDOFHELP
Usage: $me [-r|--relative] [-c|--children] [-h|--help] TARGET [DESTINATION]
$me examines rom media files in TARGET and subdirectories
and for each set of filenames that only differs from a media
#!/usr/bin/env bash
hash parted 2>/dev/null || { echo >&2 "Program requires parted but it's not installed. Exit."; exit 1; }
hash udisksctl 2>/dev/null || { echo >&2 "Program requires udisksctl but it's not installed. Exit."; exit 1; }
hash fdisk 2>/dev/null || { echo >&2 "Program requires fdisk but it's not installed. Exit."; exit 1; }
hash mkdosfs 2>/dev/null || { echo >&2 "Program requires mkdosfs but it's not installed. Exit."; exit 1; }
hash numfmt 2>/dev/null || { echo >&2 "Program requires numfmt but it's not installed. Exit."; exit 1; }
hash truncate 2>/dev/null || { echo >&2 "Program requires truncate but it's not installed. Exit."; exit 1; }
hash mcopy 2>/dev/null || { echo >&2 "Program requires mtools but it's not installed. Exit."; exit 1; }
hash mattrib 2>/dev/null || { echo >&2 "Program requires mtools but it's not installed. Exit."; exit 1; }
hash dd 2>/dev/null || { echo >&2 "Program requires dd but it's not installed. Exit."; exit 1; }
@i30817
i30817 / gist:b7cf69f544e50aa7f4d643c53f2e5838
Last active June 10, 2020 11:47
diff shadowrun disguises null pointer dragonfall to hongkong
public static CachedMesh Initiate(GameObject core, GameObject root, bool destroyImmediate = false)
{
Vector3 position = root.transform.parent.transform.position;
Quaternion rotation = root.transform.parent.transform.rotation;
root.transform.parent.transform.position = new Vector3(0f, 0f, 0f);
root.transform.parent.transform.rotation = new Quaternion(0f, 0f, 0f, 0f);
root.transform.localPosition = new Vector3(0f, 0f, 0f);
root.transform.localRotation = new Quaternion(0f, 0f, 0f, 0f);
SkinnedMeshRenderer[] componentsInChildren = core.GetComponentsInChildren<SkinnedMeshRenderer>();
List<Transform> list = new List<Transform>();