summaryrefslogtreecommitdiffstats
path: root/pokemod/Map.h
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2007-06-01 02:54:29 +0000
committerBen Boeckel <MathStuf@gmail.com>2007-06-01 02:54:29 +0000
commitf71140fae5218ee9839ffcd4ec83abfded5124f4 (patch)
tree9af8f2174728cedb93580411223bc59fd9a86d0a /pokemod/Map.h
parent9e28e6ecd358a9801ad25914d3e8cca7b6d7f4f7 (diff)
downloadsigen-f71140fae5218ee9839ffcd4ec83abfded5124f4.tar.gz
sigen-f71140fae5218ee9839ffcd4ec83abfded5124f4.tar.xz
sigen-f71140fae5218ee9839ffcd4ec83abfded5124f4.zip
Added Map and Tile, added Hat class, and fixed up some other minor things
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@17 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Map.h')
-rw-r--r--pokemod/Map.h118
1 files changed, 118 insertions, 0 deletions
diff --git a/pokemod/Map.h b/pokemod/Map.h
new file mode 100644
index 00000000..70ecbb28
--- /dev/null
+++ b/pokemod/Map.h
@@ -0,0 +1,118 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/Map.h
+// Purpose: Define a map for the game
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Mon May 28 2007 21:41:54
+// Copyright: ©2007 Nerdy Productions
+// Licence:
+// This program 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 2 of the License, or
+// (at your option) any later version.
+//
+// This program 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 General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __POKEMOD_MAP__
+#define __POKEMOD_MAP__
+
+#include <vector>
+#include "Object.h"
+#include "String.h"
+#include "Matrix.h"
+#include "MapEffect.h"
+#include "MapTrainer.h"
+#include "MapWarp.h"
+#include "MapWildList.h"
+
+namespace PokeGen
+{
+ namespace PokeMod
+ {
+ class Map : public Object
+ {
+ public:
+ Map(const unsigned _id);
+ Map(Ini &ini, const unsigned _id = UINT_MAX);
+ ~Map();
+
+ void ImportIni(Ini &ini, const unsigned _id = UINT_MAX);
+ void ExportIni(std::ofstream &fout) const;
+
+ void SetName(const String &n);
+ void SetFlyWarp(const unsigned f);
+ void SetFlyWarp(const String &f);
+ void SetType(const unsigned t);
+ void SetType(const String &t);
+
+ String GetName() const;
+ unsigned GetFlyWarp() const;
+ String GetFlyWarpString() const;
+ unsigned GetType() const;
+ String GetTypeString() const;
+
+ void SetTile(unsigned x, unsigned y, unsigned _id);
+ void InsertColumn(unsigned x);
+ void InsertRow(unsigned y);
+ void AddColumn();
+ void AddRow();
+ void DeleteColumn(unsigned x);
+ void DeleteRow(unsigned y);
+
+ unsigned GetTile(unsigned x, unsigned y) const;
+ unsigned GetWidth() const;
+ unsigned GetHeight() const;
+
+ const MapEffect *GetMapEffect(const unsigned _id) const;
+ const MapEffect *GetMapEffect(const String &n) const;
+ unsigned GetMapEffectCount() const;
+ void NewMapEffect(Ini *const ini = NULL);
+ void DeleteMapEffect(const unsigned _id);
+ void DeleteMapEffect(const String &n);
+
+ const MapTrainer *GetMapTrainer(const unsigned _id) const;
+ const MapTrainer *GetMapTrainer(const String &n) const;
+ unsigned GetMapTrainerCount() const;
+ void NewMapTrainer(Ini *const ini = NULL);
+ void DeleteMapTrainer(const unsigned _id);
+ void DeleteMapTrainer(const String &n);
+
+ const MapWarp *GetMapWarp(const unsigned _id) const;
+ const MapWarp *GetMapWarp(const String &n) const;
+ unsigned GetMapWarpCount() const;
+ void NewMapWarp(Ini *const ini = NULL);
+ void DeleteMapWarp(const unsigned _id);
+ void DeleteMapWarp(const String &n);
+
+ const MapWildList *GetMapWildList(const unsigned _id) const;
+ unsigned GetMapWildListCount() const;
+ void NewMapWildList(Ini *const ini = NULL);
+ void DeleteMapWildList(const unsigned _id);
+ private:
+ void Validate();
+# ifdef PG_DEBUG_WINDOW
+ void Validate(const wxListBox &output);
+# endif
+
+ String name;
+ unsigned flyWarp;
+ unsigned type;
+ Matrix<unsigned> tiles;
+
+ std::vector<MapEffect> effects;
+ std::vector<MapTrainer> trainers;
+ std::vector<MapWarp> warps;
+ std::vector<MapWildList> wildLists;
+ };
+ }
+}
+
+#endif