-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutility.h
64 lines (54 loc) · 1.45 KB
/
utility.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
/*
* =====================================================================================
*
* Filename: utility.h
*
* Description: header for small utility functions
*
* Version: 1.0
* Created: 23.02.2017 16:28:48
* Revision: none
* Compiler: gcc
*
* Author: Arvid Krein (mn), [email protected]
* Company: -
*
* =====================================================================================
*/
#ifndef INIT_H
#define INIT_H
#include <iostream>
#include <stdio.h>
#include <string>
#include <cmath>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include "bezier.h"
#include "physobj.h"
extern const int SCREEN_WIDTH;
extern const int SCREEN_HEIGHT;
//init function
bool init(SDL_Window** pWindow, SDL_Renderer** pRenderer, int height, int width);
//bezier creation functions
Bezpath createbezierpath(SDL_Renderer* gRenderer);
void drawBezierPath(SDL_Renderer* renderer,const Bezpath &bPath);
//physobj drawing function
void drawobj(SDL_Renderer* Renderer, kraftpartikel* Obj, int boxsize);
void drawobjs(SDL_Renderer* Renderer, std::vector<kraftpartikel> vObj, int boxsize);
//simpleTimer class
class simpleTimer
{
public:
void reset();
void pause();
void unpause();
void flip();
bool getstatus();
Uint32 get(); //Time in milliseconds
simpleTimer();
private:
Uint32 starttime;
Uint32 pausedtime;
bool ispaused=false;
};
#endif