-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrouting.h
45 lines (36 loc) · 962 Bytes
/
routing.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
#ifndef ROUTING
#define ROUTING
#include <iostream>
#include <string>
#include <SDL2/SDL.h>
#include "route.h"
#include "stage_1.h"
struct Route;
class Routing {
protected:
SDL_Renderer *renderer;
SDL_Window *window;
public:
static Route* actualRoute;
explicit Routing (SDL_Renderer *renderer, SDL_Window *window) : renderer(renderer), window(window) {
}
static void selectedRoute(RouteEnum routeEnum) {
for( Route::RouteListClass::iterator routeIterator = Route::routeList.begin();
routeIterator != Route::routeList.end();
routeIterator ++)
{
if ((*routeIterator)->route_id == routeEnum) {
actualRoute = (*routeIterator);
}
}
}
void init() {
Stage1* stage = new Stage1();
}
void render() {
actualRoute->setRenderObj(this->renderer);
actualRoute->setWindowObj(this->window);
actualRoute->render();
}
};
#endif