aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/vmenu.cpp
diff options
context:
space:
mode:
authorStrangerke2011-06-27 01:03:47 +0200
committerStrangerke2011-06-27 01:03:47 +0200
commit083d6ff6122cb2faf0a4330eb480bb9f77afa255 (patch)
treee8dae7dcccf1946d5df3518ff0e1221d6a881896 /engines/cge/vmenu.cpp
parente0673c113563ab9fc28d08c07a3bcb5c3b98fa1c (diff)
downloadscummvm-rg350-083d6ff6122cb2faf0a4330eb480bb9f77afa255.tar.gz
scummvm-rg350-083d6ff6122cb2faf0a4330eb480bb9f77afa255.tar.bz2
scummvm-rg350-083d6ff6122cb2faf0a4330eb480bb9f77afa255.zip
CGE: remove some if(n)def DEMO by using a new flag. Added CGEEngine in several classes in order to do so.
Diffstat (limited to 'engines/cge/vmenu.cpp')
-rw-r--r--engines/cge/vmenu.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/cge/vmenu.cpp b/engines/cge/vmenu.cpp
index e2b2a29515..7db5a79f85 100644
--- a/engines/cge/vmenu.cpp
+++ b/engines/cge/vmenu.cpp
@@ -45,7 +45,7 @@ namespace CGE {
-MENU_BAR::MENU_BAR(uint16 w) {
+MENU_BAR::MENU_BAR(CGEEngine *vm, uint16 w) : TALK(vm), _vm(vm) {
int h = FONT_HIG + 2 * MB_VM, i = (w += 2 * MB_HM) * h;
uint8 *p = farnew(uint8, i), * p1, * p2;
@@ -98,8 +98,8 @@ VMENU *VMENU::Addr = NULL;
int VMENU::Recent = -1;
-VMENU::VMENU(CHOICE *list, int x, int y)
- : TALK(VMGather(list), RECT), Menu(list), Bar(NULL) {
+VMENU::VMENU(CGEEngine *vm, CHOICE *list, int x, int y)
+ : TALK(vm, VMGather(list), RECT), Menu(list), Bar(NULL), _vm(vm) {
CHOICE *cp;
Addr = this;
@@ -114,7 +114,7 @@ VMENU::VMENU(CHOICE *list, int x, int y)
else
Goto(x - W / 2, y - (TEXT_VM + FONT_HIG / 2));
Vga->ShowQ->Insert(this, Vga->ShowQ->Last());
- Bar = new MENU_BAR(W - 2 * TEXT_HM);
+ Bar = new MENU_BAR(_vm, W - 2 * TEXT_HM);
Bar->Goto(X + TEXT_HM - MB_HM, Y + TEXT_VM - MB_VM);
Vga->ShowQ->Insert(Bar, Vga->ShowQ->Last());
}
@@ -126,7 +126,7 @@ VMENU::~VMENU(void) {
void VMENU::Touch(uint16 mask, int x, int y) {
-#define h (FONT_HIG + TEXT_LS)
+ uint16 h = FONT_HIG + TEXT_LS;
bool ok = false;
if (Items) {
@@ -147,10 +147,10 @@ void VMENU::Touch(uint16 mask, int x, int y) {
if (ok && (mask & L_UP)) {
Items = 0;
SNPOST_(SNKILL, -1, 0, this);
- Menu[Recent = n].Proc();
+ //Menu[Recent = n].Proc();
+ warning("Missing call to proc()");
}
}
-#undef h
}
} // End of namespace CGE