Commit Graph

276 Commits

Author SHA1 Message Date
Torbjörn Andersson
813e3d1aac Maintain the same screen update frequency while waiting for speech to finish.
This should take care of half of bug #1494934. The other half was fixed in the
SDL backend earlier.

svn-id: r22683
2006-05-27 13:33:27 +00:00
Torbjörn Andersson
c1c5080fcd Draw the selected menu item (currently always the first one) highlighted, i.e.
white instead of yellow.

svn-id: r22676
2006-05-27 11:59:40 +00:00
Torbjörn Andersson
da7140c3cf This produces the correct character spacing for the main menu.
svn-id: r22664
2006-05-26 16:02:37 +00:00
Torbjörn Andersson
fba9e15916 We don't have a mouse cursor yet, but this is probably the point where it
should be shown.

svn-id: r22663
2006-05-26 15:55:42 +00:00
Torbjörn Andersson
5bbdde5479 Removed hack to flush mouse events. No longer needed, apparently.
svn-id: r22662
2006-05-26 15:44:46 +00:00
Johannes Schickel
f548f97666 Fixes input handling while moving.
svn-id: r22661
2006-05-26 14:21:53 +00:00
Johannes Schickel
3485102a7e - redraw inventory before entering a room
- some cleanup

svn-id: r22660
2006-05-26 14:16:42 +00:00
Torbjörn Andersson
8062eb6ec3 Set and show/hide mouse cursors through a "cursor manager" (analogous to the
recently added (cursor) palette manager) so that the cursor can be properly
restored after returning from the GUI.

If there's any C++ magic that can keep the backend functions from being called
by anything else than these managing classes, that would probably be a good
idea. Also, since the cursor manager keeps a copy of the cursor image, perhaps
there are at least some backends that will no longer need to?

svn-id: r22639
2006-05-25 22:51:42 +00:00
Torbjörn Andersson
2353454adf Fade down the palette and the music in playVQA(). (We can't fade down the
palette before that, I think, because then we don't have any good palette to
make a backup copy of.)

svn-id: r22625
2006-05-25 11:10:49 +00:00
Torbjörn Andersson
1162a759c0 Added support for fading digital music in or out.
svn-id: r22624
2006-05-25 09:53:51 +00:00
Johannes Schickel
197b1f4e88 Some more _quitFlag checks, makes quitting while end sequence faster.
svn-id: r22623
2006-05-25 08:07:20 +00:00
Johannes Schickel
259e06a69b - Adds some _quitFlag checks
- deletes Screen::drawPixel

svn-id: r22622
2006-05-25 08:02:17 +00:00
Johannes Schickel
a052d89f8b Fixes bead movement speed in end scene.
svn-id: r22621
2006-05-25 07:53:58 +00:00
Johannes Schickel
8d954b7ae5 Fixes bug # 1471893 ("KYRA1: Graphics glitch when Malcolm turns to stone").
svn-id: r22612
2006-05-24 14:34:38 +00:00
Johannes Schickel
f2641ce081 Removes debug printf.
svn-id: r22610
2006-05-24 14:18:45 +00:00
Torbjörn Andersson
3a025038da Check _quitFlag during the first parts of the Kyra 3 main menu animation.
svn-id: r22587
2006-05-23 20:10:01 +00:00
Torbjörn Andersson
dafc2c8ceb Fix for saving the palette before playing a VQA movie. (Suggested by LordHoto.)
svn-id: r22586
2006-05-23 20:05:38 +00:00
Torbjörn Andersson
7090f051a0 Fix debug messages.
svn-id: r22570
2006-05-22 07:52:10 +00:00
Torbjörn Andersson
c40a8b48a1 Cleanup.
svn-id: r22569
2006-05-22 07:27:20 +00:00
Torbjörn Andersson
57efbacb9a Palette handling simplification, suggested by LordHoto.
svn-id: r22567
2006-05-21 20:41:53 +00:00
Torbjörn Andersson
a1f5bddaa8 If possible, sync the frame to getSoundElapsedTime().
svn-id: r22566
2006-05-21 20:25:22 +00:00
Torbjörn Andersson
71ba5c0f58 Grotesque hack to support the jung2.vqa movie. Either the VQA is less well
understood than I hoped, or the offset to the first frame of the movie is
completely out to lunch. Scan the file for the first VQFR chunk and use that
offset instead.

svn-id: r22565
2006-05-21 20:08:14 +00:00
Torbjörn Andersson
bda33949e4 The unsupported cutscene is called "jung", not "junk". (It just happens to look
like junk at the moment.)

svn-id: r22564
2006-05-21 19:08:10 +00:00
Torbjörn Andersson
b98a67d1eb More VQA fixes:
* Use setScreenPalette() rather than calling the backend directly. (As an extra
  bonus, the VQA player now only needs to store 3 bytes per colour.)

* Hide the mouse cursor while the movie is playing.

svn-id: r22563
2006-05-21 19:03:27 +00:00
Torbjörn Andersson
9fad465cf6 At LordHoto's request...
* The VQA move player isn't as similar to the WSA movie player as we first
  envisioned, so the VQA player no longer inherits from Movie. It does retain
  a fairly similar calling interface, though.

* Use the Kyra engine's idea of screen dimensions, rather than the backend's.

svn-id: r22561
2006-05-21 18:16:34 +00:00
Torbjörn Andersson
b2d8f804cd Some minor VQA player fixes:
* The playVQA() function now takes the name of the cutscene, rather than the
  filename. This is so that playVQA("FOO") will be able to play FOO0.VQA,
  FOO1.VQA or FOO2.VQA, depending on which movie size is selected.

* The VQA player centers movies by default, so don't set the position to 0,0.

* Ask the backend for screen dimensions (for centering the movie) rather than
  hard-coding them.

svn-id: r22560
2006-05-21 17:28:03 +00:00
Johannes Schickel
344cc2f475 - allows kyra3 to exit again
- implements language selection for kyra3

svn-id: r22559
2006-05-21 16:06:29 +00:00
Johannes Schickel
ef6645c5ba - reworks quit handling (no _system->quit() anymore)
- fixes some deinitalization problems

svn-id: r22558
2006-05-21 15:41:32 +00:00
Johannes Schickel
c47dadeb1f - adds debugC calls to KyraEngine_v3 functions
- finishes KyraEngine_v3::gui_printString

svn-id: r22557
2006-05-21 15:20:12 +00:00
Johannes Schickel
3af8e4ea4a Implements kyra3 main menu drawing.
svn-id: r22556
2006-05-21 15:02:12 +00:00
Johannes Schickel
dce7af1f5c makes destructor of KyraEngine virtual
svn-id: r22547
2006-05-20 15:02:39 +00:00
Torbjörn Andersson
3a028875a1 Using assert(_something->init()) is a bad idea. Assertions can be disabled.
svn-id: r22533
2006-05-19 07:34:24 +00:00
Max Horn
909cd8c93a Added some FIXMEs to the kyra engine
svn-id: r22531
2006-05-19 07:20:27 +00:00
Max Horn
d113bf3a08 Fix warning
svn-id: r22530
2006-05-19 07:12:38 +00:00
Johannes Schickel
570b9e2c9d - load fonts for kyra3
- adds screen dim tables for kyra3
- adds palette / screen backup for the vqa player
- small changes in the vqa player to use the Kyra::Screen functions
- adds (partially implemented/unimplemented) main menu drawing/handling functions (nothing to see yet)

svn-id: r22528
2006-05-18 22:46:34 +00:00
Torbjörn Andersson
2531fd5873 Added player for the Kyra 3 VQA cutscenes, based on my earlier prototype. It
could use some cleanup, and there are a couple of TODOs sprinkled throughout
the code, but it seems to work reasonably well. Until the Kyra 3 main menu is
implemented, it won't actually be used though.

It uses the appendable audio stream class, which I have moved out of the SCUMM
engine.

svn-id: r22526
2006-05-18 21:46:07 +00:00
Johannes Schickel
c65d45146c fixes kyra2 gameflag init
svn-id: r22514
2006-05-18 11:36:29 +00:00
Torbjörn Andersson
b9206a3e98 Removed leftover printf()
svn-id: r22513
2006-05-18 11:35:08 +00:00
Torbjörn Andersson
a3fc0682f4 Cleanup.
svn-id: r22512
2006-05-18 11:32:59 +00:00
Torbjörn Andersson
65091f7370 Added (optional) looping to the digital sound class.
svn-id: r22504
2006-05-17 21:14:19 +00:00
Torbjörn Andersson
6bf1e10768 Fixed two off-by-one errors. One would cause the same frame of the Kyra 3 to be
displayed twice in a row. The other, more serious one, would cause ScummVM to
crash when reaching the end of the music. Now the music loops properly. (It
does fade down before looping, but that's how it is in the original as well.
It's just the way the music is recorded.)

svn-id: r22503
2006-05-17 20:54:51 +00:00
Torbjörn Andersson
0099932d0d Loop the Kyra 3 animation indefinitely.
svn-id: r22502
2006-05-17 20:35:25 +00:00
Torbjörn Andersson
4da20ba369 Maybe the svn:keywords were already set? Maybe this will fix the file headers instead.
svn-id: r22501
2006-05-17 20:25:08 +00:00
Torbjörn Andersson
c27b1201d4 Fixed crackling in Kyra 3 sound. (At least what little of it ScummVM currently
plays before finishing.)

svn-id: r22499
2006-05-17 19:42:55 +00:00
Johannes Schickel
f7c29ccc8b - adds AUD file player (has still some problems with playing)
- adds a new sound class SoundDigital (only used for Kyra3) (needs more work though)

svn-id: r22497
2006-05-17 18:07:02 +00:00
Eugene Sandulenko
ba2a6152c7 Set gameflags for kyra3 properly.
svn-id: r22493
2006-05-16 17:38:04 +00:00
Johannes Schickel
3d10ecf1ae Removes ENABLE_KYRA2 and ENABLE_KYRA3.
svn-id: r22492
2006-05-16 16:31:23 +00:00
Johannes Schickel
47a39a8401 Oops forgot some define checks
svn-id: r22491
2006-05-16 16:15:33 +00:00
Johannes Schickel
c8aa32d095 - implements kyrandia 3 wsa loader
- fixes initalisation problems
- adds setX, setY, setDrawPage to Kyra::Movie instead of directly accessing _x, _y and _drawPage

svn-id: r22490
2006-05-16 16:04:24 +00:00
Johannes Schickel
a5b4fb7f18 - little cleanups
- adds kyra3 dummies

svn-id: r22425
2006-05-12 23:57:53 +00:00
Johannes Schickel
be6b640b92 Adds clipping to the workaround in "preserveOrRestoreBackground", so it does not overwrite the interface.
svn-id: r22404
2006-05-10 20:45:42 +00:00
Johannes Schickel
56e03a85dd Adds workaround for bug # 1477364 ("KYRA1: Water dripping freezes") until a proper solution is found.
svn-id: r22403
2006-05-10 20:30:58 +00:00
Johannes Schickel
e6350f8afa Enables OSystem::kFeatureAutoComputeDirtyRects until proper dirty rect managment is implemented.
svn-id: r22402
2006-05-10 20:28:27 +00:00
Torbjörn Andersson
816fd39d58 Added delay() to delayWithTicks() as well. This function is quite similar to
some of the custom delay loops in script_v1.cpp. Could it be used there?

svn-id: r22394
2006-05-08 16:04:08 +00:00
Torbjörn Andersson
575eb8b775 Replaced a bunch of delay loops with a new delayUntil() function. Now all of
them will at least sleep if the remaining delay is at least 10 ms. (Personally,
I don't like the idea of busy-waiting even 9 ms, but now that it's in its own
function, it becomes much easier if we want to change that behaviour. There are
still plenty of custom delay loops left, though.)

svn-id: r22393
2006-05-08 15:40:30 +00:00
Torbjörn Andersson
73f0a23bee Added comment about switch case fallthrough. I assume this one is deliberate,
but they're easy to miss at a casual glance.

svn-id: r22392
2006-05-08 14:49:54 +00:00
Torbjörn Andersson
484b480b45 As LordHoto pointed out, placeItem is already initialised to false, so we only
need to set it to true.

svn-id: r22391
2006-05-08 13:52:44 +00:00
Torbjörn Andersson
c5d912fa1c Small cleanup. It's not that I mind fallthroughs - as long as they are clearly
labelled as being intentional - but to save just one line of code? That hardly
seems worth it.

svn-id: r22390
2006-05-08 13:42:29 +00:00
Torbjörn Andersson
e2656a276a Changed abs() to ABS()
svn-id: r22389
2006-05-08 13:34:21 +00:00
Torbjörn Andersson
8179d3e80b Missed a couple of switch cleanups.
svn-id: r22385
2006-05-08 10:29:20 +00:00
Torbjörn Andersson
cf42a24833 Cleanup: Use ScummVM indentation style for switch() cases. In some cases, I
have added or removed "break"s, but not in any way which should change the
program's behaviour. I.e. I've added "break" to the final case, and after
calling quitGame(), and I've removed "break" after "return".

svn-id: r22383
2006-05-08 10:16:19 +00:00
Johannes Schickel
027fb7febe Fixes playing of credits music.
svn-id: r22378
2006-05-07 19:20:19 +00:00
Johannes Schickel
40189ab7e6 Adds (partial) support for italian floppy. (still hardcoded strings are missing) (Bug # 1409244 ("KYRA: GFX problems with ITALIAN floppy")).
svn-id: r22333
2006-05-04 11:19:48 +00:00
Johannes Schickel
e5b2d9a527 Fixes typo.
svn-id: r22310
2006-05-03 14:26:59 +00:00
Johannes Schickel
6776fb3296 - moves detection code to plugin.cpp.
- splits game table for kyra1 and kyra2.

svn-id: r22309
2006-05-03 14:24:48 +00:00
Johannes Schickel
96fd5e1fbc - modifies loadBitmap not to crash if a image isn't found
- starts to clean up the engine initalisation code

svn-id: r22308
2006-05-03 13:40:21 +00:00
Johannes Schickel
1d6a1bf157 Fix for bug # 1480744 ("KYRA1: mouse cursor vanishes").
svn-id: r22307
2006-05-03 13:19:21 +00:00
Johannes Schickel
73dbd28873 Just add kyra2 to kyra_list if ENABLE_KYRA2 is defined.
svn-id: r22256
2006-05-01 13:05:18 +00:00
Johannes Schickel
f84699ffbd Makes malcolm walking into the kyragem room after some time. (fixes half of bug #1471893 ("KYRA1: Graphics glitch when Malcolm turns to stone"))
svn-id: r22255
2006-05-01 12:57:24 +00:00
Oystein Eftevaag
ff7955f4d3 Adds archive file list, MD5 for my CD version, and a few function stubs for Hand of Fate, to use as a basis for further work
svn-id: r22252
2006-05-01 00:25:41 +00:00
Max Horn
27307acd7c Moved the AudioCDManager as well as class AudioStream and its (standard) subclasses to namespace Audio
svn-id: r22231
2006-04-29 22:33:31 +00:00
Max Horn
bf73598811 * Changed the createEngine() factory function of our plugins to return an error code (the engine is now passed indirectly via a double pointer)
* Removed Engine_Empty (obsolete now that engines can return actual error codes)

svn-id: r22199
2006-04-29 00:27:20 +00:00
Oystein Eftevaag
47068bde51 Typo
svn-id: r22190
2006-04-27 00:42:12 +00:00
Oystein Eftevaag
9ec94f6fcb Move the detector code out of the constructor and into init() to do error handling (specifically the GUI error message if no game is found in the specified directory), and cleans up the constructor/destructor a bit to allow a clean exit.
svn-id: r22189
2006-04-27 00:39:10 +00:00
Eugene Sandulenko
bf53520130 - Check if path specified for a game in scummvm.ini really exists and complain
if it does not
- Give more understandable feedback to user when SCUMM module can't find
  a game
- Put TODO to kyra engine as their current detection scheme does not let
  easily tell if game data really present in specified directory

svn-id: r22163
2006-04-25 23:07:59 +00:00
Oystein Eftevaag
d5c8a791a6 Fixes some coordinate initialization in the menus, and makes sure the initial savegame is created when kyrandia is started for the first time
svn-id: r22153
2006-04-25 15:42:37 +00:00
Oystein Eftevaag
9b589e06cd Adds some code to dynamically resize and readjust the menus if the text strings of the current language are too long, to avoid overlaps etc.
svn-id: r22148
2006-04-25 11:58:21 +00:00
Oystein Eftevaag
f25cb2e735 Uses kyra.dat for GUI strings instead of hardcoding them, which means localized strings are now supported for the menus. Note that the size of the menus are not yet calculated to account for the longer strings in some languages
svn-id: r22105
2006-04-23 14:43:16 +00:00
Johannes Schickel
b756c3e899 Fixes use of textspeed settings if voice+text mode is enabled. (thanks to salty-horse)
svn-id: r21999
2006-04-18 02:08:51 +00:00
Johannes Schickel
0eee3fe591 - Implements copyRegion without transparency checking
- Uses copyRegion without transparency checking to fix credits drawing bugs

svn-id: r21989
2006-04-17 19:52:31 +00:00
Johannes Schickel
2fb0ce8c57 Simplifies credits.txt loading.
svn-id: r21988
2006-04-17 19:39:31 +00:00
Johannes Schickel
592e37accd Fixes bug #1471895 ("KYRA1: Kyragem goes black at the very end").
svn-id: r21987
2006-04-17 19:33:08 +00:00
Torbjörn Andersson
6e2a18e28d Rewrote the timing of the Kyra end credits so that it doesn't matter that the
variables are signed. Otherwise the credits may hang on a slow system.

svn-id: r21986
2006-04-17 19:31:05 +00:00
Oystein Eftevaag
bdd5a25c16 Implements the end credits, and disables fast forwarding in the intro.
svn-id: r21980
2006-04-17 17:39:08 +00:00
Max Horn
ba1b25305e Removed the directory parameter from md5_file
svn-id: r21937
2006-04-16 12:50:39 +00:00
Max Horn
68cb7f52c8 - Renamed ConfigManager::getActiveDomain to getActiveDomainName, and added a new getActiveDomain method that returns a pointer to the actual active *domain*
- Added Engine::_targetName whose value is computed from the name of the active domain
- Removed GameDetector::_targetName, instead code now uses either Engine::_targetName or the name of the active domain
- This in turn allowed for removing usage of GameDetector in many places

svn-id: r21916
2006-04-15 20:36:41 +00:00
Max Horn
1470dadb1d Changed File::open to take a Common::String as file name parameter
svn-id: r21867
2006-04-14 01:48:51 +00:00
Max Horn
cf202049ff Fixing mismatch between format strings and data on some systems
svn-id: r21827
2006-04-12 14:54:12 +00:00
Jonathan Gray
eb3ae7d726 sizeof(void *) != sizeof(int) for a large number of systems.
Fix a lot of debug/error statements that were using %d/%x
for the result of pointer arithmetic.

As C++ apparently has no format string for ptrdiff_t use
%lu/%lx as appropriate.

svn-id: r21824
2006-04-12 10:01:41 +00:00
Max Horn
94e647235f Fix const correctness in Kyra's StaticResource::loadStrings and StaticResource::loadPaletteTable (notice the difference between a pointer pointing to a pointer pointing to const memory, vs. a pointer pointing to a *constant* pointer pointing to const memory)
svn-id: r21708
2006-04-09 00:44:08 +00:00
Eugene Sandulenko
5a2ad04a9e Introduced language EN_ANY used for general English game entries. EN_USA and
EN_GRB should be used for games which have both variants. Currently it is
MM NES and BASS. All other are switched to EN_ANY.

svn-id: r21702
2006-04-08 23:12:56 +00:00
Max Horn
e7a8bb6abf Modified the REGISTER_PLUGIN macro so that it allows (and requires) a trailing semicolon (this helps certain tools to parse our code better)
svn-id: r21689
2006-04-08 12:06:07 +00:00
Max Horn
8cf8acfd63 Renamed various *GameSettings to GameSettings (our namespaces are enough to distinguish them)
svn-id: r21686
2006-04-08 11:21:04 +00:00
Eugene Sandulenko
8fa9bd6728 Removed extra exclamation marks in warning() calls as well.
svn-id: r21608
2006-04-04 22:21:10 +00:00
Eugene Sandulenko
d292c0ec55 Since our debug() adds an exclamation mark at the message end, remove
it in several calls to avoid duplication!!11!

svn-id: r21607
2006-04-04 22:04:51 +00:00
Torbjörn Andersson
80b3f9217d Don't try to copy str to _talkBuffer if str is pointing to _talkBuffer. Apart
from being unnecessary, the result of strcpy() on overlapping memory areas is
unpredictable.

svn-id: r21562
2006-04-02 18:58:07 +00:00
Max Horn
8cdee5a931 Do not #include endian.h in scummsys.h (cuts down deps on endian.h from ~400 to ~250). Many greetings to eriktorbjorn, and have fun recompiling.
svn-id: r21500
2006-03-29 15:59:37 +00:00
Max Horn
0da5fb4c1c Alphabetical build order
svn-id: r21499
2006-03-29 15:51:13 +00:00
Johannes Schickel
c09d1ea520 - Commits heaviliy modifed patch #1459951 ("KYRA: Combining MIDI music with Adlib sfx") (created a wrapper class for two different sound drivers instead of adding a new variable to the KyraEngine class and chaning stuff there)
- Prevents to play track 0 for non mt-32 midi devices (got ugly sound output with windows midi)

svn-id: r21479
2006-03-28 15:15:36 +00:00
Max Horn
9f93e5bb81 Renamed various container isEmpty() methods to empty() to match STL conventions
svn-id: r21472
2006-03-28 09:42:54 +00:00