Commit Graph

721 Commits

Author SHA1 Message Date
Willem Jan Palenstijn
2d1fd3b554 ALL: Fix typo (existant->existent) 2013-02-23 22:07:32 +01:00
vyadh
348378f4a6 LURE: Fix bug #3604370 - ANDROID menus clickable
LURE: Fix bug #3604370 - "LURE: ANDROID, Action item scrolling too sensitive"
2013-02-17 22:11:11 +00:00
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Thierry Crozat
335ba979a2 LURE: Fix engine crash in copy protection screen with AZERTY keyboard
Fixes bug #3539031 - "LURE: Crash at Copy Protection Screen".

This reverts the previous fix which only worked for QWERTY keyboards
and made the issue worse for AZERTY keyboards. It now uses the ASCII
code instead of the keycode for the sanity check.
2012-06-30 20:48:22 +01:00
D G Turner
4789e0f026 LURE: Fix engine crash in copy protection screen.
Fixes bug #3539031 - "LURE: Crash at Copy Protection Screen".

Previously, the code didn't prevent keyboard events with modifiers being
used. Since the ascii values for these were outside the 0-9 numeric
range, this resulted in an invalid frame number being used and thus the
engine aborted at an asertion.
2012-06-29 23:37:11 +01:00
Christoph Mallon
e40ba4c135 JANITORIAL: Simply use *x instead of *x.get() on smart pointers. 2012-03-13 15:43:59 +01:00
Christoph Mallon
612bfe4092 JANITORIAL: Remove dead code. 2012-03-13 15:43:41 +01:00
Christoph Mallon
337d5da913 JANITORIAL: Make getters const. 2012-03-13 15:43:30 +01:00
Christoph Mallon
d21cef4117 JANITORIAL: Avoid the ugly operator invocation syntax. 2012-03-13 15:43:23 +01:00
Tarek Soliman
a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
Torbjörn Andersson
6530da3feb LURE: Move readByte() call out of assert() 2012-01-14 23:58:59 +01:00
David Turner
538d834080 Merge pull request #131 from digitall/goto_considered_harmful
Goto Considered Harmful...

The following commits should improve the ScummVM code structure by reducing the number of gotos used in various engine code.

They should implement identical functionality, but without using goto and without the result being less readable/maintainable than the version with goto.
2011-12-18 18:29:05 -08:00
Paul Gilbert
77326a5e27 LURE: Converted the AnimationDecoder::decode_data routine to remove GOTO usage 2011-12-09 14:15:00 +11:00
Paul Gilbert
f169e17eca LURE: Converted the vgaDecode routine to remove GOTO usage 2011-12-09 12:24:32 +11:00
D G Turner
1cb4af9c4c LURE: Reduce usage of 'goto'.
Have refrained from changing the usage of 'goto' in the PictureDecoder
class (decode.cpp) for the time being, as this class is using these in
pseudo-x86 code which is complex and should be replaced anyway.
2011-12-08 23:21:40 +00:00
Strangerke
bab4b6f729 LAUNCHER: Introduce GUIO0() in order to replace GUIO1(GUIO_NONE) 2011-11-16 22:38:58 +01:00
Johannes Schickel
61795739f8 COMMON: Rename Common::set_to to Common::fill.
This makes the name match with the name of the STL function with the same
behavior.
2011-11-16 18:06:30 +01:00
Eugene Sandulenko
b3cad04450 LURE: Fix warnings 2011-11-03 00:20:10 +00:00
Eugene Sandulenko
32972a5ffb AD: Switched rest of the engines to new GUIO 2011-10-23 17:53:13 +01:00
Paul Gilbert
197409da40 LURE: Fix crash caused by trying to talk to a character when an ask action is in progress 2011-09-09 22:10:03 +10:00
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
Eugene Sandulenko
0dafa7f80f ALL: Reduce audio/ header dependency 2011-08-06 11:30:42 +01:00
eriktorbjorn
5dd8f2575b JANITORIAL: Silence a couple of "variable set but not used" warnings. 2011-06-30 23:47:10 +02:00
Ori Avtalion
aa0f307e06 ALL: Require DECLARE_SINGLETON to be used in the Common namepsace
Silences the clang warning:

  static data member specialization of '_singleton' must
  originally be declared in namespace 'Common'; accepted as a C++0x
  extension [-Wc++0x-extensions]

Wrapping "namespace Common {}" around the macro assignment causes clang
to complain about a spurious semicolon, and removing the semicolon at
the end of the macro causes some editors to misbehave.

Changing the requirement of using the macro in one namespace (the
global) to another (Common) seems a small price to pay to
silence a warning.
2011-06-30 22:41:41 +03:00
Julien
9ff993382e LURE: Allocate debug strings buffer on the heap 2011-06-23 15:11:37 +08:00
Julien
2f200ac493 ANALYSIS: Fix potential memory leak when using realloc
When reallocation is unsuccessful, the passed buffer is not freed. In this case, assigning the result (NULL) will result in a leak of the original memory buffer.
See http://msdn.microsoft.com/en-us/library/kkedhy7c.aspx
2011-06-23 15:11:36 +08:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
Max Horn
7e7748d692 LURE: Add a comment explaining why kADFlagUseExtraAsHint is used
For the records, this was introduced by Eugene in SVN revision 30106,
corresponding to git commit b87b0f21
2011-06-14 18:52:08 +02:00
Max Horn
7c992d6598 DETECTOR: Merge ADParams into AdvancedMetaEngine 2011-06-14 18:17:01 +02:00
Max Horn
3491bf5b78 LURE: Switch to alternate AdvancedMetaEngine, avoid ADParams 2011-06-10 22:15:43 +02:00
Max Horn
4827cc914a ENGINES: Change incorrect use of 'target' to 'gameid' 2011-06-10 22:15:40 +02:00
D G Turner
da1f4e431d LURE: Replace snprintf() usage with Common::String::format()
Safer and less portability issues.
2011-06-02 18:31:04 +01:00
Max Horn
477d6233c3 ENGINES: Change 2nd param of Engine::saveGameState to Common::String 2011-06-02 18:31:59 +02:00
Matthew Hoops
9539017ee3 ALL: initialise -> initialize 2011-05-25 11:17:11 -04:00
Matthew Hoops
6b36753170 ALL: favour/favourite -> favor/favorite 2011-05-25 10:50:46 -04:00
Matthew Hoops
eea482fa43 ALL: behaviour -> behavior 2011-05-25 10:50:46 -04:00
Thierry Crozat
d2a55b42c9 ENGINES: Further unify engine names 2011-05-22 12:47:35 +01:00
Max Horn
64bcb731bf LURE: Rename method random() -> getRandom()
Also get rid of a slight bias for 0 in the random numbers (it was
selected twice as often as any other number).
2011-05-17 12:31:21 +02:00
Max Horn
4cbe4ede66 COMMON: Registers RandomSources in constructor with the event recorder
This also removes the dependency of engines on the event recorder header
and API, and will make it easier to RandomSources that are not properly
registered.
2011-05-17 12:17:26 +02:00
Thierry Crozat
3c59e37035 ENGINES: Unify engine names
This unifies the engine names in MetaEngine::getName() and the
credits. In particular drop "Engine" or "engine" from the names when
it was present and use expanded names in credits when the
MetaEngine uses it (e.g. "Beneath a Steel Sky" instead of "BASS").
2011-05-16 00:11:32 +01:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Ori Avtalion
cd6ee0589d JANITORIAL: Format forward declarations to follow convention 2011-04-28 12:20:34 +03:00
Klaus Reimer
8d3c289dd0 LURE: Enabled clickable menus for WebOS. 2011-04-19 19:13:08 +02:00
Max Horn
73f04118f3 COMMON: Rename Error to ErrorCode, introduce new Error class 2011-04-18 18:22:02 +02:00
Max Horn
84184aabc0 ALL: colour -> color 2011-04-14 14:12:35 +02:00
Max Horn
088bd7a70b ENGINES: Remove unused MIDI pass-through code 2011-03-23 17:07:48 +01:00
Max Horn
e70fd59b35 ENGINES: Further simplify pseudo MidiDrivers; fix some regressions
The regression affected AGOS and maybe some others; specifically,
the real MidiDriver would have been deleted twice -- I previously
missed that the Engine instances takes care of freeing the real
MidiDriver, not the MidiPlayer wrapping it.

This commit should clarify the ownership of the real MidiDriver for
most pseudo MidiDrivers.
2011-03-23 16:49:41 +01:00
Max Horn
29847ea42d AUDIO: Change several fake MidiDrivers to MidiDriver_BASE subclasses
Many engines follow the advice in audio/midiparser.h and create a
"pseudo-MidiDriver" subclass. But MidiParser really only needs a tiny
subset of the MidiDriver capabilities, namely those found in
MidiDriver_BASE. So we try to subclass from that whenever possible; this
allows us to remove many stub methods, and enables further future
simplifications.
2011-03-23 15:25:47 +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