aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/op_cmd.cpp
AgeCommit message (Collapse)Author
2017-02-25AGI: always stop sound/music, when calling restore/save since 2.272Martin Kiewitz
and therefore set the "fully played"-flag/variable, so that scripts don't block forever in for example Police Quest 1 poker back room. Fixes bug #9706 Thanks waltervn
2017-02-23AGI: Clean up VM opcode handlingMartin Kiewitz
so that invalid opcodes won't crash ScummVM anymore
2016-05-10AGI: Safer string copyingEugene Sandulenko
2016-02-27AGI: Add support for upscaling and Hercules hires fontMartin Kiewitz
- User option to force Hercules hires font for any rendering mode - Also change mouse cursor hotspots from 1,1 to 0,0 - Fix inaccuracy in mouse controlled game menu - Change render_Block(), drawBox(), drawDisplayRect() to use upper Y instead of lower Y. Original AGI uses lower Y, but upper Y makes upscaling way easier.
2016-02-19AGI: Add detection+workaround for endofloop+motion at the same timeMartin Kiewitz
Detects when end.of.loop + motions are used on the same screen object at the same time, which would have resulted in flag corruption in the original interpreter. We detect this situation now, show a warning and disable the cycler in case cycler was activated first. This solves a new issue in kq1, when grabbing the eagle in room 22, that was previously hidden just like in the original AGI. Fixes bug #7046
2016-02-18AGI: Apple IIgs time delay override MH1 completedMartin Kiewitz
+ Disable hide.mouse for MH1 Apple IIgs
2016-02-16AGI: Set.pri.base comments added (Apple IIgs KQ3+SQ2)Martin Kiewitz
For KQ3 the calls are currently blocked b/c interpreter version For SQ2 they aren't, which causes a few priority issues at the end
2016-02-14AGI: Add heuristic to detect delay loops within scriptsMartin Kiewitz
And in that case poll events, delay for a few milliseconds and update screen. This somewhat worked before the graphics rewrite because of a timer hack. This one tries to detect actual inner loops. Happens in at least Police Quest 1 when playing poker.
2016-02-14AGI: Added a few comments about KQ1Martin Kiewitz
set.simple gets called when killing the witch + planting beans Right after bowing to the king, ego faces away from him. This issue was already present in 1.7.0. Could probably get solved later via script patcher.
2016-02-14AGI: set.pri.base was actually available in AGI2.425Martin Kiewitz
Was available only in 2.425 and in 2.936+. Fixing comment accordingly. Also allowing the command for 2.425.
2016-02-13AGI: Fix priority band handlingMartin Kiewitz
- Fix saving/loading priority bands table. Now saving the actual raw data - Now also saving the flag, that defines if the priority table got modified by scripts - For older saved games it will try to figure out the state of that flag - Blocking set.pri.base for AGI below 2.936 - set.pri.base was actually introduced in 2.936 and not AGI3 - The set.pri.base bug was present in 2.936 as well - Saved games created between the graphics rewrite and this commit may have priority issues for games, that used AGI2.936+
2016-02-11AGI: Rename nonBlockingText -> artificialDelayMartin Kiewitz
Also add a table for Apple IIgs games for music issues like in PQ1 intro, where the developers thought that loading a new room would take X amount of time and they started loading before the music was done. In our AGI music may get cut off because of this. It of course also happens, when using the original interpreter, as soon as you emulate a faster processor. Which means this is also a workaround. See bug #7026
2016-02-09AGI: Change set.simple string copy codeMartin Kiewitz
2016-02-09AGI: Fix various CIDsMartin Kiewitz
CID 1350104: regression from graphics rewrite in C64 picture drawing CID 1350101: potential buffer overflow in set.simple command CID 1350112: uninitialized variable in TextMgr CID 1350113: false positive uninitialized variable in SystemUI CID 1350114: potentially uninitialized variable in IIgsSample CID 1350117: false positive uninitialized variable in InventoryMgr CID 1350103: code bug in CGA rendering TextMgr::charAttrib_Set() CID 1350109: false positive in GfxFont::loadFontAmigaPseudoTopaz() CID 1350111: original AGI uninitialized memory issue in SpritesMgr::showObject
2016-02-07AGI: Stop set.simple getting called for <2.425Martin Kiewitz
Also stop it from getting called by 2.440 AGI. Was implemented for 2.425, removed in 2.440 and re-added in 2.917. The opcode is called after answering the phone at the store (555-6969) in Apple IIgs Larry. It can't be automatic saving. See script 22, line 678 in AGI Studio. Stops automatic saving getting enabled for Larry 1 Apple IIgs. Also added warning messages to other commands as well.
2016-02-04AGI: Restrict hide.mouse to AGI3 onlyMartin Kiewitz
Command seems to not have existed in at least 2.917 (PC). Space Quest 2 on Apple IIgs calls it during intro, but never calls show.mouse. SQ2 on other platforms does not make this call. Mouse cursor is not hidden under emulator, so atm I have to assume that it's either a dodgy script or there was something else hacked into the interpreter back then. This fixes Space Quest 2 Apple IIgs losing mouse cursor, when the intro is not canceled.
2016-02-04AGI: Fix Hold-Key-Mode implementationMartin Kiewitz
Hold-Key-Mode got introduced v2.425, it was simply not possible to disable it until 3.098. Now creating a AGI_KEY_STATIONARY event, so that it works properly Fixes Mixed Up Mother Goose
2016-02-04AGI: Fix mouse code for transitionsMartin Kiewitz
Do not show mouse cursor after transition, when it's currently switched to hidden. Do the same for hide/show.mouse opcodes.
2016-02-03AGI: Remove Gold Rush workaround, no longer neededMartin Kiewitz
2016-02-02AGI: Remove inputMode, not needed anyoreMartin Kiewitz
2016-02-02AGI: Fix formatting.Johannes Schickel
This mostly enforces tabs for indentation and spaces for formatting. But also fixes spaces on empty lines, some extra/missing spaces. astyle + manual fixup
2016-02-02AGI: mouse support for menuMartin Kiewitz
2016-02-01AGI: change how menus are triggered on Non-PCMartin Kiewitz
2016-02-01AGI: Pass vm pointer directly to commandsMartin Kiewitz
No functional change
2016-02-01AGI: Rename _game.lognum to _game.curLogicNrMartin Kiewitz
Also a bit of cleanup
2016-02-01AGI: Remove old clockEnabled booleanMartin Kiewitz
No longer needed We use ScummVM system total play time functionality instead
2016-02-01AGI: Fix pause command effectively freezing gameMartin Kiewitz
In game timer wasn't resumed, which caused no more cycles to get executed.
2016-02-01AGI: implement predictive dialogMartin Kiewitz
2016-01-31AGI: remove timer hack, implement in game timerMartin Kiewitz
in game timer is now updated, when scripts read in game timer VM variables and during main loop. ScummVM total play time feature is used for it. Game cycle syncing is done at the same time.
2016-01-31AGI: getflag/setflag/etc. cleanupMartin Kiewitz
renamed getflag() to getFlag() renamed setflag() to setFlag() renamed flipflag() to flipFlag() preagi: renamed setFlag for this engine to setWinnieFlag
2016-01-31AGI: VM Var code cleanupMartin Kiewitz
Don't access variables directly, but through method Shouldn't include any functional differences Also changed several hardcoded values to the corresponding enums.
2016-01-31AGI: copying between var + ego screen obj fixedMartin Kiewitz
We copied the wrong way see cycle.cpp This fixes the fan game 13th disciple. bug #3563 Also cleanup playercontrol variable is now a boolean
2016-01-29AGI: remove commented out code from CmdSetSimple()Martin Kiewitz
should have been removed already.
2016-01-29AGI: graphics rewrite + cleanupMartin Kiewitz
- graphics code fully rewritten - Apple IIgs font support - Amiga Topaz support - Word parser rewritten - menu code rewritten - removed forced 2 second delay on all room changes replaced with heuristic to detect situations, where it's required - lots of naming cleanup - new console commands show_map, screenobj, vmvars and vmflags - all sorts of hacks/workarounds removed - added SCI wait mouse cursor - added Apple IIgs mouse cursor - added Atari ST mouse cursor - added Amiga/Apple IIgs transition - added Atari ST transition - user can select another render mode and use Apple IIgs palette + transition for PC versions - inventory screen rewritten - SetSimple command now properly implemented - PreAGI Mickey: Sierra logo now shown - saved games: now saving controller key mapping also saving automatic save data (SetSimple command) - fixed invalid memory access when saving games (31 bytes were saved using Common::String c_ptr() Special Thanks to: - fuzzie for helping out with the Apple IIgs font + valgrind - eriktorbjorn for helping out with valgrind - LordHoto for figuring out the code, that caused invalid memory access in the original code, when saving a game - sev for help out with reversing the Amiga transition currently missing: - mouse support for menu - mouse support for system dialogs - predictive dialog support
2015-12-05AGI: stub for AGI1 newRoom()Eugene Sandulenko
2014-02-18AGI: Make GPL headers consistent in themselves.Johannes Schickel
2013-04-27AGI: Null terminate string. CID 1003888Eugene Sandulenko
2013-04-18AGI: Silence another clang varMax Horn
Reading an array without using the resulting value has no effect. In any case, this code still looks like it may be broken, so somebody who knows more about AGI should perhaps investigate this closer.
2013-01-09AGI: Silence C++11 narrowing warning.Johannes Schickel
2012-09-26JANITORIAL: Remove trailing whitespaces.Johannes Schickel
Powered by: git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2011-12-12AGI: Add FIXME to cmdCallV1Max Horn
2011-11-03AGI: Commented out if statements that always evaluate to trueFilippos Karapetis
2011-09-26AGI: Fixed several incorrect substitutions of "game" with "_game"Filippos Karapetis
2011-09-26AGI: Rewrote cmdVersion() to use Common::StringFilippos Karapetis
This simplifies the code and avoids heap corruption because of the long version string
2011-09-26AGI: Fixed bug #3074570 - "AGI LSL1: TAB stops working after restart"Filippos Karapetis
Applied eriktorbjorn's patch from that bug tracker item (slightly modified), which is what NAGI does, and which fixes restarting in LSL1 and PQ1 (bug #2823762), and other AGI games that do not reset the controller keys when restarting.
2011-09-26AGI: Fix bug #3080041 - "AGI Mother Goose: White bar in intro"Filippos Karapetis
2011-09-25AGI: Fixed typo in restart dialogFilippos Karapetis
2011-08-14Checked V1 instructions till 0x42Eugene Sandulenko
2011-08-14AGI: Renamed some #defines to our code conventions and moved them to enumsEugene Sandulenko
2011-08-13AGI: Checked V1 instructions till 0x2cEugene Sandulenko