Commit graph

1481 commits

Author SHA1 Message Date
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
Max Horn
427dc1ae93 GUI: Move major widgets to new directory gui/widgets
Also renamed the source/header files, now they are more closely
aligned to how we rename most other source files

svn-id: r54264
2010-11-16 10:11:57 +00:00
Max Horn
a7248a0601 ENGINES: Replace many printfs by warning/debug/debugN
svn-id: r54031
2010-11-01 21:37:47 +00:00
Max Horn
e27b05ef35 COMMON: Rename String::printf() to String::format()
This is a first step towards getting rid of all uses of regular printf,
fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase.

The name format() reflects the purpose of the function, and parallels
String.format() in Java, boost::format, and others.

svn-id: r54004
2010-11-01 16:02:28 +00:00
Max Horn
3534cff8ef ALL: Fix indention (whitespaces -> tabs)
svn-id: r53738
2010-10-23 15:46:50 +00:00
Nicola Mettifogo
5ba15c5ae5 Update BRA demo startup code to use the part/location handling code from r50042. Patch #3089932 by fuzzie.
svn-id: r53702
2010-10-22 14:21:26 +00:00
Nicola Mettifogo
c67bcddf85 Initialize variable in NS gui code (was crashing a demo). Patch #3089932 by fuzzie.
svn-id: r53701
2010-10-22 14:19:37 +00:00
Max Horn
4ccce19876 ENGINES: Enhance namespace comments a bit
svn-id: r53484
2010-10-15 12:48:19 +00:00
Torbjörn Andersson
54b2a8c98d JANITORIAL: Cleanup (mostly whitespace)
svn-id: r53161
2010-10-12 04:19:58 +00:00
Johannes Schickel
c3366755ef PARALLACTION: Fix out of bounds access.
This is a partial commit of patch #3085298 "overflows in agi and parallaction".

svn-id: r53146
2010-10-11 17:07:34 +00:00
Torbjörn Andersson
c91a07229a JANITORIAL: Removed most punctuation at end of warning() and error()
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.

svn-id: r52791
2010-09-18 10:55:16 +00:00
Johannes Schickel
c42e2f3a55 PARALLACTION: Use a char array for static data instead of String.
svn-id: r52610
2010-09-06 21:17:26 +00:00
Max Horn
1d4c82885d DEBUGGER: Simplify how our console debugger works / is used
* Remove _isAttached member var and isAttached method
* Engines now always call the onFrame method; whether it does
  something is decided by the debugger class resp. its subclasses
* Make detach() protected instead of private, so that subclasses
  can invoke it
* Remove _detach_now member var (call detach() instead).
* Rename _frame_countdown to _frameCountdown and properly
  document it.
* Add more doxygen comments
* Cleanup

svn-id: r50963
2010-07-17 18:38:42 +00:00
Nicola Mettifogo
6a6091f6d7 Prevent execution of the STOP script command when its Zone does not exist. Patch #3021744 by fuzzie with some comments.
svn-id: r50363
2010-06-27 04:58:48 +00:00
Florian Kagerer
c35e350531 AUDIO: get rid of MDT_PREFER_MIDI since it should be sufficient to either select MDT_PREFER_MT32 or MDT_PREFER_GM
svn-id: r50288
2010-06-25 20:51:57 +00:00
Max Horn
bbad3f333a Patch #1956501: "GUI/LAUNCHER: Midi device selection"
svn-id: r50128
2010-06-21 21:36:36 +00:00
Nicola Mettifogo
5328abe2f0 Cleanup.
Got rid of the legacy "location.part" string handling in BRA.

svn-id: r50042
2010-06-19 04:51:31 +00:00
Nicola Mettifogo
96d4ae0fcc Cleanup some more state when switching part in BRA.
svn-id: r50041
2010-06-19 04:51:14 +00:00
Nicola Mettifogo
de7de460e8 Use the new _nextPart member switching part from the menu in BRA.
svn-id: r50040
2010-06-19 04:51:00 +00:00