Platform játék
3D-s megjelenítés, véletlenszerű pályagenerálás, jutalmazó játékélmény
global.h
Go to the documentation of this file.
1 #include <stdbool.h>
2 #include <stdlib.h>
3 #include <stdio.h>
4 
5 #include <wchar.h>
6 #include <locale.h>
7 
8 #include <SDL.h>
9 #include <SDL_ttf.h>
10 #include <SDL_gfxPrimitives.h>
11 
12 #include "auxiliary/auxFunctions.h"
13 
14 #ifndef GLOBAL_H_INCLUDED
15 #define GLOBAL_H_INCLUDED
16 
17 #define FPS (int) 50
18 
19 float g;
20 
22 SDL_Surface* screen;
23 TTF_Font* fontSmaller;
24 TTF_Font* fontSmall;
25 TTF_Font* fontSmallBold;
26 TTF_Font* fontLarge;
27 SDL_Surface* text;
28 unsigned char* keys;
30 
31 
33 typedef struct vector2D {
34  //1 egység == 1m
35  float x, y;
36 } vector2D;
37 
38 typedef struct intVector2D {
39  int x, y;
40 } intVector2D;
41 
42 typedef struct vector3D {
43  //1 egység == 1m
44  float x, y, z;
45 } vector3D;
47 
48 
50 typedef struct color {
51  unsigned char r, g, b, a;
52 } color;
53 
54 typedef struct colors {
55  color light, normal, dark;
56 } colors;
58 
59 
60 typedef enum block {
61  air, solid, invisible, treasure
62 } block;
63 
64 
65 typedef struct renderObject {
66  vector3D position;
67  vector3D size;
68  colors colors;
69  bool doesExist;
70 } renderObject;
71 
72 #endif // GLOBAL_H_INCLUDED