Commit Graph

1341 Commits

Author SHA1 Message Date
Willem Jan Palenstijn
9ffe3e11d9 Merge pull request #182 from fingolfin/forbid-ctype
ALL: Avoid using is* macros from ctype.h
2012-02-21 11:33:32 -08:00
Max Horn
4f8665fc83 COMMON: Move isFoo functions to namespace Common, add doxygen comments 2012-02-20 16:18:27 +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
Tarek Soliman
921f602ab8 JANITORIAL: Fix whitespace in pointer template arg 2012-02-15 10:07:08 -06:00
Max Horn
658080deed ALL: Avoid using is* macros from ctype.h
On some systems, passing signed chars to macros like isspace() etc. lead
to a runtime error. Hence, mark these macros as forbidden by default,
and introduce otherwise equivalent alternatives for them.
2012-02-15 16:51:37 +01:00
Tarek Soliman
edc5249772 JANITORIAL: Fix template definition whitespace 2012-02-10 21:17:27 -06:00
Andrea Corna
a6ec4f70da COMMON: Make more members of Archive constant. 2011-12-13 17:55:57 +01:00
Johannes Schickel
3ad89a0d18 PARALLACTION: Fix memset size parameter. 2011-11-03 02:26:45 +01:00
Eugene Sandulenko
e1a311a236 PARALLACTION: Fix warnings. Fix nasty out-of-scope bug in parallaction_br.cpp 2011-11-03 00:48:14 +00:00
Eugene Sandulenko
32972a5ffb AD: Switched rest of the engines to new GUIO 2011-10-23 17:53:13 +01:00
Filippos Karapetis
2883ebc40e PARALLACTION: Fixed bugs #2880939 and #3135868
A regression from commit 774773b. Many thanks to digitall for bisecting
2011-10-01 01:10:30 +03:00
Filippos Karapetis
0c468901e1 PARALLACTION: Code formatting (and trying to keep clone2727 happy! :P ) 2011-09-29 02:17:11 +03:00
Filippos Karapetis
57177e98aa PARALLACTION: Fixed bug #2969915 - "NIPPON: Disguise changing back and forth"
A regression from commit 18b48c7. The name of the normal Donna actor is
"donna", whereas it's "donnatras" for the disguised one, so strstr()
seems to be wrong here. This fixes the bug and it shouldn't cause any
further regressions. Also, changed the relevant code to conform to our
code convention guidelines - it's quite a bad idea to not enclose a
whole big code block in brackets, as it becomes hard to read.
2011-09-29 02:00:31 +03:00
Filippos Karapetis
a9214ac7a2 PARALLACTION: Updated the fix for script bug #2969913 to a workaround 2011-09-28 15:34:58 +03:00
Filippos Karapetis
7aad29572d PARALLACTION: Fixed bug #2969913 - "NIPPON: Katana graphics not shown (regression)" 2011-09-28 14:10:52 +03:00
D G Turner
0d3c6fddae PARALLACTION: Add Graphics Debug Output. Minor Whitespace Fixes.
This adds debug output for graphics object access to help with
investigation of bug #2969913 i.e. "NIPPON: Katana graphics not shown
(regression)" as well as cleanup of whitespace in this class.
2011-09-02 06:14:20 +01:00
D G Turner
d13a9270a7 PARALLACTION: Correct Previous Commit to Coding Conventions. 2011-08-24 01:42:19 +01:00
D G Turner
5a0680af52 PARALLACTION: Improve safety of PathBuffer Accesses in Pathfinding. 2011-08-24 00:58:05 +01: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
Johannes Schickel
7e4224e52a COMMON: Fix compilation when USE_HASHMAP_MEMORY_POOL is not defined. 2011-07-03 00:16:07 +02:00
Littleboy
b694a78f62 ANALYSIS: Add static casts to is* functions
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results.
See http://msdn.microsoft.com/en-us/library/ms245348.aspx
2011-06-23 08:52:52 -04: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
7c992d6598 DETECTOR: Merge ADParams into AdvancedMetaEngine 2011-06-14 18:17:01 +02:00
Thierry Crozat
06bbb57ad7 I18N: Make many more GUI MessageDialog strings translatable 2011-06-13 22:19:18 +01:00
Max Horn
289ad6b541 PARALLACTION: Switch to alternate AdvancedMetaEngine, avoid ADParams 2011-06-10 22:15:44 +02:00
Max Horn
4827cc914a ENGINES: Change incorrect use of 'target' to 'gameid' 2011-06-10 22:15:40 +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
Johannes Schickel
71bdb86e02 Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16

Conflicts:
	graphics/png.cpp
2011-05-01 16:54:45 +02:00
D G Turner
96965b4896 PARALLACTION: Fix BRA Compilation After Common Header Changes. 2011-04-30 18:12:50 +01: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
Max Horn
73f04118f3 COMMON: Rename Error to ErrorCode, introduce new Error class 2011-04-18 18:22:02 +02:00
Johannes Schickel
9734c7be64 PARALLACTION: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. 2011-04-17 16:30:12 +02:00
Max Horn
0ce2ca4e00 COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
2011-04-12 16:53:15 +02:00
Max Horn
7949d7c6de AUDIO: Move more common code to Audio::MidiPlayer
This also should fix some regressions from the previous
commits, related to MidiParser's either being leaked,
or being deleted and then used again (i.e., crashing).

I tested as many games as I had available, but further
testing of all affected engines is called for anyway.
2011-03-25 14:15:53 +01:00
Max Horn
9ffc4e0151 PARALLACTION: Move MidiDriver creation into MidiPlayer(_MSC) constructors 2011-03-25 14:15:47 +01:00
Max Horn
7cc04f25ff PARALLACTION: Change MidiPlayer impls to derive from Audio::MidiPlayer 2011-03-24 16:46:47 +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
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