Commit Graph

167 Commits

Author SHA1 Message Date
Torbjörn Andersson
8cbd185731 Use correct (I hope) size when loading TLK files. The size field in the AUD
header does not count the size of the header itself. (This fixes a failed
assertion when entering the Pegasus Landing in Kyrandia 3.)

svn-id: r31590
2008-04-20 07:44:27 +00:00
Johannes Schickel
03caed6ce3 Implemented some kyra opcodes and some chat handling code, now Malcolm should say something after crawling out of the dump.
svn-id: r31581
2008-04-19 22:22:00 +00:00
Johannes Schickel
a922069eae Ops isInPakList behavior was still not quite correct. Fixed bug with embedded pak files.
svn-id: r31574
2008-04-19 14:40:37 +00:00
Johannes Schickel
1d6af7b502 Fixed Resource::isInPakList behavior.
svn-id: r31573
2008-04-19 14:36:26 +00:00
Johannes Schickel
7e12a50bed - some minor renaming in TIM code
- added exists function to Resource
- started to add checks via exists to assure that important files are present

svn-id: r31572
2008-04-19 14:31:10 +00:00
Florian Kagerer
1d086550a7 - complete support for the playable HOF demo
svn-id: r31560
2008-04-18 19:11:58 +00:00
Johannes Schickel
75641c405e Fixed gcc warning.
svn-id: r31543
2008-04-17 17:16:52 +00:00
Johannes Schickel
710976824e Fixed Kyra 3 TLK file loading.
svn-id: r31541
2008-04-17 16:55:13 +00:00
Johannes Schickel
6cd8eda9bd Implemented support for Kyra3 TLK files.
svn-id: r31540
2008-04-17 16:38:26 +00:00
Johannes Schickel
1f91dc0384 - some refactoring for Kyra3
- removed unneeded map code in KyraEngine_v3

svn-id: r31488
2008-04-12 23:17:21 +00:00
Kari Salminen
d0f46196c2 Silence MSVC8+ warning C4800 about forcing an int value to bool that got turned into error C2220 (Warning treated as error).
svn-id: r31484
2008-04-11 11:05:04 +00:00
Johannes Schickel
a81e9e456d Load all needed package files for kyra3 on startup.
svn-id: r31480
2008-04-10 22:25:38 +00:00
Johannes Schickel
6830ff3449 Small bug fix.
svn-id: r31479
2008-04-10 22:22:35 +00:00
Johannes Schickel
6711a494a2 Improved searchpath support. (Should again detect everything Common::File is able to load).
svn-id: r31478
2008-04-10 22:18:47 +00:00
Johannes Schickel
05e2b66967 Fixed nameclash.
svn-id: r31379
2008-04-04 09:16:25 +00:00
Johannes Schickel
10233af59f Cleanup.
-This line, and those below, will be ignored--

M    kyra/resource.cpp

svn-id: r31370
2008-04-03 21:42:04 +00:00
Johannes Schickel
057fb0e9ab Replaced unloadAllPakFiles with a simple _map.clear on resource class destruction. (Should save a little file i/o need on shutdown)
svn-id: r31369
2008-04-03 21:25:05 +00:00
Max Horn
7f81de6794 cleanup
svn-id: r31289
2008-03-28 08:30:42 +00:00
Johannes Schickel
e29b4bb0cd Committed shared pointer implementation of patch #1895703 "COMMON: Managed List".
Unlike the patch on the tracker this commit includes documentation for SharedPtr.

svn-id: r31287
2008-03-28 06:03:59 +00:00
Travis Howell
91a33d4d63 Add HoF CD demo.
svn-id: r31205
2008-03-20 12:10:30 +00:00
Torbjörn Andersson
4669f2a659 Fixed compilation.
svn-id: r31203
2008-03-20 11:58:18 +00:00
Johannes Schickel
e69532bff2 Fixed loading of 'filedata.fdt' in HoF demo from Malcolm's Revenge CD.
svn-id: r31202
2008-03-20 11:55:52 +00:00
Johannes Schickel
2af4fc1034 - Implemented opcodes:
-> 21: o2_backUpScreen
  -> 22: o2_restoreScreen
  -> 28: o2_addItemToInventory
  -> 50: o2_wipeDownMouseItem
  -> 67: o2_loadPalette384
  -> 68: o2_setPalette384
  -> 165: o2_disableTimer
  -> 166: o2_enableTimer
  -> 167: o2_setTimerCountdown
- renamed some timer functions

svn-id: r31182
2008-03-18 15:50:43 +00:00
Johannes Schickel
83d2f0c3e7 Oops fix stupid copy&paste error...
svn-id: r30950
2008-02-24 12:33:20 +00:00
Johannes Schickel
cb36b056ba Also add extrapath to default search location for Kyrandia resources.
svn-id: r30949
2008-02-24 12:30:12 +00:00
Johannes Schickel
bc257fc378 Fixed comments a bit (typos etc.).
svn-id: r30839
2008-02-09 16:27:49 +00:00
Johannes Schickel
76182fbd59 Revised way of how archive files are mounted:
- file entries from protected archives do not get overwritten anymore
- preload indicator of archives will be unflagged, if embedded file entries are overwritten by other archives

svn-id: r30838
2008-02-09 16:18:44 +00:00
Johannes Schickel
bacdc6eff0 Revised checking if files can be load.
svn-id: r30837
2008-02-09 15:46:06 +00:00
Johannes Schickel
5438bf2e9c Changed some asserts to errors.
svn-id: r30836
2008-02-09 15:33:04 +00:00
Johannes Schickel
15f798d48a Added filename check before header check when trying to detect archives types, this should lower the file i/o need a lot when starting up kyra2.
svn-id: r30835
2008-02-09 15:18:35 +00:00
Johannes Schickel
b3bab9afb9 Implemented proper PAK archive detector.
svn-id: r30834
2008-02-09 15:08:49 +00:00
Johannes Schickel
40b19365be Added another check if PAK file is corrupted.
svn-id: r30833
2008-02-09 14:43:43 +00:00
Johannes Schickel
166698d29d Cleanup.
svn-id: r30832
2008-02-09 14:40:52 +00:00
Johannes Schickel
c98b51e40c - cleanup.
- kyra.dat shouldn't be load by default.

svn-id: r30831
2008-02-08 18:45:25 +00:00
Johannes Schickel
02522a3a14 Should fix regression which prevented kyra.dat to be detected corretly when in game path.
svn-id: r30830
2008-02-08 18:43:13 +00:00
Johannes Schickel
49d0b1f91e Fixed memory leak.
svn-id: r30824
2008-02-07 23:38:17 +00:00
Johannes Schickel
31938bc071 Fixed kyra3 code.
svn-id: r30822
2008-02-07 23:27:08 +00:00
Johannes Schickel
9b5839082d Fixed regression introduced while reworking resource loading code.
svn-id: r30821
2008-02-07 23:14:53 +00:00
Johannes Schickel
ae0b605ad4 Reworked Kyrandia resource loading code.
svn-id: r30820
2008-02-07 23:13:13 +00:00
Jordi Vilalta Prat
66e9d4f5e8 Removed trailing spaces.
svn-id: r30664
2008-01-27 19:47:41 +00:00
Johannes Schickel
2dd6db4ca5 Commit slighty modified patch #1865509 "KYRA: kyradat support for hof".
svn-id: r30394
2008-01-10 23:25:19 +00:00
Johannes Schickel
9b4fc2f70b Resolve portabillity issues introduced with last commit.
svn-id: r30201
2008-01-03 15:20:33 +00:00
Johannes Schickel
fbcba1a573 - got rid of hardcoding "KYRA.DAT" in all places, where it's used
- now using "kyra.dat" rather than "KYRA.DAT"

svn-id: r30200
2008-01-03 14:53:18 +00:00
Johannes Schickel
d73ffa3b03 HoF:
- make sure we really got uppercase filenames in FILEDATA.FDT
- (and silently removed a leftover debug oops)

svn-id: r29177
2007-10-09 05:42:52 +00:00
Johannes Schickel
3ecc0bfda7 HoF:
- now uses "FILEDATA.FDT" to detect what PAK files have to be loaded for ingame use

svn-id: r29176
2007-10-09 05:40:20 +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
Max Horn
c3d3aebe87 Patch #1768757: Merge fsnode-gsoc into trunk (MAJOR change, will break compilation on some ports)
svn-id: r28944
2007-09-18 20:02:04 +00:00
Johannes Schickel
fd6ca3b7ac - added PC-98 platform entry
- added Kyrandia 1 PC-98 detection entries

svn-id: r28907
2007-09-15 14:53:21 +00:00
David Corrales
6856535010 Merged fsnode with trunk: r27971:28460
svn-id: r28462
2007-08-05 19:34:20 +00:00
Johannes Schickel
65abeadcf6 Fixed bug in Resource::getFileHandle.
svn-id: r28306
2007-07-29 17:21:21 +00:00
Johannes Schickel
1140fca82e - Kyrandia 1 works again
- Added timer class for timer handling
- Little bit more resturcturing
- A little bit (almost nothing but a start!) Kyrandia 2 support

svn-id: r28297
2007-07-29 16:33:11 +00:00
David Corrales
9bfe5d5354 Merged the FSNode branch with trunk r27681:27969
svn-id: r27970
2007-07-08 16:58:54 +00:00
Neil Millstone
0601dbd31b Optimisation for resource loading in Kyra engine
svn-id: r27875
2007-07-02 23:02:54 +00:00
David Corrales
3b96c7fad5 Renamed methods in the FilesystemNode class to match the AbstractFSNode implementations.
Also exposed the new methods (exists, isReadable and isWritable) in FilesystemNode.

svn-id: r27113
2007-06-05 21:02:35 +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
Johannes Schickel
ad03c72bdb Commit of patch #1715313 ("CORE: STL like algorithm implementation").
svn-id: r26929
2007-05-23 12:02:31 +00:00
Johannes Schickel
21b2c7bceb Formatting/Cleanup.
svn-id: r26511
2007-04-15 16:41:20 +00:00
Johannes Schickel
397c10f059 made _vm/_engine usage consistent. (_engine -> _vm all over the place now).
svn-id: r26342
2007-04-01 13:10:50 +00:00
Johannes Schickel
d1645e2fbf Commit of patch #1686414 ("Kyra: FM-Towns music").
svn-id: r26285
2007-03-24 00:04:08 +00:00
Johannes Schickel
2517960b3f - more cleanup
- added some .pak file integrity checks

svn-id: r26264
2007-03-20 21:11:42 +00:00
Johannes Schickel
b17ae7017c Little cleanup.
svn-id: r26263
2007-03-20 20:46:19 +00:00
Johannes Schickel
305a1525ed - cleanup
- some diffs for Amiga version

svn-id: r26010
2007-03-07 20:31:19 +00:00
Johannes Schickel
f7c6643841 Support for loading the correct EMC pak file in the FM-Towns version.
svn-id: r25190
2007-01-25 14:38:11 +00:00
Johannes Schickel
3197cb6a23 Never unload files loat on startup like "CAVE.APK" and "LAGOON.APK".
svn-id: r24485
2006-10-24 00:56:10 +00:00
Johannes Schickel
0d357aab4d Fix for (reopened) bug #1582149 ("KYRA1: Crash when meeting Malcolm").
svn-id: r24480
2006-10-24 00:30:48 +00:00
Johannes Schickel
f0a162e8bb Fix for bug #1582149 ("KYRA1: Crash when meeting Malcolm").
svn-id: r24462
2006-10-22 20:12:27 +00:00
Johannes Schickel
a853696a5e Some AMIGA resource loading code (of course it's still not supported).
svn-id: r24461
2006-10-22 20:08:23 +00:00
Johannes Schickel
b6a8e38726 - removes the kyra specific language flag system, and uses the language enum defined in Common for that now
- also reworks the game flag system in general

svn-id: r23920
2006-09-17 20:21:40 +00:00
Johannes Schickel
a8bc979364 - enables pseudo unloading of loaded pak files (which reduces the loading of pak files on room changes)
- uses Common::hashit_lower instead of scumm_stricmp for filename checking

svn-id: r23896
2006-09-16 20:51:05 +00:00
Johannes Schickel
250133baf0 Simplifies resource handling for the CD version of Kyrandia.
(also less file loading at startup, but more on room change)

svn-id: r23887
2006-09-16 14:36:53 +00:00
Johannes Schickel
854eac7f9b Simplifies PAK file loading a bit.
svn-id: r23862
2006-09-10 13:16:34 +00:00
Max Horn
cfc52b5654 Renamed Resource::fileHandle() to Resource::getFileHandle()
svn-id: r23853
2006-09-09 17:14:47 +00:00
Max Horn
c7ab445755 Get rid of fsnode hack
svn-id: r23852
2006-09-09 17:10:09 +00:00
Max Horn
ab82dc3f9c Fix memory leak
svn-id: r23848
2006-09-09 14:54:41 +00:00
Torbjörn Andersson
7bb8ca3ef6 Fixed warning.
svn-id: r23844
2006-09-09 13:07:15 +00:00
Neil Millstone
9f0149c553 Fixed a bug in loadPakFile(), and changed PAKFile constructor so that it doesn't load the entire file.
svn-id: r23843
2006-09-09 12:21:49 +00:00
Johannes Schickel
1ba14890c6 Init unitialised var.
svn-id: r23805
2006-08-29 15:58:57 +00:00
Oystein Eftevaag
610547acac Makes sure FilesystemNode::name isn't used to open a file, use a regular filehandle name instead.
svn-id: r23800
2006-08-28 18:43:35 +00:00
Johannes Schickel
7c99b54b4e Removing an extra '!' in a warning message.
svn-id: r23799
2006-08-28 14:21:23 +00:00
Oystein Eftevaag
a698cdfcfc Catalog the PAK files by base name instead of full path name so we can properly unload them. The method may be slightly hackish, but I don't see how else to do it since we apparently support recursive PAK files so the File object can't be instantiated directly using the FilesystemNode. It's this, or add a function to File that gives us just the base name of the file.
svn-id: r23762
2006-08-26 18:37:49 +00:00
Johannes Schickel
eee50637b8 Little Common::String usage 'fix'.
svn-id: r23698
2006-08-08 21:34:19 +00:00
Johannes Schickel
01b3a0b568 Yet more kyra3 init code.
svn-id: r23648
2006-07-31 16:37:34 +00:00
Johannes Schickel
6cc1a57d3b - fixes bug in fileData (introduced with last commit)
- show mouse cursor in Screen::setMouseCursor if it's allready shown
- a little bit more kyra3 init stuff

svn-id: r23623
2006-07-30 08:22:39 +00:00
Johannes Schickel
92649de672 - fixes copyright of kyra3.h
- implements a bit more init functions for kyra3
- removes hacked mouse cursor
- changes Resource::fileData to accept a null pointer for size

svn-id: r23622
2006-07-30 07:51:11 +00:00
Max Horn
4fcdbb9349 String class usage cleanup
svn-id: r23582
2006-07-23 15:08:48 +00:00
Johannes Schickel
eb23d7b9a0 Changing usage of FSNode::displayName to FSNode::path
svn-id: r23549
2006-07-22 00:44:56 +00:00
Johannes Schickel
29f99a029e Using path instead of displayName.
svn-id: r23541
2006-07-20 21:41:59 +00:00
Johannes Schickel
73869dca9f - don't error on CHAPTER1.VRM miss anymore
- nicer error messages when no font files are found
- implements nicer way to load fonts

svn-id: r23531
2006-07-16 19:44:39 +00:00
Johannes Schickel
1a31d7da7e Should fix loading of pakfiles.
svn-id: r23516
2006-07-15 21:22:07 +00:00
Johannes Schickel
1ad8d3ee6e Adds filesize check for kyra.dat, this forces to upgrade always to the newest version though.
svn-id: r23514
2006-07-15 20:46:27 +00:00
Johannes Schickel
ea0e3a806c Get rid of some asserts and adds error messages instead.
svn-id: r23513
2006-07-15 20:37:32 +00:00
Johannes Schickel
d630b3e722 Little cleanup.
svn-id: r23512
2006-07-15 20:32:54 +00:00
Johannes Schickel
04503d462d Use the FS Api to load all .PAK and .APK files. (I just made a few quick tests, but before this should be integrated to branch-0-9-0 there should be a test for it on *every* platform, since I'm not quite sure if FilesystemNode::displayName is useable for this...)
svn-id: r23511
2006-07-15 20:30:36 +00:00
Johannes Schickel
abdebd3bfd - fixes some c/p errors from my last commit
- fixes embedded pak loading

svn-id: r23425
2006-07-08 14:25:23 +00:00
Johannes Schickel
57621c9245 Implements loading of 'westwood.001' for kyra3 (no need to run the installer anymore).
(thanks to eriktorbjorn for his code to extract files from westwood.001)

svn-id: r23423
2006-07-08 13:56:56 +00:00
Johannes Schickel
93e9dee0d1 Adds a message dialog if kyra.dat is missing which tells the user to download the kyra.dat file.
svn-id: r23421
2006-07-08 12:23:44 +00:00
Johannes Schickel
35e7eacc3f Changes some char* usage to Common::String.
svn-id: r22902
2006-06-03 18:30:07 +00:00
Johannes Schickel
6cfb416d44 - Replaces usage of PAKChunk* with PAKChunk for Common::List, should solve some strange MSVC6 warnings/(errors).
svn-id: r22900
2006-06-03 17:58:13 +00:00
Oystein Eftevaag
5d562eb3c5 Committed patch [ 1496602 ] KYRA: typo on Kyra2 file list
, thanks to Bellut

svn-id: r22729
2006-05-29 01:55:42 +00:00
Johannes Schickel
1750be5b5a - makes Screen::getPagePtr private
- introduces Screen::getCPagePtr and Screen::getPageRect (which should ease the introduction of dirty rect handling)
- moves KyraEngine::loadBitmap to Screen

svn-id: r22716
2006-05-28 12:19:45 +00:00