diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2007-05-05 15:57:58 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2007-05-05 15:57:58 +0000 |
| commit | 0d2d8121cbb6a45180d88021fe2e5ac86b3532e3 (patch) | |
| tree | 512385f11f6d152f76ac36c7950bfe75992291ff /pokemod/Point.cpp | |
| parent | 21cb50c82f18b3a2ee1e77a7de11413ce45e6587 (diff) | |
| download | sigen-0d2d8121cbb6a45180d88021fe2e5ac86b3532e3.tar.gz sigen-0d2d8121cbb6a45180d88021fe2e5ac86b3532e3.tar.xz sigen-0d2d8121cbb6a45180d88021fe2e5ac86b3532e3.zip | |
Got rid of XML for INI format, in process of moving over; added /ai/Net.{h, cpp}
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@8 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Point.cpp')
| -rw-r--r-- | pokemod/Point.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/pokemod/Point.cpp b/pokemod/Point.cpp index 9d318676..dd8f77db 100644 --- a/pokemod/Point.cpp +++ b/pokemod/Point.cpp @@ -1,10 +1,10 @@ /////////////////////////////////////////////////////////////////////////////
-// Name: Point.cpp
+// Name: pokemod/Point.cpp
// Purpose: Define a coordinate point for use in a PokéMod
// Author: Ben Boeckel
// Modified by: Ben Boeckel
// Created: Sun Apr 8 13:46:11 2007
-// Copyright: ©2007 Ben Boeckel and Nerdy Productions
+// 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
@@ -23,28 +23,19 @@ #include "Point.h"
-void PokeGen::PokeMod::Point::ImportXml(XmlElement &xml)
+void PokeGen::PokeMod::Point::ImportIni(Ini &ini)
{
String curName;
LogImportStart("Point");
x = 0;
y = 0;
- xml.ClearCounter();
- for (XmlElement *child = xml.NextElement(); child; child = xml.NextElement())
- {
- curName = child->GetName();
- if (curName == "x")
- child->GetValue(x, 0);
- else if (curName == "y")
- child->GetValue(y, 0);
- else
- LogUnknownXml("Point", curName);
- }
+ ini.GetValue("x", x, 0);
+ ini.GetValue("y", y, 0);
Log(String("Point Import: Imported (%d, %d)", x, y), PM_DEBUG_INFO);
}
-PokeGen::PokeMod::XmlElement PokeGen::PokeMod::Point::ExportXml(const String &val)
+PokeGen::PokeMod::XmlElement PokeGen::PokeMod::Point::ExportXml(const std::ofstream &fout, const String &val)
{
Log(String("Point Export: Starting (%d, %d) as %s", x, y, val.c_str()), PM_DEBUG_INFO);
// Declare the elements
|
