Skip to content

Instantly share code, notes, and snippets.

@rioki
rioki / build_detect_platform
Last active December 27, 2015 16:29
leveldb Windows port
#!/bin/sh
#
# Detects OS we're compiling on and outputs a file specified by the first
# argument, which in turn gets read while processing Makefile.
#
# The output will set the following variables:
# CC C Compiler path
# CXX C++ Compiler path
# PLATFORM_LDFLAGS Linker flags
# PLATFORM_LIBS Libraries flags
class Entity
{
private:
void add_component(Component* c)
{
components.push_back(c);
c->entity = this;
}
#include <stdio.h>
#include <SDL.h>
#include <SDL_image.h>
#include <GL/glew.h>
#include <glt.h>
#define TITLE "OpenGL 4.0 Scaffold"
#define WIDTH 1024
#define HEIGHT 768
@rioki
rioki / uv-bundle.bat
Created February 25, 2017 15:32
libuv Visual Studio Bundle generator
echo off
rem
rem libuv Visual Studio Bundle generator
rem Copyright 2017 Sean Farrell
rem
rem DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
rem Version 2, December 2004
rem
rem Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
@rioki
rioki / Makefile
Created October 26, 2012 07:05
Ultimate C++ Library Makefile
PACKAGE = myproj
VERSION = 0.0.0
CXX ?= g++ -std=c++0x
CXXFLAGS += -Iinclude -DVERSION=\"$(VERSION)\"
LDFLAGS +=
prefix ?= /usr/local
headers = $(wildcard include/*.h)
lib_hdr = $(wildcard src/*.h)
@rioki
rioki / ObjParser.cpp
Created January 26, 2018 18:36
OBJ Parser
//
// OBJ Parser
//
// Copyright (c) 2014 Sean Farrell
//
// 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
#include <stdio.h>
#include "test.h"
int register_parse_tests();
int main(int argc, char*argv[])
{
int r = 0;
r = register_parse_tests();
//
// Copyright (c) 2015 Sean Farrell
//
// 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:
//
// Copyright 2019 Sean Farrell <sean.farrell@rioki.org>
// This work is free. You can redistribute it and/or modify it under the
// terms of the Do What The Fuck You Want To Public License, Version 2,
// as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
#ifndef _ROUND_ROBIN_H_
#define _ROUND_ROBIN_H_
#include <array>
// PID Controller
// Copyright 2017 Sean Farrell <sean.farrell@rioki.org>
//
// This program is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What The Fuck You Want
// To Public License, Version 2, as published by Sam Hocevar.
// See http://www.wtfpl.net/ for more details.
#include "PidController.h"