From 8390b0cc53b2025108eee9a8ea9ee7f411edd55e Mon Sep 17 00:00:00 2001 From: Matt Hargett Date: Sun, 22 Sep 2002 03:53:53 +0000 Subject: 2002-09-21 Matt Hargett * scumm.dsp, scummvm.dsp, simon.dsp: Turn on warning as errors. Generate PDBs on all builds. * gameDetector.cpp, newgui.cpp, widget.cpp, actor.cpp, dialogs.cpp, resource.cpp, saveload.cpp, scumm_renderer.cpp: Fix warnings where possible. One pragma added to eliminate warning of unknown pragmas. * string.cpp: If unknown escape sequence, print warning. svn-id: r4998 --- gui/newgui.cpp | 8 ++++++-- gui/widget.cpp | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'gui') diff --git a/gui/newgui.cpp b/gui/newgui.cpp index e2c3dfb639..f8dff32c90 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -26,6 +26,10 @@ #include "dialog.h" #include "scumm/dialogs.h" +#ifdef _MSC_VER +# pragma warning( disable : 4068 ) // unknown pragma +#endif + /* * TODO list * - get a nicer font which contains diacrits (ŠšŸ§Žˆ etc.) @@ -126,7 +130,7 @@ void NewGui::loop() switch(t.event_code) { case OSystem::EVENT_KEYDOWN: - activeDialog->handleKeyDown(t.kbd.ascii, t.kbd.flags); + activeDialog->handleKeyDown((byte)t.kbd.ascii, t.kbd.flags); // init continuous event stream _currentKeyDown = t.kbd.ascii; @@ -135,7 +139,7 @@ void NewGui::loop() _keyRepeatLoopCount = 0; break; case OSystem::EVENT_KEYUP: - activeDialog->handleKeyUp(t.kbd.ascii, t.kbd.flags); + activeDialog->handleKeyUp((byte)t.kbd.ascii, t.kbd.flags); if (t.kbd.ascii == _currentKeyDown) // only stop firing events if it's the current key _currentKeyDown = 0; diff --git a/gui/widget.cpp b/gui/widget.cpp index f6aedbad76..3788e4d237 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -23,6 +23,10 @@ #include "dialog.h" #include "newgui.h" +#ifdef _MSC_VER +# pragma warning( disable : 4068 ) // unknown pragma +#endif + Widget::Widget (Dialog *boss, int x, int y, int w, int h) : _type(0), _boss(boss), _x(x), _y(y), _w(w), _h(h), @@ -57,7 +61,7 @@ void Widget::draw() } // Now perform the actual widget draw - drawWidget(_flags & WIDGET_HILITED); + drawWidget((_flags & WIDGET_HILITED) ? true : false); // Restore x/y if (_flags & WIDGET_BORDER) { -- cgit v1.2.3