diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2007-09-21 15:36:22 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2007-09-21 15:36:22 +0000 |
| commit | 5b55d13ead7e352ee1feaae72009e8abf5bd071a (patch) | |
| tree | 6c2838312dd7f42769280e24e8abc16b53c165cb /pokemod/ItemStorage.cpp | |
| parent | e94d9893b8753e72adb92b2c5eb203830ddf641c (diff) | |
| download | sigen-5b55d13ead7e352ee1feaae72009e8abf5bd071a.tar.gz sigen-5b55d13ead7e352ee1feaae72009e8abf5bd071a.tar.xz sigen-5b55d13ead7e352ee1feaae72009e8abf5bd071a.zip | |
[FIX] Neural Network methods complete
[FIX] Wrapped Node up into the layer
[FIX] Wrapped NatureEffect into Nature
[FIX] Getting around to fixing up the design of the PokéMod stuff
[FIX] Creating new subclasses now returns pointer to new subclass
[FIX] Simplified interfaces
[FIX] Minor style issues
[FIX] Renamed CoinItem to CoinListObject
[FIX] Renamed MapTrainerTeam to MapTrainerPokemon
[FIX] Renamed MapWildPokemon to MapWildListPokemon
[FIX] Moved global enums to relevant classes
[FIX] Removed general logging features
[DEL] pokemod/Debug.{h, cpp}
[DEL] pokemod/Path.{h, cpp}
[FIX] Using QFile rather than custom Path class for checking for files
[FIX] Set* methods now return a bool to let the caller know if anything actually changed (if it can fail, otherwise it is void)
[ADD] Compliation without errors is required for pokemod from now on before commits
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@24 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/ItemStorage.cpp')
| -rw-r--r-- | pokemod/ItemStorage.cpp | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/pokemod/ItemStorage.cpp b/pokemod/ItemStorage.cpp deleted file mode 100644 index cefeb8cb..00000000 --- a/pokemod/ItemStorage.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////
-// Name: pokemod/ItemStorage.cpp
-// Purpose: Define a type of item and how much can be stored
-// Author: Ben Boeckel
-// Modified by: Ben Boeckel
-// Created: Tue Mar 20 18:06:40 2007
-// Copyright: ©2007 Ben Boeckel and 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 3 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, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
-
-#include "ItemStorage.h"
-
-PokeGen::PokeMod::ItemStorage::ItemStorage(const unsigned _id) :
- name(""),
- computer(0),
- player(1)
-{
- LogCtor("ItemStorage", _id);
- id = _id;
-}
-
-PokeGen::PokeMod::ItemStorage::ItemStorage(Ini &ini, const unsigned _id)
-{
- LogCtorIni("ItemStorage", _id);
- ImportIni(ini, _id);
- if (id == UINT_MAX)
- LogIdError("ItemStorage");
-}
-
-PokeGen::PokeMod::ItemStorage::~ItemStorage()
-{
- LogDtor("ItemStorage", id, name);
-}
-
-void PokeGen::PokeMod::ItemStorage::Validate()
-{
- LogValidateStart("ItemStorage", id, name);
- if (name == "")
- {
- LogVarNotSet("ItemStorage", id, "name");
- isValid = false;
- }
- if (!player)
- {
- LogVarNotValid("ItemStorage", id, "player");
- isValid = false;
- }
- LogValidateOver("ItemStorage", id, isValid, name);
-}
-
-void PokeGen::PokeMod::ItemStorage::ImportIni(Ini &ini, const unsigned _id)
-{
- LogImportStart("ItemStorage");
- if (_id == UINT_MAX)
- {
- ini.GetValue("id", id);
- if (id == UINT_MAX)
- LogIdNotFound("ItemStorage");
- }
- else
- id = _id;
- ini.GetValue("name", name);
- ini.GetValue("computer", computer, 0);
- ini.GetValue("player", player, 1);
- LogImportOver("ItemStorage", id, name);
-}
-
-void PokeGen::PokeMod::ItemStorage::ExportIni(QFile &fout) const
-{
- LogExportStart("ItemStorage", id, name);
- // Make elements
- Ini exItemStorage("ItemStorage");
- exItemStorage.AddField("id", id);
- exItemStorage.AddField("name", name);
- exItemStorage.AddField("computer", computer);
- exItemStorage.AddField("player", player);
- exItemStorage.Export(fout);
- LogExportOver("ItemStorage", id, name);
-}
-
-void PokeGen::PokeMod::ItemStorage::SetName(const QString &n)
-{
- LogSetVar("ItemStorage", id, "name", n, name);
- name = n;
-}
-
-void PokeGen::PokeMod::ItemStorage::SetComputer(const unsigned c)
-{
- LogSetVar("ItemStorage", id, "computer", c, name);
- computer = c;
-}
-
-void PokeGen::PokeMod::ItemStorage::SetPlayer(const unsigned p)
-{
- LogSetVar("ItemStorage", id, "player", p, name);
- if (p)
- player = p;
-}
-
-QString PokeGen::PokeMod::ItemStorage::GetName() const
-{
- LogFetchVar("ItemStorage", id, "name", name);
- return name;
-}
-
-unsigned PokeGen::PokeMod::ItemStorage::GetComputer() const
-{
- LogFetchVar("ItemStorage", id, "computer", computer, name);
- return computer;
-}
-
-unsigned PokeGen::PokeMod::ItemStorage::GetPlayer() const
-{
- LogFetchVar("ItemStorage", id, "player", player, name);
- return player;
-}
|
