aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/vmenu.cpp
diff options
context:
space:
mode:
authorStrangerke2011-07-19 08:09:16 +0200
committerStrangerke2011-07-19 08:09:16 +0200
commit9a148a27cc44ba089e57ea07996a868c89c2287f (patch)
tree230b696d248ad3e6c7b9d741122bc0dbfd79aeec /engines/cge/vmenu.cpp
parenta073e78ba1fb4be357660a03aa0c387d80df3aab (diff)
downloadscummvm-rg350-9a148a27cc44ba089e57ea07996a868c89c2287f.tar.gz
scummvm-rg350-9a148a27cc44ba089e57ea07996a868c89c2287f.tar.bz2
scummvm-rg350-9a148a27cc44ba089e57ea07996a868c89c2287f.zip
CGE: Remove macro farnew
Diffstat (limited to 'engines/cge/vmenu.cpp')
-rw-r--r--engines/cge/vmenu.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/cge/vmenu.cpp b/engines/cge/vmenu.cpp
index bc5e5cfb6c..c65ec6957e 100644
--- a/engines/cge/vmenu.cpp
+++ b/engines/cge/vmenu.cpp
@@ -32,15 +32,16 @@
namespace CGE {
MenuBar::MenuBar(CGEEngine *vm, uint16 w) : Talk(vm), _vm(vm) {
- int h = kFontHigh + 2 * kMenuBarVM, i = (w += 2 * kMenuBarHM) * h;
- uint8 *p = farnew(uint8, i), * p1, * p2;
+ int h = kFontHigh + 2 * kMenuBarVM;
+ int i = (w += 2 * kMenuBarHM) * h;
+ uint8 *p = (uint8 *) malloc(sizeof(uint8) * i);
memset(p + w, TRANS, i - 2 * w);
memset(p, kMenuBarLT, w);
memset(p + i - w, kMenuBarRB, w);
- p1 = p;
- p2 = p + i - 1;
- for (i = 0; i < h; i++) {
+ uint8 *p1 = p;
+ uint8 *p2 = p + i - 1;
+ for (int cpt = 0; cpt < h; cpt++) {
*p1 = kMenuBarLT;
*p2 = kMenuBarRB;
p1 += w;