Platform játék
3D-s megjelenítés, véletlenszerű pályagenerálás, jutalmazó játékélmény
global.h
Ugrás a fájl dokumentációjához.
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
block
block
Definition:
global.h:60
colors::normal
color normal
Definition:
global.h:55
intVector2D
Definition:
global.h:38
treasure
Definition:
global.h:61
intVector2D::y
int y
Definition:
global.h:39
screen
SDL_Surface * screen
Definition:
global.h:22
renderObject::position
vector3D position
Definition:
global.h:66
fontSmaller
TTF_Font * fontSmaller
Definition:
global.h:23
renderObject::doesExist
bool doesExist
Definition:
global.h:69
vector3D::z
float z
Definition:
global.h:44
vector3D
Definition:
global.h:42
color::r
unsigned char r
Definition:
global.h:51
renderObject
struct renderObject renderObject
vector2D::y
float y
Definition:
global.h:35
vector3D
struct vector3D vector3D
/Vektorok>
color
Definition:
global.h:50
fontLarge
TTF_Font * fontLarge
Definition:
global.h:26
vector2D
struct vector2D vector2D
auxFunctions.h
keys
unsigned char * keys
/Globális változók>
Definition:
global.h:28
air
Definition:
global.h:61
vector2D
Definition:
global.h:33
renderObject
Definition:
global.h:65
color
struct color color
colors
struct colors colors
/Színek>
solid
Definition:
global.h:61
renderObject::size
vector3D size
Definition:
global.h:67
fontSmall
TTF_Font * fontSmall
Definition:
global.h:24
text
SDL_Surface * text
Definition:
global.h:27
colors
Definition:
global.h:54
vector2D::x
float x
Definition:
global.h:35
fontSmallBold
TTF_Font * fontSmallBold
Definition:
global.h:25
invisible
Definition:
global.h:61
renderObject::colors
colors colors
Definition:
global.h:68
g
float g
Globális változók>
Definition:
global.h:19
intVector2D
struct intVector2D intVector2D
modules
global.h
Projekt: Platform játék Készült: Sun Dec 3 2017 21:11:21 Készítette:
1.8.13