aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/menu.cpp
AgeCommit message (Collapse)Author
2019-12-01SCI: Fix Missing Default Switch CasesD G Turner
These are flagged by GCC if -Wswitch-default is enabled.
2019-11-19SCI: Fix kMenuSelect selecting disabled itemssluicebox
Fixes CAMELOT "draw sword" command causing bugs and lockups when it's not supposed to be available
2019-03-29SCI: Fix kAddMenu language separator parsingsluicebox
Fixes bug #10926 that prevents SQ3 German Amiga from loading
2017-09-27SCI: Do some clean-up of event handling systemColin Snover
Convert macros and vars to enums, rename keyboard events in preparation for adding key up events, clean up unnecessary nested conditionals, add TODOs for potential future work.
2017-07-16SCI: Clarify Tab character & modifier workarounds in GfxMenuColin Snover
2017-07-16SCI: Fix kMenuSelect to understand control charactersColin Snover
In b4c0be8b42d63cbf3c808be1a94839483f674ce9 keyboard events were adjusted to send control characters to game scripts, which matches how keyboard input works in SSCI. Unfortunately this broke games using kMenuSelect because that kernel code was not expecting to receive control characters. Here is an amended list of known types of keyboard shortcuts, for future reference: * All games with text inputs (Ctrl+C clears text boxes) * Most games using MenuBar, like QFG1EGA (Ctrl+P pauses the game, Tab or Ctrl+I show inventory) * QFG1VGA (Ctrl+S shows stats) * Torin (Ctrl+N, Ctrl+O, Ctrl+S, etc. activate menu commands) * LSL1VGA & LSL3 (Ctrl+Alt+X to bypass age check) * Most in-game debuggers (Alt+T for teleport) The shortcut handling code is still not 100% accurate since there are some edge cases that are not implemented (e.g. in DOS/SSCI, Shift+Ctrl+<key> usually sends the same key information as Ctrl+<key>, but not if <key> is Tab), but it should now be working in a consistent and rational manner for end-users.
2016-02-02SCI: Removed ".data" from SciEventMartin Kiewitz
Was the ScummVM-system-Keycode, sometimes modified. Changed Menu/Portrait/Controls32-code to use .character instead. Cleaned up a bit of code in getScummVMEvent()
2016-02-02SCI: Fix control/Fx keys not working anymoreMartin Kiewitz
Was effectively caused by commit adding the keyboard driver bug for SCI0/SCI01, although the bug is actually real and happens. It seems Sierra did not check the key-modifier in kMenuSelect. We do and that's why the code didn't recognize all sorts of menu keys anymore. We now isolate the lower byte before comparing. I also noticed, that Sierra passed keyboard modifiers in mouse events. This was probably done, so that owners of a 1-button mouse were able to right-click. We do this now too. Also added information about mouse modifiers in kGetEvent. Moved the mouse modifier code into getScummVMEvent(). This should fix bug #7009.
2014-02-18SCI: Make GPL headers consistent in themselves.Johannes Schickel
2013-05-01SCI: Fix a non-initialized variable in GfxMenu - CID 1003110Filippos Karapetis
2013-02-23ALL: Fix typo (existant->existent)Willem Jan Palenstijn
2012-06-18SCI: Add setter/getter methods to reg_t'sFilippos Karapetis
No functionality change has been made with this commit. This avoids setting and getting the reg_t members directly, and is the basis of any future work on large SCI3 scripts (larger than 64KB)
2012-03-13JANITORIAL: Replace (x ? false : true) by !(x).Christoph Mallon
2011-06-20ALL: Remove trailing whitespacesMax Horn
This tries to make our code a bit more compliant with our code formatting conventions. For future use, this is the command I used: git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-12SCI: Fixed bug #3295931 - "SCI: JONES: Disabled commands are available using ↵md5
shortcuts"
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-03-13SCI: Fixed the flashing icon bar in the Mac version of Castle of Dr. Brainmd5
Thanks to waltervn for his work and help on this
2011-03-09SCI: Save mouse position in SciEvent.Johannes Schickel
Instead of querying the event manager for the current mouse cursor coordinates kGetEvent now uses the saved mouse positions, which will assure every event will be processed with the correct coordinates instead of the current ones. Various other functions using SciEvent directly were adapted too. This fixes cursor click positions for the WinCE backend. Thanks to wjp and waltervn for helping me with this.
2011-03-08SCI: Remove unused argument to saidWillem Jan Palenstijn
2011-01-15SCI: Plugged 2 memory leaks, reported by digitallFilippos Karapetis
- Plugged 2 memory leaks in the SCI0 menu code (the lists of menu and submenu entries) - Got rid of the _listCount variable svn-id: r55254
2011-01-08SCI: Some function renamingFilippos Karapetis
Draw_Status -> DrawStatus Draw_String -> DrawString svn-id: r55178
2011-01-01SCI: debugC calls no longer require a debug level of 2 to show outputFilippos Karapetis
svn-id: r55086
2010-11-02SCI: Remove any use of printfMax Horn
svn-id: r54037
2010-09-26SCI: adding separate status drawing codeMartin Kiewitz
now also draws "IV" in KQ4 correctly. This wasn't the case before because we reused the regular drawing code, which would see the 0xA ("IV") as linebreak save for backport svn-id: r52913
2010-07-29SCI: Ignore setAttribute() on any non-existent menu itemsMatthew Hoops
This fixes two fan games: Al Pond 2 and Aquarius. The original interpreter did this as well. svn-id: r51477
2010-07-28SCI: Fix using the parser in SCI Fan GamesMatthew Hoops
Get a pointer to the said spec instead of copying to a buffer. The fan games use a said spec with size < 64. Also, make said() take a const pointer as the spec cannot change. Thanks to waltervn and wjp. svn-id: r51432
2010-07-28SCI: Added bug report numbers for all the recently fixed bugsFilippos Karapetis
svn-id: r51407
2010-07-26SCI: Fixed bug #3034507, "PQ2 Demo: Non-existant menu item"Filippos Karapetis
svn-id: r51294
2010-07-20SCI: fixed jones/ega/vga port issueMartin Kiewitz
getPortById() error was caused by us remembering port when going interactive, restoring it and restoring it all the time afterwards as well svn-id: r51071
2010-07-10SCI: calculate widths for menu after switching to menuport, i guess this was ↵Martin Kiewitz
the reason why we sometimes had issues drawing parts of the menu (random issue) svn-id: r50784
2010-07-06SCI: fix regression of r50721 - pausing/resuming only on actual menu usageMartin Kiewitz
svn-id: r50724
2010-06-29SCI: Rewrap more commentsMax Horn
svn-id: r50500
2010-06-23Moved the SelectorCache struct inside selector.h, where it belongs, and ↵Filippos Karapetis
fixed some header dependencies in the process svn-id: r50183
2010-06-17SCI: Rename sciEvent to SciEventMax Horn
svn-id: r49960
2010-06-17SCI: Moved the event code a little bit around.Max Horn
* Move sleep() from EventManager to SciEngine * Rename EventManager methods: get -> getSciEvent, and getFromScummVM -> getScummVMEvent * Make scancode_rows static const * Turn altify & numlockify from EventManager methods into static functions (and comment out the currently unused numlockify) svn-id: r49959
2010-06-15SCI: SciGui/SciGui32 gone for good...Martin Kiewitz
svn-id: r49860
2010-06-09Renamed the SciEvent class to EventManager, to separate it from the sciEvent ↵Filippos Karapetis
structure, and removed it from the engine state svn-id: r49534
2010-05-29Mass renaming of selector-related functions, and removed some defines which ↵Filippos Karapetis
were just cloaking functions with a different name - GET_SEL32 -> readSelector - GET_SEL32V -> readSelectorValue - PUT_SEL32 -> writeSelector - PUT_SEL32V -> writeSelectorValue Also, changed some selector-related function names and variables to CamelCase svn-id: r49317
2010-05-15SCI: handle TAB like Ctrl-I on menu key checking, sci0 also did it that way ↵Martin Kiewitz
- makes TAB work for inventory in iceman/qfg1ega svn-id: r49044
2010-05-15SCI: SCI_SCREEN_MASK_* now GFX_SCREEN_MASK_*, using enum - added new enum ↵Martin Kiewitz
GFX_SCREEN_UPSCALED_* svn-id: r49039
2010-04-25SCI: fix regression of r48659 - now calculating menu width and splitting ↵Martin Kiewitz
text on kernelDrawMenuBar() as well - fixes menu not displaying all the time in hoyle 1&2 svn-id: r48791
2010-04-20SCI: menu - handle right aligned "=" as actual text not as tag marker, also ↵Martin Kiewitz
handle "=" as being a supported shortcut key svn-id: r48747
2010-04-20SCI: remove lone spaces at the end of right aligned menu items. fixes ↵Martin Kiewitz
"wrongly" aligned menu items in some games svn-id: r48746
2010-04-18SCI: fix regression from r48685 - english got always used for menu entriesMartin Kiewitz
svn-id: r48698
2010-04-17SCI: move menu window inside the screen, if parts of it are outside (happens ↵Martin Kiewitz
in multilingual sq3 and lsl3) svn-id: r48686
2010-04-17SCI: implement ability to handle multilingual menu separators (is actually 2 ↵Martin Kiewitz
separators with a language separator inbetween) svn-id: r48685
2010-04-17SCI: Remove subtitles in menu.Walter van Niftrik
svn-id: r48683
2010-04-15SCI: split menu/item strings when displaying instead of when initializing - ↵Martin Kiewitz
makes on-the-fly menu language changes possible (used by multilingual SCI01 games) svn-id: r48659
2010-02-23SCI: Turn kernel_sleep() into SciEvent::sleep()Max Horn
svn-id: r48119
2010-02-13SCI: Move language related code from EngineState to SciEngineMax Horn
svn-id: r48052