-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.h
More file actions
51 lines (44 loc) · 1.02 KB
/
view.h
File metadata and controls
51 lines (44 loc) · 1.02 KB
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
#define SDL_MAIN_HANDLED
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_mixer.h>
#include <SDL2/SDL_ttf.h>
#include "model.h"
#include <map>
#include <string>
#include <sstream>
#ifndef _VIEW_H
#define _VIEW_H
// Show (output) the state of the model
class View {
public:
View(std::string title, int width, int height);
~View();
// Print out the visible stuff in the grid
void show(Model * model);
// SDL_Rect Rect[31];
private:
bool Collision(SDL_Rect a, SDL_Rect b);
SDL_Surface* life;
SDL_Surface* background;
SDL_Surface* background2;
SDL_Surface* pacmanclose;
SDL_Surface* text;
SDL_Surface* words;
SDL_Surface* pill;
SDL_Surface* spill;
SDL_Window* window;
SDL_Surface* screen;
bool fail;
SDL_Surface* load(char * path);
std::map<Direction, SDL_Surface*> pacman;
SDL_Surface* Ghost;
SDL_Surface* Ghost2;
Mix_Music * startup;
Mix_Chunk * death;
Mix_Chunk * chomp;
SDL_Rect dest;
TTF_Font* font;
int frame;
};
#endif