-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
62 lines (52 loc) · 1.54 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//linker settings and standard librarys-----------------------------------------
#include <stdio.h>
#include <vector>
#include <fstream>
#include <iostream>
#ifdef WIN32
#include <Windows.h>
#endif
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")
#pragma comment(lib, "glew32.lib")
#include <GL\glew.h>
#include <gl\glut.h>
#include <SDL.h>
#pragma comment(lib, "SDL2.lib")
#undef main
#include <SDL_image.h>
#pragma comment(lib, "SDL2_image.lib")
#include <SDL_ttf.h>
#pragma comment(lib, "SDL2_ttf.lib")
//global switch and macros-------------------------------------------------------
#define trigger_breakpoint __debugbreak()
//global variables---------------------------------------------------------------
//temporary buffer, use carefully
#define t_size 1024*1080*4*4
static union
{
unsigned char c[t_size/sizeof(unsigned char)];
int i[t_size/sizeof(int)];
float f[t_size/sizeof(float)];
double d[t_size/sizeof(double)];
long l[t_size/sizeof(long)];
} t;
int window_width;// = 800;
int window_height;// = 600;
GLuint shader_program_text;
//custom header files------------------------------------------------------------
#include "library.h"
#include "text_area.h"
#include "water_effect.h"
#include "BlockTypes.h"
#include "ColorSelector.h"
#include "ParticleEmitter.h"
#include "program_run.h"
#include "program_callbacks.h"
#include "program_construct.h"
void main(int argc, char** argv)
{
window_width = GetSystemMetrics(SM_CXSCREEN) - 100;
window_height = GetSystemMetrics(SM_CYSCREEN) - 100;
program_construct(argc, argv);
}