mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 17:57:14 +00:00
ULTIMA1: Added Merchant widget class
This commit is contained in:
parent
9402c70150
commit
49b5e97268
@ -79,6 +79,7 @@ MODULE_OBJS += \
|
||||
ultima1/widgets/guard.o \
|
||||
ultima1/widgets/hit.o \
|
||||
ultima1/widgets/king.o \
|
||||
ultima1/widgets/merchant.o \
|
||||
ultima1/widgets/overworld_monster.o \
|
||||
ultima1/widgets/person.o \
|
||||
ultima1/widgets/princess.o \
|
||||
|
@ -27,6 +27,7 @@
|
||||
#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"
|
||||
|
||||
@ -68,6 +69,9 @@ void MapCityCastle::loadWidgets() {
|
||||
case 20:
|
||||
person = new Widgets::King(_game, this, lp[3]);
|
||||
break;
|
||||
case 21:
|
||||
person = new Widgets::Merchant(_game, this, lp[3]);
|
||||
break;
|
||||
case 22:
|
||||
person = new Widgets::Princess(_game, this, lp[3]);
|
||||
break;
|
||||
|
@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ULTIMA_ULTIMA1_PEOPLE_BARD_H
|
||||
#define ULTIMA_ULTIMA1_PEOPLE_BARD_H
|
||||
#ifndef ULTIMA_ULTIMA1_WIDGETS_BARD_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_BARD_H
|
||||
|
||||
#include "ultima/ultima1/widgets/person.h"
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ULTIMA_ULTIMA1_PEOPLE_GUARD_H
|
||||
#define ULTIMA_ULTIMA1_PEOPLE_GUARD_H
|
||||
#ifndef ULTIMA_ULTIMA1_WIDGETS_GUARD_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_GUARD_H
|
||||
|
||||
#include "ultima/ultima1/widgets/person.h"
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ULTIMA_ULTIMA1_PEOPLE_KING_H
|
||||
#define ULTIMA_ULTIMA1_PEOPLE_KING_H
|
||||
#ifndef ULTIMA_ULTIMA1_WIDGETS_KING_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_KING_H
|
||||
|
||||
#include "ultima/ultima1/widgets/person.h"
|
||||
|
||||
|
32
engines/ultima/ultima1/widgets/merchant.cpp
Normal file
32
engines/ultima/ultima1/widgets/merchant.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
/* 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.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
52
engines/ultima/ultima1/widgets/merchant.h
Normal file
52
engines/ultima/ultima1/widgets/merchant.h
Normal file
@ -0,0 +1,52 @@
|
||||
/* 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_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_MERCHANT_H
|
||||
|
||||
#include "ultima/ultima1/widgets/person.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
class Merchant : public Person {
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
Merchant(Ultima1Game *game, Map::Ultima1Map::MapBase *map, int hitPoints) :
|
||||
Person(game, map, 50, hitPoints) {}
|
||||
Merchant(Ultima1Game *game, Map::Ultima1Map::MapBase *map, uint tileNum, int hitPoints) :
|
||||
Person(game, map, tileNum, hitPoints) {}
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~Merchant() {}
|
||||
};
|
||||
|
||||
} // End of namespace Widgets
|
||||
} // End of namespace Ultima1
|
||||
} // End of namespace Ultima
|
||||
|
||||
#endif
|
@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ULTIMA_ULTIMA1_PEOPLE_PERSON_H
|
||||
#define ULTIMA_ULTIMA1_PEOPLE_PERSON_H
|
||||
#ifndef ULTIMA_ULTIMA1_WIDGETS_PERSON_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_PERSON_H
|
||||
|
||||
#include "ultima/ultima1/map/map.h"
|
||||
#include "ultima/ultima1/game.h"
|
||||
@ -66,7 +66,7 @@ public:
|
||||
* Constructor
|
||||
*/
|
||||
Person(Ultima1Game *game, Map::Ultima1Map::MapBase *map, uint tileNum, int hitPoints) :
|
||||
Shared::Creature(game, map, hitPoints), _tileNum(tileNum) {}
|
||||
Shared::Creature(game, map, hitPoints), _game(game), _map(map), _tileNum(tileNum) {}
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
|
@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ULTIMA_ULTIMA1_PEOPLE_PRINCESS_H
|
||||
#define ULTIMA_ULTIMA1_PEOPLE_PRINCESS_H
|
||||
#ifndef ULTIMA_ULTIMA1_WIDGETS_PRINCESS_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_PRINCESS_H
|
||||
|
||||
#include "ultima/ultima1/widgets/wench.h"
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ULTIMA_ULTIMA1_PEOPLE_WENCH_H
|
||||
#define ULTIMA_ULTIMA1_PEOPLE_WENCH_H
|
||||
#ifndef ULTIMA_ULTIMA1_WIDGETS_WENCH_H
|
||||
#define ULTIMA_ULTIMA1_WIDGETS_WENCH_H
|
||||
|
||||
#include "ultima/ultima1/widgets/person.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user