Skip to content

Instantly share code, notes, and snippets.

View dotxnc's full-sized avatar

.xnc dotxnc

View GitHub Profile
@dotxnc
dotxnc / lcd_game.lua
Last active February 12, 2017 03:55
#!/usr/bin/luajit
local wpi = require ("wiringlua")
local ADDR = 0x27
local BLEN = 1
local fd = 0
function write_word(data)
local temp = data
#!/usr/bin/luajit
local wpi = require ("wiringlua")
local ADDR = 0x27
local BLEN = 1
local fd = 0
function write_word(data)
local temp = data
@dotxnc
dotxnc / stb_image_aug.c
Created August 24, 2016 13:44
modified stb_image_aug.c found in SOIL library so that it works in MinGW.
/* stbi-1.16 - public domain JPEG/PNG reader - http://nothings.org/stb_image.c
when you control the images you're loading
QUICK NOTES:
Primarily of interest to game developers and other people who can
avoid problematic images and only need the trivial interface
JPEG baseline (no JPEG progressive, no oddball channel decimations)
PNG non-interlaced
BMP non-1bpp, non-RLE
@dotxnc
dotxnc / makefile
Created July 27, 2016 10:43
moonscript makefile
DIRS = .
MOONS = $(wildcard $(DIRS:=/*.moon))
all: compile
love love/
compile:
@echo compiling ... $(MOONS)
moonc -t love/ $(MOONS)
@dotxnc
dotxnc / ResourceLoader.cpp
Created March 16, 2016 02:47
Resource Loader
#include "ResourceLoader.h"
bool ResourceLoader::m_done = false;
std::string ResourceLoader::datafolder = "data";
std::map<std::string, sf::Texture> ResourceLoader::m_textures;
std::map<std::string, sf::Font> ResourceLoader::m_fonts;
std::map<std::string, sf::SoundBuffer> ResourceLoader::m_sounds;
void ResourceLoader::m_load()
{