Commit Graph

714 Commits

Author SHA1 Message Date
Johannes Schickel
6dabb5c414 SWORD25: Call requested pixel format by its correct name. 2015-12-14 05:16:12 +01:00
Johannes Schickel
40421f1854 SWORD25: Cleanup. 2015-12-14 05:08:05 +01:00
Johannes Schickel
cb8e611e33 SWORD25: Fix uninitialized variable usage.
When using the constructor of Panel which directly calls unpersist _color was
uninitialized. However, unpersit uses setColor which assumes _color is
initialized properly. Caused valgrind warnings when loading.
2015-12-14 05:08:05 +01:00
Johannes Schickel
184ae49302 SWORD25: Plug memory leak in RenderedImage. 2015-12-14 05:08:05 +01:00
Johannes Schickel
74321fcd22 SWORD25: Let ImgLoader write into Graphics::Surface. 2015-12-14 05:08:05 +01:00
Jakub Wilk
407a5a1f55 SWORD25: Fix typo 2015-12-09 23:02:01 +01:00
Strangerke
ade912da56 SWORD25: Build engine by default 2015-12-06 22:31:29 +01:00
Eugene Sandulenko
1779fba59b SWORD25: Mark Sword 2.5 as testing 2015-12-04 11:53:07 +01:00
Eugene Sandulenko
3a574272b8 SWORD25: Remove unused class variable 2015-11-30 23:54:27 +01:00
Eugene Sandulenko
7449c09f4a SWORD25: Init variables 2015-11-30 23:54:27 +01:00
Eugene Sandulenko
2d0b914301 SWORD25: Added Ultimate version detection 2015-11-19 00:52:20 +01:00
Eugene Sandulenko
efaf82c66e SWORD25: Fix Hungarian version support 2015-11-19 00:51:44 +01:00
Eugene Sandulenko
dbb473752b SWORD25: Fix tint color 2015-11-18 22:54:27 +01:00
Eugene Sandulenko
aa9b5e94b6 SWORD25: Implement missing SWF opcode 2015-11-18 00:13:18 +01:00
Eugene Sandulenko
aa74254f23 SWORD25: Translate comments 2015-11-17 23:28:57 +01:00
Eugene Sandulenko
4dc23ea289 SWORD25: Fix text rendering 2015-11-17 23:17:20 +01:00
Willem Jan Palenstijn
2b31096856 SWORD25: Fix comment translation 2015-11-13 10:51:29 +01:00
Eugene Sandulenko
1f1ef9b632 SWORD25: Fixing typo of typo. This time for real 2015-11-13 09:09:05 +01:00
Eugene Sandulenko
a47ab5e1d9 SWORD25: Fix typo 2015-11-13 08:21:51 +01:00
Eugene Sandulenko
ca4c10f424 SWORD25: Translate comments 2015-11-13 00:21:59 +01:00
Eugene Sandulenko
882989f5c3 SWORD25: Fix thumbnail generation and make it portable 2015-11-13 00:03:42 +01:00
Christian Krause
d39f93af68 SWORD25: Draw next movie frame only when an update is needed
This fixes the problem that the movies are played too fast
and get out of sync with additionally played speech samples.
2015-05-03 12:19:17 +02:00
Matthew Hoops
797506eff7 SWORD25: Use fabs for absolute value of doubles 2015-04-11 16:12:47 -04:00
RichieSams
4c64f7e194 SWORD25: Remove unused code
The original idea was to keep the code variation and pick the best one. However,
these two methods we're portable enough for our needs.
2015-01-07 07:00:13 -06:00
Eugene Sandulenko
baacf0be61 SWORD25: Commend unused and unportable functions 2015-01-04 22:16:50 +01:00
Eugene Sandulenko
17fe53a34c SWORD25: Hopefully fix compilation errors 2015-01-04 22:10:17 +01:00
Eugene Sandulenko
ce45caaf83 SWORD25: Fix warning 2015-01-04 21:06:49 +01:00
RichieSams
e4f74b6c34 SWORD25: Remove the option to persist a double as a string
Since the current method *should* be more accurate
2014-12-30 18:28:14 -06:00
RichieSams
9a4d62e76a SWORD25: Change function names to use persist instead of serialize
Same argument as in 97c35714ce.
To match the rest of the SWORD25 code base
2014-12-30 18:26:59 -06:00
RichieSams
8ee75e1dc5 SWORD25: Add Pluto copyright message to new persistence code
Since the code is based off the Pluto code
2014-12-30 18:22:15 -06:00
RichieSams
eaff6a40f6 SWORD25: Correct include guards to reflect the changes to the file names 2014-12-30 18:21:43 -06:00
RichieSams
67114c3e7e SWORD25: Remove old lua persistence files 2014-12-30 15:40:33 -06:00
RichieSams
8668707f16 SWORD25: Fix how nils are persisted
The unpersist code expects nils to be represented as an index with value 0.
The persist code incorrectly wrote out this data
2014-12-30 15:40:33 -06:00
RichieSams
08e3f21a8d SWORD25: Rename double serialization file to better represent what it is
AKA functions, rather than a class
2014-12-30 15:40:33 -06:00
RichieSams
97c35714ce SWORD25: Rename lua serialization functions to use 'persist' in order to match the rest of the engine 2014-12-30 15:40:29 -06:00
RichieSams
a188b31d15 SWORD25: Use new lua serialization functions to persist state 2014-12-30 13:42:45 -06:00
RichieSams
0b8482b55f SWORD25: Update module.mk with lua serialization changes 2014-12-30 13:42:02 -06:00
RichieSams
2fb116f10e SWORD25: Move all lua serialization helper functions to their own file 2014-12-30 13:41:24 -06:00
Adrian Astley
2c7a87a4e3 SWORD25: Fix code formatting
... with AStyle
2014-12-19 14:51:00 -06:00
Adrian Astley
de20880d9d SWORD25: Re-write the pluto unserializing function(s) 2014-12-19 13:41:58 -06:00
Adrian Astley
dedfd7aa84 SWORD25: Move common functions to their own set of files so they can be shared 2014-12-19 13:38:56 -06:00
Adrian Astley
efcd6196ee SWORD25: Create a function for serializing lua objects
This function is very similar to the Pluto function. However, this code
is much cleaner and is endian-safe
2014-12-19 11:29:22 -06:00
Adrian Astley
ff35d7118c SWORD25: Create a set of functions for manually serializing a double
Since we can't assume IEEE.
2014-12-19 11:29:22 -06:00
Filippos Karapetis
fa9e2f7b29 SWORD25: Disable unused code
Thanks to fingolfin for pointing out this unused code
2014-12-07 17:49:52 +02:00
Filippos Karapetis
e938ddcef7 SWORD25: Remove trailing whitespace 2014-10-28 16:13:07 +02:00
Adrian Astley
91571387d1 SWORD25: Bump the save file version number
Since the previous commit breaks saves for 32 bit binaries
2014-09-12 17:05:53 -05:00
Adrian Astley
2ec3adfad5 SWORD25: Make save files x32/x64 agnostic 2014-09-12 16:07:06 -05:00
Eugene Sandulenko
5da1a45307 SWORD25: Fix sprite flipping 2014-06-24 00:48:52 +03:00
Eugene Sandulenko
5c706dde27 SWORD25: Switch to common TransparentSurface 2014-06-15 15:43:25 +03:00
Johannes Schickel
59d0874ca9 SWORD25: Use float constant values in expressions which result in float.
This silences some float conversion warnings.
2014-06-02 01:00:15 +02:00
Eugene Sandulenko
c3ffbd884a Merge pull request #426 from sunmax/master
PS2: Pull request to master for latest PS2 code
2014-04-28 21:20:42 +03:00
Matthew Hoops
740b6e8fbd IMAGE: Move all ImageDecoders to image/ 2014-02-28 00:27:28 -05:00
Johannes Schickel
bad7cdd3a6 SWORD25: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
Max Lingua
001e3f7658 PS2: modified sword25 loslib.cpp to support PS2 2014-01-19 00:51:02 -05:00
Johannes Schickel
0e017f007a Merge pull request #375 from digitall/engineAutoPlug
RFC: Pluggable Engines #2 (No Python, just evolution of current configure shell and make code)
2013-11-26 02:27:11 -08:00
Strangerke
622dfcf950 SWORD25: Janitorial - Fix spacing errors 2013-11-24 18:52:48 +01:00
D G Turner
ef85456859 BUILD: Remove need for engine.mk in each engine directory.
Each engine now only has to provide a single configure.engine file
adding the engine into the configure script, which then produces the
required other files automatically.
2013-11-24 00:48:01 +00:00
D G Turner
1ac01d2333 BUILD: Remove need for engine-plugin.h in engines.
This is now generated automatically by the configure script from the
engine directory names.
2013-11-24 00:48:01 +00:00
D G Turner
00c27a28f9 BUILD: Split engines/plugins_table header down to a file per engine.
This is the third and final commit enabling fully pluggable engines.

Now providing an engine folder contains a configure.engine, engine.mk
and engine-plugin.h file, it will be picked up automatically by the
configure script.
2013-11-24 00:48:01 +00:00
D G Turner
d77cf95a18 BUILD: Split engines.mk down to a single file per engine.
This is the second part of allowing engines to be added dynamically.
Each folder in engines/ which must contain a file named "engine.mk"
containing the make definitions for that engine.
2013-11-24 00:48:01 +00:00
D G Turner
aa947c9474 BUILD: Split configure.engines down to a single file per engine.
This is the first part of allowing engines to be added dynamically.
They are placed into a folder in engines/ which must contain a file
named "configure.engine" to add the engine, which is pulled into the
top level configure script automatically.
2013-11-24 00:45:38 +00:00
Willem Jan Palenstijn
34169a817c SWORD25: Revert "Fix compilation on some 32-bit systems"
This reverts commit 6dc3768faa.

This commit was the wrong fix to the compilation problem later
fixed by 8e9aefbf6e.
2013-11-04 21:25:00 +01:00
Eugene Sandulenko
ae6f205b93 SWORD25: Fix potential buffer overrun. CID 1003865 2013-10-08 00:11:18 +03:00
Thierry Crozat
cdbee9972a SWORD25: Fix possible error in sound engine when loading a savegame
The error occurred when the save game was saved early in the game
before all the sound handles had been used. The unused handles only had
the handle type initialised (as kFreeHandle) so all the other fields had
random values. After loading the game the sound engine could erroneously
try to play one of these sound handle resulting in an error.
2013-10-05 00:25:04 +01:00
Thierry Crozat
f55259e3b1 SWORD25: Fix regression in persistence code
The regression was introduced by commit e6ba26ff0d which wrote
coordinates of a rect as unsigned int when they were before written
as signed int. Since the load code was not modified it still expected
signed int. They are now again written as signed int. Any gamed saved
between commit e6ba26ff0d and this commit will therefore be corrupted.
2013-10-05 00:25:04 +01:00
Willem Jan Palenstijn
4591bd6eb6 SWORD25: Fix alpha/colormod blitting
This is a backport to sword25 of the wintermute commits
e9cbda135b and 2141ad285e

Thanks to eriktorbjorn for noticing and testing.
2013-09-29 20:18:54 +02:00
Eugene Sandulenko
118da76068 SWORD25: int -> int32 correctness 2013-09-29 10:44:41 +03:00
Eugene Sandulenko
c73904c978 SWORD25: Fix compilation 2013-09-29 10:30:39 +03:00
Eugene Sandulenko
2333041fdf SWORD25: Specify integer size 2013-09-29 10:15:24 +03:00
Eugene Sandulenko
e6ba26ff0d SWORD25: int -> int32 correctness 2013-09-29 10:02:34 +03:00
Eugene Sandulenko
7a669b770f SWORD25: Specifying int size to make Amiga happy 2013-09-29 09:45:16 +03:00
Eugene Sandulenko
2a2a5e51c6 SWORD25: Fix Amiga compilation 2013-09-29 09:30:23 +03:00
D G Turner
befa99ca77 SWORD25: Some more fixes for Amiga OS 4 compilation. 2013-09-29 03:21:55 +01:00
D G Turner
7e62442376 SWORD25: And even more fixes for Amiga OS 4 compilation. 2013-09-29 02:33:02 +01:00
D G Turner
03965ba855 SWORD25: Even more fixes for Amiga OS 4 compilation. 2013-09-29 00:45:43 +01:00
Eugene Sandulenko
9220d331e2 SWORD25: Make Amiga compiler happier 2013-09-28 23:57:39 +03:00
Eugene Sandulenko
5cb881be12 SWORD25: More int->int32 fixes 2013-09-28 23:45:31 +03:00
Eugene Sandulenko
86550cdc3c SWORD25: Further fixes for Amiga 2013-09-28 23:28:19 +03:00
Eugene Sandulenko
9a1ddf0dee SWORD25: More int <-> int32 corrections 2013-09-28 23:17:02 +03:00
Eugene Sandulenko
08c010b8df SWORD25: Further fixes for Amiga compilation 2013-09-28 22:58:10 +03:00
Eugene Sandulenko
4552f5196b SWORD25: Fix Amiga compilation 2013-09-28 22:26:54 +03:00
Eugene Sandulenko
8053989dd1 SWORD25: Remove explictit #includes
Makes Coverity happier.
2013-09-27 11:07:25 +03:00
Eugene Sandulenko
03911e6505 SWORD25: Fix copy-paste error. CID 1004130 2013-09-26 22:58:46 +03:00
Eugene Sandulenko
4f0d37d2f8 SWORD25: Remove unused variable 2013-09-09 00:48:02 +03:00
Johannes Schickel
eb22417639 SWORD25: Do not set Surface::pixels directly anymore. 2013-08-03 04:14:08 +02:00
Johannes Schickel
1550e9804b SWORD25: Take advantage of Surface::getPixels. 2013-08-03 04:02:52 +02:00
Johannes Schickel
5afa6f97f4 SWORD25: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 02:52:33 +02:00
Eugene Sandulenko
6dc3768faa SWORD25: Fix compilation on some 32-bit systems 2013-07-15 19:19:45 +03:00
Eugene Sandulenko
b7e3d52abc SWORD25: Replace Pluto with Tamed Pluto for increased compatibility
Still saves are incompatible but at least this now has enhanced
debugging capabilities.
2013-07-15 19:02:34 +03:00
Sven Hesse
989ea7cb56 JANITORIAL: Remove trailing whitespace 2013-07-14 19:01:47 +02:00
Eugene Sandulenko
f59512c47e RECORDER: Implement Events Recorder 2013-05-17 00:18:09 +03:00
Eugene Sandulenko
4a62d6c25a Merge pull request #320 from johndoe123/sword25-gfx
SWORD25: Optimized graphics drawing
2013-05-06 03:49:21 -07:00
Eugene Sandulenko
3c0c6a5cb1 SWORD25: Plug memory leak. CID 1003589 2013-04-24 01:23:31 +03:00
johndoe123
4fc57dac8f SWORD25: Fix blitting code
- Rename collectRenderQueue to preRender
- Only do forceRefresh() in Panel::setColor() and Text::setText() if the new values are different
- Move child object resorting from RenderObject::render() into RenderObject::preRender()
2013-04-20 00:34:32 +02:00
Max Horn
cdfd5f85c8 ENGINES: Silence clang warning about unused private member _vm
This affects the Console / debugger classes of multiple engines.
An alternative solution would have been to remove the unused _vm
member vars. However, it seems likely that in the future, the _vm
member could be useful for methods added to the console. So instead,
we add a simple assert(_vm) to silence the clang warning.
2013-04-18 23:50:19 +02:00
johndoe123
176a3babc5 Merge branch 'master' of github.com:scummvm/scummvm into sword25-gfx 2013-04-18 19:08:22 +02:00
Max Horn
4a55f52818 SWORD25: Silence warning in the Lua code
This fixes warnings like this that crop up when compiling sword25
with Apple clang 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
2013-04-18 17:09:32 +02:00
johndoe123
e935f85366 SWORD25: Change absolute Z calculation to match that of absolute x/y; remove old comment 2013-04-17 19:54:39 +02:00
johndoe123
0a0b2f397b SWORD25: Optimize graphics drawing code 2013-04-17 12:41:49 +02:00
Filippos Karapetis
6286779d0a SWORD25: Fix some spacing in LUA 2013-02-03 18:18:43 +02:00
Filippos Karapetis
afdb28b4e9 SWORD25: Replace calls to LUAI_THROW() with error() in LUA
This removes one of the uses of setjmp(), but its use in LUAI_TRY still
remains
2013-02-03 18:17:02 +02:00
Johannes Schickel
fe1a779441 SWORD25: Silence C++11 narrowing warnings. 2013-01-09 07:24:37 +01:00
Johannes Schickel
2773f5d7af COMMON: Forbid symbols for the rest of is* from ctype.h.
I also moved the isprint case to the correct position.

This adds a FIXME to our lua code from sword25, which uses iscntrl directly.
2012-12-13 21:08:48 +01: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
Matthew Hoops
857b92f8ff Merge pull request #268 from clone2727/video-rewrite
VideoDecoder upgrade & partial rewrite
2012-08-26 15:41:56 -04:00
upthorn
f34924bc39 SWORD25: Fix loading savegames on 64-bit archs. 2012-08-20 21:15:46 +02:00
Alyssa Milburn
b1af75f2c3 SWORD25: Improve sound persistence.
Keep track of volume/panning state, and don't restart sounds which already
finished playing.
2012-08-20 21:14:10 +02:00
Matthew Hoops
92432a136b VIDEO: Convert TheoraDecoder to the new AdvancedVideoDecoder API 2012-08-13 16:25:03 -04:00
Matthew Hoops
7831225b28 VIDEO: Move TheoraDecoder to video/ 2012-08-12 08:58:00 -04:00
Johannes Schickel
5f65cf9679 SWORD25: Get rid of casts on OSystem::copyRectToScreen calls. 2012-06-16 02:39:00 +02:00
Strangerke
04b6af9176 SWORD25: Janitorial: Apply coding conventions 2012-06-13 09:40:11 +02:00
Matthew Hoops
10f7e805c2 VIDEO: Add volume/balance control to VideoDecoder 2012-05-28 14:00:16 -04:00
Matthew Hoops
9e330174c8 VIDEO: Change getElapsedTime() into getTime()
This name change accompanies a slight meaning change; now it means the current time position from the beginning of the video and not from starting the video.
2012-05-12 21:28:13 -04:00
D G Turner
b7a5573dda SWORD25: Correct stack dump debug function output.
This was introduced by the change from C++ output streams (<<) to
Common::String output. Thanks to salty-horse for finding this.
2012-04-22 14:36:51 +01:00
Johannes Schickel
0e17497110 SWORD25: Do not cast away const qualifier. 2012-04-05 00:40:30 +02:00
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