This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <AL/alut.h> | |
#include <vorbis/codec.h> | |
#include <vorbis/vorbisfile.h> | |
char pcmout[16*1024]; | |
void check_error() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define GLWT_EVENT_INPUT 1 | |
#define GLWT_EVENT_WINDOW 2 | |
#define GLWT_EVENT_HOTPLUG 3 | |
#define GLWT_EVENT_INPUT_KEY 1 | |
#define GLWT_EVENT_INPUT_BUTTON 2 | |
#define GLWT_EVENT_INPUT_ABS 3 | |
#define GLWT_EVENT_INPUT_REL 4 | |
#define GLWT_EVENT_WINDOW_RESIZE 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "A.hpp" | |
#include <iostream> | |
#include <string> | |
#include <LuaBridge/LuaBridge.h> | |
std::string A::getName() const { return std::string("A"); } | |
void A::register_lua(lua_State *L) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 3h Twin stick shooter | |
* Autor: Jakob Progsch | |
*/ | |
#include <GL3/gl3w.h> | |
#include <GL/glfw.h> | |
#include <iostream> | |
#include <string> | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef ON_DESTROY_H | |
#define ON_DESTROY_H | |
#include <functional> | |
#include <utility> | |
class on_destroy { | |
public: | |
on_destroy() { } | |
template<class F, class... Args> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cmath> | |
#include <utility> | |
#include <glm/glm.hpp> | |
#include <glm/gtc/type_ptr.hpp> | |
const double G = 6.674e-11; // gravitational constant | |
const double PI = 3.14159265358979323846; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
#include <cmath> | |
#include <utility> | |
#include <glm/glm.hpp> | |
const double G = 6.674e-11; // gravitational constant | |
const double PI = 3.14159265358979323846; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <cmath> | |
#include <algorithm> | |
#include <png.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int write_png(const char *file_name, int width, int height, unsigned char *data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "hash_map2d.h" | |
#include <stdlib.h> | |
static unsigned hash_map2d_hash(int x, int y) { | |
unsigned h = 65521u*x + 101u*y; | |
return h; | |
} | |
static hash_map2d_entry* hash_map2d_alloc(int capacity) { |
OlderNewer