-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgameMisc.h
68 lines (53 loc) · 1.61 KB
/
gameMisc.h
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
63
64
65
66
67
68
/***************************************************************************
** gameMisc is used to handle font, fadeEffect and others kind of stuff **
** Written by St4rk **
** Nightmare Fiction Engine - NFE **
***************************************************************************/
#ifndef GAME_MISC_H
#define GAME_MISC_H
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <sstream>
#include <GL/glut.h>
#include <SDL/SDL.h>
#include "gameStruct.h"
enum FADE_TYPE {
TYPE_FADE_NONE = 0,
TYPE_FADE_IN = 1,
TYPE_FADE_OUT = 2,
TYPE_FADE_OUT_AND_IN = 3,
TYPE_FADE_SPECIAL = 4
};
class gameMisc {
public:
gameMisc();
~gameMisc();
void renderSquareWithColor(float R, float G, float B, float A);
void renderSquareWithTexture(BITMAP *texture, bool ARGB);
void renderSquareWithTexture2(NFP *texture,
float r = 1.0f, float g = 1.0f, float b = 1.0f, float a = 1.0f);
void setupFadeEffect(unsigned char type, float R, float G, float B,
unsigned int timer);
void renderFadeEffect();
void renderText(float, float, float, int, std::string, float r = 1.0, float g = 1.0, float b = 1.0, float a = 1.0);
void renderBoundingBox(float x, float y, float z);
void renderBlood(float x, float y, float z);
bool isInFade();
private:
/*
* fadeEffect stuff
*/
unsigned int mtimer;
float mR;
float mG;
float mB;
float mA;
unsigned char mtype;
unsigned int gTimer;
bool mEnable;
bool doubleMode;
unsigned char specialMode;
BITMAP engineFont;
};
#endif