Commit Graph

44 Commits

Author SHA1 Message Date
Nicola Mettifogo
664d696e55 Made readLineIntern() return a zero-length string when no printable text is read out of a script. This makes life easier for the parser, and also makes the introduction fully viewable.
svn-id: r35233
2008-12-04 09:33:37 +00:00
Torbjörn Andersson
8dcb3cbac0 It's unnecessary to use strlen() just to find out if a string is empty or not.
svn-id: r35185
2008-11-30 10:11:38 +00:00
Nicola Mettifogo
de0fe01c04 Removed unused parameter.
svn-id: r35053
2008-11-14 12:13:59 +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
93499c8032 Update ReadStringStream and parser to work with the new eos() logic.
svn-id: r34945
2008-11-09 09:39:36 +00:00
Nicola Mettifogo
86c3ddc23c Deleted debug code that slipped in.
svn-id: r34041
2008-08-19 14:36:05 +00:00
Nicola Mettifogo
389575b5c1 Fixed bug in low-level parser. Block comments weren't interpreted correctly.
svn-id: r34038
2008-08-19 14:07:48 +00:00
Nicola Mettifogo
5cfa50f028 Finally moved parseNextToken to Script, where it belongs!
svn-id: r33859
2008-08-14 07:14:34 +00:00
Nicola Mettifogo
c349a8dcd9 * Increasing max number of allowed token on one line.
* Increasing buffer size to match old parser.

svn-id: r33512
2008-08-02 03:19:45 +00:00
Nicola Mettifogo
86079c20f5 Fixed issues detected by DrMcCoy's obnoxious compiler. ;)
svn-id: r33511
2008-08-02 02:43:05 +00:00
Nicola Mettifogo
15aada52c4 * Added a preprocessor to deal with the crappy location scripts in BRA.
* Added some comments on how the parser and related code should be changed to make things smoother.

svn-id: r33509
2008-08-02 02:24:36 +00:00
Christopher Page
fa75221e48 PARA: Fixed some memory leaks
svn-id: r32519
2008-06-03 18:24:54 +00:00
Christopher Page
a338d5fdb2 PARA: Got rid of calls to system->quit() so that the Parallaction engine can return to the launcher. Also fixed a couple of memory leaks.
svn-id: r32504
2008-06-02 21:08:49 +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
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
17fdd182b6 Enhanced parser to handle multi-line comments in scripts.
svn-id: r30797
2008-02-05 09:55:17 +00:00
Nicola Mettifogo
fea63a5181 Fixed maximum token length for the parser.
svn-id: r30776
2008-02-03 17:06:45 +00:00
Nicola Mettifogo
8da3b3a0ea Changed an explicit warning/remainder into a code comment.
svn-id: r29879
2007-12-16 16:03:04 +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
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
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
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
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
3036c37dd8 Yet another fix for broken parsing/displaying of strings. Now quotes are properly considered when they are needed, and ignored when they aren't.
svn-id: r27967
2007-07-08 13:39:23 +00:00
Nicola Mettifogo
373cadce5b Finally fixed parsing of labels.
svn-id: r27962
2007-07-08 12:39:39 +00:00
Nicola Mettifogo
a7a62d3c9d Made parseNextToken *really* work this time.
svn-id: r27960
2007-07-08 09:22:08 +00:00
Nicola Mettifogo
cdae0280be Parser is now able to deal with missing quotes at the end of instructions in location scripts.
svn-id: r27959
2007-07-08 08:34:19 +00:00
Max Horn
218e132e37 Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots
svn-id: r27024
2007-05-30 21:56:52 +00:00
Nicola Mettifogo
ae63466446 cleanup
svn-id: r26834
2007-05-13 14:38:05 +00:00
Nicola Mettifogo
e3c25e6d20 - added a new archive member variable to Disk, to decouple resource archives from location archives
- made Script use a stream as input with overall simplification of Disk routines

svn-id: r26379
2007-04-03 22:03:21 +00:00
Nicola Mettifogo
1eb2d6f625 made Script optionally take ownership and dispose input text
svn-id: r25973
2007-03-04 15:00:50 +00:00
Nicola Mettifogo
c727205dae replaced memAlloc/memFree with standard malloc/free
svn-id: r25962
2007-03-04 08:58:23 +00:00
Nicola Mettifogo
b6a10e10ef changed parseComment to use Script stream instead of file
svn-id: r25739
2007-02-20 09:52:07 +00:00
Nicola Mettifogo
5886d3ed7f cleanup and small fixes
svn-id: r25738
2007-02-20 09:17:28 +00:00
Nicola Mettifogo
1bd5f9932b animation scripts are now parsed through the same pipeline used for location scripts. Thus, animation scripts are now cached instead of being read line by line.
svn-id: r25737
2007-02-20 09:10:21 +00:00
Nicola Mettifogo
07077a2be4 first step in parser simplification
svn-id: r25733
2007-02-19 22:34:00 +00:00
Nicola Mettifogo
32b4492b1a a little more refactoring
svn-id: r25725
2007-02-19 14:11:56 +00:00
Nicola Mettifogo
9bdf145aa0 refactoring
svn-id: r25724
2007-02-19 14:09:13 +00:00
Nicola Mettifogo
80edc8504c a little bit of fiddling to expose similarities between routines
svn-id: r25723
2007-02-19 14:06:47 +00:00
Nicola Mettifogo
1121fe4948 moved specialised parsing routines in parser.cpp, so code can be refactored more easily
svn-id: r25718
2007-02-19 12:53:59 +00:00
Torbjörn Andersson
f33da9e412 Some indentation and format changes. Mostly replacing spaces with tabs.
svn-id: r25654
2007-02-17 15:37:49 +00:00
Eugene Sandulenko
de02e840a6 skip_whitespace() -> Common::ltrim()
svn-id: r25573
2007-02-13 23:15:46 +00:00
Eugene Sandulenko
e5c7ce83b8 Initial import of Parallaction engine
svn-id: r25083
2007-01-14 21:29:12 +00:00