Copy editing
[meritous_recharged.git] / src / mapgen.h
blob83017099ad1d22283d387f710e9cea4e6ec81f55
1 //
2 // mapgen.h
3 //
4 // Copyright 2007, 2008 Lancer-X/ASCEAI
5 //
6 // This file is part of Meritous.
7 //
8 // Meritous is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation, either version 3 of the License, or
11 // (at your option) any later version.
13 // Meritous is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with Meritous. If not, see <http://www.gnu.org/licenses/>.
22 // Exposes mapgen.c functionality and types
24 #ifndef MAPGEN_H
25 #define MAPGEN_H
27 struct RoomConnection {
28 int x, y;
29 int x2, y2;
30 int c;
31 struct RoomConnection *n;
34 typedef struct {
35 int x, y;
36 int w, h;
37 int creator;
38 int visited;
39 int checkpoint;
40 int s_dist;
41 int connections;
42 int room_type;
43 int room_param;
44 int enemies;
45 struct RoomConnection *con;
46 } Room;
48 typedef struct {
49 int w, h;
50 unsigned char *m;
51 int *r;
52 int totalRooms;
53 //Room *rooms;
54 } GameLevel;
56 extern GameLevel map;
57 extern Room rooms[3000];
59 void RandomGenerateMap();
61 void Put(int x, int y, unsigned char tile, int room);
62 unsigned char Get(int x, int y);
63 int GetRoom(int x, int y);
64 int GetVisited(int x, int y);
65 extern int place_of_power;
67 void WriteMapData();
68 void ReadMapData();
70 void DestroyDungeon();
72 void Paint(int xp, int yp, int w, int h, char *fname);
74 #endif