This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Converted from https://gist.github.com/chitchcock/5112270 | |
-- Requires LuaBitOp or LuaJIT (since LuaJIT comes with LuaBitOp) | |
local bit = require("bit") | |
local crcTable = { | |
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, | |
0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, | |
0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, | |
0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, | |
0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CRC16-CCITT */ | |
#include <stdlib.h> | |
const unsigned short crcTable[] = { | |
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, | |
0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, | |
0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, | |
0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, | |
0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, | |
0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Visualizer builder script | |
-- Copyright (c) 2018 MikuAuahDark | |
-- | |
-- This software is provided 'as-is', without any express or implied | |
-- warranty. In no event will the authors be held liable for any damages | |
-- arising from the use of this software. | |
-- | |
-- Permission is granted to anyone to use this software for any purpose, | |
-- including commercial applications, and to alter it and redistribute it | |
-- freely, subject to the following restrictions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; If you're using MSVC, use this DEF file or deHCA will complain | |
; about a nil value. Example command to build clHCA in Windows: | |
; > cl.exe /c /Ox /Ot /GL /arch:SSE2 /MD clHCA.c | |
; > link.exe /DLL /LTCG /DEF:clHCA.def /OUT:clHCA.dll clHCA.obj | |
; Then copy clHCA.dll to LOVE directory. | |
; The library name must be "clHCA" (clHCA.dll/libclHCA.so/libclHCA.dylib) | |
EXPORTS | |
clHCA_isOurFile0 | |
clHCA_isOurFile1 | |
clHCA_sizeof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 300 es | |
#define PIXEL PIXEL | |
#if !defined(GL_ES) && __VERSION__ < 140 | |
#define lowp | |
#define mediump | |
#define highp | |
#endif | |
#if defined(VERTEX) || __VERSION__ > 100 || defined(GL_FRAGMENT_PRECISION_HIGH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Some notice: | |
1. This code is compatible with LOVE 0.10.0, and LOVE 11.0 (probably later version too) | |
2. Audio must have sample rate of 28224Hz | |
3. Audio is encoded to 8bit PCM (128 denotes 0) then converted to PNG | |
]] | |
local ffi = require("ffi") | |
function love.conf(t) | |
t.window = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SRC_FILES := $(wildcard old/*.png) | |
DST_FILES := $(patsubst old/%.png,%.png,$(SRC_FILES)) | |
all: $(DST_FILES) | |
%.png: old/%.png | |
zopflipng $< --lossy_transparent --filters=01234mepb --iterations=10 $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dwordMultiply(a, b) | |
a = a % 4294967296 | |
b = b % 4294967296 | |
local ah, al = math.floor(a / 65536), a % 65536 | |
local bh, bl = math.floor(b / 65536), b % 65536 | |
local high = ((ah * bl) + (al * bh)) % 65536 | |
return ((high * 65536) + (al * bl)) % 4294967296 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* HCA2WAV */ | |
/* This is one shot tool, error handling is lazy, */ | |
/* memory may not be freed. Any efforts fixing this */ | |
/* is useless */ | |
#ifdef _MSC_VER | |
#define _CRT_SECURE_NO_WARNINGS | |
#define _CRT_SECURE_NO_DEPRECATE | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Script that monkeypatch LOVE Transform | |
-- to add 3D support | |
local love = require("love") | |
local t = love.math.newTransform() | |
local t2 = love.math.newTransform() | |
local transformMt = getmetatable(t) | |
local function applyDump(ts, ...) | |
t2:reset() | |
t2:apply(ts) |