Commit Graph

982 Commits

Author SHA1 Message Date
Matthew Hoops
6f83052b40 AGI: Cleanup PreAGI console code 2011-08-15 22:24:42 -04:00
Matthew Hoops
62aabc57e4 AGI: Reorganize the PreAGI code a bit 2011-08-15 11:55:03 -04:00
Matthew Hoops
6a9d4b3e5b AGI: Make Troll inherit from PreAgiEngine 2011-08-15 11:55:03 -04:00
Matthew Hoops
cb43e9694b AGI: Make Mickey inherit from PreAgiEngine 2011-08-15 11:55:03 -04:00
Matthew Hoops
fcd0cda9a9 AGI: Make Winnie inherit from PreAgiEngine 2011-08-15 11:55:01 -04:00
Eugene Sandulenko
b83cf61bfb Checked V1 instructions till 0x42 2011-08-14 21:40:07 +01:00
Eugene Sandulenko
273e37f726 AGI: Renamed some #defines to our code conventions and moved them to enums 2011-08-14 18:48:59 +01:00
Matthew Hoops
40f40303ef AGI: Enable sound support for Winnie DOS 2011-08-14 13:14:37 -04:00
Matthew Hoops
de6390dddb AGI: Make the sound code use AgiBase instead of AgiEngine
In preparation of using the sound code with Winnie
2011-08-14 13:10:43 -04:00
Eugene Sandulenko
46354d5772 AGI: Switched booters detection to AD 2011-08-13 23:27:34 +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
1dbe5bfccf AGI: Implement loader for V1 "object" file 2011-08-13 23:27:22 +01:00
Jussi Pitkanen
d2f9087f20 AGI: Fix warning messages about undefined opcodes 2011-08-13 23:27:20 +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
d02251fa4d AGI: Formatting (+ a few debug prints) 2011-08-13 23:27:08 +01:00
Jussi Pitkanen
368a3722a3 AGI: Implement loader for V1 words.tok dictionary 2011-08-13 23:27:05 +01:00
Jussi Pitkanen
c731f1f48c AGI: Implement common internal dictionary for different words.tok formats
Preparations for V1 words.tok support.
2011-08-13 23:27:03 +01:00
Jussi Pitkanen
0b6b670803 AGI: Add still incomplete V1 instruction tables 2011-08-13 23:27:00 +01:00
Jussi Pitkanen
04353038ae AGI: Add loader and detection for Black Cauldron booter 2011-08-13 23:26:58 +01:00
Jussi Pitkanen
d273f58b3c AGI: AgiLoader_v1: Precalculate final resource offsets
That is, calculate the final offsets when loading the resource directories,
and when loading the resource simply seek into the disk image file.
2011-08-13 23:26:56 +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
Jussi Pitkanen
e1153cf11f AGI: Comment cleanup 2011-08-13 23:26:48 +01:00
Jussi Pitkanen
eb797b692f AGI: Simplify handling of IF conditions
Execute all test commands in a condition even when not strictly needed.
2011-08-13 23:26:46 +01:00
Jussi Pitkanen
7a80c4cdb3 AGI: Fix row duration in V1 SOUND resource player 2011-08-13 23:26:44 +01:00
Jussi Pitkanen
1507fe4e79 AGI: Fix detection of IIgs sample resources 2011-08-13 23:26:41 +01:00
Jussi Pitkanen
d8e1b392d2 AGI: Use a jump table for test commands instead of switch/case
Preparations for V1 support.
2011-08-13 23:26:39 +01:00
Jussi Pitkanen
24bb5da228 AGI: Add a layer of abstraction between the sound chip and the two players 2011-08-13 23:26:36 +01:00
Jussi Pitkanen
8183103777 AGI: Simplify sector offset calculation 2011-08-13 23:26:34 +01:00
Jussi Pitkanen
7405140474 AGI: Cleanup 2011-08-13 23:26:32 +01:00
Jussi Pitkanen
4d4a558f7b AGI: Do not try to pass filenames of disk images from the detector to engine 2011-08-13 23:26:29 +01:00
Jussi Pitkanen
1f680ecbc8 AGI: Detect the end of V1 sound resources correctly, fixing crashes 2011-08-13 23:26:27 +01:00
Jussi Pitkanen
010315dc0c AGI: Implement resource loader for the DDP booter game 2011-08-13 23:26:24 +01:00
Jussi Pitkanen
3fd26de379 AGI: Detect the bootable floppy version of Donald Duck's Playground
Also create a framework into which more booter games can be added.
2011-08-13 23:26:22 +01:00
Jussi Pitkanen
ab784944ea AGI: Implement note fetch routine for AGI v2.001 sound resources
I suspect this is the format for AGI V1 sound resources as well. It is
currently implemented by splitting getNextNote() to getNextNote_v2() and
getNextNote_v1(). Since the V1 format consists of simple register values
to the sound chip in PCjr, this could probably be made more cleanly by
refactoring the code to resemble the chip more closely, so that its state
is updated by writing to the registers.
2011-08-13 23:26:19 +01:00
Christoph Mallon
e35b4f20c1 GRAPHICS: Simplify the interface of Graphics::loadThumbnail().
Now it returns the Surface, so the caller does not need to create one and pass it.
2011-08-07 15:19:09 +02:00
Christoph Mallon
b4b6ce0954 ALL: Use Graphics::skipThumbnail() where appropriate. 2011-08-07 15:19:09 +02:00
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
Matthew Hoops
b4f4fd6b00 AGI: Cleanup some Winnie string code 2011-07-03 13:49:28 -04:00
Matthew Hoops
c2be473ce2 AGI: Fix some memset calls
Spotted by both salty-horse and LordHoto using clang
2011-07-03 13:49:28 -04:00
Littleboy
b694a78f62 ANALYSIS: Add static casts to is* functions
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results.
See http://msdn.microsoft.com/en-us/library/ms245348.aspx
2011-06-23 08:52:52 -04:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
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-20 00:59:48 +02:00
Max Horn
71ea5acd29 AGI: Replace vsprintf by Common::String::vformat 2011-06-18 01:36:15 +02:00
Max Horn
879c3c7817 DETECTOR: Pass allFiles to AdvancedMetaEngine::fallbackDetect()
Also reorder the parameters of composeFileHashMap, placing the "return value"
first.
2011-06-14 18:52:11 +02:00