mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 18:06:26 +00:00
ULTIMA1: Added stub classes for each type of merchant
This commit is contained in:
parent
977181fc3a
commit
0bc35753ff
@ -95,6 +95,12 @@ MODULE_OBJS += \
|
||||
ultima1/widgets/hit.o \
|
||||
ultima1/widgets/king.o \
|
||||
ultima1/widgets/merchant.o \
|
||||
ultima1/widgets/merchant_armor.o \
|
||||
ultima1/widgets/merchant_grocer.o \
|
||||
ultima1/widgets/merchant_magic.o \
|
||||
ultima1/widgets/merchant_tavern.o \
|
||||
ultima1/widgets/merchant_transport.o \
|
||||
ultima1/widgets/merchant_weapons.o \
|
||||
ultima1/widgets/overworld_monster.o \
|
||||
ultima1/widgets/overworld_widget.o \
|
||||
ultima1/widgets/person.o \
|
||||
|
@ -30,6 +30,18 @@ namespace Ultima {
|
||||
namespace Shared {
|
||||
namespace Maps {
|
||||
|
||||
MapWidget *MapBase::WidgetsArray::findByClass(ClassDef *classDef) {
|
||||
for (uint idx = 0; idx < size(); ++idx) {
|
||||
MapWidget *w = (*this)[idx].get();
|
||||
if (w->isInstanceOf(*classDef))
|
||||
return w;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
void MapBase::clear() {
|
||||
_mapId = 0;
|
||||
_data.clear();
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "common/array.h"
|
||||
#include "common/serializer.h"
|
||||
#include "ultima/shared/core/base_object.h"
|
||||
#include "ultima/shared/core/rect.h"
|
||||
#include "ultima/shared/maps/map_widget.h"
|
||||
|
||||
@ -45,6 +46,17 @@ class MapTile;
|
||||
* Base class for specific map types
|
||||
*/
|
||||
class MapBase {
|
||||
/**
|
||||
* Widgets array
|
||||
*/
|
||||
class WidgetsArray : public Common::Array<MapWidgetPtr> {
|
||||
public:
|
||||
/**
|
||||
* Finds a widget by class
|
||||
*/
|
||||
MapWidget *findByClass(ClassDef *classDef);
|
||||
};
|
||||
|
||||
/**
|
||||
* Internal class used for storing the data for a row
|
||||
*/
|
||||
@ -118,8 +130,8 @@ public:
|
||||
Point _size; // X, Y size of the map
|
||||
Point _tilesPerOrigTile; // For enhanced modes, number of tiles per original game tile
|
||||
Common::String _name; // Name of map, if applicable
|
||||
MapWidget *_playerWidget; // Current means of transport, even if on foot
|
||||
Common::Array<MapWidgetPtr> _widgets; // Party, monsteres, transports, etc.
|
||||
MapWidget *_playerWidget; // Current means of transport, even if on foot
|
||||
WidgetsArray _widgets; // Party, monsteres, transports, etc.
|
||||
Common::Array<MapCellsRow> _data; // Data for the map
|
||||
public:
|
||||
/**
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "common/ptr.h"
|
||||
#include "common/serializer.h"
|
||||
#include "common/str.h"
|
||||
#include "ultima/shared/core/base_object.h"
|
||||
#include "ultima/shared/core/rect.h"
|
||||
|
||||
namespace Ultima {
|
||||
@ -46,7 +47,7 @@ class MapBase;
|
||||
/**
|
||||
* Base class for things that appear within a map, such as monsters, transports, or people
|
||||
*/
|
||||
class MapWidget {
|
||||
class MapWidget : public BaseObject {
|
||||
protected:
|
||||
Game *_game; // Game reference
|
||||
MapBase *_map; // Map reference
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "ultima/ultima1/maps/map_overworld.h"
|
||||
#include "ultima/ultima1/maps/map.h"
|
||||
#include "ultima/ultima1/core/resources.h"
|
||||
#include "ultima/ultima1/widgets/merchant.h"
|
||||
#include "ultima/ultima1/game.h"
|
||||
|
||||
namespace Ultima {
|
||||
@ -59,11 +60,25 @@ void MapBase::getTileAt(const Point &pt, Shared::Maps::MapTile *tile) {
|
||||
}
|
||||
|
||||
void MapBase::steal() {
|
||||
U1MapTile tile;
|
||||
getTileAt(getPosition(), &tile);
|
||||
|
||||
//Widgets::Merchant *merchant = nullptr;
|
||||
switch (tile._tileId) {
|
||||
case 57:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
addInfoMsg("?");
|
||||
_game->playFX(1);
|
||||
}
|
||||
|
||||
void MapBase::talk() {
|
||||
addInfoMsg("?");
|
||||
_game->playFX(1);
|
||||
}
|
||||
|
||||
} // End of namespace Maps
|
||||
|
@ -59,12 +59,12 @@ public:
|
||||
/**
|
||||
* Do a steal action
|
||||
*/
|
||||
virtual void steal();
|
||||
void steal();
|
||||
|
||||
/**
|
||||
* Do a talk action
|
||||
*/
|
||||
virtual void talk();
|
||||
void talk();
|
||||
};
|
||||
|
||||
} // End of namespace Maps
|
||||
|
@ -21,15 +21,21 @@
|
||||
*/
|
||||
|
||||
#include "ultima/ultima1/maps/map_city_castle.h"
|
||||
#include "ultima/ultima1/maps/map_tile.h"
|
||||
#include "ultima/ultima1/core/resources.h"
|
||||
#include "ultima/ultima1/game.h"
|
||||
#include "ultima/ultima1/widgets/urban_player.h"
|
||||
#include "ultima/ultima1/widgets/bard.h"
|
||||
#include "ultima/ultima1/widgets/guard.h"
|
||||
#include "ultima/ultima1/widgets/king.h"
|
||||
#include "ultima/ultima1/widgets/merchant.h"
|
||||
#include "ultima/ultima1/widgets/princess.h"
|
||||
#include "ultima/ultima1/widgets/wench.h"
|
||||
#include "ultima/ultima1/widgets/merchant_armor.h"
|
||||
#include "ultima/ultima1/widgets/merchant_grocer.h"
|
||||
#include "ultima/ultima1/widgets/merchant_magic.h"
|
||||
#include "ultima/ultima1/widgets/merchant_tavern.h"
|
||||
#include "ultima/ultima1/widgets/merchant_transport.h"
|
||||
#include "ultima/ultima1/widgets/merchant_weapons.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
@ -69,9 +75,34 @@ void MapCityCastle::loadWidgets() {
|
||||
case 20:
|
||||
person = new Widgets::King(_game, this, lp[3]);
|
||||
break;
|
||||
case 21:
|
||||
person = new Widgets::Merchant(_game, this, lp[3]);
|
||||
case 21: {
|
||||
U1MapTile tile;
|
||||
getTileAt(Point(lp[1], lp[2]), &tile);
|
||||
|
||||
switch (tile._tileId) {
|
||||
case 55:
|
||||
person = new Widgets::MerchantArmor(_game, this, lp[3]);
|
||||
break;
|
||||
case 57:
|
||||
person = new Widgets::MerchantGrocer(_game, this, lp[3]);
|
||||
break;
|
||||
case 59:
|
||||
person = new Widgets::MerchantWeapons(_game, this, lp[3]);
|
||||
break;
|
||||
case 60:
|
||||
person = new Widgets::MerchantMagic(_game, this, lp[3]);
|
||||
break;
|
||||
case 61:
|
||||
person = new Widgets::MerchantTavern(_game, this, lp[3]);
|
||||
break;
|
||||
case 62:
|
||||
person = new Widgets::MerchantTransport(_game, this, lp[3]);
|
||||
break;
|
||||
default:
|
||||
error("Invalid merchant");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 22:
|
||||
person = new Widgets::Princess(_game, this, lp[3]);
|
||||
break;
|
||||
|
@ -29,6 +29,9 @@ namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
/**
|
||||
* Base class for merchants in the cities and castles
|
||||
*/
|
||||
class Merchant : public Person {
|
||||
public:
|
||||
DECLARE_WIDGET(Merchant)
|
||||
@ -51,9 +54,9 @@ public:
|
||||
Merchant(Ultima1Game *game, Maps::MapBase *map) : Person(game, map, 50) {}
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
* Does the steal action
|
||||
*/
|
||||
virtual ~Merchant() {}
|
||||
virtual void steal() {}
|
||||
};
|
||||
|
||||
} // End of namespace Widgets
|
||||
|
35
engines/ultima/ultima1/widgets/merchant_armor.cpp
Normal file
35
engines/ultima/ultima1/widgets/merchant_armor.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultima/ultima1/widgets/merchant_armor.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
void MerchantArmor::steal() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
63
engines/ultima/ultima1/widgets/merchant_armor.h
Normal file
63
engines/ultima/ultima1/widgets/merchant_armor.h
Normal file
@ -0,0 +1,63 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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 ULTIMA_ULTIMA1_WIDGETS_MERCHANT_ARMOR_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_MERCHANT_ARMOR_H
|
||||
|
||||
#include "ultima/ultima1/widgets/merchant.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
class MerchantArmor : public Merchant {
|
||||
public:
|
||||
DECLARE_WIDGET(MerchantArmor)
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantArmor(Ultima1Game *game, Maps::MapBase *map, int hitPoints) :
|
||||
Merchant(game, map, 50, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantArmor(Ultima1Game *game, Maps::MapBase *map, uint tileNum, int hitPoints) :
|
||||
Merchant(game, map, tileNum, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantArmor(Ultima1Game *game, Maps::MapBase *map) : Merchant(game, map, 50) {}
|
||||
|
||||
/**
|
||||
* Does the steal action
|
||||
*/
|
||||
virtual void steal();
|
||||
};
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
||||
|
||||
#endif
|
35
engines/ultima/ultima1/widgets/merchant_grocer.cpp
Normal file
35
engines/ultima/ultima1/widgets/merchant_grocer.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultima/ultima1/widgets/merchant_grocer.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
void MerchantGrocer::steal() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
63
engines/ultima/ultima1/widgets/merchant_grocer.h
Normal file
63
engines/ultima/ultima1/widgets/merchant_grocer.h
Normal file
@ -0,0 +1,63 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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 ULTIMA_ULTIMA1_WIDGETS_MERCHANT_GROCER_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_MERCHANT_GROCER_H
|
||||
|
||||
#include "ultima/ultima1/widgets/merchant.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
class MerchantGrocer : public Merchant {
|
||||
public:
|
||||
DECLARE_WIDGET(MerchantGrocer)
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantGrocer(Ultima1Game *game, Maps::MapBase *map, int hitPoints) :
|
||||
Merchant(game, map, 50, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantGrocer(Ultima1Game *game, Maps::MapBase *map, uint tileNum, int hitPoints) :
|
||||
Merchant(game, map, tileNum, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantGrocer(Ultima1Game *game, Maps::MapBase *map) : Merchant(game, map, 50) {}
|
||||
|
||||
/**
|
||||
* Does the steal action
|
||||
*/
|
||||
virtual void steal();
|
||||
};
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
||||
|
||||
#endif
|
31
engines/ultima/ultima1/widgets/merchant_magic.cpp
Normal file
31
engines/ultima/ultima1/widgets/merchant_magic.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultima/ultima1/widgets/merchant_armor.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
58
engines/ultima/ultima1/widgets/merchant_magic.h
Normal file
58
engines/ultima/ultima1/widgets/merchant_magic.h
Normal file
@ -0,0 +1,58 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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 ULTIMA_ULTIMA1_WIDGETS_MERCHANT_MAGIC_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_MERCHANT_MAGIC_H
|
||||
|
||||
#include "ultima/ultima1/widgets/merchant.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
class MerchantMagic : public Merchant {
|
||||
public:
|
||||
DECLARE_WIDGET(MerchantMagic)
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantMagic(Ultima1Game *game, Maps::MapBase *map, int hitPoints) :
|
||||
Merchant(game, map, 50, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantMagic(Ultima1Game *game, Maps::MapBase *map, uint tileNum, int hitPoints) :
|
||||
Merchant(game, map, tileNum, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantMagic(Ultima1Game *game, Maps::MapBase *map) : Merchant(game, map, 50) {}
|
||||
};
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
||||
|
||||
#endif
|
31
engines/ultima/ultima1/widgets/merchant_tavern.cpp
Normal file
31
engines/ultima/ultima1/widgets/merchant_tavern.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultima/ultima1/widgets/merchant_armor.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
58
engines/ultima/ultima1/widgets/merchant_tavern.h
Normal file
58
engines/ultima/ultima1/widgets/merchant_tavern.h
Normal file
@ -0,0 +1,58 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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 ULTIMA_ULTIMA1_WIDGETS_MERCHANT_TAVERN_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_MERCHANT_TAVERN_H
|
||||
|
||||
#include "ultima/ultima1/widgets/merchant.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
class MerchantTavern : public Merchant {
|
||||
public:
|
||||
DECLARE_WIDGET(MerchantTavern)
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantTavern(Ultima1Game *game, Maps::MapBase *map, int hitPoints) :
|
||||
Merchant(game, map, 50, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantTavern(Ultima1Game *game, Maps::MapBase *map, uint tileNum, int hitPoints) :
|
||||
Merchant(game, map, tileNum, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantTavern(Ultima1Game *game, Maps::MapBase *map) : Merchant(game, map, 50) {}
|
||||
};
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
||||
|
||||
#endif
|
31
engines/ultima/ultima1/widgets/merchant_transport.cpp
Normal file
31
engines/ultima/ultima1/widgets/merchant_transport.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultima/ultima1/widgets/merchant_grocer.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
58
engines/ultima/ultima1/widgets/merchant_transport.h
Normal file
58
engines/ultima/ultima1/widgets/merchant_transport.h
Normal file
@ -0,0 +1,58 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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 ULTIMA_ULTIMA1_WIDGETS_MERCHANT_TRANSPORT_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_MERCHANT_TRANSPORT_H
|
||||
|
||||
#include "ultima/ultima1/widgets/merchant.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
class MerchantTransport : public Merchant {
|
||||
public:
|
||||
DECLARE_WIDGET(MerchantTransport)
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantTransport(Ultima1Game *game, Maps::MapBase *map, int hitPoints) :
|
||||
Merchant(game, map, 50, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantTransport(Ultima1Game *game, Maps::MapBase *map, uint tileNum, int hitPoints) :
|
||||
Merchant(game, map, tileNum, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantTransport(Ultima1Game *game, Maps::MapBase *map) : Merchant(game, map, 50) {}
|
||||
};
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
||||
|
||||
#endif
|
35
engines/ultima/ultima1/widgets/merchant_weapons.cpp
Normal file
35
engines/ultima/ultima1/widgets/merchant_weapons.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultima/ultima1/widgets/merchant_weapons.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
void MerchantWeapons::steal() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
63
engines/ultima/ultima1/widgets/merchant_weapons.h
Normal file
63
engines/ultima/ultima1/widgets/merchant_weapons.h
Normal file
@ -0,0 +1,63 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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 ULTIMA_ULTIMA1_WIDGETS_MERCHANT_WEAPONS_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_MERCHANT_WEAPONS_H
|
||||
|
||||
#include "ultima/ultima1/widgets/merchant.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
class MerchantWeapons : public Merchant {
|
||||
public:
|
||||
DECLARE_WIDGET(MerchantWeapons)
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantWeapons(Ultima1Game *game, Maps::MapBase *map, int hitPoints) :
|
||||
Merchant(game, map, 50, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantWeapons(Ultima1Game *game, Maps::MapBase *map, uint tileNum, int hitPoints) :
|
||||
Merchant(game, map, tileNum, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MerchantWeapons(Ultima1Game *game, Maps::MapBase *map) : Merchant(game, map, 50) {}
|
||||
|
||||
/**
|
||||
* Does the steal action
|
||||
*/
|
||||
virtual void steal();
|
||||
};
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user