1399 Commits

Author SHA1 Message Date
Max Horn
7b02dac3c5 ENGINES: Use Common::StackLock in more places 2011-03-23 15:25:46 +01:00
Max Horn
8982fff1b7 AUDIO: Add pure virtual MidiDriver::isOpen() method
This in turn enables modifying MidiDriver_MPU401::close() to allow
it to be called on a midi driver that has not yet been opened.

The specific issue that triggered me to make these changes was a
crash-upon-quit in HUGO, caused by it instantiating a midi driver,
then encountering an error (missing hugo.dat) *before* having
opened the new midi driver; the general cleanup code then tries
to close the (not yet opened) midi driver -> kaboom

Also fixed some engines which were leaking MidiDriver instances.
2011-03-22 23:51:47 +01:00
dhewg
5b6479c55a PARALLACTION: Init volume levels on startup 2011-03-19 16:04:55 +01:00
Johannes Schickel
e21d6e0d11 Merge branch 'osystem-palette' of https://github.com/lordhoto/scummvm into master
Conflicts:
	backends/platform/android/android.cpp
	engines/sci/graphics/screen.cpp
	engines/sci/graphics/transitions.cpp
2011-02-19 21:46:45 +01:00
Alyssa Milburn
145b0d83df PARALLACTION: Use signed math in fadeTo.
This fixes corruption during fades when low palette values end up negative.
2011-02-16 16:00:44 +01:00
Johannes Schickel
c44538a01e PARALLACTION: Fix half bright palette.
Thanks to peres for pointing this out to me.
2011-02-16 02:00:00 +01:00
Johannes Schickel
51c8871b9b PARALLACTION: Adapt to setPalette RGBA->RGB change.
This change is not tested, but should hopefully work fine.
2011-02-14 17:08:32 +01:00
Ori Avtalion
84a8bdc86b JANITORIAL: Remove duplicate #include's
svn-id: r55889
2011-02-12 10:00:52 +00:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Nicola Mettifogo
1a525d1bb7 PARALLACTION: Avoid hiding overloaded virtual methods.
svn-id: r55820
2011-02-08 01:44:03 +00:00
Max Horn
2d1c8a3533 ALL: Fix whitespaces / indention
svn-id: r55818
2011-02-07 23:01:06 +00:00
Max Horn
41121be4d6 GUI: Rename SaveLoadChooser::runModal to runModalWithPluginAndTarget
This avoids hiding an overloaded virtual method, which in turn can
cause weird bugs (see also the next commit).

svn-id: r55815
2011-02-07 22:58:22 +00:00
Max Horn
ab039812e7 COMMON: OSystem now has a PaletteManager
svn-id: r55806
2011-02-07 17:52:38 +00:00
Nicola Mettifogo
ec03425c0f PARALLACTION: update MIDI driver commands description for BRA.
svn-id: r55792
2011-02-06 10:17:54 +00:00
Nicola Mettifogo
865f12a643 PARALLACTION: Use CursorMan to control cursor instead of backend functions.
svn-id: r55611
2011-01-29 10:42:56 +00:00
Nicola Mettifogo
d3ae7da133 PARALLACTION: Cleanup dialogue code.
Shorten long lines to increase readability.

svn-id: r55610
2011-01-29 10:42:40 +00:00
Torbjörn Andersson
bf01059be1 PARALLACTION: Add default case to silence GCC warning.
Not that I understand exactly what this function does, but since it's
a piece of debug code I figure I don't really have to.

svn-id: r55608
2011-01-29 08:08:58 +00:00
Nicola Mettifogo
2856e959be PARALLACTION: Cleanup dialogue code.
Turned 'no answer selected' into a constant.

svn-id: r55607
2011-01-29 07:22:04 +00:00
Nicola Mettifogo
bcd18232ad PARALLACTION: Cleanup dialogue code.
Hide mood and balloon winding extraction into Question and Answer objects.

svn-id: r55606
2011-01-29 07:21:48 +00:00
Nicola Mettifogo
e1046d3eae PARALLACTION: Simplify text comparisons in dialogue code.
Encapsulate text comparison into string owners and removed some ugly
double negative logic.

svn-id: r55605
2011-01-29 07:21:31 +00:00
Nicola Mettifogo
c3698a2cd5 PARALLACTION: Clarify strategy for choosing (answer) dialogue paths.
svn-id: r55604
2011-01-29 07:21:13 +00:00
Nicola Mettifogo
d39d75779e PARALLACTION: Don't show 'null' answers in dialogues.
Skip a 'runanswer' state when the text of the only answer available is 'null'.

svn-id: r55603
2011-01-29 07:20:57 +00:00
Nicola Mettifogo
6d4d253ec4 PARALLACTION: Improve dialogue debug output.
Print out the current question or the available answers when debug level is 9.

svn-id: r55602
2011-01-29 07:20:42 +00:00
Nicola Mettifogo
cf4f041c63 PARALLACTION: encapsulate dialogue state changes to aid debugging.
svn-id: r55601
2011-01-29 07:20:26 +00:00
Nicola Mettifogo
7760628bdb PARALLACTION: Flexible monologues in BRA (patch #3021740 by fuzzie)
Some dialogue answers are set to the literal 'null', which is used in NS to
simulate a fixed monologue ('null' instructs the engine to jump to the first
entry in the list of available questions, which is always made of a single
item in this case).
BRA has flexible monologues that depend on the game state, so this patch goes
and checks all the available branches before picking the correct one.

svn-id: r55591
2011-01-28 14:19:39 +00:00
Nicola Mettifogo
dd7bc67f82 Replaced char* with Common::String in balloon code.
svn-id: r55590
2011-01-28 13:24:32 +00:00
David Turner
ccb1faef7e PARALLACTION: Removal of unecessary returns and whitespace fixes to saveload.*
svn-id: r55510
2011-01-25 01:58:26 +00:00
David Turner
0f07082a78 PARALLACTION: Improve safety of PathBuffer::getValue().
This will now avoid invalid memory reads and instead emit warnings if it is called with values outside of the expected data buffer or on a NULL buffer.

svn-id: r55492
2011-01-24 01:58:43 +00:00
David Turner
bbb1379def PARALLACTION: Minor Whitespace fixup in walk.cpp
svn-id: r55392
2011-01-21 20:08:11 +00:00
David Turner
14d74d2063 PARALLACTION: Fix Un-initialized Memory Errors and Leaks in Nippon Safes Amiga Demo.
These were found using Valgrind.

svn-id: r55369
2011-01-21 03:25:01 +00:00
David Turner
f042e398ea PARALLACTION: Fix Big Red Adventure Walking To Stop On Path Build Failure.
Walking now works correctly, with no valgrind issues, lockups or assertions.

svn-id: r55281
2011-01-18 00:22:47 +00:00
David Turner
c6750a7a65 PARALLACTION: Minor Whitespace and code complexity reduction in walk.*
svn-id: r55280
2011-01-17 23:12:59 +00:00
David Turner
3ebf1e5962 PARALLACTION: Some Improvements To Big Red Adventure Walk Code.
* Renamed and retyped "int _fieldC" to "bool _stillWalkingTowardsNode" to aid readability and clarity of code. Thanks to fuzzie for naming.
* Added assertion to prevent use of invalid memory as reported by Valgrind when walk point p is constructed from an empty list.
* Added code to stop walk if buildPath fails, though this causes an assertion instead currently.

svn-id: r55279
2011-01-17 23:00:52 +00:00
David Turner
81729b87e8 PARALLACTION: Add debug console command "showmouse".
This command forces the mouse state to Enabled and Visible.
This is intended to help playtesting in Big Red Adventure, which has an issue currently with the mouse pointer getting stuck in the hidden state in some cases.

svn-id: r55234
2011-01-14 03:25:39 +00:00
David Turner
28e7ea8c22 PARALLACTION: Fix Valgrind Error on Engine Exit.
The automatic destruction of engine member "_char" of type Character at end of the destructor causes an invalid read in the destruction of the AnimationPtr which is a SharedPtr. To stop this happening, the SharedPtr is reset() prior to the destruction of Gfx, so it's dependencies on Gfx are still present. This will affect Nippon Safes as well as Big Red Adventure, but is unlikely to cause any issues and it is likely this exists in NS as well.

Thanks to fuzzie for this code.

svn-id: r55233
2011-01-14 00:13:27 +00:00
David Turner
00d78dd3d5 PARALLACTION: Fix for DoorData Memory Leak in Big Red Adventure.
svn-id: r55232
2011-01-13 21:58:54 +00:00
David Turner
460f8c277b PARALLACTION: Fixed Limit Values in Big Red Adventure Walker Code.
This corrects the Valgrind invalid reads associated with the IS_PATH_CLEAR() check reading beyond the data buffer and probably improves the pathfinding behaviour.
Thanks to fuzzie for suggesting this patch.

svn-id: r55231
2011-01-13 20:06:23 +00:00
David Turner
9118d2915c PARALLACTION: Close Memory Leak in Big Red Adventure Subtitles.
svn-id: r55229
2011-01-13 17:26:00 +00:00
David Turner
f09d6d7073 PARALLACTION: Close Memory Leak in Big Red Adventure MIDI Playback.
svn-id: r55226
2011-01-13 15:34:18 +00:00
David Turner
ecdd866117 PARALLACTION: Close Memory Leak in Big Red Adventure When Changing Location.
svn-id: r55225
2011-01-13 15:33:15 +00:00
David Turner
731a75adb8 PARALLACTION: Fix for Valgrind Uninitialized Error in Big Red Adventure Walk Code.
svn-id: r55221
2011-01-13 03:25:57 +00:00
David Turner
a7a05fc053 PARALLACTION: Fix Valgrind Error When Displaying Location Balloons In Big Red Adventure.
svn-id: r55220
2011-01-13 01:39:05 +00:00
Nicola Mettifogo
31ffb39939 PARALLACTION: keep music playing during the intro (fix bug #2879791).
svn-id: r55148
2011-01-07 16:19:13 +00:00
Nicola Mettifogo
9dd0e0f94c PARALLACTION: fix music playback (bug #2879793).
* Do not restart character theme is already playing.
* Play the correct tune in the night club.
* Do not play muisc in the location meant to be silent.

svn-id: r55147
2011-01-07 16:00:08 +00:00
Nicola Mettifogo
75d7ee9bd6 PARALLACTION: remove code duplication in NS sound code.
svn-id: r55146
2011-01-07 15:17:07 +00:00
Arnaud Boutonné
d063b074cd JANITORIAL: Suppress some useless includes
svn-id: r55091
2011-01-02 14:06:42 +00:00
Nicola Mettifogo
d19d9991b2 PARALLACTION: do not skip commands on Examine zones if there is no text to show. This fixes bug #3135782.
svn-id: r54882
2010-12-12 11:43:23 +00:00
Nicola Mettifogo
c4e4f7dc86 PARALLACTION: parse command lists for kNoneType zones, even if defined after TYPE markers. This fixes bug #3131769.
svn-id: r54879
2010-12-12 07:17:13 +00:00
Max Horn
6edc86a19b DEBUG: Let GUI::Debugger::preEnter and postEnter (un)pause the engine
svn-id: r54815
2010-12-07 18:54:21 +00:00
Max Horn
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03:07 +00:00