Commit Graph

507 Commits

Author SHA1 Message Date
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
Nicola Mettifogo
a2a450dfae Changed Table to return 0 instead of -1 when lookup fails. Lookup already yields 1-based values when the item is found.
svn-id: r28600
2007-08-13 23:17:17 +00:00
Nicola Mettifogo
9694215490 Changed Command parsing/execution and Instruction execution from switch statements into arrays of function pointers.
svn-id: r28599
2007-08-13 22:59:13 +00:00
Eugene Sandulenko
837381f1d4 Fix linking errors.
svn-id: r28587
2007-08-13 10:12:07 +00:00
Eugene Sandulenko
daf5c30551 Switch Parallaction back to single gameid (to be compatible with 0.10.x), and
made it use new AdvancedDetector features.

svn-id: r28585
2007-08-13 09:02:11 +00:00
Nicola Mettifogo
d95994e660 Fix build.
svn-id: r28569
2007-08-12 20:27:45 +00:00
Nicola Mettifogo
3465571b12 Added preliminary support for loading locations in BRA:
- changed parseLocation to invoke subclasses for version-specific keywords.
- implemented loading of background resources (backgrounds should be visible)

svn-id: r28568
2007-08-12 19:11:37 +00:00
Nicola Mettifogo
10ee427772 Changed signature of disk routines for backgrounds to something resembling revisions prior to 28524, yet keeping the new useful BackgroundInfo struct. Those routines can now be used to fill specific fields of the struct, instead of having them create a new one at each call.
This feature is needed by BRA, since background, mask and path are specified by different instructions in the script.

svn-id: r28566
2007-08-12 17:13:21 +00:00
Nicola Mettifogo
0ec634ea06 Fixed location retrieval.
svn-id: r28565
2007-08-12 13:54:31 +00:00
Nicola Mettifogo
12d9e7aed9 Added first location selection for each part.
svn-id: r28564
2007-08-12 13:54:01 +00:00
Nicola Mettifogo
a3e1907837 Added more resource loading.
svn-id: r28563
2007-08-12 13:47:19 +00:00
Nicola Mettifogo
c408e30bb9 BRA now loads tables and correctly selects episode (part) for resource loading.
svn-id: r28562
2007-08-12 13:27:48 +00:00
Nicola Mettifogo
de30651476 Disk can now load tables for BRA.
svn-id: r28561
2007-08-12 13:21:45 +00:00
Nicola Mettifogo
6bbeb8c6d1 Added simple game loop to BRA. The game still crashes after menu.
svn-id: r28560
2007-08-12 13:10:04 +00:00
Nicola Mettifogo
9125ccb3eb Oops. Buffers are now initialized properly.
svn-id: r28559
2007-08-12 13:06:42 +00:00
Travis Howell
efaca7c657 Change BRA to default to 1x scaler.
svn-id: r28558
2007-08-12 12:52:38 +00:00
Travis Howell
4c9a175ff9 Fix BRA regressions.
svn-id: r28557
2007-08-12 12:51:10 +00:00
Nicola Mettifogo
ee7102d0e7 Pushed menu handling into Parallaction_ns.
svn-id: r28556
2007-08-12 12:44:26 +00:00
Nicola Mettifogo
41b8ec417c Added menu options enum to BRA and some refactoring.
svn-id: r28554
2007-08-12 12:24:59 +00:00
Nicola Mettifogo
be994c88db Moved intro hack routines to Parallaction_ns callables, where they belonged from the beginning.
svn-id: r28541
2007-08-12 09:10:10 +00:00
Nicola Mettifogo
8444ad7f48 Even better large background support. Now internal buffers aren't reallocated if not background size stays the same across location switches.
svn-id: r28540
2007-08-12 08:47:45 +00:00
Nicola Mettifogo
fdee6a6e87 Better support for large backgrounds.
svn-id: r28539
2007-08-12 08:37:46 +00:00
Nicola Mettifogo
46c74a5bcf Added very basic support for backgrounds larger than screen:
- background surfaces are now reallocated for every location
- screen is copied according to _scrollX/Y position

svn-id: r28538
2007-08-12 08:26:20 +00:00
Nicola Mettifogo
ccfd109e25 Added partial cursor support for Big Red Adventure. Small adjustments to generalize disk code for multiple cursors.
svn-id: r28537
2007-08-11 21:08:08 +00:00
Nicola Mettifogo
9167422ce3 Moved cursor handling from Gfx to engine subclasses.
svn-id: r28534
2007-08-11 20:44:22 +00:00
Torbjörn Andersson
ceaeba852e Fixed warning.
svn-id: r28533
2007-08-11 19:35:27 +00:00
Nicola Mettifogo
b11a47bd17 Main menu in Big Red Adventure is now available. Cursor is still ScummVM stock.
svn-id: r28531
2007-08-11 19:08:32 +00:00
Nicola Mettifogo
b07f787f7f Moved core font management from Gfx to engine. Gfx still retains features related to displaying text on screen.
svn-id: r28530
2007-08-11 17:25:57 +00:00
Nicola Mettifogo
81b864e9e8 Added preliminary font support for Big Red Adventure.
svn-id: r28529
2007-08-11 14:26:12 +00:00
Nicola Mettifogo
1d0541a1db Since splash screen graphics will be called slides (like in Nippon Safes), loading code has been moved to loadSlide. Related code in engine has been refactored as well.
svn-id: r28527
2007-08-11 14:18:00 +00:00
Nicola Mettifogo
0c7d53a2a4 Deleted some rotten comments.
svn-id: r28526
2007-08-11 13:17:57 +00:00
Nicola Mettifogo
4c89de8fc0 Cleanup.
svn-id: r28525
2007-08-11 13:13:56 +00:00
Nicola Mettifogo
8c2ae45ab4 Overhaul of background/mask/path handling:
- added new BackgroundInfo structure
- added helper functions to aid management of BackgroundInfo. Engine is now responsible for allocation/deallocation.
- simplified loading and handling of background resources.

svn-id: r28524
2007-08-11 13:07:21 +00:00
Nicola Mettifogo
2c6c654435 Added new clone method to Palette object.
svn-id: r28523
2007-08-11 12:26:17 +00:00
Kari Salminen
1b7bed55fd Removed an extra semicolon.
svn-id: r28512
2007-08-09 21:32:26 +00:00
Nicola Mettifogo
a644817966 Added code to load and display splash screens for BRA. The game crashes afterwards.
svn-id: r28511
2007-08-09 19:26:20 +00:00
Nicola Mettifogo
df7bd6f41c Fix warning.
svn-id: r28510
2007-08-09 19:24:51 +00:00