aboutsummaryrefslogtreecommitdiff
path: root/engines/mutationofjb/widgets
diff options
context:
space:
mode:
authorĽubomír Remák2018-08-04 16:57:41 +0200
committerEugene Sandulenko2018-08-25 23:12:01 +0200
commita25715a29b0587ae6795eef63a575172e2cb971d (patch)
treeb10acdeffd001f507209799498a6e9f90a585e06 /engines/mutationofjb/widgets
parent6ff609c51478c07a00018e57d8149f09d97677e7 (diff)
downloadscummvm-rg350-a25715a29b0587ae6795eef63a575172e2cb971d.tar.gz
scummvm-rg350-a25715a29b0587ae6795eef63a575172e2cb971d.tar.bz2
scummvm-rg350-a25715a29b0587ae6795eef63a575172e2cb971d.zip
MUTATIONOFJB: Fix code formatting issues (with astyle).
Diffstat (limited to 'engines/mutationofjb/widgets')
-rw-r--r--engines/mutationofjb/widgets/buttonwidget.cpp8
-rw-r--r--engines/mutationofjb/widgets/conversationwidget.cpp5
-rw-r--r--engines/mutationofjb/widgets/conversationwidget.h4
-rw-r--r--engines/mutationofjb/widgets/inventorywidget.cpp2
-rw-r--r--engines/mutationofjb/widgets/inventorywidget.h4
5 files changed, 11 insertions, 12 deletions
diff --git a/engines/mutationofjb/widgets/buttonwidget.cpp b/engines/mutationofjb/widgets/buttonwidget.cpp
index 9f9a401eb6..911cb7d7df 100644
--- a/engines/mutationofjb/widgets/buttonwidget.cpp
+++ b/engines/mutationofjb/widgets/buttonwidget.cpp
@@ -38,9 +38,8 @@ void ButtonWidget::setCallback(ButtonWidgetCallback *callback) {
}
void ButtonWidget::handleEvent(const Common::Event &event) {
- switch(event.type) {
- case Common::EVENT_LBUTTONDOWN:
- {
+ switch (event.type) {
+ case Common::EVENT_LBUTTONDOWN: {
const int16 x = event.mouse.x;
const int16 y = event.mouse.y;
if (_area.contains(x, y)) {
@@ -49,8 +48,7 @@ void ButtonWidget::handleEvent(const Common::Event &event) {
}
break;
}
- case Common::EVENT_LBUTTONUP:
- {
+ case Common::EVENT_LBUTTONUP: {
if (_pressed) {
_pressed = false;
markDirty();
diff --git a/engines/mutationofjb/widgets/conversationwidget.cpp b/engines/mutationofjb/widgets/conversationwidget.cpp
index 24bb5e1d25..e0bbf6645f 100644
--- a/engines/mutationofjb/widgets/conversationwidget.cpp
+++ b/engines/mutationofjb/widgets/conversationwidget.cpp
@@ -74,9 +74,8 @@ void ConversationWidget::_draw(Graphics::ManagedSurface &surface) {
}
void ConversationWidget::handleEvent(const Common::Event &event) {
- switch(event.type) {
- case Common::EVENT_LBUTTONDOWN:
- {
+ switch (event.type) {
+ case Common::EVENT_LBUTTONDOWN: {
const int16 x = event.mouse.x;
const int16 y = event.mouse.y;
if (_area.contains(x, y)) {
diff --git a/engines/mutationofjb/widgets/conversationwidget.h b/engines/mutationofjb/widgets/conversationwidget.h
index 51ea86ed02..abde70205b 100644
--- a/engines/mutationofjb/widgets/conversationwidget.h
+++ b/engines/mutationofjb/widgets/conversationwidget.h
@@ -41,7 +41,9 @@ public:
enum { CONVERSATION_MAX_CHOICES = 4 };
ConversationWidget(Gui &gui, const Common::Rect &area, const Graphics::Surface &surface);
- void setCallback(ConversationWidgetCallback *callback) { _callback = callback; }
+ void setCallback(ConversationWidgetCallback *callback) {
+ _callback = callback;
+ }
void setChoice(int choiceNo, const Common::String &str, uint32 data = 0);
void clearChoices();
diff --git a/engines/mutationofjb/widgets/inventorywidget.cpp b/engines/mutationofjb/widgets/inventorywidget.cpp
index d78ef10adc..96f35e4cb2 100644
--- a/engines/mutationofjb/widgets/inventorywidget.cpp
+++ b/engines/mutationofjb/widgets/inventorywidget.cpp
@@ -41,7 +41,7 @@ enum {
INVENTORY_ITEMS_LINES = 5
};
-InventoryWidget::InventoryWidget(Gui &gui, Gui::InventoryMap &inventoryMap, const Common::Array<Graphics::Surface>& inventorySurfaces) :
+InventoryWidget::InventoryWidget(Gui &gui, Gui::InventoryMap &inventoryMap, const Common::Array<Graphics::Surface> &inventorySurfaces) :
Widget(gui, Common::Rect(INVENTORY_START_X, INVENTORY_START_Y, INVENTORY_START_X + Inventory::VISIBLE_ITEMS * INVENTORY_ITEM_WIDTH, INVENTORY_START_Y + INVENTORY_ITEM_HEIGHT)),
_inventoryMap(inventoryMap),
_surfaces(inventorySurfaces) {}
diff --git a/engines/mutationofjb/widgets/inventorywidget.h b/engines/mutationofjb/widgets/inventorywidget.h
index f0bc4baeee..8d6205e1ef 100644
--- a/engines/mutationofjb/widgets/inventorywidget.h
+++ b/engines/mutationofjb/widgets/inventorywidget.h
@@ -34,13 +34,13 @@ namespace MutationOfJB {
class InventoryWidget : public Widget {
public:
- InventoryWidget(Gui &gui, Gui::InventoryMap &inventoryMap, const Common::Array<Graphics::Surface>& inventorySurfaces);
+ InventoryWidget(Gui &gui, Gui::InventoryMap &inventoryMap, const Common::Array<Graphics::Surface> &inventorySurfaces);
virtual void _draw(Graphics::ManagedSurface &) override;
private:
void drawInventoryItem(Graphics::ManagedSurface &surface, const Common::String &item, int pos);
Gui::InventoryMap &_inventoryMap;
- const Common::Array<Graphics::Surface>& _surfaces;
+ const Common::Array<Graphics::Surface> &_surfaces;
};
}