--- deliantra/server/random_maps/random_map.h 2007/07/01 05:00:19 1.15
+++ deliantra/server/random_maps/random_map.h 2008/04/11 21:09:53 1.17
@@ -1,11 +1,11 @@
/*
- * This file is part of Crossfire TRT, the Roguelike Realtime MORPG.
+ * This file is part of Deliantra, the Roguelike Realtime MMORPG.
*
- * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team
+ * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
* Copyright (©) 2001,2007 Mark Wedel & Crossfire Development Team
* Copyright (©) 1992,2007 Frank Tore Johansen
*
- * Crossfire TRT is free software: you can redistribute it and/or modify
+ * Deliantra is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@@ -18,12 +18,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
- * The authors can be reached via e-mail to
+ * The authors can be reached via e-mail to
*/
#ifndef RANDOM_MAP_H
#define RANDOM_MAP_H
+#include "util.h"
+
struct random_map_params
{
char wallstyle[512];
@@ -124,5 +126,47 @@
// needs a minimum size of at least 12
#define MIN_RANDOM_MAP_SIZE 12
+struct MazeData : zero_initialised
+{
+ char **col;
+
+ MazeData (int xsize, int ysize);
+ ~MazeData ();
+
+ operator char **()
+ {
+ return col;
+ }
+};
+
+struct Maze
+{
+ MazeData *ptr;
+
+ Maze ()
+ {
+ }
+
+ Maze (int xsize, int ysize)
+ : ptr (new MazeData (xsize, ysize))
+ {
+ }
+
+ Maze (random_map_params *RP)
+ : ptr (new MazeData (RP->Xsize, RP->Ysize))
+ {
+ }
+
+ void free ()
+ {
+ delete ptr;
+ }
+
+ operator char **()
+ {
+ return *ptr;
+ }
+};
+
#endif