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
-- libhonoka2 FFI binding | |
-- Copyright (c) 2038 Dark Energy Processor Corporation | |
-- | |
-- Permission is hereby granted, free of charge, to any person obtaining a | |
-- copy of this software and associated documentation files (the "Software"), | |
-- to deal in the Software without restriction, including without limitation | |
-- the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
-- and/or sell copies of the Software, and to permit persons to whom the | |
-- Software is furnished to do so, subject to the following conditions: | |
-- |
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
-- A very basic Lua 5.2 FFI binding. | |
-- Tested under LuaJIT FFI, but should work under Facebook LuaFFI too | |
-- This assume: | |
-- - lua_Number is double | |
-- - lua_Integer is ptrdiff_t (equal to size_t?) | |
-- - lua_Unsigned is unsigned int | |
-- Released under public domain | |
local ffi = require("ffi") | |
local lua52 = ffi.load("lua52") |
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
-- luagvect | |
-- GLSL-like vector & matrix function | |
local vec = {} | |
local math = require("math") | |
------------------ | |
-- Vector class -- | |
------------------ |
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 $@ |