Skip to content

Instantly share code, notes, and snippets.

import sys
import argparse
def vlc_lzw_compress(data, nbit=8):
assert 1 < nbit < 9, 'nbit must satisfies, 1 < nbit < 9'
# LZW encoding
CLR = 1<<nbit
END = CLR+1
d = {}
00 int テクスチャのindex
02 int 色の量子化の種類 (1: luma, 2: chroma)
04 float[2] 回転その1
05 int[2] テクスチャの貼る数
06 nazo
07 nazo
09 float[3] 平行移動
0a float[2] 拡大
0b float[3] テクスチャ繰り返しのばらつき具合
0c bool 回転その2

About this document

This document is WIP.

This document gives you a techinial overview about Ninja Gaiden Sigma 2 (Ninja gaiden Master Collection PC)'s savedata.

You should be familiar with some programming language (C, C++, Java).

This document is written by Nozomi Miyamori and is in the Public Domain.

import math
import mmap
import sys
# Author: Nozomi Miyamori
# This program is in the Public Domain.
test_quan_table = [2, 1, 1, 1, 1, 0, 0, 0]
test_rate_table = [50, 40, 5, 4, 1, 0, 0, 0]
@nm004
nm004 / strtohex.py
Last active September 23, 2023 17:43
#
# strtohex - Read hex values in string representaion from command line and write them
# in byte representation out to stdout
#
# This software is in the public domain
#
import os, sys
os.write(1, b''.join( bytes.fromhex(s) for s in sys.argv[1:] ))
/*
* autoholdclick - auto clicking while holding a button (for Linux only).
*
* Build:
* cc -o autoholdclick autoholdclick.c $(pkg-config --cflags --libs libevdev)
*
* This software is in the public domain.
*/
#include <libevdev/libevdev-uinput.h>