aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/gui_lok.h
diff options
context:
space:
mode:
authorTorbjörn Andersson2008-05-12 04:33:30 +0000
committerTorbjörn Andersson2008-05-12 04:33:30 +0000
commit65e41486f478dae996459e8e8b834be8c9b1e6a9 (patch)
tree661444d93693218f771ff62f728ec16216b8ab93 /engines/kyra/gui_lok.h
parent4c5226002f5e0fcf8a4f706801e67dd7611de885 (diff)
downloadscummvm-rg350-65e41486f478dae996459e8e8b834be8c9b1e6a9.tar.gz
scummvm-rg350-65e41486f478dae996459e8e8b834be8c9b1e6a9.tar.bz2
scummvm-rg350-65e41486f478dae996459e8e8b834be8c9b1e6a9.zip
Added do { ... } while (0) to the GUI_V* macros, so that they will work as
expected if, for instance, someone writes "if (...) GUI_V1_MENU_ITEM( ... );" I don't expect anyone will want to write statements like that, but just to avoid nasty surprises... svn-id: r32049
Diffstat (limited to 'engines/kyra/gui_lok.h')
-rw-r--r--engines/kyra/gui_lok.h104
1 files changed, 55 insertions, 49 deletions
diff --git a/engines/kyra/gui_lok.h b/engines/kyra/gui_lok.h
index aa3bcdcc7f..607ef0b605 100644
--- a/engines/kyra/gui_lok.h
+++ b/engines/kyra/gui_lok.h
@@ -31,59 +31,65 @@
namespace Kyra {
#define GUI_V1_BUTTON(button, a, b, c, d, e, f, g, h, i, j, k) \
- button.nextButton = 0; \
- button.index = a; \
- button.unk6 = button.unk8 = 0; \
- button.data0Val1 = b; \
- button.data1Val1 = c; \
- button.data2Val1 = d; \
- button.data0ShapePtr = button.data1ShapePtr = button.data2ShapePtr = 0; \
- button.flags = e; \
- button.dimTableIndex = f; \
- button.x = g; \
- button.y = h; \
- button.width = i; \
- button.height = j; \
- button.flags2 = k; \
- button.mouseWheel = 0
+ do { \
+ button.nextButton = 0; \
+ button.index = a; \
+ button.unk6 = button.unk8 = 0; \
+ button.data0Val1 = b; \
+ button.data1Val1 = c; \
+ button.data2Val1 = d; \
+ button.data0ShapePtr = button.data1ShapePtr = button.data2ShapePtr = 0; \
+ button.flags = e; \
+ button.dimTableIndex = f; \
+ button.x = g; \
+ button.y = h; \
+ button.width = i; \
+ button.height = j; \
+ button.flags2 = k; \
+ button.mouseWheel = 0; \
+ } while (0)
#define GUI_V1_MENU(menu, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \
- menu.x = a; \
- menu.y = b; \
- menu.width = c; \
- menu.height = d; \
- menu.bkgdColor = e; \
- menu.color1 = f; \
- menu.color2 = g; \
- menu.menuNameString = h; \
- menu.textColor = i; \
- menu.titleX = j; \
- menu.titleY = k; \
- menu.highlightedItem = l; \
- menu.numberOfItems = m; \
- menu.scrollUpButtonX = n; \
- menu.scrollUpButtonY = o; \
- menu.scrollDownButtonX = p; \
- menu.scrollDownButtonY = q
+ do { \
+ menu.x = a; \
+ menu.y = b; \
+ menu.width = c; \
+ menu.height = d; \
+ menu.bkgdColor = e; \
+ menu.color1 = f; \
+ menu.color2 = g; \
+ menu.menuNameString = h; \
+ menu.textColor = i; \
+ menu.titleX = j; \
+ menu.titleY = k; \
+ menu.highlightedItem = l; \
+ menu.numberOfItems = m; \
+ menu.scrollUpButtonX = n; \
+ menu.scrollUpButtonY = o; \
+ menu.scrollDownButtonX = p; \
+ menu.scrollDownButtonY = q; \
+ } while (0)
#define GUI_V1_MENU_ITEM(item, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) \
- item.enabled = a; \
- item.itemString = d; \
- item.x = e; \
- item.y = g; \
- item.width = h; \
- item.height = i; \
- item.textColor = j; \
- item.highlightColor = k; \
- item.titleX = l; \
- item.bkgdColor = n; \
- item.color1 = o; \
- item.color2 = p; \
- item.saveSlot = q; \
- item.labelString = r; \
- item.labelX = s; \
- item.labelY = t; \
- item.unk1F = v
+ do { \
+ item.enabled = a; \
+ item.itemString = d; \
+ item.x = e; \
+ item.y = g; \
+ item.width = h; \
+ item.height = i; \
+ item.textColor = j; \
+ item.highlightColor = k; \
+ item.titleX = l; \
+ item.bkgdColor = n; \
+ item.color1 = o; \
+ item.color2 = p; \
+ item.saveSlot = q; \
+ item.labelString = r; \
+ item.labelX = s; \
+ item.labelY = t; \
+ item.unk1F = v; \
+ } while (0)
class KyraEngine_LoK;