-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdoor.h
More file actions
49 lines (40 loc) · 1.04 KB
/
door.h
File metadata and controls
49 lines (40 loc) · 1.04 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
#ifndef DOOR_H_INCLUDED
#define DOOR_H_INCLUDED
#include "yssimplesound.h"
#include "yspng.h"
#include "Monster.h"
class Door
{
protected:
int doorplaystate;
YsSoundPlayer::SoundData dooropensound;
public:
YsRawPngDecoder dooropen;
YsRawPngDecoder doorclose;
YsSoundPlayer doorplayer;
int state;
int x;
int y;
Door(int x, int y);
Door();
void control(int playerx, int playery, char mapvalueforread[300][300], char mapvalue[300][300]);
void SpecialControl(Monster &monster, char mapvalueforead[300][300], char mapvalue[300][300]);
void open();
void close();
void draw(int playerX, int playerY);
};
class Doorlist
{
protected:
const int NormalDoorNum = 6;
const int SpecialDoorNum = 3;
public:
Door NormalDoors[6];
Door SpecialDoors[3];
Doorlist();
void SpeicalControl(Monster monsters[], char mapvalueforead[300][300], char mapvalue[300][300]);
void NormalControl(int playerX, int playerY, char mapvalueforead[300][300], char mapvalue[300][300]);
void DoorsDraw(int playerX, int playerY);
};
#endif // !DOOR_H_INCLUDED
#pragma once