Commit Graph

713 Commits

Author SHA1 Message Date
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
dhewg
69dcb99369 LURE: Init volume levels on startup
And set global volume levels
2011-03-19 16:04:53 +01:00
Johannes Schickel
68b17128c1 LURE: Adapt to setPalette RGBA->RGB change.
This is currently done by converting the internal palette from RGBA(?) to RGB
when setPalette is called.
2011-02-14 17:08:32 +01:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn
2d1c8a3533 ALL: Fix whitespaces / indention
svn-id: r55818
2011-02-07 23:01:06 +00:00
Max Horn
ab039812e7 COMMON: OSystem now has a PaletteManager
svn-id: r55806
2011-02-07 17:52:38 +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
Lars Persson
9163b9e032 LURE : Fix for ID: 3030143 Unexpected game cursor behavior. Always refresh menu and screen when mouse is moved.
svn-id: r54747
2010-12-03 09:23:56 +00:00
Max Horn
abe1959d36 COMMON: Simplify DECLARE_SINGLETON macro
This makes it possible to write
  DECLARE_SINGLETON(foo);
instead of
  DECLARE_SINGLETON(foo)
without causing a warning about an extra semicolon.
The extra semicolon helps some editors at parsing the C++ code.

svn-id: r54258
2010-11-16 08:23:13 +00:00