Commit Graph

483 Commits

Author SHA1 Message Date
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
md5
86563d0009 SWORD25: Committed changes to module.mk which were forgotten in my previous commit 2011-05-26 12:34:22 +03:00
md5
62c026d3b6 SWORD25: Merged the PNG and thumbnail decoding code into a common class 2011-05-26 12:29:51 +03:00
md5
d5050463d5 SWORD25: Removed the leftover libpng code 2011-05-26 11:46:42 +03:00
md5
984f53ac14 SWORD25 (LUA): Removed unused code for handling precompiled LUA scipts 2011-05-26 11:46:41 +03:00
Max Horn
a2f16d9155 SWORD25: Const correctness 2011-05-26 08:22:46 +02:00
Max Horn
2068bc1527 SWORD25: Fix warning: double format, float arg on DC 2011-05-26 08:22:36 +02:00
Max Horn
2c8a9b0e76 SWORD25: Avoid using strcoll 2011-05-26 08:14:57 +02:00
Matthew Hoops
9539017ee3 ALL: initialise -> initialize 2011-05-25 11:17:11 -04:00
Matthew Hoops
eea482fa43 ALL: behaviour -> behavior 2011-05-25 10:50:46 -04:00
Max Horn
fdf12c5c09 SWORD25: Remove more unused loadlib code + use of fopen
The functions loader_C and loader_Croot provably did not do anything
besides returning an error, so removing them was safe.

For loader_Lua, this was using luaL_loadfile. But that in turn now
uses Sword25FileProxy, which only supports loading config.lua,
and config.lua is not used via the loadlib mechanism.
Therefore, I deemed it safe to also remove this third loader.

This leaves loader_preload as only remaining loader. It is probably
unused, too, but I did not both to investigate further, as I already
achieved my primary goal (getting rid of fopen/fclose use).

All other removed functions were unused due to the removal of the
first three loader_* functions.
2011-05-25 13:01:06 +02:00
Max Horn
94122f7afb SWORD25: Remove unused Lua print stuff 2011-05-24 00:19:31 +02:00
Max Horn
55e7ef1e08 SWORD25: Remove obsolete FORBIDDEN_SYMBOL_ALLOW_ALL defines 2011-05-23 19:48:14 +02:00
Max Horn
6c5f50c246 COMMON: Add exit() to list of forbidden symbols 2011-05-23 19:39:26 +02:00
Max Horn
e6c78b4f46 SWORD25: Include scummsys.h from lua.h, partially deal with the consequences
This should help mark the spots that are still non-portable, just follow
the FIXMEs.
2011-05-23 19:12:25 +02:00
Max Horn
3931e1dc50 SWORD25: Avoid including lua headers in other headers 2011-05-23 19:12:25 +02:00
Max Horn
fa2c268d6a SWORD25: Replace some non-portable calls, add FIXMEs 2011-05-23 19:12:24 +02:00