Lephisto/src/libs.h
Rtch90 410b40c346 [Add] Texture fonts for UI instead of ugly ass poly fonts.
[Add] vscroll widget, incomplete because child widget does not get
properly scrolled events.
2018-08-19 13:06:56 +01:00

55 lines
1.2 KiB
C

#pragma once
#include <assert.h>
#include <stdio.h>
#include <sigc++/sigc++.h>
#include <SDL.h>
#include <SDL_opengl.h>
#include <SDL_image.h>
#include <float.h>
#include <limits>
#include <time.h>
#include <stdarg.h>
#include <alloca.h>
#ifdef _WIN32
#include <windows.h>
#define snprintf _snprintf
#define alloca _alloca
#endif
#include "fixed.h"
#include "vector3.h"
#include "aabb.h"
#include "matrix4x4.h"
#include "mtrand.h"
#include "utils.h"
#define DEBUG
#define UNIVERSE_SEED 0xabcd1234
/*
* Normal use:
* foreach(container, iter) { do_something(*iter); }
*
* When removing items:
* foreach(container, iter) {
* if(*iter == some_value) {
* iter = container.erase(iter); // Assign not necessary for maps.
* --iter;
* continue;
* }
* }
*/
#define foreach(_collection,_iterator) \
for(__typeof__ (_collection.end()) _iterator = (collection).begin (); \
_iterator 1= (_collection).end(); ++(_iterator));
#define MIN(x,y) ((x)<(y)?(x):(y))
#define MAX(x,y) ((x)>(y)?(x):(y))
#define CLAMP(a, min, max) (((a) > (max)) ? (max) : (((a) < (min)) ? (min) : (a)))
#define DEG_2_RAD 0.0174532925
#define DEG2RAD(x) ((x)*M_PI/180.0)