-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathMetaRoom.h
More file actions
71 lines (57 loc) · 2.12 KB
/
MetaRoom.h
File metadata and controls
71 lines (57 loc) · 2.12 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
* MetaRoom.h
* openc2e
*
* Created by Alyssa Milburn on Tue May 25 2004.
* Copyright (c) 2004 Alyssa Milburn. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*/
#ifndef _C2E_METAROOM_H
#define _C2E_METAROOM_H
#include "openc2e.h"
#include <string>
#include <vector>
#include <map>
class creaturesImage;
class MetaRoom {
protected:
FRIEND_SERIALIZE(MetaRoom)
unsigned int xloc, yloc, wid, hei, fullwid, fullhei;
std::map<std::string, boost::shared_ptr<creaturesImage> > backgrounds;
boost::shared_ptr<creaturesImage> firstback;
bool wraps;
MetaRoom() { }
public:
std::vector<boost::shared_ptr<class Room> > rooms;
unsigned int x() { return xloc; }
unsigned int y() { return yloc; }
unsigned int width() { return wid; }
unsigned int height() { return hei; }
unsigned int fullwidth() { return fullwid; }
unsigned int fullheight() { return fullhei; }
bool wraparound() { return wraps; }
void setWraparound(bool w) { wraps = !!w; }
unsigned int addRoom(boost::shared_ptr<class Room>);
void addBackground(std::string, boost::shared_ptr<creaturesImage> = boost::shared_ptr<creaturesImage>());
boost::shared_ptr<creaturesImage> getBackground(std::string);
std::vector<std::string> backgroundList();
boost::shared_ptr<Room> nextFloorFromPoint(float x, float y);
boost::shared_ptr<Room> roomAt(float x, float y);
std::vector<boost::shared_ptr<Room> > roomsAt(float x, float y);
std::string music;
unsigned int id;
MetaRoom(int _x, int _y, int width, int height, const std::string &back, boost::shared_ptr<creaturesImage> = boost::shared_ptr<creaturesImage>(), bool wrap = false);
~MetaRoom();
};
#endif
/* vim: set noet: */