mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-21 03:31:40 +00:00
MUTATIONOFJB: Fix missing lines between block ends.
This commit is contained in:
parent
9f1c628d4b
commit
561309eaa2
@ -556,4 +556,5 @@ Command::ExecuteResult ChangeSceneCommand::execute(ScriptExecutionContext &scrip
|
||||
Common::String ChangeSceneCommand::debugString() const {
|
||||
return Common::String::format("SCENE%d.%s %s %s", _sceneId, getRegisterAsString(), getOperationAsString(), getValueAsString().c_str());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -46,9 +46,7 @@ void ConditionalCommandParser::finish(ScriptParseContext &) {
|
||||
ConditionalCommand::ConditionalCommand() :
|
||||
_trueCommand(nullptr),
|
||||
_falseCommand(nullptr),
|
||||
_cachedResult(false)
|
||||
{}
|
||||
|
||||
_cachedResult(false) {}
|
||||
|
||||
Command *ConditionalCommand::getTrueCommand() const {
|
||||
return _trueCommand;
|
||||
@ -73,4 +71,5 @@ Command *ConditionalCommand::next() const {
|
||||
return _falseCommand;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -96,4 +96,5 @@ Command::ExecuteResult DefineStructCommand::execute(ScriptExecutionContext &scri
|
||||
Common::String DefineStructCommand::debugString() const {
|
||||
return "DEFINE_STRUCT <data omitted>";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -38,4 +38,5 @@ public:
|
||||
private:
|
||||
ConversationInfo _conversationInfo;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -77,12 +77,12 @@ bool IfCommandParser::parse(const Common::String &line, ScriptParseContext &, Co
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
IfCommand::IfCommand(uint8 sceneId, uint8 objectId, uint16 value, bool negative) :
|
||||
_sceneId(sceneId),
|
||||
_objectId(objectId),
|
||||
_value(value),
|
||||
_negative(negative)
|
||||
{}
|
||||
_negative(negative) {}
|
||||
|
||||
Command::ExecuteResult IfCommand::execute(ScriptExecutionContext &scriptExecCtx) {
|
||||
Scene *const scene = scriptExecCtx.getGameData().getScene(_sceneId);
|
||||
@ -108,4 +108,3 @@ Common::String IfCommand::debugString() const {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -70,8 +70,7 @@ bool IfItemCommandParser::parse(const Common::String &line, ScriptParseContext &
|
||||
|
||||
IfItemCommand::IfItemCommand(const Common::String &item, bool negative) :
|
||||
_item(item),
|
||||
_negative(negative)
|
||||
{}
|
||||
_negative(negative) {}
|
||||
|
||||
Command::ExecuteResult IfItemCommand::execute(ScriptExecutionContext &scriptExecCtx) {
|
||||
_cachedResult = scriptExecCtx.getGameData()._inventory.hasItem(_item);
|
||||
@ -87,4 +86,3 @@ Common::String IfItemCommand::debugString() const {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -68,4 +68,3 @@ Common::String IfPiggyCommand::debugString() const {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -59,6 +59,7 @@ bool LabelCommandParser::parse(const Common::String &line, ScriptParseContext &p
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
const Common::String &LabelCommand::getName() const {
|
||||
return _name;
|
||||
}
|
||||
|
@ -80,4 +80,3 @@ Common::String NewRoomCommand::debugString() const {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,7 @@ bool RandomCommandParser::parse(const Common::String &line, ScriptParseContext &
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool RandomBlockStartParser::parse(const Common::String &line, ScriptParseContext &parseCtx, Command *&) {
|
||||
if (line != "/") {
|
||||
return false;
|
||||
@ -84,6 +85,7 @@ void RandomBlockStartParser::transition(ScriptParseContext &parseCtx, Command *,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RandomCommand::RandomCommand(uint numChoices)
|
||||
: _numChoices(numChoices),
|
||||
_chosenNext(nullptr) {
|
||||
|
@ -49,4 +49,3 @@ private:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -60,4 +60,3 @@ private:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -110,4 +110,3 @@ public:
|
||||
#else
|
||||
REGISTER_PLUGIN_STATIC(MUTATIONOFJB, PLUGIN_TYPE_ENGINE, MutationOfJBMetaEngine);
|
||||
#endif
|
||||
|
||||
|
@ -52,7 +52,6 @@ MutationOfJBEngine::~MutationOfJBEngine() {
|
||||
debug("MutationOfJBEngine::~MutationOfJBEngine");
|
||||
}
|
||||
|
||||
|
||||
void MutationOfJBEngine::setupCursor() {
|
||||
const uint8 cursor[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
@ -72,7 +72,6 @@ private:
|
||||
CursorState _cursorState;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -87,8 +87,7 @@ ScriptParseContext::ScriptParseContext(Common::SeekableReadStream &stream) :
|
||||
_stream(stream),
|
||||
_currentCommand(nullptr),
|
||||
_lastCommand(nullptr),
|
||||
_pendingRandomCommand(nullptr)
|
||||
{}
|
||||
_pendingRandomCommand(nullptr) {}
|
||||
|
||||
bool ScriptParseContext::readLine(Common::String &line) {
|
||||
do {
|
||||
|
@ -58,4 +58,3 @@ Common::String toUpperCP895(const Common::String &str) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,6 @@ namespace Common {
|
||||
class String;
|
||||
}
|
||||
|
||||
|
||||
namespace MutationOfJB {
|
||||
|
||||
void reportFileMissingError(const char *fileName);
|
||||
|
@ -62,7 +62,9 @@ void ButtonWidget::handleEvent(const Common::Event &event) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
void ButtonWidget::_draw(Graphics::ManagedSurface &surface) {
|
||||
|
||||
void ButtonWidget::draw(Graphics::ManagedSurface &surface) {
|
||||
surface.blitFrom(_pressed ? _pressedSurface : _normalSurface, Common::Point(_area.left, _area.top));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
virtual void handleEvent(const Common::Event &event) override;
|
||||
|
||||
protected:
|
||||
virtual void _draw(Graphics::ManagedSurface &) override;
|
||||
virtual void draw(Graphics::ManagedSurface &) override;
|
||||
|
||||
private:
|
||||
Graphics::Surface _normalSurface;
|
||||
|
@ -59,7 +59,7 @@ void ConversationWidget::clearChoices() {
|
||||
markDirty();
|
||||
}
|
||||
|
||||
void ConversationWidget::_draw(Graphics::ManagedSurface &surface) {
|
||||
void ConversationWidget::draw(Graphics::ManagedSurface &surface) {
|
||||
surface.blitFrom(_surface, Common::Point(_area.left, _area.top));
|
||||
|
||||
for (int i = 0; i < CONVERSATION_MAX_CHOICES; ++i) {
|
||||
@ -94,4 +94,3 @@ void ConversationWidget::handleEvent(const Common::Event &event) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
virtual void handleEvent(const Common::Event &event) override;
|
||||
|
||||
protected:
|
||||
virtual void _draw(Graphics::ManagedSurface &surface) override;
|
||||
virtual void draw(Graphics::ManagedSurface &surface) override;
|
||||
|
||||
private:
|
||||
Graphics::Surface _surface;
|
||||
|
@ -30,7 +30,7 @@ ImageWidget::ImageWidget(Gui &gui, const Common::Rect &area, const Graphics::Sur
|
||||
_image(image) {}
|
||||
|
||||
|
||||
void ImageWidget::_draw(Graphics::ManagedSurface &surface) {
|
||||
void ImageWidget::draw(Graphics::ManagedSurface &surface) {
|
||||
surface.blitFrom(_image, Common::Point(_area.left, _area.top));
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
ImageWidget(Gui &gui, const Common::Rect &area, const Graphics::Surface &image);
|
||||
|
||||
protected:
|
||||
virtual void _draw(Graphics::ManagedSurface &surface) override;
|
||||
virtual void draw(Graphics::ManagedSurface &surface) override;
|
||||
|
||||
private:
|
||||
Graphics::Surface _image;
|
||||
|
@ -63,7 +63,7 @@ void InventoryWidget::drawInventoryItem(Graphics::ManagedSurface &surface, const
|
||||
surface.blitFrom(_surfaces[surfaceNo], sourceRect, destStartPos);
|
||||
}
|
||||
|
||||
void InventoryWidget::_draw(Graphics::ManagedSurface &surface) {
|
||||
void InventoryWidget::draw(Graphics::ManagedSurface &surface) {
|
||||
Inventory &inventory = _gui.getGame().getGameData().getInventory();
|
||||
const Inventory::Items &items = inventory.getItems();
|
||||
surface.fillRect(_area, 0x00);
|
||||
|
@ -35,7 +35,7 @@ namespace MutationOfJB {
|
||||
class InventoryWidget : public Widget {
|
||||
public:
|
||||
InventoryWidget(Gui &gui, Gui::InventoryMap &inventoryMap, const Common::Array<Graphics::Surface> &inventorySurfaces);
|
||||
virtual void _draw(Graphics::ManagedSurface &) override;
|
||||
virtual void draw(Graphics::ManagedSurface &) override;
|
||||
|
||||
private:
|
||||
void drawInventoryItem(Graphics::ManagedSurface &surface, const Common::String &item, int pos);
|
||||
|
@ -54,7 +54,7 @@ bool Widget::isDirty() const {
|
||||
void Widget::update(Graphics::ManagedSurface &surface) {
|
||||
if (_dirty) {
|
||||
if (_visible) {
|
||||
_draw(surface);
|
||||
draw(surface);
|
||||
}
|
||||
_dirty = false;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
|
||||
virtual void handleEvent(const Common::Event &) {}
|
||||
protected:
|
||||
virtual void _draw(Graphics::ManagedSurface &) = 0;
|
||||
virtual void draw(Graphics::ManagedSurface &) = 0;
|
||||
|
||||
Gui &_gui;
|
||||
Common::Rect _area;
|
||||
@ -67,4 +67,3 @@ protected:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user