Commit Graph

76 Commits

Author SHA1 Message Date
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
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
d800f33ff1 Turned StaticCnv struct into stock Graphics::Surface, and changed all relevant code.
svn-id: r28484
2007-08-07 15:08:45 +00:00
Nicola Mettifogo
e65c744039 Added workaround for bugged scripts not declaring local variables before using them (as a sample, see balzo.script in Amiga versions).
svn-id: r28466
2007-08-06 08:38:45 +00:00
Nicola Mettifogo
b01232f08a - Added parser strings for Big Red Adventure
- Pushed parser strings initialization down to engine subclasses

svn-id: r28295
2007-07-29 16:29:41 +00:00
Nicola Mettifogo
9a766cf5c4 Removed direct references to callable functions (opcodes). They are now only available via a virtual member function in the engine.
svn-id: r28291
2007-07-29 15:21:33 +00:00
Nicola Mettifogo
2fb22f2eea Now clipping frame # to avoid crashes because of bad behavior of game scripts.
svn-id: r27683
2007-06-23 21:42:45 +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
342d1aa48f Reverting my last change.
svn-id: r26866
2007-05-18 20:05:08 +00:00
Nicola Mettifogo
f243227f09 Replaced explicit bitmasks with function calls.
svn-id: r26855
2007-05-16 19:23:14 +00:00
Nicola Mettifogo
ae63466446 cleanup
svn-id: r26834
2007-05-13 14:38:05 +00:00
Nicola Mettifogo
09c816e695 New debug messages.
svn-id: r26832
2007-05-13 12:41:42 +00:00
Nicola Mettifogo
d0635b8677 New debug strings and levels.
svn-id: r26812
2007-05-12 19:29:20 +00:00
Nicola Mettifogo
d6c60a5407 Fix compilation (sigh).
svn-id: r26724
2007-05-01 16:21:16 +00:00
Nicola Mettifogo
ab85ecdcb7 - Moved Zone and Animation to List<>.
- Removed any reference to Node from codebase.

svn-id: r26452
2007-04-11 20:01:06 +00:00
Nicola Mettifogo
a0dbf44ee1 - moved walk code to List<>
- some adjustments to #include statements

svn-id: r26424
2007-04-09 10:03:15 +00:00
Nicola Mettifogo
edd226d1b6 Added new ManagedList class to handle Instruction and Command lists. The same class will be used to hold Zone, Animation and WalkNode lists.
svn-id: r26410
2007-04-07 17:18:16 +00:00
Nicola Mettifogo
5a8b8ca92d cleanup
svn-id: r26409
2007-04-07 16:40:27 +00:00
Nicola Mettifogo
162247ad3e Changed Commands to use List<>
svn-id: r26407
2007-04-07 15:18:26 +00:00
Nicola Mettifogo
aaf8e48a02 oops forgot to deallocate List nodes after usage
svn-id: r26403
2007-04-07 12:13:50 +00:00
Nicola Mettifogo
1e1ba32c0a change Program to use a List<> of Instructions instead of a homebrew linked list
svn-id: r26401
2007-04-07 12:03:51 +00:00
Nicola Mettifogo
9367371107 Turned free___() routines into proper destructors for Zone, Animation and Program, and added memo comments for porting the engine to Common::List<>.
svn-id: r26399
2007-04-07 09:31:24 +00:00
Nicola Mettifogo
40245fe450 Made Program hold an explicit reference to its set of Instruction(s) instead of simply being a Node chained with them.
svn-id: r26393
2007-04-06 18:29:55 +00:00
Nicola Mettifogo
711865ef63 - implemented destructor for Cnv, thus removing calls to Gfx::freeCnv()
- enforced use of getFramePtr instead of Cnv::_array member

svn-id: r26317
2007-03-29 18:34:31 +00:00
Nicola Mettifogo
7b9c74acae Added new class Table, and updated Disk accordingly. Tables can be populated after their creation or wrapped around existing arrays. Thus, the old functions (initTable, freeTable and searchTable) have been removed.
svn-id: r26295
2007-03-24 21:18:08 +00:00
Nicola Mettifogo
3034cb1273 made more functions members of Parallaction
svn-id: r26294
2007-03-24 19:55:34 +00:00
Nicola Mettifogo
a37870c125 - moved buildWalkPath inner loop into a new function
- renamed some variables in buildWalkPath
- deleted an old extern for buildWalkPath

svn-id: r26272
2007-03-21 21:49:11 +00:00
Nicola Mettifogo
d881196681 replaced some x,y/left,top pairs with Common::Point
svn-id: r26262
2007-03-20 20:46:09 +00:00
Nicola Mettifogo
fe5660400f made Animation a subclass of Zone (finally!)
svn-id: r26244
2007-03-19 21:49:41 +00:00
Nicola Mettifogo
992f535724 Made loadFrames return a new Cnv instead of accepting a parameter.
svn-id: r26231
2007-03-18 21:08:28 +00:00
Nicola Mettifogo
548a522733 changed Animation::_cnv to be a pointer, in view of changes to Disk::loadFrames()
svn-id: r26229
2007-03-18 20:35:12 +00:00
Nicola Mettifogo
7e310422c3 - added constructors for most structs
- structs are now allocated via new instead of malloc's
- respective free's have been replaced with delete

svn-id: r26228
2007-03-18 20:18:19 +00:00
Nicola Mettifogo
f14a5c17f2 - Made global Node's (_zones, _animations, _helperNode) and the functions using them members of the engine.
- Added a constructor for Node

svn-id: r26226
2007-03-18 19:35:54 +00:00
Nicola Mettifogo
29bf77d5b1 hidden _cnv member of Animation from callers
svn-id: r26217
2007-03-18 17:33:54 +00:00
Nicola Mettifogo
0e370a4162 converted DoorData and Zone to Common::Point
svn-id: r26215
2007-03-18 17:17:21 +00:00
Nicola Mettifogo
abaef3f5af removed unused parameter from Gfx::flatBlitCnv
svn-id: r26195
2007-03-18 09:16:12 +00:00
Nicola Mettifogo
5ffd410e30 fixed usage of reference operator
svn-id: r26189
2007-03-18 08:15:54 +00:00
Nicola Mettifogo
b80dab6c73 added getters for width and height in Zone and Animation
svn-id: r26183
2007-03-17 20:48:23 +00:00
Nicola Mettifogo
54201ddaa9 split Zone::_oldPosition in two members
svn-id: r26182
2007-03-17 20:19:16 +00:00
Nicola Mettifogo
d7f31cf55d Flattened anonymous union in Zone. Its members have been partially merged.
svn-id: r26181
2007-03-17 19:48:48 +00:00
Nicola Mettifogo
48460e2ea6 - Made Node a superclass for Zone, WalkNode, Command, Instruction, Program and Job.
- Moved Job list management inside Parallaction (because constructors for global variables are not always invoked on some platforms)

svn-id: r26164
2007-03-17 13:14:50 +00:00
Nicola Mettifogo
b515721ed8 some renaming to shorten lines
svn-id: r26159
2007-03-17 07:55:16 +00:00
Nicola Mettifogo
1ef774b2ee gathered character related stuff into a new struct Character, and modified calling code accordingly
svn-id: r26158
2007-03-17 07:52:47 +00:00
Nicola Mettifogo
62a5f783ee removed explicit references to kMask0 since there is only 1 mask available
svn-id: r26140
2007-03-14 21:57:07 +00:00
Nicola Mettifogo
33093f3452 made hi-level graphics routine use Common::Rect instead of (x,y,w,h) t-uples
svn-id: r26121
2007-03-13 19:59:45 +00:00
Nicola Mettifogo
6f0dda093a renamed Graphics class to Gfx and Parallaction::_graphics to Parallaction::_gfx to shorten lines and avoid aliasing with framework's Graphics
svn-id: r26111
2007-03-12 20:41:25 +00:00