Commit Graph

507 Commits

Author SHA1 Message Date
Nicola Mettifogo
008042ac25 Implemented a IFF (Interchange File Format) parser and added subclasses to parse graphics (ILBM, PBM) and audio (8SVX), thus replacing old decoding routines. SAGA and Parallaction have been adjusted to work with the new code.
svn-id: r26719
2007-05-01 15:39:40 +00:00
Torbjörn Andersson
6ba72121ad Changed abs() to ABS()
svn-id: r26639
2007-04-28 04:29:05 +00:00
Max Horn
89ee8945c1 Fix warning
svn-id: r26621
2007-04-27 20:22:55 +00:00
Nicola Mettifogo
81d6873608 Refactored music code for dos version and added music to Amiga versions.
svn-id: r26619
2007-04-27 20:06:42 +00:00
Nicola Mettifogo
c1d8a1a01c Fixed paths. (Short comment for big achievement).
svn-id: r26586
2007-04-23 21:31:03 +00:00
Nicola Mettifogo
0782fc5448 Fonts have been taking care of them being proportional for some time now, so it's time to remove old flags.
svn-id: r26585
2007-04-23 21:19:09 +00:00
Nicola Mettifogo
fd08c7278d Improvements on background masking in Amiga versions (not yet perfect, though),
svn-id: r26584
2007-04-23 21:16:13 +00:00
Nicola Mettifogo
b60c35e6f1 Fixed VS2005 warning
svn-id: r26582
2007-04-23 18:28:14 +00:00
Nicola Mettifogo
7609a54520 Some fixes for font management:
- new Amiga topaz font
- labels can be seen on the Amiga demo
- colors are now working

svn-id: r26580
2007-04-23 17:22:47 +00:00
Nicola Mettifogo
0f8c1d4200 Tiny fix for missing text in slides.
svn-id: r26579
2007-04-23 17:08:19 +00:00
Nicola Mettifogo
ea7157c5b8 Simplified loading of background resources for Amiga.
svn-id: r26578
2007-04-23 17:07:47 +00:00
Nicola Mettifogo
77afb85fcd Fixed walking bug: random nodes aren't inserted in the walk path anymore.
svn-id: r26577
2007-04-23 17:07:09 +00:00
Nicola Mettifogo
8c8066b7ab Added stubs for Amiga specific callables.
svn-id: r26565
2007-04-22 09:46:22 +00:00
Nicola Mettifogo
c9970a8005 - Implemented Amiga halfbrite mode in palette code, though usage is limited to displayItemComment() for the moment.
- Some changes to palette routines to make them fit with the new scheme.

svn-id: r26553
2007-04-21 12:51:40 +00:00
Nicola Mettifogo
9d50a5a64f Fixes bug 1702679.
svn-id: r26544
2007-04-18 11:53:07 +00:00
Sven Hesse
2d9cf85a73 Fix compilation
svn-id: r26533
2007-04-16 20:26:43 +00:00
Nicola Mettifogo
987638a713 Now handling fonts with brand-new Font hierarchy. Amiga font have been implemented for dialogues/descriptions, but not for labels yet.
svn-id: r26530
2007-04-16 20:16:18 +00:00
Nicola Mettifogo
c43960b958 - Fonts are now preloaded at start.
- Replaced font string names with enums.
- Some slight simplification to Disk.

svn-id: r26518
2007-04-15 20:57:56 +00:00
Nicola Mettifogo
7e0c88592f Fixed some memory leaks.
svn-id: r26483
2007-04-15 08:32:28 +00:00
Nicola Mettifogo
88b8f94435 Implemented palette animation to Amiga version of Nippon Safes.
svn-id: r26453
2007-04-11 20:20:22 +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
6f8e77eb76 Moved Jobs to ManagedList. Since Jobs must be ordered according to their priority, a new insertSorted method has been added to the implementation.
svn-id: r26451
2007-04-10 18:46:34 +00:00
Nicola Mettifogo
cfcf281b86 Cleanup of Zone/Animation removal code. Only the good god of void pointers knows how it managed to work until now.
svn-id: r26430
2007-04-09 11:07:38 +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
53bdc1e0cf Fixed regression bug in dialogue code.
svn-id: r26422
2007-04-09 07:50:52 +00:00
Nicola Mettifogo
48b5726043 Fixed broken implementation of ManagedList
svn-id: r26412
2007-04-07 22:50:56 +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
2f6f857eaf Fixed incomplete implementation of Command lists.
svn-id: r26408
2007-04-07 15:47:42 +00:00
Nicola Mettifogo
162247ad3e Changed Commands to use List<>
svn-id: r26407
2007-04-07 15:18:26 +00:00
Nicola Mettifogo
caf2b4d270 Explicit constructor invoked when instancing WalkNode.
svn-id: r26406
2007-04-07 14:01:37 +00:00
Nicola Mettifogo
9cf94ef46a Implemented destructors for Question and Answer.
svn-id: r26405
2007-04-07 14:00:23 +00:00
Nicola Mettifogo
16dc3436ad New struct Answer introduced.
svn-id: r26404
2007-04-07 12:47:02 +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
17bcfbf89d Added code for ~Command().
svn-id: r26402
2007-04-07 12:04:27 +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
59b1538685 Reduced dependency between project files, and prepared defs.h for deletion as soon as List<>'s usage is implemented.
svn-id: r26400
2007-04-07 10:02:59 +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
700fba21ed Enabled lazy removal for Job instances.
svn-id: r26396
2007-04-06 18:44:58 +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
972b0d036a Characters now only store the set of frames they actually need. Basically, mini characters and normal characters are now completely separated.
svn-id: r26381
2007-04-04 20:59:31 +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
4c151928fa - fixed RLEStream
- simplified unpacking of background for dos version
- other minor changes

svn-id: r26378
2007-04-03 21:11:43 +00:00
Nicola Mettifogo
0dadd3cd2c Reduced code duplication in AmigaDisk by means of a new wrapper class for Archive.
svn-id: r26377
2007-04-03 19:51:23 +00:00
Nicola Mettifogo
8b63337ce0 miscellaneous improvements for amiga
svn-id: r26374
2007-04-02 21:00:11 +00:00
Nicola Mettifogo
94159481cc - slightly improved mask for amiga (not perfect yet)
- fixed loading of Talks for amiga
- fixed handling of multiple frames

svn-id: r26373
2007-04-02 20:53:25 +00:00
Nicola Mettifogo
4273a4d49b Renamed classes for consistency.
svn-id: r26362
2007-04-01 19:58:53 +00:00
Nicola Mettifogo
f5828e7fdf - Added a new class RLEDecoder to avoid code duplication in Disk routines.
- Temporarily disabled mask loading in Amiga version.

svn-id: r26361
2007-04-01 19:22:15 +00:00
Nicola Mettifogo
a97ab92dd9 Fixed loading of graphics. Now things really look what they are, except the character which still looks a bit jagged.
svn-id: r26352
2007-04-01 15:41:34 +00:00
Nicola Mettifogo
91eaea3e58 Added code for resource loading and fixed the bug having Amiga demo crashing. It is now limitedly playable, although graphics is still heavily messed up.
svn-id: r26349
2007-04-01 14:35:33 +00:00
Nicola Mettifogo
b7e499b64a Implemented Disk routines for Amiga demo. Font are simulated with boxes, and frames aren't decoded properly yet. The engine will now show the first game screen, but crash as soon as the user clicks her mouse.
svn-id: r26341
2007-04-01 12:45:42 +00:00
Nicola Mettifogo
20c2bba084 Added GF_DEMO flag and ability to load the correct location at start.
svn-id: r26340
2007-04-01 12:42:30 +00:00
Nicola Mettifogo
a6ad021b30 Function changeCharacter is now responsible for loading character specific Zones and such
svn-id: r26339
2007-04-01 12:17:38 +00:00
Nicola Mettifogo
18ef96d08b made Menu use _vm instead of _engine
svn-id: r26336
2007-04-01 11:44:58 +00:00
Nicola Mettifogo
69ede83dd3 made menu properly set language
svn-id: r26329
2007-03-30 21:48:59 +00:00
Nicola Mettifogo
d75df27964 oops
svn-id: r26319
2007-03-29 19:10:01 +00:00
Nicola Mettifogo
31eb34c98f - changed Cnv to use a single large buffer for frames instead of small chunks of memory, to simplify loading by Disk.
- added a new constructor with parameters to Cnv

svn-id: r26318
2007-03-29 19:03:51 +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
3903309af3 Overhaul of palette management to bring it back to its original form. Gfx palette code has been updated, and _c_endComment (callable from scripts) has been implemented. As a by-product, palette cycling now finally works!
svn-id: r26314
2007-03-28 20:12:00 +00:00
Nicola Mettifogo
ac1e6c9b75 Fixed palette bug to allow proper display of splash screens, but dos palette is still broken in game. Palette code needs a general revision due to differences between dos and amiga.
svn-id: r26313
2007-03-27 22:04:50 +00:00
Nicola Mettifogo
303b66391b engine can now handle amiga and dos splash screens
svn-id: r26312
2007-03-27 22:03:00 +00:00
Nicola Mettifogo
77657498b2 added code to load amiga background slides
svn-id: r26311
2007-03-27 22:02:07 +00:00
Nicola Mettifogo
7708186cba Changed detection of the dreaded 'fr' archive in Nippon Safes Amiga Demo. This is not a better hack than before, except that now it works.
svn-id: r26299
2007-03-24 23:57:29 +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
afe981d340 started infrastructure for amiga demo:
- added Disk skeleton
- adapted Archive to handle different structure for archives
- moved Disk creation from engine constructor into init() [still sub-optimal]

svn-id: r26293
2007-03-24 17:14:04 +00:00
Nicola Mettifogo
10048eaec1 - fixed regression bug: one free/delete mismatch
- added needed virtual destructors to structs

svn-id: r26292
2007-03-24 16:36:13 +00:00
Nicola Mettifogo
3daa442c82 unrolled loop in buildWalkPath and renamed some variables
svn-id: r26276
2007-03-22 19:49:15 +00:00
Max Horn
2964bed5d2 Fix warnings
svn-id: r26274
2007-03-22 17:33:21 +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
89ea1f3abf got rid of cryptic pseudo-boolean variable in buildWalkPath
svn-id: r26269
2007-03-21 19:42:09 +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
9494a9f025 some refactoring for walking code
svn-id: r26260
2007-03-20 19:45:17 +00:00
Nicola Mettifogo
d94979c936 final version of runDialogue
svn-id: r26251
2007-03-19 22:38:00 +00:00
Nicola Mettifogo
838ec385cf applied De Morgan's law to an expression to expose similarities
svn-id: r26250
2007-03-19 22:32:35 +00:00
Nicola Mettifogo
54b785fb3b fixed bug from first decompile
svn-id: r26249
2007-03-19 22:30:54 +00:00
Nicola Mettifogo
33f827c83e refactoring of the main loop of runDialogue, now in a decent shape
svn-id: r26247
2007-03-19 22:24:40 +00:00
Nicola Mettifogo
8f69bae8ec a bit of refactoring for dialogue code
svn-id: r26246
2007-03-19 22:21:10 +00:00
Nicola Mettifogo
d5e26cf261 removed most useless (paranoid) debugC
svn-id: r26245
2007-03-19 22:10:10 +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
3dd12518cb added member initialization
svn-id: r26243
2007-03-19 21:44:23 +00:00
Nicola Mettifogo
1931461127 deleted some dead code
svn-id: r26242
2007-03-19 20:26:17 +00:00
Max Horn
8fae7d8b02 Fixed warning: warning: base class 'struct Parallaction::Node' should be explicitly initialized in the copy constructor
svn-id: r26235
2007-03-18 23:04:44 +00:00
Nicola Mettifogo
0bc056aee3 Made loadStatic return a new StaticCnv instead of accepting a parameter. All disk functions now accept only a resource name as their parameter.
svn-id: r26232
2007-03-18 21:15:39 +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
4966b755f0 changed DoorData::_cnv to be a pointer, in view of changes to Disk::loadFrames()
svn-id: r26230
2007-03-18 21:00:22 +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
2ea44bf1ee changed code to use WalkNode constructors
svn-id: r26227
2007-03-18 19:59:56 +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
c1f84742f9 changed remaining stuff to Common::Point and got rid of custom Point and Rect
svn-id: r26216
2007-03-18 17:22:07 +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
919985e4df converted input and labels to Common::Point
svn-id: r26214
2007-03-18 17:12:48 +00:00
Nicola Mettifogo
ff5ec6462e converted walk routines to use Common::Point
svn-id: r26213
2007-03-18 17:03:07 +00:00
Nicola Mettifogo
791ad09510 Made loadFont return a new Cnv instead of accepting a parameter.
svn-id: r26203
2007-03-18 10:38:31 +00:00
Nicola Mettifogo
13385a5f2d Made loadObjects return a new Cnv instead of accepting a parameter.
svn-id: r26202
2007-03-18 10:34:41 +00:00
Nicola Mettifogo
8f74bc15ae - made loadPointer return a new StaticCnv instead of accepting a parameter.
- adjusted Gfx code handling mouse pointers.

svn-id: r26201
2007-03-18 10:30:51 +00:00
Nicola Mettifogo
ec58e9ac05 Made loadHead return a new Cnv instead of accepting a parameter.
svn-id: r26200
2007-03-18 10:25:46 +00:00
Nicola Mettifogo
35cebe2444 Made loadTalk return a new Cnv instead of accepting a parameter.
svn-id: r26199
2007-03-18 10:20:38 +00:00
Nicola Mettifogo
0aedc8d67f Removed old and commented hack code for Dino in the museum location.
svn-id: r26198
2007-03-18 09:35:48 +00:00
Nicola Mettifogo
6d718d27f5 extracted more code from runDialogue and renamed some key variables
svn-id: r26197
2007-03-18 09:34:19 +00:00
Nicola Mettifogo
abaef3f5af removed unused parameter from Gfx::flatBlitCnv
svn-id: r26195
2007-03-18 09:16:12 +00:00
Nicola Mettifogo
03249397e0 more formatting
svn-id: r26194
2007-03-18 09:09:02 +00:00
Nicola Mettifogo
97426c8808 formatting
svn-id: r26193
2007-03-18 09:06:22 +00:00
Nicola Mettifogo
88ce9c83bd broke down huge runDialogue in more manageable chunks
svn-id: r26192
2007-03-18 08:58:41 +00:00
Nicola Mettifogo
8240027712 Bug fixed: inventory wasn't refreshed when loading a savegame if character was not switched. To make things clearer, character are now forced to reload all of their data on switch/load.
svn-id: r26190
2007-03-18 08:29:45 +00:00
Nicola Mettifogo
5ffd410e30 fixed usage of reference operator
svn-id: r26189
2007-03-18 08:15:54 +00:00
Nicola Mettifogo
794fa64de1 added getRect() to Zone to slightly simplify hitZone condition check
svn-id: r26186
2007-03-17 21:17:00 +00:00
Nicola Mettifogo
e6f64e83dd added translate() to Zone
svn-id: r26185
2007-03-17 21:06:19 +00:00
Nicola Mettifogo
74f7a90886 renamed structures to be more general
svn-id: r26184
2007-03-17 20:51:13 +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
Max Horn
ed54ea9155 Moved Event/EventType/keyboard enum from common/system.h (part of class OSystem) to common/events.h (part of namespace Common). Porters may have to make minor changes to their backends to get them to compile again
svn-id: r26180
2007-03-17 19:02:05 +00:00
Nicola Mettifogo
f272d19570 cleanup
svn-id: r26179
2007-03-17 17:52:30 +00:00
Nicola Mettifogo
aca3cfad51 cleanup
svn-id: r26166
2007-03-17 13:19:30 +00:00
Nicola Mettifogo
9c137c25cb oops forgot to commit changes for Command
svn-id: r26165
2007-03-17 13:18:03 +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
cb5c3840ed minor cleanup
svn-id: r26161
2007-03-17 08:06:45 +00:00
Nicola Mettifogo
1f7e889fe9 renamed freeCharacterFrames() to freeCharacter() for consistency
svn-id: r26160
2007-03-17 07:56:45 +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
Max Horn
15d9bc42ea Force all code to use EventManager::pollEvent instead of OSystem::pollEvent
svn-id: r26156
2007-03-17 00:53:21 +00:00
Nicola Mettifogo
5c91a361c7 removed a leftover extern statement causing link errors on some platforms
svn-id: r26146
2007-03-16 20:45:35 +00:00
Nicola Mettifogo
18fb5b485b moved remaining background related functions to disk.cpp, and changed Gfx accordingly
svn-id: r26145
2007-03-15 21:56:21 +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
dcfd64cdbc some slight refactoring
svn-id: r26139
2007-03-14 21:53:34 +00:00
Nicola Mettifogo
5dae85ad11 removed dead code
svn-id: r26138
2007-03-14 21:11:04 +00:00
Nicola Mettifogo
a9191d1119 implemented clipping using Common::Rect::clip
svn-id: r26137
2007-03-14 21:09:56 +00:00
Nicola Mettifogo
b1abd5e6ca enforced use of Common::Rect on all graphic routines
svn-id: r26128
2007-03-13 23:30:36 +00:00
Nicola Mettifogo
922c0a7ea0 removed special case of Graphics::copyRect in favor of more general code
svn-id: r26126
2007-03-13 20:47:59 +00:00
Nicola Mettifogo
b0a7abb186 removed pointless dependencies
svn-id: r26124
2007-03-13 20:42:11 +00:00
Nicola Mettifogo
2ad8d70152 Moved inventory surface management into inventory.cpp, thus removing Graphics::kBit3. Some duplicated code now exists in graphics.cpp and inventory.cpp.
svn-id: r26123
2007-03-13 20:41:40 +00:00
Nicola Mettifogo
3346e270ba cleanup
svn-id: r26122
2007-03-13 20:08:31 +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
594296c3e3 oops forgot to add a file
svn-id: r26118
2007-03-12 22:54:04 +00:00
Nicola Mettifogo
88ed622702 moved background path buffer management into walk.cpp
svn-id: r26117
2007-03-12 22:52:27 +00:00
Nicola Mettifogo
cf816f54d9 removed useless routines (maybe leftovers from the amiga conversion)
svn-id: r26116
2007-03-12 22:45:50 +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
Nicola Mettifogo
77855d5b41 got rid of remaining uses of kBit3 in Menu
svn-id: r26108
2007-03-12 20:08:52 +00:00
Nicola Mettifogo
afc35317f7 The only uses for StaticCnv::_data2 were by Get and Door zones, so a new field has been added to those structure and _data2 has been deleted. Some graphic routines has been renamed to better reflect this change, too.
svn-id: r26107
2007-03-12 19:58:10 +00:00
Nicola Mettifogo
d0ccb0ea19 overall revision of selectCharacter (protection code) to remove usage of StaticCnv::_data2 and some slight bug fixing
svn-id: r26099
2007-03-12 09:21:30 +00:00
Nicola Mettifogo
e9190ba977 oops
svn-id: r26096
2007-03-11 17:01:41 +00:00
Nicola Mettifogo
6723598296 fixed bug: loading a game from the start menu doesn't lead to a crash anymore
svn-id: r26095
2007-03-11 16:54:39 +00:00
Nicola Mettifogo
63ae591e5f Disk is now completely responsible for retrieving localized location scripts
svn-id: r26094
2007-03-11 16:53:20 +00:00
Nicola Mettifogo
a1b5d99835 removed some dead code and formatting
svn-id: r26089
2007-03-11 15:10:45 +00:00
Nicola Mettifogo
39fdacf1fd fixed bug: now considering Array's ability to shift values when removing elements
svn-id: r26086
2007-03-11 14:16:43 +00:00
Nicola Mettifogo
3b5c330cef wrapped active location data into a new structure
svn-id: r26085
2007-03-11 14:14:08 +00:00
Nicola Mettifogo
981d11dcfd changed changeLocation to use StringList instead of multiple nested if's
svn-id: r26084
2007-03-11 13:43:17 +00:00
Nicola Mettifogo
06434f6eef some simplification for changeLocation
svn-id: r26083
2007-03-11 13:01:11 +00:00
Nicola Mettifogo
555d3ed317 added comment to changeLocation
svn-id: r26081
2007-03-11 11:11:05 +00:00
Nicola Mettifogo
f17cd6a577 some refactoring for music management
svn-id: r26080
2007-03-11 10:50:52 +00:00
Nicola Mettifogo
23b7c2aec5 should stop Q's Visual Studio from complaining
svn-id: r26079
2007-03-11 01:06:54 +00:00
Nicola Mettifogo
7c05225f0d cleanup
svn-id: r26077
2007-03-11 00:06:14 +00:00
Nicola Mettifogo
7d03e1ebf4 more refactoring
svn-id: r26076
2007-03-11 00:04:50 +00:00
Nicola Mettifogo
08cc2e4b27 changed kEngineMiniDonna to a more appropriate kEngineTransformedDonna
svn-id: r26075
2007-03-10 22:56:32 +00:00
Nicola Mettifogo
93d910bf2d simplified character mode handling
svn-id: r26074
2007-03-10 22:55:09 +00:00
Nicola Mettifogo
72ef7093fa some refactoring
svn-id: r26072
2007-03-10 22:13:47 +00:00
Nicola Mettifogo
096579ecbc commented nasty hack in the original code
svn-id: r26071
2007-03-10 21:31:59 +00:00
Nicola Mettifogo
21f4d2f818 fixed old reimplementation bug
svn-id: r26070
2007-03-10 21:31:22 +00:00
Nicola Mettifogo
84a5f0f827 fixed regression: head and talks are now loaded only for real characters, i.e. no dummies used for slide transitions
svn-id: r26069
2007-03-10 21:25:18 +00:00
Nicola Mettifogo
c80c3e3b3b more robust font management
svn-id: r26068
2007-03-10 21:23:22 +00:00
Eugene Sandulenko
9b0bf64448 Silence MSVC8 warnings.
svn-id: r26062
2007-03-10 15:02:39 +00:00
Nicola Mettifogo
479c8bdc18 character loading/freeing routines now also handle Heads and Talks, instead of having scattered code around
svn-id: r26059
2007-03-10 14:52:33 +00:00
Nicola Mettifogo
cd366dd78c got rid of calls to close() since streams and archives clean after themselves
svn-id: r26051
2007-03-10 13:05:13 +00:00
Nicola Mettifogo
948213d5a0 deleted useless code
svn-id: r26025
2007-03-08 20:07:27 +00:00
Nicola Mettifogo
62d1f780d5 fixed regression: background used to get broken when items were picked up
svn-id: r25981
2007-03-04 20:12:55 +00:00
Nicola Mettifogo
20da7f80f1 made loadScript and loadLocation benefit from Script's ability to dispose of its input buffer
svn-id: r25976
2007-03-04 15:09:45 +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
b440bc1a03 wrapped loader routines into a new class named Disk. The new class is also responsible for handling Archives in place of the Parallaction engine.
svn-id: r25972
2007-03-04 13:27:29 +00:00
Nicola Mettifogo
826b16ef71 no more overloading for loadBackground
svn-id: r25971
2007-03-04 12:55:25 +00:00
Nicola Mettifogo
61fe32066b hid mask and path loading details from the engine, so it is now independent from background management
svn-id: r25970
2007-03-04 11:10:55 +00:00
Nicola Mettifogo
696b080f63 separated slide from scenery loading to take care of filename aliases
svn-id: r25969
2007-03-04 11:03:27 +00:00
Nicola Mettifogo
c5e848fb32 moved background loading into disk.cpp
svn-id: r25968
2007-03-04 10:57:30 +00:00
Nicola Mettifogo
8e7b556e99 moved platform-dependant resource loading routines into disk.cpp
svn-id: r25964
2007-03-04 09:20:03 +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
84d2c1782f removed common-case code from loadBackground
svn-id: r25949
2007-03-03 10:10:46 +00:00
Nicola Mettifogo
c15310920a loadBackground simplified: palette cycling is still broken, though
svn-id: r25948
2007-03-03 10:01:43 +00:00
Nicola Mettifogo
1dce0b18d9 corrected parsing of LOCATION command
svn-id: r25947
2007-03-03 09:39:08 +00:00
Nicola Mettifogo
6d958e9f30 added loaders for static images like pickable items and for characters frames
svn-id: r25940
2007-03-02 23:13:13 +00:00
Nicola Mettifogo
9267e85c16 fix broken build
svn-id: r25939
2007-03-02 22:55:46 +00:00
Nicola Mettifogo
4c2687e9c7 added Script loader routine
svn-id: r25938
2007-03-02 22:34:12 +00:00
Nicola Mettifogo
753d83f946 enforced convention on loader names: load[ItemType]
svn-id: r25937
2007-03-02 22:26:39 +00:00
Nicola Mettifogo
02d4001f57 added inventory objects loader routine
svn-id: r25936
2007-03-02 22:23:02 +00:00
Nicola Mettifogo
c122d83c0e changed every font name to be platform independent, added font loader routine
svn-id: r25935
2007-03-02 22:18:37 +00:00
Nicola Mettifogo
0c39e0e3db replaced calls to loadExternalStaticCnv with separate loaders for Head and Pointer resources
svn-id: r25934
2007-03-02 22:12:57 +00:00
Nicola Mettifogo
f124c22bc5 added openLocation as loader for location scripts resources
svn-id: r25933
2007-03-02 22:02:19 +00:00
Nicola Mettifogo
43f802ef5f oops forgot to add file
svn-id: r25932
2007-03-02 21:50:36 +00:00
Nicola Mettifogo
1af8258325 added openTalk as loader for talk resources
svn-id: r25931
2007-03-02 21:47:35 +00:00
Nicola Mettifogo
94aed388a7 corrected error message
svn-id: r25930
2007-03-02 21:46:54 +00:00
Nicola Mettifogo
b2927b69c6 changed font handling:
- engine doesn't see font as a low-level Cnv anymore
- the Graphics class takes care of freeing memory on font changes

svn-id: r25900
2007-02-27 19:39:33 +00:00
Nicola Mettifogo
c9f652dc1f made Archive inherit from SeekableReadStream instead of File since write capabilities and file handle are not needed. Implementation of SeekableReadStream virtual functions is now complete.
svn-id: r25870
2007-02-25 22:17:41 +00:00
Max Horn
d74a339424 Fix warnings
svn-id: r25869
2007-02-25 22:13:38 +00:00
Nicola Mettifogo
c7734857e1 made Archive inherit from Common::File, added some methods to comply to interface, changed callers to exploit readByte capabilities
svn-id: r25868
2007-02-25 21:40:15 +00:00
Nicola Mettifogo
420a7c5f75 made Archive behave more like Common::File, preparing for inheritance
svn-id: r25867
2007-02-25 21:04:51 +00:00
Nicola Mettifogo
cacff9a9f2 wrapped archive routines into a new class named Archive. File-level static variables have been made members of the new class.
svn-id: r25866
2007-02-25 20:35:47 +00:00
Nicola Mettifogo
0c77177ef1 oops. Forgot the very last reference.
svn-id: r25865
2007-02-25 20:18:11 +00:00
Nicola Mettifogo
7c5600724b got rid of ArchievedFile. Since only one single file is being read from the archives at every moment, the ArchivedFile structure used for bookkeeping is useless.
svn-id: r25864
2007-02-25 20:12:23 +00:00
Eugene Sandulenko
91dbad8325 Use AGDS feature for specifying demos
svn-id: r25822
2007-02-24 15:24:38 +00:00
Nicola Mettifogo
f4f1e12330 nippon safes demo is English, not French
svn-id: r25821
2007-02-24 14:49:08 +00:00
Travis Howell
967b034fa5 Set the extra field for the Amiga demo, to just 'demo', since the language and platform are auto added.
svn-id: r25815
2007-02-24 09:17:06 +00:00
Nicola Mettifogo
aa625d0a38 ArchiveFile's details are now known only to archive code
svn-id: r25814
2007-02-24 09:12:07 +00:00
Nicola Mettifogo
c8631a92e9 french amiga demo is now recognized (not playable yet)
svn-id: r25813
2007-02-24 09:11:12 +00:00
Max Horn
4624837448 Fix fixed spelling :)
svn-id: r25803
2007-02-23 00:40:24 +00:00
Eugene Sandulenko
73c23077cd Fix spelling.
svn-id: r25802
2007-02-23 00:30:50 +00:00
Eugene Sandulenko
b825fb858f Add support for MIDI music. THough the music is not yet heard since
there are no instrument assignments yet.

svn-id: r25774
2007-02-21 21:42:37 +00:00
Nicola Mettifogo
d689187aa3 made hi-level parsing routines (Zone, Commands, Dialogue, Animation) rely on Script objects for input.
svn-id: r25743
2007-02-20 16:54:55 +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
Eugene Sandulenko
bbc50471bb Fix compilation
svn-id: r25722
2007-02-19 13:46:44 +00:00
Nicola Mettifogo
0f3ebbd3b3 table routines merged with common engine code
svn-id: r25721
2007-02-19 13:07:18 +00:00
Nicola Mettifogo
2f7388d78a oops forgot to update make module
svn-id: r25720
2007-02-19 12:55:51 +00:00
Nicola Mettifogo
745d814caa renamed file to follow common convention
svn-id: r25719
2007-02-19 12:54:58 +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
Nicola Mettifogo
85a0a02996 fixed bad implementation
svn-id: r25717
2007-02-19 11:36:31 +00:00
Nicola Mettifogo
402e364852 fixed engine bug preventing savegames from being consistent with the actual game status. The workaround code comes from BRA.
svn-id: r25715
2007-02-19 09:31:43 +00:00
Nicola Mettifogo
880f449a2d fixed regression bug preventing user from interacting with many items, notably not allowing combining items from the inventory
svn-id: r25714
2007-02-19 09:25:11 +00:00
Chris Apers
5a32e4f6e2 Bad hack to make thsi engine run on PalmOS
svn-id: r25686
2007-02-18 14:00:55 +00:00
Nicola Mettifogo
cd75d9bfdb fixed broken savegames with duplicate items
svn-id: r25681
2007-02-18 10:57:11 +00:00
Nicola Mettifogo
06c354c236 replaced magic number with kFlagsVisited where needed
svn-id: r25680
2007-02-18 10:56:45 +00:00
Nicola Mettifogo
3dd23c5d9a found and commented gross hack in the original engine
svn-id: r25679
2007-02-18 10:32:15 +00:00
Nicola Mettifogo
d4e5daa5b5 change in debug level
svn-id: r25678
2007-02-18 10:31:29 +00:00
Nicola Mettifogo
bc17ef29f9 set the size of savegame name to the same length for both saving and loading
svn-id: r25677
2007-02-18 09:56:28 +00:00
Nicola Mettifogo
6452e60727 enforced use of MAKE_INVENTORY_ID
svn-id: r25676
2007-02-18 09:36:47 +00:00
Nicola Mettifogo
d0da566633 fixed broken sprintf formats in saving routines
svn-id: r25675
2007-02-18 09:35:50 +00:00
Nicola Mettifogo
eb30be5f10 new special debug levels
svn-id: r25674
2007-02-18 09:33:53 +00:00
Nicola Mettifogo
b096586a22 fixes last broken commit
svn-id: r25673
2007-02-18 09:29:54 +00:00
Nicola Mettifogo
03099ec1ca more big-endianness fixes
svn-id: r25672
2007-02-18 09:26:20 +00:00
Nicola Mettifogo
4e6e57eb53 adjusted wrong comment
svn-id: r25670
2007-02-18 08:45:22 +00:00
Nicola Mettifogo
be878d60db fixed regression bug causing labels not to be aligned properly when near the right border
svn-id: r25665
2007-02-17 21:19:55 +00:00
Nicola Mettifogo
b1a63e8a16 changed mapChar to use unsigned (byte) instead of char, to avoid possible sign issues
svn-id: r25664
2007-02-17 20:54:25 +00:00
Nicola Mettifogo
33d04d5aa4 changed CNV loading code to be endian-safe
svn-id: r25663
2007-02-17 20:50:50 +00:00
Torbjörn Andersson
24a36cbb3f Changed spaces to tabs again.
svn-id: r25656
2007-02-17 16:06:34 +00:00
Nicola Mettifogo
e29ddfe156 more conventional termination handling. Event loops are going to get merged soon, so there are FIXME remainders around there.
svn-id: r25655
2007-02-17 15:57:49 +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
Nicola Mettifogo
9ab2ca5bc7 changed some debug levels
svn-id: r25653
2007-02-17 13:39:22 +00:00
Nicola Mettifogo
5e38eab640 fixed regression bug caused by ZoneTypeData being declared as a struct instead of an union. Should have taken care of this when the switch was actually made...
svn-id: r25652
2007-02-17 10:58:54 +00:00
Nicola Mettifogo
e3e76b59b6 fixed a bug in the original engine causing memory-protected systems to occasionally crash
svn-id: r25614
2007-02-15 21:43:56 +00:00
Nicola Mettifogo
22c7239796 fixed warning pointed out by _Q
svn-id: r25613
2007-02-15 21:42:57 +00:00
Eugene Sandulenko
d910b545c5 More skip_whitespace -> Common::ltrim(). For real now.
svn-id: r25577
2007-02-14 00:36:06 +00:00
Max Horn
7572d2b4f2 Changed detectBestMatchingGame to return a pointer to a ADGameDescription (or a subclass of it); added a (currently fake) fallback callback entry in ADParams
svn-id: r25574
2007-02-13 23:37:44 +00:00
Eugene Sandulenko
de02e840a6 skip_whitespace() -> Common::ltrim()
svn-id: r25573
2007-02-13 23:15:46 +00:00
Nicola Mettifogo
9317aec6a2 cancel button on load/save dialog is now handled correctly
svn-id: r25565
2007-02-13 21:07:33 +00:00
Nicola Mettifogo
75fab28be2 cleanup
svn-id: r25562
2007-02-13 21:06:13 +00:00