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
// 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 <m.gonzalez@student.fontys.nl>
* 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>
@bitbrain
bitbrain / new
Created February 17, 2014 02:16
Scanning dependencies of target particles
[ 44%] Building C object examples/CMakeFiles/particles.dir/particles.c.o
[ 46%] Building C object examples/CMakeFiles/particles.dir/__/deps/tinycthread.c.o
[ 48%] Building C object examples/CMakeFiles/particles.dir/__/deps/getopt.c.o
Linking C executable particles
/usr/bin/ld: CMakeFiles/particles.dir/__/deps/tinycthread.c.o: undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'
/usr/bin/ld: note: 'pthread_mutexattr_settype@@GLIBC_2.2.5' is defined in DSO /lib/libpthread.so.0 so try adding it to the linker command line
/lib/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [examples/particles] Error 1
#include "LinkedList.h"
#include <stdlib.h>
#include <stdio.h>
void addFrontLL(LL *list, int number)
{
if (list->head != NULL)
{
node *newNode;
newNode = malloc(sizeof(node));
/home/miguel/Buildsystem/Install/springbok/lib/libSpringbok.a(SoundInstance.cpp.o): In function `SoundInstance::SoundInstance(SoundSource const&, float, float, float)':
SoundInstance.cpp:(.text+0x2c): undefined reference to `alGenSources'
SoundInstance.cpp:(.text+0x52): undefined reference to `alSourcei'
SoundInstance.cpp:(.text+0x73): undefined reference to `alSourcef'
SoundInstance.cpp:(.text+0x93): undefined reference to `alSourcef'
SoundInstance.cpp:(.text+0xb4): undefined reference to `alSourcef'
SoundInstance.cpp:(.text+0xd5): undefined reference to `alSourcef'
SoundInstance.cpp:(.text+0x106): undefined reference to `alSource3f'
SoundInstance.cpp:(.text+0x113): undefined reference to `alSourcePlay'
SoundInstance.cpp:(.text+0x118): undefined reference to `alGetError'
$('.enterButton').each(function() {
var button = $(this);
button.keypress(function(e){
if(e.keyCode==13)
button.click();
});
});