Commit graph

62 commits

Author SHA1 Message Date
Nicola Mettifogo
294c76f4c4 Don't assert anymore when a command flag doesn't exist, but ignore it and print a warning instead. Some location scripts in BRA are totally broken.
svn-id: r35783
2009-01-08 07:11:32 +00:00
Nicola Mettifogo
7a0b782a3c Made sure to display labels on animations.
svn-id: r35726
2009-01-04 15:37:46 +00:00
Nicola Mettifogo
f2b495ba2d Implemented counters in BRA. Only valid answer options are shown, and counter calculations in scripts are performed.
svn-id: r35723
2009-01-04 14:23:20 +00:00
Nicola Mettifogo
74b251d45d Added a stub to dialogue parser, so that dialogue lines controlled by counters are displayed.
svn-id: r35465
2008-12-21 15:41:41 +00:00
Nicola Mettifogo
774773b7cd Reduced code duplication when manipulating Animations, and cleanup.
svn-id: r35408
2008-12-17 11:15:47 +00:00
Nicola Mettifogo
dc3e9027f4 Removed references to _vm from the engine itself.
svn-id: r35358
2008-12-14 10:32:26 +00:00
Nicola Mettifogo
b3475d8178 * Replaced char* with Common::String in the parser.
* Enforced const-correctness on related routines.

svn-id: r35326
2008-12-13 03:37:43 +00:00
Nicola Mettifogo
618644ba0c Update to the low level parser:
* made it detect buffer overflows 
* removed unused code paths
* general simplification

svn-id: r35047
2008-11-13 15:15:54 +00:00
Nicola Mettifogo
181a44fc21 Fixed default zone flags, so that labels in BRA are only shown on zones which have one.
svn-id: r35012
2008-11-12 07:08:43 +00:00
Nicola Mettifogo
63ccac8f9d Enabled flags parsing for all commands in location script. Most of them don't need it, but some commands have been enhanced in BRA.
svn-id: r34944
2008-11-09 05:24:08 +00:00
Nicola Mettifogo
3eeece6a25 * cleanup
* moved find routines from Parallaction to Location

svn-id: r34940
2008-11-08 15:02:19 +00:00
Nicola Mettifogo
0606fef24e Made coordinates and frame number protected into Zone and Animation, and changed client code to use get/set. This will allow various simplifications (e.g. when calculating Z), and is a step towards correct handling of interactive zones of Zone/Animation in BRA.
svn-id: r33892
2008-08-15 04:30:45 +00:00
Nicola Mettifogo
c70d09bc26 Made scripts access Animation fields via accessors and mutators, instead of using raw pointers.
svn-id: r33891
2008-08-15 03:59:45 +00:00
Nicola Mettifogo
ea2a2cbb7c Simplified handling of script variables (especially locals).
svn-id: r33889
2008-08-15 02:52:42 +00:00
Nicola Mettifogo
d3440f2cc5 Some variable renamed to make more sense.
svn-id: r33864
2008-08-14 13:45:32 +00:00
Nicola Mettifogo
f4ef55a2e5 Tiny readability aid for parser code.
svn-id: r33369
2008-07-28 11:47:03 +00:00
Nicola Mettifogo
5d2e25ee11 Preliminary code for traps.
svn-id: r33364
2008-07-28 09:00:00 +00:00
Nicola Mettifogo
1174296a66 Changed the remaining references to Nodes into Points.
svn-id: r33290
2008-07-25 16:08:10 +00:00
Nicola Mettifogo
3e08d36363 * Changed walk code to use Common::Point instead of the clumsy WalkNode.
* Changed walk code to use object copy instead of managing pointers.

svn-id: r33289
2008-07-25 16:01:25 +00:00
Eugene Sandulenko
de09845319 Fix for bug #2008054: Parallaction engine doesn't compile under MSVC9
svn-id: r32879
2008-07-03 08:44:29 +00:00
Christopher Page
cae6396ce7 Merged revisions 32507-32513,32516,32518,32520-32521,32523-32524,32526-32548,32550-32562 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

svn-id: r32563
2008-06-05 21:20:35 +00:00
Nicola Mettifogo
52fbdd51eb Script instructions referencing unexisting animations are now skipped, instead of crashing the engine.
svn-id: r32524
2008-06-04 01:27:55 +00:00
Christopher Page
fa75221e48 PARA: Fixed some memory leaks
svn-id: r32519
2008-06-03 18:24:54 +00:00
Nicola Mettifogo
22d63345e3 Got rid of the static arrays for initialization of parsers and exec opcodes, to make returning to launcher easier. The code has been borrowed by Kyra, after suggestion by LordHoto.
svn-id: r32465
2008-06-01 14:05:39 +00:00
Max Horn
6e3c92e239 Renamed some parallaction member vars to have a leading underscore (besides being part of our code formatting conventions, this fixes various name clash warnings)
svn-id: r32041
2008-05-11 22:08:32 +00:00
Nicola Mettifogo
1320ab610b Cleanup of parsing code.
svn-id: r31999
2008-05-11 08:55:16 +00:00
Nicola Mettifogo
6979458e26 Extracted script parsing code to its own class.
svn-id: r31972
2008-05-10 11:11:03 +00:00
Nicola Mettifogo
1d025957ca Moved location parsing out of the engines, to LocationParser_ns and LocationParser_br.
svn-id: r31958
2008-05-09 01:35:43 +00:00
Nicola Mettifogo
1ddd54b50d - Moved some members from the engine class to Location, since they belong there.
- Cleaned up usage of location flags by using accessor functions.

svn-id: r31872
2008-05-05 11:02:40 +00:00
Nicola Mettifogo
4295392906 Added new Parser class, which will gradually grow to include all parsing code from the engine class.
svn-id: r31865
2008-05-04 15:09:23 +00:00
Nicola Mettifogo
d4c8d4e18f Fixed usage of SharedPtr, so that reference counting is proper and there are no more objects that need constructors at global level (helps PalmOS).
svn-id: r31533
2008-04-17 09:32:57 +00:00
Nicola Mettifogo
3d1a2e2049 Replaced custom ManagedList with Common::SharedPtr.
svn-id: r31415
2008-04-06 05:40:02 +00:00
Nicola Mettifogo
435c437f6d More refactoring for command parsing/execution.
svn-id: r30841
2008-02-09 23:26:45 +00:00
Nicola Mettifogo
265621de58 Fixes to make BRA introduction run:
- fixed location command parser
- implemented stop command
- temporary disabled speak zones (audio is not yet supported)

svn-id: r30796
2008-02-05 09:30:58 +00:00
Nicola Mettifogo
85171eadaa Programs are now handled in their own list, instead of being accessed via the referring Animation.
svn-id: r30768
2008-02-03 14:58:16 +00:00
Nicola Mettifogo
cce8e25960 Removed all job routines. Stubs have been left for future reference in the code for BRA.
svn-id: r30675
2008-01-28 13:10:49 +00:00
Nicola Mettifogo
be2c5d3c87 All interactive objects are now drawn in the framebuffer instead of using the old kBitBack/kBitFront buffers. Animation are not sorted yet, so they can overlap in an inconsistent fashion for the time being.
svn-id: r30673
2008-01-28 12:20:53 +00:00
Jordi Vilalta Prat
d6c34bdc4b Fixed the spaces before tabs.
svn-id: r30667
2008-01-28 00:14:17 +00:00
Nicola Mettifogo
605c9d0fd6 Turned Gfx::setFont into a protected member, since now Gfx can automatically detect which font to use. Gfx still needs setFont internally to select fonts. The font shadowing introduced in revision 30221 has been removed as well, since the new approach handles it better.
svn-id: r30361
2008-01-09 21:54:58 +00:00
Nicola Mettifogo
e21fd496f8 Restructured label handling and moved all related code to Gfx.
svn-id: r30345
2008-01-08 20:46:58 +00:00
Nicola Mettifogo
1b80eedaa1 Added a proper _name member to Zone, instead of using the label text.
svn-id: r30343
2008-01-08 20:32:29 +00:00
Torbjörn Andersson
eeb212c7e0 Indent with tabs instead of spaces.
svn-id: r30312
2008-01-06 20:42:28 +00:00
Nicola Mettifogo
7bef63537d Going back to uncached mode for graphics resources of Examine zones. This prevents engine to crash when trying to cache a resource out of the currently selected archive.
svn-id: r29798
2007-12-09 17:29:41 +00:00
Nicola Mettifogo
fdb20177b4 Broke up parseDialogue into more manageable and focused short routines.
svn-id: r29716
2007-12-04 20:38:45 +00:00
Nicola Mettifogo
919c0a2833 * added adapter from Graphics::Surface to Frames
* changed all Disk routines to return Frames* instead of Graphics::Surface*
* changed displayItemComment to use new gfx routines
* merged code for Examine zones into displayComment

svn-id: r29615
2007-11-22 21:51:33 +00:00
Nicola Mettifogo
6471eb84f2 Cleanup.
svn-id: r29556
2007-11-18 13:22:38 +00:00
Nicola Mettifogo
03d5111a74 Fixed parseLocation, so that it only tries to parse scripts when they aren't already loaded. This fixes bugs like #1816899, caused by the wrong data archive being selected in the Disk object.
svn-id: r29240
2007-10-21 15:26:07 +00:00
Nicola Mettifogo
78bc71e6f5 Cleanup.
svn-id: r29238
2007-10-21 13:09:53 +00:00
Nicola Mettifogo
f9b8c8a0d4 Turned the 'unexpected keyword' warning into a debug message and added a nifty line number to aid debugging.
svn-id: r29222
2007-10-14 21:35:02 +00:00
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