ULTIMA1: Proper display of different transport types

This commit is contained in:
Paul Gilbert 2018-10-09 19:55:58 -07:00 committed by Paul Gilbert
parent 20d72bc200
commit 7c41a99cca
2 changed files with 36 additions and 0 deletions

View File

@ -217,6 +217,7 @@ void Transports::addTransport(int transportIndex) {
// Add the transport onto the designated tile around the location
Shared::Maps::MapWidget *widget = map->createWidget(WIDGET_NAMES[transportIndex]);
assert(widget);
widget->_position = map->getPosition() + delta;
map->addWidget(widget);
return;
}

View File

@ -89,6 +89,11 @@ public:
* Constructor
*/
Horse(Ultima1Game *game, Maps::MapBase *map);
/**
* Get the tile for the transport method
*/
virtual uint getTileNum() const override { return 9; }
};
/**
@ -104,6 +109,11 @@ public:
* Constructor
*/
Cart(Ultima1Game *game, Maps::MapBase *map);
/**
* Get the tile for the transport method
*/
virtual uint getTileNum() const override { return 10; }
};
/**
@ -119,6 +129,11 @@ public:
* Constructor
*/
Raft(Ultima1Game *game, Maps::MapBase *map);
/**
* Get the tile for the transport method
*/
virtual uint getTileNum() const override { return 11; }
};
/**
@ -139,6 +154,11 @@ public:
* Get the name of a transport's weapons
*/
virtual Common::String getWeaponsName();
/**
* Get the tile for the transport method
*/
virtual uint getTileNum() const override { return 12; }
};
/**
@ -159,6 +179,11 @@ public:
* Get the name of a transport's weapons
*/
virtual Common::String getWeaponsName();
/**
* Get the tile for the transport method
*/
virtual uint getTileNum() const override { return 14; }
};
/**
@ -181,6 +206,11 @@ public:
* Handles loading and saving data
*/
virtual void synchronize(Common::Serializer &s) override;
/**
* Get the tile for the transport method
*/
virtual uint getTileNum() const override { return 15; }
};
/**
@ -196,6 +226,11 @@ public:
* Constructor
*/
TimeMachine(Ultima1Game *game, Maps::MapBase *map);
/**
* Get the tile for the transport method
*/
virtual uint getTileNum() const override { return 16; }
};
} // End of namespace Widgets