Commit Graph

382 Commits

Author SHA1 Message Date
Strangerke
2218d14fb5 TONY: Remove unused error defines 2014-03-01 16:50:02 +01:00
Strangerke
9d8477b87d TONY: Remove dummy defines 2014-03-01 16:46:31 +01:00
Strangerke
8d8bf74ad6 TONY: Remove unused function declaration in lzo 2014-03-01 16:37:22 +01:00
Strangerke
3ace561178 TONY: Indent code properly in lzo 2014-03-01 16:35:58 +01:00
Strangerke
3f6b51ce55 TONY: Remove dead code in lzo 2014-03-01 16:25:41 +01:00
Strangerke
a440c6a20e TONY: Reduce the scope of more variables 2014-02-28 23:24:09 +01:00
Strangerke
81d733aec0 TONY: Fix some British comments 2014-02-28 22:49:05 +01:00
Strangerke
f358ec74f7 TONY: Reduce the scope of some more variables 2014-02-28 22:47:36 +01:00
Strangerke
d35f470bf6 TONY: Reduce the scope of some variables, change the return type of findPath() 2014-02-28 22:20:38 +01:00
Johannes Schickel
b9bfa3a857 TONY: Make GPL headers consistent in themselves. 2014-02-18 02:39:39 +01:00
Johannes Schickel
88469ba578 TONY: Indent REGISTER_PLUGIN_* for consistency. 2014-02-17 23:02:58 +01:00
Johannes Schickel
417064e311 Merge pull request #417 from digitall/STACK_fixes
ALL: Fix optimization unstable code on checking for null after new.
2014-01-17 17:48:16 -08:00
Johannes Schickel
9afeafd3fd TONY: Cleanup (don't compare pointer with false). 2014-01-16 22:58:38 +01:00
D G Turner
ac4087856f ALL: Remove optimization unstable code on checking for null after new.
These issues were identified by the STACK tool.

By default, the C++ new operator will throw an exception on allocation
failure, rather than returning a null pointer.

The result is that testing the returned pointer for null is redundant
and _may_ be removed by the compiler. This is thus optimization
unstable and may result in incorrect behaviour at runtime.

However, we do not use exceptions as they are not supported by all
compilers and may be disabled.

To make this stable without removing the null check, you could qualify
the new operator call with std::nothrow to indicate that this should
return a null, rather than throwing an exception.

However, using (std::nothrow) was not desirable due to the Symbian
toolchain lacking a <new> header.
A global solution to this was also not easy by redefining "new" as "new
(std::nothrow)" due to custom constructors in NDS toolchain and various
common classes.

Also, this would then need explicit checks for OOM adding to all new
usages as per C malloc which is untidy.

For now to remove this optimisation unstable code is best as it is
likely to not be present anyway, and OOM will cause a system library
exception instead, even without exceptions enabled in the application
code.
2014-01-15 02:36:19 +00:00
Strangerke
408f1b3aa3 TONY: Add a reset function in RMWindow in order to group variable initialization 2013-12-17 07:43:58 +01:00
D G Turner
53c3bff277 TONY: Add missing getDebugger() for engine API. 2013-12-07 02:32:29 +00: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
Strangerke
f05afb9bff TONY: Janitorial - Fix spacing errors 2013-11-23 10:26:29 +01:00
Torbjörn Andersson
61f59997be TONY: Initialise _buf and _origBuf in second RMGfxBuffer constructor
I think this fixes CID 1086888, but I haven't been able to find
where in the game this constructor is used.
2013-10-13 09:15:59 +02:00
D G Turner
93c3375244 TONY: Fix compilation on FreeBSD with C++-11 enabled.
This is part of bug #3615056 and is due to NULL being defined as
nullptr when C++-11 is enabled, which is not valid being assigned
to a integer value.
2013-09-28 01:37:15 +01:00
Johannes Schickel
b125aa953b TONY: Take advantage of Surface::getPixels. 2013-08-03 04:02:53 +02:00
Johannes Schickel
f30eb4ea32 TONY: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 02:52:34 +02:00
Alyssa Milburn
5b6d3078c9 TONY: Add a hack to work around amigaos4 issues. 2013-08-02 00:01:11 +02:00
Alyssa Milburn
9c02f5b593 TONY: Fix thumbnails on BE. 2013-08-02 00:01:10 +02:00
Alyssa Milburn
d1795a21bc TONY: Fix savegames on BE (this breaks compatibility). 2013-08-02 00:01:10 +02:00
Alyssa Milburn
275c65c272 TONY: Simplify thumbnail loading code. 2013-08-02 00:01:10 +02:00
Torbjörn Andersson
da17953c12 TONY: Remove debug message from last commit. Oops. 2013-07-19 21:19:03 +02:00
Torbjörn Andersson
c44d6ae60c TONY: Fix parameter to RMGfxSourceBuffer8RLEWordAA::init()
The method it is meant to override uses "const byte *buf" so this
one should too. I don't know if/when it's called, but fuzzie tells
me it should be a harmless change. Hopefully fixes CID 1003892.
2013-07-19 21:10:50 +02:00
Strangerke
daebd2657a TONY: Add detection for German "Shoe Box", bug #3582420 2013-06-11 08:11:45 +02:00
Strangerke
9c0297bc9e TONY: Add detection for English version unpacked
Thanks Tomaso for reporting the problem
2013-06-11 07:54:49 +02:00
Torbjörn Andersson
ad38029e6e TONY: Remove varargs from mpalQueryCORO(). CID 1002105
It didn't always reach va_end(), but rather than adding a call it
makes more sense to just drop the varargs from it, since it didn't
use it anyway.
2013-06-10 20:07:33 +02:00
Torbjörn Andersson
1cc0e9cb88 TONY: Fix memory leak on save game failure (CID 1003579)
Though shouldn't it also alert the user to the failure?
2013-06-02 22:13:59 +02:00
Torbjörn Andersson
9d28a6f531 TONY: Fix potential memory leak
Unfortunately, I'm not sure where and when this function is called.
But this should be correct. CID 1003575
2013-06-02 22:00:25 +02:00
D G Turner
e9b04d018f TONY: Fix compiler warnings about possible "used before set" variables.
Looking at this code and the code in clip2D, this shouldn't happen,
but this will prevent any future issues.
2012-11-20 19:05:45 +00:00
D G Turner
459752f20b TONY: Fixed scripted exit to use engine method, rather than error().
This fixes bug #3586252 ("TONY: Game errors out when exiting via the
menu").
2012-11-14 09:37:19 +00:00
D G Turner
43520ce4f3 TONY: Fix image loading on BE systems.
Thanks to wjp and fuzzie for working out the cause.
2012-11-13 09:18:28 +00:00
Willem Jan Palenstijn
8df3c1458d TONY: Fix resource loading on BE systems
Thanks to digitall for debugging and testing.
2012-11-12 08:42:20 +01:00
D G Turner
e782065591 TONY: Fix compiler warnings in Input class. 2012-11-12 03:48:19 +00:00
D G Turner
b8c1b46ae0 TONY: Cleanup whitespace formatting.
This is mainly removal of extraneous blank lines, reformatting indents
to tab characters and other minor non-functional changes to improve
compliance with Code Formatting Conventions.
2012-11-12 00:39:20 +00:00
D G Turner
0a709d955d TONY: Replace Input class internal buffers with Common standard.
The mouse position is now represented internally by Common::Point and
the keyDown buffer is an array of Common::Keycode values for depressed
keys.
2012-11-11 23:14:17 +00:00
D G Turner
659a4b8b14 TONY: Remove further unused code from Input class. 2012-11-11 23:14:02 +00:00
D G Turner
535180dc7b TONY: Remove unused functions from Input class. 2012-11-11 23:13:47 +00:00
Willem Jan Palenstijn
da0490f9b2 TONY: Fix endianness issue when saving/loading inventory 2012-11-02 21:26:34 +01:00
Paul Gilbert
b403a6f3ac Merge pull request #290 from rasky/fix_sfx_volumes
TONY: fix volumes of sound effects.
2012-11-01 03:38:04 -07:00
Willem Jan Palenstijn
38b8b6eff1 TONY: Fix AmigaOS build (bug #3580541) 2012-10-27 17:59:21 +02:00
Giovanni Bajo
79d7d3d708 TONY: fix volumes of sound effects.
The game was using a logarithmic scale (through DirectSound)
so we need a log->linear conversion to feed the mixer.
2012-10-26 20:29:04 +02:00