Commit Graph

80 Commits

Author SHA1 Message Date
Nicola Mettifogo
58df840a13 Moved Nippon Safes specific code from Parallaction to Parallaction_ns and adapted client code.
svn-id: r39813
2009-04-03 16:32:47 +00:00
Max Horn
fb6d0a7119 PARALLACTION: Fix silly Mingw 'shadowed declaration' warnings
svn-id: r39809
2009-04-03 14:53:15 +00:00
Nicola Mettifogo
011b73a09b Commands now evaluate their reference Zone at runtime, thus handling of forward references in the parser is no more needed.
svn-id: r39738
2009-03-29 12:41:00 +00:00
Nicola Mettifogo
28465d73bb Merged CommandData into Command.
svn-id: r39732
2009-03-29 10:18:09 +00:00
Nicola Mettifogo
c1ff3aec3e Removed paranoia check.
svn-id: r39656
2009-03-24 09:01:44 +00:00
Nicola Mettifogo
76c0d08200 * Pushed evaluation of 'following question' from dialogue parsing to dialogue execution.
* Removed all the question forwards declaration code

svn-id: r39654
2009-03-24 08:20:08 +00:00
Nicola Mettifogo
0998f53cb0 Refactored the zone type parsers.
svn-id: r39650
2009-03-23 23:17:33 +00:00
Nicola Mettifogo
d82aea1e54 Turned ZoneTypes into a regular numeric id (no more a bitfield).
svn-id: r39648
2009-03-23 22:34:46 +00:00
Nicola Mettifogo
2223627c75 Merged GetData, HearData, SpeakData, PathData, ExamineData, MergeData into TypeData struct. This simplifies life a bit especially in the parsers.
svn-id: r39645
2009-03-23 20:41:54 +00:00
Nicola Mettifogo
8cebcaf017 Pushed down dependencies from parser.h
svn-id: r39636
2009-03-23 17:42:08 +00:00
Nicola Mettifogo
d18274d0ee Implemented all variants of IF script instruction. Program class has been changed to store an Array of instruction instead of a List, so that references to instructions are integers.
svn-id: r39631
2009-03-23 11:38:09 +00:00
Nicola Mettifogo
14ced31851 Fixed building on 64-bit architectures.
svn-id: r39395
2009-03-14 15:34:28 +00:00
Nicola Mettifogo
8723afd6f4 * Added a generic sound manager that hides engine-specific managers and allows accessing them through a simplified command/parameter interface.
* Updated client code to use the new manager.
* Moved Nippon Safes sound code from sound.cpp to sound_ns.cpp.

svn-id: r39394
2009-03-14 15:09:31 +00:00
Nicola Mettifogo
44906f574f The engine has now to build the drawing list for the graphic department, instead of setting visibility flags; the new field _prog has been added to GfxObj to help sorting the list.
The outcome is that cleaning up unused resources on location switches is now easier to manage, and less error prone.

svn-id: r38928
2009-02-27 08:56:19 +00:00
Nicola Mettifogo
88efc8603e Removed null*Ptr dummy objects, using SharedPtr's reset method to null pointers instead.
svn-id: r38897
2009-02-26 10:44:01 +00:00
Nicola Mettifogo
e3afa772e2 Cleanup.
svn-id: r38817
2009-02-23 12:17:25 +00:00
Nicola Mettifogo
b2a9393eee Replacement an immediate with the appropriate #define constant.
svn-id: r35950
2009-01-20 12:47:39 +00:00
Nicola Mettifogo
3e611e1eb7 Adapted fixed-sized arrays to cope with the larger dialogues in BRA. Maybe they should be turned into dynamic data structures...
svn-id: r35944
2009-01-20 10:39:16 +00:00
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