Skip to content

Instantly share code, notes, and snippets.

View bitbrain's full-sized avatar
⚒️
Forging an RPG

miguel bitbrain

⚒️
Forging an RPG
View GitHub Profile
name: my:reality
info: The world of Miguel Gonzalez
pygments: true
paginate: 6
navigation:
- text: Blog
title: News, Tutorials and more.
url: /
icon: icon-book
function doAjax(datasource) {
$.ajax({
type: "GET",
url: datasource + "?callback=?",
dataType: "json",
crossDomain: true,
async: false,
jsonp: false,
success: function(data) {
// Do something with json data
@bitbrain
bitbrain / gist:6745271
Created September 28, 2013 19:00
Javascript attributes
var myClass = function() {
this.attribut1 = "Heisenberg";
this.attribut2 = "Heisenberg";
getAttribut1 : function() {
return this.attribut1;
}
}
@bitbrain
bitbrain / output
Created January 14, 2014 12:14
Output of mono TheDungeoning.exe
$ sudo mono TheDungeoningDemo0_6.exe
* Assertion at domain.c:1499, condition `mono_defaults.monotype_class != 0' not met
Native stacktrace:
mono() [0x4916ba]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7f40e491bcb0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f40e4582425]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7f40e4585b8b]
// Create a new shader manager
ShaderManager shaderManager = new ShaderManager();
// Create shaders
BlurShader blurShader = new BlurShader();
CRTShader crtShader = new CRTShader();
// Add them to the manager in a layer-based way. At first, the blur shader is applied and so on.
shaderManager.add(this, blurShader, crtShader);
Vec2F Distance = Target->Position - TheEnemy->Position;
TheEnemy->TargetDirection = Approach<Angle>(TheEnemy->TargetDirection, Distance.getAngle(), 1f);
TheEnemy->Acceleration = Speed * TheEnemy->TargetDirection.toDirection();
Rect<float> Screen = Rect<float>(Vec2F(0, 0), Vec2F(500, 500));
Vec2F vec2F(501.0f, 1.0f);
std::cout << Screen.isInside(vec2F) << std::endl;
/usr/local/lib/libSpringbok.a(GameSurface.cpp.o): In function `GameSurface::GameSurface(std::string const&, int, Vec2<unsigned int>)':
GameSurface.cpp:(.text+0x2a): undefined reference to `glfwInit'
GameSurface.cpp:(.text+0x43): undefined reference to `glfwWindowHint'
GameSurface.cpp:(.text+0x52): undefined reference to `glfwWindowHint'
GameSurface.cpp:(.text+0x82): undefined reference to `glfwCreateWindow'
GameSurface.cpp:(.text+0x8c): undefined reference to `glfwGetPrimaryMonitor'
GameSurface.cpp:(.text+0x9c): undefined reference to `glfwGetVideoMode'
GameSurface.cpp:(.text+0xaf): undefined reference to `glfwWindowHint'
GameSurface.cpp:(.text+0xe3): undefined reference to `glfwCreateWindow'
GameSurface.cpp:(.text+0xf8): undefined reference to `glfwMakeContextCurrent'
/* Main file
*
* Author: Miguel Gonzalez <[email protected]>
* Version: 1.0
* Since: 1.0
*/
#include <string>
#include <iostream>
#include <cstdlib>
miguel@BluePhoenix: ~/Buildsystem/Build/SpringbokX (master)
$ make
[ 2%] Built target sbDependencies
[ 5%] Built target sbAnimation
[ 15%] Built target sbPlatform
[ 17%] Built target sbResources
[ 28%] Built target sbAudio
[ 30%] Building CXX object Source/Platform/GLFW/CMakeFiles/sbPlatformGLFW.dir/ButtonSpecs.cpp.o
/home/miguel/Buildsystem/Source/SpringbokX/Source/Platform/GLFW/ButtonSpecs.cpp:8:24: fatal error: GLFW/glfw3.h: No such file or directory
#include <GLFW/glfw3.h>