Commit Graph

351 Commits

Author SHA1 Message Date
Sven Hesse
ffb3de5bc0 SWORD25: Fix some invalid writes / crashes
On my system, sizeof(png_uint_32) == 8, while sizeof(int) == 4.

svn-id: r55504
2011-01-24 14:59:21 +00:00
Filippos Karapetis
6dc0999c6d SWORD25: Cleanup
svn-id: r55501
2011-01-24 14:00:55 +00:00
David Turner
9961e054d0 SWORD25: Fix linker breakage from DECLARE_SINGLETON() in renderObjectRegistry.h.
svn-id: r55490
2011-01-24 00:46:06 +00:00
Filippos Karapetis
092da73929 SWORD25: Documented a FIXME
svn-id: r55489
2011-01-24 00:04:32 +00:00
Filippos Karapetis
1f1cb1f140 SWORD25: Removed the logErrorLn and logWarningLn wrappers
svn-id: r55488
2011-01-24 00:03:09 +00:00
David Turner
2c2ef3973a SWORD25: Fix GCC Compilation Warnings.
svn-id: r55482
2011-01-23 20:51:16 +00:00
Eugene Sandulenko
caa6684752 VIDEO: Move video classes to Video:: namespace
svn-id: r55479
2011-01-23 19:08:09 +00:00
Filippos Karapetis
3d15871ee2 SWORD25: Removed several unused methods of the Vertex class, and made a subclass of the Common::Point class
svn-id: r55478
2011-01-23 19:06:35 +00:00
Filippos Karapetis
b17d4ada86 SWORD25: Removed several unused methods from the Polygon class
svn-id: r55477
2011-01-23 19:02:36 +00:00
Torbjörn Andersson
85406467e2 SWORD25: Remove unused yuvtorgba.h file
svn-id: r55475
2011-01-23 17:52:29 +00:00
Eugene Sandulenko
806ccf5d25 GRAPHICS: Move graphics/video/ to video/. Step 1/2
svn-id: r55473
2011-01-23 17:14:43 +00:00
Filippos Karapetis
36ed9be335 SWORD25: Fixed compilation (oops...)
svn-id: r55472
2011-01-23 16:22:15 +00:00
Filippos Karapetis
160517da93 SWORD25: Simplified the YUV->RGBA conversion code
svn-id: r55469
2011-01-23 16:14:51 +00:00
Torbjörn Andersson
806defa98e SWORD25: Fix format string warnings.
svn-id: r55465
2011-01-23 15:07:46 +00:00
Filippos Karapetis
1250785822 SWORD25: Replaced BS_ASSERT() with assert()
svn-id: r55464
2011-01-23 15:01:24 +00:00
Filippos Karapetis
04af67d736 SWORD25: Fixed compilation
svn-id: r55463
2011-01-23 14:57:21 +00:00
Filippos Karapetis
00a0f8d15d SWORD25: Removed the custom log class and replaced it with warning/error/debugC calls
svn-id: r55462
2011-01-23 14:49:50 +00:00
Eugene Sandulenko
c528765814 SWORD25: getSoundTime() is not used. Remove it.
svn-id: r55320
2011-01-19 07:40:30 +00:00
Eugene Sandulenko
4bc730f256 SWORD25: Strip off unportable functions
svn-id: r55319
2011-01-19 07:40:10 +00:00
Torbjörn Andersson
da42014402 SWORD25: Fix main menu button text colour
In the other cases I've found in the code, the colour components are
stored in the order B, G, R and A. Assume that's the case here too. I
hope that is correct. It doesn't seem to break anything obvious.

svn-id: r55255
2011-01-16 08:15:47 +00:00
Torbjörn Andersson
aa9786604c JANITORIAL: Remove unnecessary semicolon.
svn-id: r55077
2010-12-31 15:19:42 +00:00
Matthew Hoops
375f32fbe9 VIDEO: Make VideoDecoder::decodeNextFrame() return a const Surface pointer
svn-id: r54927
2010-12-16 01:35:13 +00:00
Max Horn
6edc86a19b DEBUG: Let GUI::Debugger::preEnter and postEnter (un)pause the engine
svn-id: r54815
2010-12-07 18:54:21 +00:00
Max Horn
b3ba5f6ec5 SWORD25: Fix warning about uninitialized DijkstraNode::parentIter
svn-id: r54551
2010-11-28 21:33:27 +00:00
Max Horn
5d2b77899f SWORD25: Fix warning: deref type-punned pointer breaks strict-aliasing rules
svn-id: r54550
2010-11-28 21:33:02 +00:00
Max Horn
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03:07 +00:00
Max Horn
ee4770ffb6 ENGINES: Change 'colour' to 'color'
Only changed this in engines where 'color' was/is already used
almost exclusively

svn-id: r54288
2010-11-17 12:22:08 +00:00
Max Horn
abe1959d36 COMMON: Simplify DECLARE_SINGLETON macro
This makes it possible to write
  DECLARE_SINGLETON(foo);
instead of
  DECLARE_SINGLETON(foo)
without causing a warning about an extra semicolon.
The extra semicolon helps some editors at parsing the C++ code.

svn-id: r54258
2010-11-16 08:23:13 +00:00
David Turner
7ad677afc8 SWORD25: Added basic debugging console to engine (Command Key Disabled)
Since SWORD25 uses Debug Channels, this allows for the interactive setting of debugflags as well as providing a base for adding further debugging commands.

However, this is not currently usable as the command key code is commented out.
This is due to the event loop which reads keyboard input being buried 2 object layers below the Engine VM object and I am unsure how the engine development team would want this exposed / interfaced.

svn-id: r54184
2010-11-10 04:30:24 +00:00
Max Horn
44c6a90643 LUA: Tweak lua_ident to not conflict with SVN keywords (since this is not used at all, only used to 'mark' binaries compiling Lua in, I think we could safely remove it, too)
svn-id: r54056
2010-11-04 00:31:50 +00:00
Max Horn
0f7645dda9 Trying to fix weird keyword expansion quirk
svn-id: r54055
2010-11-04 00:13:23 +00:00
Max Horn
0c018bf392 SWORD25: cleanup
svn-id: r54045
2010-11-03 00:19:28 +00:00
Max Horn
438da9b220 SWORD25: Convert printf to debugN
svn-id: r54040
2010-11-02 09:50:45 +00:00
Max Horn
6fa8772bae SWORD25: Replace art_warn/art_die by warning/error
svn-id: r54002
2010-11-01 16:00:35 +00:00
Max Horn
44393b2dc8 ALL: Add code to help stop people from accidentally using "bad" APIs
A new header file common/forbidden.h is included by scummsys.h and it
re-#defines numerous symbols like fopen(), fread(), system(), etc. with
garbage, in order to provoke compile errors in any code using them.

If a .cpp file really *must* use any of these (e.g. because it is a
backend file), then these redefinitions can be disabled by #defining
FORBIDDEN_SYMBOL_ALLOW_ALL as the first thing in the .cpp file. Whenever
this is done, an explanatory comment should be added.

Note that this system cannot catch all "bad" usages (notably the Lua
code in the sword25 engine), as it can only work if scummsys.h is
included.

svn-id: r53961
2010-10-30 21:27:42 +00:00
Torbjörn Andersson
71e08336c0 SWORD25: Play the cutscene audio
Once the audio buffer has been queued in the audio stream, the Theora
decoder is no longer responsible for it. It has to allocate a new
audio buffer for the next set of audio data.

Of course, at the moment the audio is pretty useless because the
playback speed is all wrong.

svn-id: r53939
2010-10-30 09:17:21 +00:00
Torbjörn Andersson
09c678e363 SWORD25: Fix hanging cutscene video
Even though our video player does not (yet) support audio, we need to
adjust the values of _audiobufFill and _audiobufReady as if it did, or
it will never realize it has reached the end of the cutscene.

Also fixes what looks like a typo in audio data clipping.

svn-id: r53938
2010-10-30 08:21:10 +00:00
Paul Gilbert
919d79f091 SWORD25: Added a hack to allow the new English voice pack to be detected
svn-id: r53937
2010-10-30 04:30:42 +00:00
Johannes Schickel
2c042c263b SWORD25: Comment out unused static variable.
svn-id: r53909
2010-10-28 22:45:15 +00:00
Paul Gilbert
b53d12da23 SWORD25: Standardised savegame filenames, start on advanced engine features
svn-id: r53901
2010-10-28 09:51:56 +00:00
Max Horn
b2fa7e58a3 SWORD25: Start to rename read/write methods of *PersistenceBlock classes
All should be renamed to reduce risk of accidental incorrect use.

svn-id: r53899
2010-10-28 00:26:25 +00:00
Max Horn
cf3551525f SWORD25: Get rid of CallbackRegistry
svn-id: r53898
2010-10-28 00:25:33 +00:00
Max Horn
7e1d78cab1 SWORD25: Simplify InputEngine::(un)persist
svn-id: r53897
2010-10-28 00:24:53 +00:00
Max Horn
aaf7ffdd5c SWORD25: Fix keyboard state handling
Previously, you could get the game into a state where it would think a
key was constantly being pressed. E.g. by pressing 'p' several times
quickly in a row, the game would end in a state where it endlessly
toggled between pause mode and regular mode.

svn-id: r53878
2010-10-27 15:53:53 +00:00
Max Horn
95353b0e60 SWORD25: Use ScummVM keycodes
This should enable use of F-keys in BS25. Most of the KEY_*
constants are not used by the scripts anyway.

svn-id: r53877
2010-10-27 15:53:36 +00:00
Max Horn
b5e41b3a82 SWORD25: Fix out of bounds writes when pressing keys like ctrl or F-keys
This fixes a crash one got by quitting via the GMM.

svn-id: r53876
2010-10-27 15:15:59 +00:00
Max Horn
8217efc74a SWORD25: Disable script triggered screenshots
svn-id: r53840
2010-10-25 23:34:36 +00:00
Max Horn
ed0de8462d SWORD25: Add FIXME about savegame names; cleanup
svn-id: r53839
2010-10-25 23:34:12 +00:00
Max Horn
a783285625 SWORD25: Simplify FS 'wrapper' code a bit, add FIXME comments
The save system of this engine currently partially bypasses the
SaveFileManager API, by (abusing) the fact that the Lua engine allows
creating files in arbitrary places (it exposes fopen, fread, fwrite
etc.). This is used to create a 'config.lua' configuration file. This makes it non-portable.

In addition, the filenames used for the savestates ("0.b25s") do not
comply with our naming conventions for engine savestates.

It should be possible to overcome all this, but it might require hacking
the Lua engine; or we could try to replace some of the BS2.5 script
functions with our own, dynamically.

svn-id: r53838
2010-10-25 23:19:39 +00:00
Max Horn
e0d5db0bb8 SWORD25: 'Implement' RTL support & add TODOs about missing feature support
svn-id: r53837
2010-10-25 22:41:48 +00:00