diff options
-rw-r--r-- | engines/sci/engine/kmenu.cpp | 8 | ||||
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 14 |
2 files changed, 7 insertions, 15 deletions
diff --git a/engines/sci/engine/kmenu.cpp b/engines/sci/engine/kmenu.cpp index 8f7203ef87..b4510d3d1a 100644 --- a/engines/sci/engine/kmenu.cpp +++ b/engines/sci/engine/kmenu.cpp @@ -393,20 +393,20 @@ kMenuSelect(state_t *s, int funct_nr, int argc, reg_t *argv) old_menu = -1; while (menu_mode) { - sci_event_t event = gfxop_get_event(s->gfx_state, SCI_EVT_ANY); + sci_event_t ev = gfxop_get_event(s->gfx_state, SCI_EVT_ANY); claimed = 0; - switch (event.type) { + switch (ev.type) { case SCI_EVT_QUIT: quit_vm(); return NULL_REG; case SCI_EVT_KEYBOARD: - switch (event.data) { + switch (ev.data) { case '`': - if (event.buckybits & SCI_EVM_CTRL) + if (ev.buckybits & SCI_EVM_CTRL) s->visual->print(GFXW(s->visual), 0); break; diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 4679a45f9a..cb83604b53 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -80,21 +80,13 @@ /* Floating point struct */ typedef struct pointf { + pointf() : x(0), y(0) {} + pointf(float x_, float y_) : x(x_), y(y_) {} + float x, y; } pointf_t; pointf_t -pointf(float x, float y) -{ - pointf_t p; - - p.x = x; - p.y = y; - - return p; -} - -pointf_t to_pointf(point_t p) { return pointf(p.x, p.y); |