Commit Graph

499 Commits

Author SHA1 Message Date
Matthew Hoops
a658fc660e GRAPHICS: Move PNG to the ImageDecoder interface 2012-03-20 01:06:48 +01:00
Christoph Mallon
a64b5e2a77 ALL: Use GCC_ATLEAST(). 2012-03-17 20:09:49 +01:00
Christoph Mallon
75efdd2d84 JANITORIAL: Replace (x ? false : true) by !(x). 2012-03-13 15:43:36 +01:00
Max Horn
367131ef0e COMMON: Move Language and Platform functionality into separate files 2012-02-26 15:21:36 +01:00
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
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
Johannes Schickel
21fb4af154 SWORD25: Return 0 instead of false in Screenshot::createThumbnail.
This should "fix" a g++ warning.
2012-01-29 16:33:43 +01:00
D G Turner
7a0aabccbe SWORD25: Reduce usage of 'goto'.
Have refrained from changing the usage of 'goto' in the embedded LUA
interpreter code for the time being, as this is still in flux due to
the savegame issues.
2011-12-08 19:24:42 +00:00
Christoph Mallon
a78b2d777d JANITORIAL: Remove extra semicolons. 2011-11-27 12:54:22 +01:00
Filippos Karapetis
52ee29d5cd SWORD25: Add the Hungarian "psylog" version from bug #3428644 2011-11-26 22:28:41 +02:00
Filippos Karapetis
5e8d52562d SWORD25: Fixed the language of the Croatian version 2011-11-18 17:52:27 +02: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
Strangerke
0af96cd379 LAUNCHER: Add GUIO_NOASPECT to sword25 2011-10-24 00:39:31 +02:00
Eugene Sandulenko
32972a5ffb AD: Switched rest of the engines to new GUIO 2011-10-23 17:53:13 +01:00
Filippos Karapetis
e95bc9d7b0 SWORD25: Make sure that id is always initialized in playSoundEx() 2011-08-07 16:05:54 +03:00
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
Christoph Mallon
bf580e6e6b JANITORIAL: Add missing NL at EOF. 2011-08-07 13:53:33 +02:00
Eugene Sandulenko
18cbb63cba SWORD25: Removed custom endianness code in persistence code
This is first step towards making saves portable. Binary footprint
left intact, so the saves are compatible.
2011-07-10 18:11:00 +03:00
Eugene Sandulenko
1c711da8fc SWORD25: Fix regression introduced in 5dd8f2575b
Janitorial removed function call which had a side effect.
Thus the actor image load code crashed.
2011-07-10 18:10:58 +03: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
Eugene Sandulenko
a17049e228 SWORD25: removed useless warning in setVsync() 2011-06-29 17:16:28 +03:00
Eugene Sandulenko
15a16e556c SWORD25: Implement persistence functions for soundengine
Now sound is properly saved/restored. Implemented savegame versioning.
Compatibility with old saves pertained.
2011-06-29 17:16:25 +03:00
Thierry Crozat
55a7bbf86a SWORD25: Change unknow handle error into a warning
Also add sanity checks when calling findHandle() in the SoundEngine.
This fixes an issue when functions of SoundEngine are called on a
sound that has already finished playing (the most common
occurrences are calls to isSoundPlaying()).
2011-06-26 18:40:31 +01:00
Eugene Sandulenko
32392c9430 SWORD25: Fixed bug with concurrent sounds. Reported by criezy 2011-06-26 17:36:53 +03:00
Eugene Sandulenko
bce549f42a SWORD25: Fix bug with loading saves when some saves are missing 2011-06-26 16:10:34 +03: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
Julien
e972c6cfd8 SWORD25: Add error checks after allocating memory with malloc 2011-06-23 15:15:57 +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
eriktorbjorn
72aa426770 SWORD25: Fix locale-related bug when reading the volume settings
I don't really like this, but I can't think of any better way. It
seems that Lua doesn't like decimal comma at all, so we have to
format the volume settings with a decimal point instead. Otherwise,
all I'll ever get is either full volume or no volume, with nothing
in between.
2011-06-18 18:30:04 +02:00
eriktorbjorn
a7234eef81 SWORD25: Fix getting volume settings from config file
The tests had been inverted, so that if there were config file
settings it would use the default settings instead.
2011-06-18 16:30:29 +02:00
Eugene Sandulenko
94ad45b058 Merge pull request #30 from tsoliman/configure-enhancement-warning-clean
Configure enhancement warning clean
2011-06-17 10:19:57 -07:00
Eugene Sandulenko
f090eb6727 SWORD25: Fix image blending for black
This fixes exit menu.
2011-06-17 01:17:25 +03:00
Tarek Soliman
206256713d SWORD25: flag all WIP games with ADGF_UNSTABLE
all
2011-06-16 13:37:58 -05:00
Max Horn
7c992d6598 DETECTOR: Merge ADParams into AdvancedMetaEngine 2011-06-14 18:17:01 +02:00
Filippos Karapetis
259bb84174 SWORD25: Removed leftover dead code 2011-06-12 22:24:33 +03:00
Eugene Sandulenko
eb9b492ce7 SWORD25: Unstub more sound-related functions 2011-06-11 14:12:27 +03:00
Max Horn
a0cba0a760 SWORD25: Fix warning 2011-06-10 22:15:47 +02:00
Max Horn
43f301d4c7 SWORD25: Switch to alternate AdvancedMetaEngine, avoid ADParams 2011-06-10 22:15:45 +02:00
Max Horn
4827cc914a ENGINES: Change incorrect use of 'target' to 'gameid' 2011-06-10 22:15:40 +02:00
Eugene Sandulenko
ca825e1dba SWORD25: Unstub SoundEngine::set/getVolume 2011-06-10 11:27:27 +03:00
Max Horn
0a2fb9a465 COMMON: Make more symbols forbidden 2011-06-06 17:05:35 +02:00
Max Horn
a6e5b97e9f COMMON: Remove vfprintf call from XML parser 2011-06-06 11:19:09 +02:00
Max Horn
ac1c2124e5 SWORD25: Remove redundant bounds check 2011-06-06 11:19:07 +02:00
Max Horn
9c86e1a0a8 SWORD25: Fix whitespace 2011-06-06 11:19:07 +02:00
Max Horn
477d6233c3 ENGINES: Change 2nd param of Engine::saveGameState to Common::String 2011-06-02 18:31:59 +02:00
Alyssa Milburn
7b03a6e604 SWORD25: Fix making multiple saves at the same time.
This adds a missing seek. Thanks to [md5] for guessing the cause.
2011-05-26 13:23:25 +02:00