Commit graph

41 commits

Author SHA1 Message Date
sluicebox
faaf89389b AGI: Implement near.water opcode
Used by Black Cauldron AGIv1 when filling flask
2025-01-30 21:14:57 -08:00
sluicebox
5c30bfb1b1 AGI: Update misc AGIv1 opcode details 2025-01-30 21:14:03 -08:00
sluicebox
3138057f69 AGI: Implement AGIv1 set.bit and clear.bit opcodes 2024-12-30 14:25:42 -08:00
sluicebox
ce2410f7a3 AGI: Update Apple IIgs opcodes
- discard.sound has three potential opcode values depending on the
  interpreter version; this is now handled and documented.
- Unknown opcode 175 is now handled and its presence is documented.
- Fixes AGIDEMO and PQ1 calling set.simple instead of discard.sound.
- Reverted SQ2 workaround now that its discard.sound calls are
  correctly handled: 736d7cd533
2024-10-28 21:02:52 -07:00
sluicebox
a5909e5f60 AGI: Move AGI256 picture opcode into function 2024-10-28 21:02:51 -07:00
sluicebox
155552cecd AGI: Update opcode tables 2024-08-25 22:36:58 -07:00
sluicebox
126c19855a AGI: Restrict AGIMOUSE feature to AGIMOUSE games
Fixes bug #12747 where fan game Phil's Quest immediately ends, but this
also affects early KQ2 and other games.
2024-03-02 13:22:38 -07:00
sluicebox
858be3a931 AGI: Update V1 opcode table 2024-02-17 15:44:09 -05:00
sluicebox
89723ae889 AGI: Move SQ2 Apple IIgs unknown opcode handling 2024-01-30 13:22:44 -08:00
sluicebox
0c06708053 AGI: Fix opcode table version detection
- Fixes Manhunter 1 Amiga / Atari ST not starting
- Fixes Manhunter 2 Amiga not starting
- Fixes Gold Rush Atari ST
- Fixes King's Quest IV Apple IIGS
- Fixes Black Cauldron Apple IIGS
- Uses original opcode name: get.mse.posn (from GR Amiga)
2024-01-26 13:34:53 -08:00
sluicebox
8f2127e418 AGI: Cleanup graphics code 2024-01-22 17:32:46 -07:00
sluicebox
0877da67b2 AGI: Fix uninit memory use, crash on error
Fixes random crashes when an illegal opcode is encountered.

See bug #14699
2024-01-01 21:59:20 -08:00
sluicebox
ad9537227b AGI: Fix print.at parameter count in SQ1 1.0X
Fixes the skimmer sequence locking up when displaying a message box.

fixes bug #10872
2024-01-01 21:58:43 -08:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
f1f4657b10 AGI: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
Zvika Haramaty
1a979a807a AGI: fixed typos in opcodes values comments 2020-10-07 23:22:34 +02:00
Martin Kiewitz
9dd0cd51d5 AGI: Clean up VM opcode handling
so that invalid opcodes won't crash ScummVM anymore
2017-02-23 23:54:45 +01:00
Martin Kiewitz
9a9ddc777e AGI: set.pri.base was actually available in AGI2.425
Was available only in 2.425 and in 2.936+.
Fixing comment accordingly. Also allowing the command for 2.425.
2016-02-14 02:01:28 +01:00
Martin Kiewitz
9f59b5ed7c AGI: Fix priority band handling
- 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-13 20:42:30 +01:00
Johannes Schickel
6778175f6d AGI: Fix formatting.
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-02 20:15:18 +01:00
Martin Kiewitz
8a595e7771 AGI: graphics rewrite + cleanup
- 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
2016-01-29 13:22:22 +01:00
Eugene Sandulenko
e215a75e7b AGI: stub for AGI1 newRoom() 2015-12-05 08:03:36 +01:00
Johannes Schickel
6aac905dfd AGI: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00
Eugene Sandulenko
8109ffd253 AGI: Fix potential buffer overrun. CID 1004028 2013-10-07 23:13:30 +03:00
Filippos Karapetis
ffa5f637c8 AGI: Fix the Apple IIGS versions of Manhunter 1 and Gold Rush
Both games use an additional parameter for show.mouse and hide.mouse.
Ignoring these confused the script parser, which started parsing junk.
Fixes bugs #3577754 and #3426946.
2012-11-07 02:00:05 +02:00
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Eugene Sandulenko
f6a9c6727d AGI: Fix buffer overflow 2011-11-02 22:20:27 +00:00
Eugene Sandulenko
4e83a49b0f AGI: Fix bug #3398171: AGI: SQ1/SQ2: problem entering name
Was introduced during refactoring to SCI-like opcode handling.
Also restored original comments about opcode parameter differences
between AGI versions.
2011-08-27 23:43:46 +01:00
Eugene Sandulenko
b83cf61bfb Checked V1 instructions till 0x42 2011-08-14 21:40:07 +01:00
Eugene Sandulenko
3cb41b5dfc AGI: Checked V1 instructions till 0x2c 2011-08-13 23:27:32 +01:00
Eugene Sandulenko
be9c5c0427 AGI: Checked V1 instructions till 0x20 2011-08-13 23:27:29 +01:00
Eugene Sandulenko
3fb50b815e AGI: Further work on v1 opcode difference 2011-08-13 23:27:27 +01:00
Jussi Pitkanen
af691e46c4 AGI: Updates to V1 instruction table, plus an outcommented experiment
The experiment tries to implement the program control of the V1 interpreter.
Maybe it is better to add another method for doing that once the workings of
it are more clear.
2011-08-13 23:27:24 +01:00
Jussi Pitkanen
e4a1193d22 AGI: Add last undefined V1 test command that tests if a bit of var is set
Also fix skipInstruction() for V1.
2011-08-13 23:27:17 +01:00
Jussi Pitkanen
2289ba88b6 AGI: Rename cmd_what_ever to cmdWhatEver 2011-08-13 23:27:15 +01:00
Jussi Pitkanen
09f937126e AGI: Fix and clarify IF expression handling 2011-08-13 23:27:13 +01:00
Jussi Pitkanen
9bc25749d6 AGI: Implement V1 SAID test commands
Yes, V1 has three versions of SAID, for one, two and three arguments.

Also add a few corrections to V1 instruction tables.
2011-08-13 23:27:10 +01:00
Jussi Pitkanen
0b6b670803 AGI: Add still incomplete V1 instruction tables 2011-08-13 23:27:00 +01:00
Jussi Pitkanen
41dccce00c AGI: Execute test commands only when needed 2011-08-13 23:26:53 +01:00
Jussi Pitkanen
a4e0cd53f0 AGI: Refactor interpreter core (somewhat akin to SCI)
* Instruction tables are now defined in opcodes.{cpp,h}.

* Move opcode handlers from Agi::AgiEngine to Agi
* Opcode handlers take as parameter a pointer to AGI state (AgiGame)
2011-08-13 23:26:51 +01:00