Skip to content

Instantly share code, notes, and snippets.

View maluramichael's full-sized avatar
🏠
Working from home

Michael maluramichael

🏠
Working from home
View GitHub Profile
@maluramichael
maluramichael / SConstruct
Created October 22, 2013 08:30
Sample SConstruct
import os
import sys
import glob
libraryDirs = [
os.environ['Boost_DIR'] + "\\lib64-msvc-9.0",
]
includeDirs = [
os.environ['Boost_DIR'],
@maluramichael
maluramichael / main.cpp
Created December 9, 2013 09:07
Array of pointers
#include <iostream>
using namespace std;
int main(){
int* pArr;
int arr[2] = {10,20};
pArr = arr;
int a = 20;
@maluramichael
maluramichael / gist:7976377
Created December 15, 2013 18:27
Static library
== Build library ==
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: libs/debug libs/release
g++ -o libs/release/src/Game.o -c -g -Ilibs/release/include -Iinclude src/Game.cpp
g++ -o libs/release/src/Graphics.o -c -g -Ilibs/release/include -Iinclude src/Graphics.cpp
ar rc libs/release/libppw.a libs/release/src/Game.o libs/release/src/Graphics.o
ranlib libs/release/libppw.a
@maluramichael
maluramichael / main.cpp
Last active December 31, 2015 15:08
Component Entity Sample
#include<iostream>
#include<vector>
#include<bitset>
const short MAX_COMPS = 4;
typedef std::bitset<MAX_COMPS> ComponentMask;
/************************************************************************/
/* COMPONENT */
@maluramichael
maluramichael / cube.obj
Created January 2, 2014 09:57
Simple cube model (wavefront)
# Blender v2.69 (sub 0) OBJ File: ''
# www.blender.org
mtllib untitled.mtl
o Cube
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -0.999999
v 0.999999 1.000000 1.000001
@maluramichael
maluramichael / plane.obj
Created January 2, 2014 12:27
Simple plane object
# Blender v2.69 (sub 0) OBJ File: ''
# www.blender.org
mtllib untitled.mtl
o Plane
v 1.000000 0.000000 1.000000
v -1.000000 0.000000 1.000000
v 1.000000 0.000000 -1.000000
v -1.000000 0.000000 -1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
VIEW
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.0 0.0 0.0 1.0
PROJECTION
2.4142134 0.0 0.0 0.0
0.0 2.4142134 0.0 0.0
0.0 0.0 -1.0 -0.0
@maluramichael
maluramichael / gist:8842776
Created February 6, 2014 11:56
pico monsters fight log
Olaf's turn.
Behemoth used 'Sketch'. Dealing 20.0 critical damage. Gigas has 921.88855 left.
Ignaz's turn.
Gigas used 'Shadow Ball'. Dealing 80.0 critical damage. Behemoth has 438.0927 left.
Olaf's turn.
Behemoth used 'Extremespeed'. Dealing 80.0 damage. Gigas has 841.88855 left.
Ignaz's turn.
class Foo {
public:
Foo()
{
// wird weg optimiert oO
std::cout << "construct\n";
}
~Foo()
{
<html>
<body>
<canvas id='canvas' width='300' height='300'></canvas>
<script type="text/javascript">
window.requestAnimFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function( callback ){