743 Commits

Author SHA1 Message Date
Nicola Mettifogo
963e63d985 Integrated low-level routines into the Script class, turning it into a self-contained parser for location, program and table scripts.
svn-id: r29221
2007-10-14 21:32:43 +00:00
Nicola Mettifogo
652069f1a6 Made location parser more fault-tolerant, in that it prints out a warning message instead of exiting ScummVM when it encounters an unexpected keywords in the scripts.
svn-id: r29220
2007-10-14 20:59:46 +00:00
Nicola Mettifogo
1c52ea0562 Decoupled password request from actual rendering of the dialogue screen, thus making it possible to fix bug #1765300. This bug was present in the original game, causing garbled text to appear when asking for password (only in the English version).
svn-id: r29213
2007-10-13 21:49:38 +00:00
Nicola Mettifogo
8a73ce38bb Added beep sound to Nippon Safes for Amiga.
svn-id: r29171
2007-10-07 19:18:41 +00:00
Nicola Mettifogo
6351ed5379 Fixed bug #1808529. One must use memmove() when copying overlapping blocks of memory (blush).
svn-id: r29161
2007-10-07 07:11:09 +00:00
Nicola Mettifogo
0fab64817f Fixed bug #1808615. An unexpected (but harmless) 'ENDCOMMANDS' statement was spotted in the game scripts by the new stricter parser.
svn-id: r29158
2007-10-06 21:15:53 +00:00
Nicola Mettifogo
9280c25a36 Fixed bug #1808620. The original Inventory::addItem routine relied on a trick that went undetected until r29060 actually broke it. Not all regression is bad, after all.
svn-id: r29157
2007-10-06 20:56:17 +00:00
Nicola Mettifogo
439c6e1d53 Fixed bug #1803287. The inner block was changing the test condition causing unwanted behavior.
svn-id: r29155
2007-10-04 16:19:42 +00:00
Nicola Mettifogo
212d4ed913 Changed InventoryRenderer to draw inventory over a Surface, thus removing useless drawing routines.
svn-id: r29097
2007-09-25 15:58:44 +00:00
Nicola Mettifogo
8e1e4b9079 Fixed inventory regression introduced with yesterday's commit.
svn-id: r29091
2007-09-24 19:45:18 +00:00
Nicola Mettifogo
19e9161a20 Oops. Some debug code was committed.
svn-id: r29061
2007-09-23 20:23:49 +00:00
Nicola Mettifogo
05abbf49a2 Moved most of inventory-related code inside classes Inventory and InventoryRenderer. Shift is not completed, as new code doesn't handle selections yet (falling back to existent code).
svn-id: r29060
2007-09-23 20:17:50 +00:00
Nicola Mettifogo
50fb8b2734 Fixed broken compile on MSVC.
svn-id: r29026
2007-09-22 19:31:24 +00:00
Nicola Mettifogo
d7ae40b65d Refactored a lot of Character-related code and put it into the Character class.
svn-id: r29025
2007-09-22 18:45:43 +00:00
Nicola Mettifogo
f04ba3ac7c Added copyright notice to existing files.
svn-id: r28973
2007-09-19 20:01:42 +00:00
Eugene Sandulenko
77eea722af Modified patch #1738058: "Action recorder".
svn-id: r28968
2007-09-19 13:55:05 +00:00
Nicola Mettifogo
258901bab9 Merged common/stdafx.h into common/scummsys.h. All referencing files have been updated.
svn-id: r28966
2007-09-19 08:40:12 +00:00
Nicola Mettifogo
ef0df159f1 * moved Table handling to objects.cpp
* added helper functions to load tables from files
* fixed occasional lock-ups on location change because of broken Table deallocation

svn-id: r28933
2007-09-17 18:22:52 +00:00
Nicola Mettifogo
04c323a19f Split code from parseZoneTypeBlock in specialized parser functions.
svn-id: r28922
2007-09-16 09:26:03 +00:00
Nicola Mettifogo
c37de0131b Revised debug levels and added many debug strings for parsers.
svn-id: r28921
2007-09-16 08:43:34 +00:00
Nicola Mettifogo
c22784449f Fixed BRA parser table for scripts.
svn-id: r28905
2007-09-15 12:16:43 +00:00
Max Horn
4cc9d17c34 Adding various FIXME comments to bogus (non-self-explanatory) existing FIXME comments; and some other related cleanup
svn-id: r28890
2007-09-11 09:20:39 +00:00
Max Horn
4a302b25ad Lots of source code formatting corrections
svn-id: r28887
2007-09-10 13:17:20 +00:00
Nicola Mettifogo
b819ae3e78 More support for subtitles in BRA.
svn-id: r28829
2007-09-02 19:00:22 +00:00
Nicola Mettifogo
21e4f4f176 Simplified global label management and added subtitles for BRA.
svn-id: r28828
2007-09-02 18:34:11 +00:00
Max Horn
f1f324cee4 fixed some warnings
svn-id: r28827
2007-09-02 17:28:00 +00:00
Nicola Mettifogo
af72280fb9 Cleanup: removed unneeded references to engine (_vm).
svn-id: r28826
2007-09-02 15:27:25 +00:00
Nicola Mettifogo
60a6d5aa53 Jobs are now members of the engine and are handled with a table, instead of being external functions.
svn-id: r28824
2007-09-02 15:17:41 +00:00
Nicola Mettifogo
bc44745011 Pushed current save/load code from Parallaction down to Parallaction_ns.
svn-id: r28775
2007-08-31 18:34:46 +00:00
Nicola Mettifogo
771f3e5306 Enforced use of character's feet coordinates throughout the walk code.
svn-id: r28760
2007-08-28 14:30:17 +00:00
Nicola Mettifogo
9c608fcacb Implemented more opcodes.
svn-id: r28746
2007-08-26 09:01:19 +00:00
Nicola Mettifogo
6928087999 Added implementation for most parser and exec opcodes in BRA.
svn-id: r28735
2007-08-25 20:37:41 +00:00
Nicola Mettifogo
39e4a9b180 Added an abstract base class for representing multiple-frames for animations. Changed user code to rely on the new interface. Cnv has been turned into an implementation of the new interface, and it is now known as a concrete class only to Disk and Font code for Nippon Safes.
svn-id: r28734
2007-08-25 20:34:10 +00:00
Nicola Mettifogo
f6322b698e Fix build.
svn-id: r28729
2007-08-25 17:20:58 +00:00
Nicola Mettifogo
8f2e600601 Merged most parser contexts into a single structure, added some new fields to support BRA.
svn-id: r28727
2007-08-25 16:45:06 +00:00
Nicola Mettifogo
1e8ebaa7bd Cleanup script routines.
svn-id: r28718
2007-08-25 11:45:05 +00:00
Nicola Mettifogo
37cdd1c69a First step in restructuring engine code:
- code has been consolidated in fewer files
- new table-driven parsers/execution
- some functions has been pushed down the engine hierarchy
- Parallaction_br now inherits from Parallaction_ns

svn-id: r28711
2007-08-24 20:14:51 +00:00
Nicola Mettifogo
dd215f3e9f Fixed bug #1777058.
svn-id: r28666
2007-08-19 19:05:41 +00:00
Nicola Mettifogo
eb0798d580 Now using stacks to keep track of multiple levels when parsing location scripts.
svn-id: r28639
2007-08-16 19:47:22 +00:00
Nicola Mettifogo
f0f46113ee Changed more parsing routines to use tables instead of switch statements.
svn-id: r28637
2007-08-16 17:28:18 +00:00
Nicola Mettifogo
429af74320 Oops oops. This fixes the bug fix.
svn-id: r28623
2007-08-14 19:57:20 +00:00
Nicola Mettifogo
dc35b37d93 Oops. Removed debug code.
svn-id: r28622
2007-08-14 19:55:10 +00:00
Nicola Mettifogo
70f69a18bb Fixed bug (array-overflow) in NS introduction. This randomly caused the intro to crash during sketching.
svn-id: r28621
2007-08-14 19:53:32 +00:00
Nicola Mettifogo
32164ff210 Defined new Table for location scripts level-0 statements, and changed parseLocation to use a function pointer array instead of a big switch statement.
svn-id: r28620
2007-08-14 18:58:47 +00:00
Nicola Mettifogo
d02441a372 Fixed a couple of mistyped strings, solving a crash in the introduction of BS and a soon-to-be-spotted issue in BRA.
svn-id: r28619
2007-08-14 16:39:25 +00:00
Nicola Mettifogo
76e1be89c3 Partially reverting commit 28568, so now engine is back in charge for parsing locations. I'm going to convert this if/else/else hell into smaller opcode-like routines to achieve more flexibility first, and then assign version-specific opcodes to subclasses.
svn-id: r28609
2007-08-14 08:03:13 +00:00
Torbjörn Andersson
92ea1804ca GCC doesn't like the extra qualifier when DECLARE_COMMAND_PARSER() etc. are
used within the class definition. Added macros for the unqualified form. Feel
free to give them a less cumbersome name -- I just wanted to be able to compile
ScummVM again. :-)

svn-id: r28608
2007-08-14 05:38:27 +00:00
Nicola Mettifogo
3c43ebd49f Added invalid opcode entries in slot 0 of opcode lists, and adjusted indices to avoid small decrements.
svn-id: r28603
2007-08-13 23:58:17 +00:00
Nicola Mettifogo
681ae6ca85 Moved opcode initialization to new routine.
svn-id: r28602
2007-08-13 23:49:38 +00:00
Nicola Mettifogo
0f489597aa Changed instruction parsing to array of function pointers.
svn-id: r28601
2007-08-13 23:44:13 +00:00