Commit Graph

591 Commits

Author SHA1 Message Date
md5
68118bdf7a SWORD25: Added some FIXMEs in the save game and thumbnail code
Also, translated some comments
2011-05-05 12:54:32 +03:00
md5
9abc42019a SWORD25: Remove unused code 2011-05-05 12:54:31 +03:00
Johannes Schickel
b2693c81ec SWORD25: Fix compilation, caused by zlib.h including unistd.h 2011-05-02 17:19:54 +02:00
Johannes Schickel
71bdb86e02 Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16

Conflicts:
	graphics/png.cpp
2011-05-01 16:54:45 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn
73f04118f3 COMMON: Rename Error to ErrorCode, introduce new Error class 2011-04-18 18:22:02 +02:00
Johannes Schickel
da734a4af0 ALL/GRAPHICS: Remove Surface::bytesPerPixel. 2011-04-17 21:27:34 +02:00
Johannes Schickel
c3669443ec SWORD25: Prefer Surface::format over Surface::bytesPerPixel. 2011-04-17 20:58:07 +02:00
Johannes Schickel
b3f0eb8a9d SWORD25: Prefer Surface::create taking a PixelFormat over the one taking a byte depth.
I am not 100% sure whether the surfaces all use the same format as the screen,
but a quick test showed that it still works fine. In case this is wrong please
set them up with the correct format.
2011-04-17 16:31:49 +02:00
md5
8f09386ec8 SWORD25: Removed the duplicate header files inside the pluto/pdep directory 2011-04-15 00:34:03 +03:00
md5
15b921327e SWORD25: Removed several unused files from the pluto directory 2011-04-15 00:33:59 +03:00
Alyssa Milburn
eef6c5dd90 SWORD25: Silly whitespace fix. 2011-04-14 23:02:18 +02:00
Alyssa Milburn
8305f9c2a0 SWORD25: Simplify text rendering code slightly. 2011-04-14 21:08:52 +02:00
Alyssa Milburn
6ecc460b41 SWORD25: Fix rendering on big-endian. 2011-04-14 21:06:06 +02:00
Alyssa Milburn
a762173794 SWORD25: Always create the MoviePlayer, even without USE_THEORADEC. 2011-04-14 18:45:45 +02:00
Max Horn
bb6a5c3685 SWORD25: more translated comments from gfx/image (patch #3238507)
Plus some extra white space changes by myself.
2011-03-25 15:00:41 +01:00
Paul Gilbert
b3471354d0 SWORD25: Commit submitted patch of German comments translated to English 2011-03-24 20:48:58 +11:00
Paul Gilbert
649a5adb10 SWORD25: Commit of patch translating German comments to English 2011-03-23 22:25:33 +11:00
Max Horn
bf4dc80419 SWORD25: Reduce code duplication; formatting 2011-03-21 14:36:25 +01:00
D G Turner
2907f7d652 SWORD25: Fix MSVC Compilation. 2011-03-19 22:11:33 +00:00
dhewg
e5b6146b78 SWORD25: Init volume levels on startup 2011-03-19 16:49:16 +01:00
dhewg
2def212de7 ALL: s/PI/M_PI/
Tip of the day: git grep -w PI
2011-03-19 11:24:06 +01:00
Max Horn
5ee5dd76f5 SWORD25: C++ify some code, remove obsolete stuff 2011-03-18 14:43:52 +01:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn
805a5b2996 VIDEO: In overloaded methods, invoke correct parent implementation
This should not cause any code behavior changes at this time, but if any
of the intermediate VideoDecoder classes ever starts to overload stuff,
this would become important.

svn-id: r55841
2011-02-09 00:12:58 +00:00
Max Horn
357c225f64 VIDEO: Rename VideoDecoder::load() to loadStream()
svn-id: r55810
2011-02-07 17:54:16 +00:00
Filippos Karapetis
832cfddf34 SWORD25: Cache related changes
- Increase the resource cache limits
- Added a check before forcing resources to be freed
- Only force free image and animation resources, with a warning. It seems like there is
a bug in the resource reference code and several bitmap resources are not freed - added
a FIXME
- Clarify that initializeAnimationResource() is used with XML resources

svn-id: r55736
2011-02-02 19:32:04 +00:00
Filippos Karapetis
a86cb87b98 GRAPHICS: Implemented a PNG decoder, and set it as default for the sword25 engine
libpng is still needed for PNG encoding (for thumbnails in saved games of sword25), but
since we'll probably drop support for the original saved games anyway, the PNG encoding
code will ultimately be removed

svn-id: r55723
2011-02-02 15:43:45 +00:00
Filippos Karapetis
a4a09ac284 SWORD25: Added a cache minimum and maximum limit, so that the resources loaded will always be inside these limits. Resources can now be forcefully unlocked when the upper limit is reached
svn-id: r55722
2011-02-02 15:35:05 +00:00
Filippos Karapetis
b7362876dd SWORD25: Disabled the video save/load code, and made it error out instead.
Videos are never saved or loaded, thus when this happens, it probably indicates a game bug
or a corrupted saved game

svn-id: r55667
2011-01-30 21:00:23 +00:00
Filippos Karapetis
d4e1260b7e SWORD25: Some optimizations to the Theora decoder
- Optimized and cleaned up translateYUVtoRGBA()
- Disabled a lot of seeking-related functionality
- Replaced some calloc() calls, used for audio buffer creation with malloc()

svn-id: r55666
2011-01-30 20:39:02 +00:00
Filippos Karapetis
9d6e398e74 SWORD25: Added alternative code for video frame blitting (currently disabled)
svn-id: r55664
2011-01-30 20:36:17 +00:00
Filippos Karapetis
2e42c2d11d SWORD25: Some translations, and a bugfix. Disabled a hack.
Translated some comments, and pushed the indirect rendering define to the header
file, so that the engine won't try and update the screen with direct movie rendering.
Also, the thumbnail hack has been disabled, as it doesn't really work (at least not for
me: all the thumbnails are gray)

svn-id: r55663
2011-01-30 20:34:47 +00:00
Filippos Karapetis
1da472a2db SWORD25: Translated some comments, and removed some superfluous ones
svn-id: r55613
2011-01-29 10:56:34 +00:00
Filippos Karapetis
42670975ac SWORD25: Removed a lot of debug/unimplemented/unused functions
svn-id: r55600
2011-01-28 20:52:52 +00:00
Filippos Karapetis
5978d8f63d SWORD25: Marked several unused LUA callbacks as dummy functions. Some cleanup.
svn-id: r55597
2011-01-28 17:29:08 +00:00
Filippos Karapetis
eb59444d1e SWORD25: Removed some now unused variables
svn-id: r55596
2011-01-28 17:03:15 +00:00
Filippos Karapetis
7ed5a92823 SWORD25: Removed some more unused/unimplemented debug code
svn-id: r55595
2011-01-28 17:02:02 +00:00
Filippos Karapetis
c63ff39a7f SWORD25: Resources are now cleaned up correctly
The original checked the total amount of memory occupied by all resources. This has been
changed to a maximum number of simultaneous resources instead, so the game resources
are no longer leaked. Also disabled the unused or debug functions getUsedMemory(), 
setMaxMemoryUsage(), setMaxMemoryUsage(), isLogCacheMiss(), setLogCacheMiss(). Performed
some cleanup on code related to the above.

svn-id: r55594
2011-01-28 16:54:55 +00:00
Filippos Karapetis
a2f9600179 SWORD25: Disabled the mechanism which precaches all of the game's resources on startup.
This reduced the initial memory used by 100MB for me, though the game keeps allocating
new resources in each scene without deleting them, because of the missing functionality in
getUsedMemory(). This change also slightly reduces the loading time on game startup.

svn-id: r55593
2011-01-28 16:13:12 +00:00
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
Max Horn
e761f76653 SWORD25: Get rid of most of the 'kernel service/superclass' code
svn-id: r53835
2010-10-25 22:41:25 +00:00
Max Horn
90dcc8c91a SWORD25: Get rid of classes ScummVMWindow and Window
svn-id: r53832
2010-10-25 21:51:11 +00:00
Max Horn
518526ba2f SWORD25: Remove some dead code; cleanup
svn-id: r53760
2010-10-24 01:53:32 +00:00
Max Horn
fa0151683c SWORD25: Replace ResourceManager's hash table by a Common::HashMap
svn-id: r53759
2010-10-24 01:53:01 +00:00
Max Horn
48d15398e5 SWORD25: Get rid of kernel/string.h
svn-id: r53758
2010-10-24 01:52:27 +00:00
Max Horn
2a987c4a31 SWORD25: Simplify & optimize PNG reading code
The interlaced part is untested since I do not know any place
in the game where interlaced data is used.

svn-id: r53757
2010-10-24 01:33:24 +00:00
Max Horn
4d6fb4e768 SWORD25: Get rid of colorFormat parameter in PNGLoader API
Only CF_ARGB32 was supported anyway.

svn-id: r53756
2010-10-24 01:32:52 +00:00
Max Horn
7cc8811a5c SWORD25: Merge classes PNGLoader, ImageLoader and ImageLoaderManager
This looses some flexibility when it comes to supporting other image
formats. But since the game does not use other image formats, this seems
rather irrelevant, compared to how much simpler the code now is.

svn-id: r53755
2010-10-24 01:32:15 +00:00
Max Horn
1e16d576ca SWORD25: Merge B25SLoader into PNGLoader
svn-id: r53754
2010-10-24 01:31:30 +00:00
Max Horn
85e3ddc309 SWORD25: Add ImageLoaderManager, get rid of last globally constructed object
This also gets rid of an evil use of atexit.

svn-id: r53753
2010-10-24 01:30:53 +00:00
Max Horn
2da4469686 SWORD25: Remove outdated comments
svn-id: r53752
2010-10-24 01:29:59 +00:00
Max Horn
360f67636b SWORD25: Register LUA callbacks insider registerScriptBindings() methods
Previously, the constructor of an anonymous global object was used to do
this, for no apparent reason.
However, maybe there was a hidden reason which I missed, so this change
might cause regressions. I.e., please test.

svn-id: r53735
2010-10-23 15:44:33 +00:00
Max Horn
c483a22f2a SWORD25: Get rid of global SharedPtr instances
svn-id: r53734
2010-10-23 15:44:04 +00:00
Paul Gilbert
14e82dbe7f SWORD25: Added description field to savegames
This stores the date and time of when the game was saved, since ScummVM doesn't support getting a file's age like the original engine did.

svn-id: r53638
2010-10-20 11:11:09 +00:00
Paul Gilbert
66ecd08868 SWORD25: Fix to correctly write game state to savegame files
svn-id: r53637
2010-10-20 10:53:50 +00:00
Eugene Sandulenko
6629efc676 SWORD25: Enforced code formatting rules in rest of the engine
svn-id: r53626
2010-10-19 21:03:33 +00:00
Eugene Sandulenko
ae78107e2a SWORD25: Enforce code naming conventions in gfx/*
svn-id: r53625
2010-10-19 20:54:30 +00:00
Eugene Sandulenko
f3becaddf1 SWORD25: Enforce code naming conventions in gfx/image/imageloader*
svn-id: r53623
2010-10-19 20:52:47 +00:00
Eugene Sandulenko
bbd95da899 SWORD25: Fix engine exit when running without theoradec
svn-id: r53622
2010-10-19 20:52:06 +00:00
Eugene Sandulenko
d94435eebd SWORD25: Enforce code naming conventions in gfx/graphicengine*
svn-id: r53621
2010-10-19 20:51:21 +00:00
Eugene Sandulenko
0d1d481894 SWORD25: Properly implement GraphicEngine::fill()
Now all transitions and dimming out screen at exit dialog is supported.

svn-id: r53620
2010-10-19 20:50:29 +00:00
Paul Gilbert
6a1e874447 SWORD25: Fix for Valgrind identified memory leak
svn-id: r53611
2010-10-19 10:03:38 +00:00
Max Horn
4caa1d40a8 SWORD25: Simplify log listener code (and get rid of another global constructor)
svn-id: r53610
2010-10-19 09:44:48 +00:00
Max Horn
8f5eee67db SWORD25: Destroy singletons upon engine exit (untested, may lead to crash upon exit)
svn-id: r53609
2010-10-19 09:44:29 +00:00
Max Horn
d6b7ebab16 SWORD25: Some code cleanup
svn-id: r53608
2010-10-19 09:44:13 +00:00
Max Horn
ddf0a3d80c SWORD25: Move BS_ServiceInfo to service_ids.h and turn it into a POD struct
svn-id: r53607
2010-10-19 09:43:53 +00:00
Max Horn
88bca8e13d SWORD25: Optimize ReverseArray, move it to only place it is used
svn-id: r53606
2010-10-19 09:43:31 +00:00
Max Horn
ebf9911649 SWORD25: Work around for bug in Mac OS X 10.2 SDK
svn-id: r53604
2010-10-19 09:42:48 +00:00
Paul Gilbert
3b29bda9a1 SWORD25: Added operator= to Polygon class
This fixes a corruption where vertice arrays were being copied directly and destroyed prematurely

svn-id: r53603
2010-10-19 09:23:20 +00:00
Paul Gilbert
355032d4f9 SWORD25: Fix cppcheck warnings in BS_Log::LogPrefix
The LogPrefix method isn't currently used, but I'm fixing it just in case it's ever used again

svn-id: r53602
2010-10-19 08:12:04 +00:00
Torbjörn Andersson
c1a3689a5d SWORD25: Fix cppcheck warning
svn-id: r53600
2010-10-19 04:59:45 +00:00
Johannes Schickel
70566beb78 SWORD25: Since ssize_t might not be available on all platforms use size_t for the pointer cast now.
svn-id: r53594
2010-10-18 22:30:44 +00:00
Johannes Schickel
a821d65efe SWORD25: Fix compilation on 64bit arches by casting a pointer to ssize_t instead of int.
This should be no permanent solution. I added a small fixme comment near the
cast so it won't be forgotten.

svn-id: r53593
2010-10-18 22:17:41 +00:00
Johannes Schickel
521751e8d7 SWORD25: Use const_cast to cast away constness.
This fixes a few warnings/errors in the LUA code. I added some FIXMEs at the
places where the casts happen, since usually this casting indicates bad
design.

svn-id: r53592
2010-10-18 22:17:18 +00:00
Eugene Sandulenko
c360aa9d14 SWORD25: Fix warning
svn-id: r53569
2010-10-18 17:13:03 +00:00
Eugene Sandulenko
3feac393b0 SWORD25: Renamed Lua .c files to .cpp and make it compilable
svn-id: r53568
2010-10-18 17:12:00 +00:00
Paul Gilbert
81f71f48c2 SWORD25: Fix Valgrind reported uninitialised errors
svn-id: r53565
2010-10-18 10:58:22 +00:00
Paul Gilbert
ae63e20661 SWORD25: Fix for Valgrind identified errors
svn-id: r53563
2010-10-18 10:26:27 +00:00
Ori Avtalion
e6ae9c4d98 SWORD25: Use C-style comments in C files
svn-id: r53538
2010-10-16 12:04:22 +00:00
Ori Avtalion
ea9679cf72 SWORD25: Update svn keywords
svn-id: r53537
2010-10-16 12:02:59 +00:00
Torbjörn Andersson
9744167adc SWORD25: Fix infinite recursion
If I understand this, we don't need to call Kernel::GetInstance()
when we are already in the Kernel class. In this particular case,
_RegisterScriptBindings() is called from the Kernel constructor, so
it gets called again and again because _Instance hasn't yet been set.

svn-id: r53512
2010-10-15 20:01:13 +00:00
Max Horn
4ccce19876 ENGINES: Enhance namespace comments a bit
svn-id: r53484
2010-10-15 12:48:19 +00:00
Max Horn
34cc54eaa9 Add doxygen comment for namespaces of several engines.
This is an empty template which ideally engine maintainers
would update and complete with concrete information...

svn-id: r53481
2010-10-15 12:28:56 +00:00
Max Horn
36cd5caf95 COMMON: Add XMLParser::parseIntegerKey variant accepting a Common::String
Almost all places where we used XMLParser::parseIntegerKey were using
it like this:
  XMLParser::parseIntegerKey(str.c_str(), ...)
Since this makes the code harder to read, I overloaded the method to
also accept Commmon::String directly.
Also removed all .c_str() invocations where necessary.

svn-id: r53479
2010-10-15 12:19:13 +00:00
Max Horn
f52b31a05f SWORD25: Typo, cleanup
svn-id: r53478
2010-10-15 12:18:41 +00:00
Max Horn
550073ee04 SWORD25: Do not use Kernel::GetService directly anymore
svn-id: r53477
2010-10-15 12:18:19 +00:00
Max Horn
2b5de8c892 SWORD25: Adapted a few things to our code formatting conventions; translated rest of graphicengine.h to german
svn-id: r53476
2010-10-15 12:17:20 +00:00
Max Horn
f8c15c90ff SWORD25: Fix a few global constructor warnings
svn-id: r53475
2010-10-15 12:16:57 +00:00
Paul Gilbert
96585f24d9 SWORD25: Fix unloading of movies so the menu animation properly loops
svn-id: r53474
2010-10-15 10:52:23 +00:00
Eugene Sandulenko
f67bbc4ecc SWORD25: Attempt to optimize movie rendering
Current code makes about 5 blits of each frame which is a huge
overhead. This code is an attempt to make that 1. Doesn't work yet
as the rendering pipe keeps blitting invisible pictures.

svn-id: r53459
2010-10-14 20:44:44 +00:00
Eugene Sandulenko
e0b69a3061 SWORD25: Remove lua.c since it is not needed
svn-id: r53452
2010-10-13 22:23:09 +00:00
Max Horn
9ca0a6147b SWORD25: Get rid of (deprecated) access to libpng io_ptr
Unfortunately I cannot test this, so watch our for regressions.

svn-id: r53451
2010-10-13 22:18:57 +00:00
Max Horn
810f087599 SWORD25: Fix empty loop body & conversion warnings
svn-id: r53450
2010-10-13 22:18:32 +00:00
Torbjörn Andersson
e52b77dc7b SWORD25: Worked around crash in options dialog.
I don't really know if this is correct, but aesthetically it goes well
with how the scale factor is treated.

svn-id: r53447
2010-10-13 20:05:21 +00:00
Johannes Schickel
bc2781fdb3 SWORD25: Semi-colon cleanup.
svn-id: r53446
2010-10-13 20:04:50 +00:00
Torbjörn Andersson
bbbfdad458 SWORD25: Check if _LogFile has been created before flushing.
svn-id: r53445
2010-10-13 19:33:12 +00:00
Matthew Hoops
f9910fd0ee SWORD25: Don't compile lua.c
lua.c has its own main function which we don't want. Compiling this in for me gives me a Lua console on startup (which probably isn't a good thing).

svn-id: r53442
2010-10-13 18:13:24 +00:00
Filippos Karapetis
2880ebdeb4 Fixed ifdef. I'm too tired today :/
svn-id: r53440
2010-10-13 17:45:20 +00:00
Filippos Karapetis
96e05a1ff9 SWORD25: Hopefully fix compilation when libtheora is not present
svn-id: r53439
2010-10-13 17:42:56 +00:00
Filippos Karapetis
a52f986125 SWORD25: Use $(CXX) -x c to build C files (hopefully this fixes compilation)
svn-id: r53438
2010-10-13 17:33:13 +00:00
Filippos Karapetis
737c2dd0ba SWORD25: Partially revert commit #53389 and add the custom rule for C files
again, so that LUA can be compiled. It's a hack but at least it allows
compilation of C files for now

svn-id: r53437
2010-10-13 17:05:44 +00:00
Max Horn
9755c63292 SWORD25: Invoke parent's class copy constructor
svn-id: r53432
2010-10-13 15:41:55 +00:00
Max Horn
9b4d41d2d2 SWORD25: Convert object registries to singletons
svn-id: r53431
2010-10-13 15:41:34 +00:00
Max Horn
8f4f0d16fc SWORD25: Renamed getInstance() -> instance()
svn-id: r53430
2010-10-13 15:41:00 +00:00
Filippos Karapetis
17f9913a24 SWORD25: Oops, atan2() takes two arguments
svn-id: r53429
2010-10-13 15:06:14 +00:00
Max Horn
fa8275f27b SWORD25: Don't even compile theora related code when that lib is not present
svn-id: r53428
2010-10-13 15:00:51 +00:00
Filippos Karapetis
a3d3e94a8d SWORD25: Extended Mac OSX compilation fix for sqrtf and atan2f
svn-id: r53426
2010-10-13 14:40:32 +00:00
Filippos Karapetis
090540504d SWORD25: Hopefully fixed compilation under Mac OSX, Solaris and mingw32
Taken from sound/softsynth/mt32/tables.cpp lines 28-41 (thanks LordHoto)

svn-id: r53425
2010-10-13 14:33:47 +00:00
Filippos Karapetis
de3534fcd3 SWORD25: Include common/scummsys.h in places where USE_THEORADEC is used
svn-id: r53423
2010-10-13 14:13:48 +00:00
Filippos Karapetis
d83a70af43 SWORD25: Renamed ENABLE_THEORADEC to USE_THEORADEC (like in configure)
svn-id: r53418
2010-10-13 13:32:30 +00:00
Filippos Karapetis
f2d9319d9e SWORD25: Renamed ENABLE_THEORA to ENABLE_THEORADEC (like in configure)
svn-id: r53417
2010-10-13 13:27:55 +00:00
Filippos Karapetis
681ec59292 SWORD25: Added a ENABLE_THEORA define inside fmv/theora_decoder.h
This define can be used to disable building of the Theora decoder, and thus makes
libtheora optional (therefore resolving an item in the Sword25 TODO). Disabling the
Theora decoder will effectively disable the game's videos

Note that running the game with the Theora decoder disabled is still untested

svn-id: r53416
2010-10-13 13:07:16 +00:00
Sven Hesse
ff0160050a SWORD25: Force cast to uint instead of unsigned long long
As per Fingolfin's request, because apparently there's no long long
in the C++ standard; and ScummVM's hashmap needs uint.

svn-id: r53413
2010-10-13 11:42:17 +00:00
Filippos Karapetis
c81da6dcb6 SWORD25: Silenced MSVC false positive about a potentially uninitialized variable
svn-id: r53412
2010-10-13 11:32:08 +00:00
Filippos Karapetis
80c7fcede0 SWORD25: Remove the unused LUA compiler
svn-id: r53411
2010-10-13 11:24:53 +00:00
Sven Hesse
ab57b38fdf SWORD25: Resolve ambigous write() call on 64 bit systems
svn-id: r53410
2010-10-13 11:22:52 +00:00
Sven Hesse
c86c0b6b96 SWORD25: Cast the pointer to unsigned long long
...Instead of to uint, which fails on my 64 bit system where pointers
are 64 bit, but normal ints 32 bit wide.

svn-id: r53409
2010-10-13 11:22:19 +00:00
Filippos Karapetis
a876494fe7 SWORD25: Stop using class names as variable names
svn-id: r53408
2010-10-13 11:20:49 +00:00
Filippos Karapetis
59c6223d49 SWORD25: Fixed signed/unsigned bug
svn-id: r53407
2010-10-13 11:18:34 +00:00
Max Horn
85fa23afbe SWORD25: Get rid of kernel/bs_stdint.h
svn-id: r53405
2010-10-13 10:51:20 +00:00
Max Horn
02322c562c SWORD25: Get rid of Kernel::GetMicroTicks()
svn-id: r53403
2010-10-13 10:41:30 +00:00
Eugene Sandulenko
eb66750137 SWORD25: Enforce code naming conventions in gfx/animation*
svn-id: r53393
2010-10-13 00:10:18 +00:00
Eugene Sandulenko
063cb5d84c SWORD25: Enforced code naming conventions in math/*
svn-id: r53392
2010-10-13 00:09:32 +00:00
Eugene Sandulenko
54ccc8f4c9 SWORD25: Enforced code naming conventions in script/*
svn-id: r53391
2010-10-13 00:08:28 +00:00
Eugene Sandulenko
1e15d8efb7 SWORD25: Enforced code naming conventions in sfx/ and reservice.h
svn-id: r53390
2010-10-13 00:07:27 +00:00
Eugene Sandulenko
9a5415e6f9 SWORD25: Remove custom .c builiding rules
svn-id: r53389
2010-10-13 00:06:53 +00:00
Eugene Sandulenko
bf22def884 SWORD25: Enforce code naming conventions in fmv/*
svn-id: r53388
2010-10-13 00:06:37 +00:00
Eugene Sandulenko
7bcfe1f195 SWORD25: Remove standalone SWF rendering tool
svn-id: r53387
2010-10-13 00:06:12 +00:00
Eugene Sandulenko
3439819232 SWORD25: Add path to art.h include
svn-id: r53386
2010-10-13 00:05:33 +00:00
Eugene Sandulenko
56e05f93a3 SWORD25: Stop polluting global namespace
svn-id: r53385
2010-10-13 00:05:09 +00:00
Eugene Sandulenko
0603a58845 SWORD25: Merged all art* code and cleaned it up
svn-id: r53384
2010-10-13 00:04:40 +00:00
Eugene Sandulenko
91d1d9eb09 SWORD25: Fix startup
svn-id: r53383
2010-10-13 00:04:04 +00:00
Eugene Sandulenko
5790f2a8a1 SWORD25: Add proper copyrights to gfx/image/art*
svn-id: r53382
2010-10-13 00:03:47 +00:00
Eugene Sandulenko
1855cee5e3 SWORD25: Loading >200kb file in memory is no more ugly
svn-id: r53381
2010-10-13 00:03:10 +00:00
Eugene Sandulenko
8582c1ad57 SWORD25: Enforse code naming conventions in PackageManager and Sword25Engine
svn-id: r53380
2010-10-13 00:02:51 +00:00
Eugene Sandulenko
736ae4c07a SWORD25: Return proper path separator
svn-id: r53379
2010-10-13 00:01:59 +00:00
Eugene Sandulenko
f85139bbfa SWORD25: Remove redundant code
svn-id: r53378
2010-10-13 00:01:40 +00:00
Eugene Sandulenko
2143afde6c SWORD25: Add support for language patch
svn-id: r53377
2010-10-13 00:01:04 +00:00
Eugene Sandulenko
d7c6d615bb SWORD25: Fixed vector renderer. Yay!
svn-id: r53376
2010-10-13 00:00:41 +00:00
Eugene Sandulenko
7c1b37e150 SWORD25: Fix transparency effects
svn-id: r53375
2010-10-13 00:00:20 +00:00
Paul Gilbert
3e84d4fe73 SWORD25: Implemented thumbnail loading for savegame list
svn-id: r53374
2010-10-12 23:59:49 +00:00
Paul Gilbert
80521ed5dd SWORD25: Further savegame work, including savegame screenshots
This handles saving (but not yet re-loaded display) of screenshots into savegame files. It also changes the original engine behaviour of temporarily saving the screenshots in a file 'tmp.png' to keeping the raw PNG file data in a memory block.

svn-id: r53373
2010-10-12 23:59:23 +00:00
Eugene Sandulenko
1e07d9561f SWORD25: Add standalone SWF renderer
svn-id: r53372
2010-10-12 23:58:51 +00:00
Eugene Sandulenko
b2003364ff SWORD25: Fix freeze with sound code. Now game is really playable.
svn-id: r53371
2010-10-12 23:57:45 +00:00
Eugene Sandulenko
08ce5575fa SWORD25: Put all sound-related debug output under debug flag.
svn-id: r53370
2010-10-12 23:57:26 +00:00
Eugene Sandulenko
017d461b3a SWORD25: Fix bug with script debug flags
svn-id: r53369
2010-10-12 23:57:05 +00:00
Eugene Sandulenko
2a918b794a SWORD25: Fix warning
svn-id: r53368
2010-10-12 23:56:47 +00:00
Eugene Sandulenko
38d84fd767 SWORD25: Further work on sound.
Have difficulties with understanding how mainmenu sound is stopped.
Currently it is not. Must be some trickery with object creation.

svn-id: r53367
2010-10-12 23:56:28 +00:00
Eugene Sandulenko
3e637a8341 SWORD25: Initial work on sound
svn-id: r53366
2010-10-12 23:56:07 +00:00
Eugene Sandulenko
951549a298 SWORD25: Fix hangup
svn-id: r53365
2010-10-12 23:55:44 +00:00
Eugene Sandulenko
573dafefbb SWORD25: Got rid of FMODExSound class
svn-id: r53364
2010-10-12 23:55:24 +00:00
Eugene Sandulenko
56aac421eb SWORD25: Rename GLImage to RenderedImage
svn-id: r53363
2010-10-12 23:54:47 +00:00
Eugene Sandulenko
cefa844b51 SWORD25: Rename GLImage to RenderedImage
svn-id: r53362
2010-10-12 23:54:30 +00:00
Eugene Sandulenko
e975cc057d SWORD25: Rename GLImage to RenderedImage
svn-id: r53361
2010-10-12 23:54:07 +00:00
Eugene Sandulenko
cd453b3d01 SWORD25: Rename glimage.* to renderedimage.*
svn-id: r53360
2010-10-12 23:53:41 +00:00
Eugene Sandulenko
97164f058c SWORD25: Adjust the paths accordingly
svn-id: r53359
2010-10-12 23:53:07 +00:00
Eugene Sandulenko
2b81beea69 SWORD25: Remove opengl/ directory
svn-id: r53358
2010-10-12 23:52:37 +00:00
Eugene Sandulenko
7dfea5ee4d SWORD25: Moved glimage and swimage to image/
svn-id: r53357
2010-10-12 23:52:13 +00:00
Eugene Sandulenko
69cae2e7dd SWORD25: Got rid of OpenGLGfx class
svn-id: r53356
2010-10-12 23:51:36 +00:00
Eugene Sandulenko
1aa907e815 SWORD25: Remove unnecessary executable flags
svn-id: r53355
2010-10-12 23:51:04 +00:00
Eugene Sandulenko
c59603ddba SWORD25: Get rid of ScummVMInput class
svn-id: r53354
2010-10-12 23:50:19 +00:00
Eugene Sandulenko
ccb1644568 SWORD25: Got rid of ScummVMPackageManager
svn-id: r53353
2010-10-12 23:49:42 +00:00
Eugene Sandulenko
d5ec19960d SWORD25: Make full transparency check earlier
svn-id: r53352
2010-10-12 23:49:12 +00:00
Paul Gilbert
5c228cea0b SWORD25: Fixes to the savegame saving code
svn-id: r53351
2010-10-12 23:48:50 +00:00
Paul Gilbert
cf664780cb SWORD25: Bugfix to not draw off-screen images
svn-id: r53350
2010-10-12 23:48:32 +00:00
Paul Gilbert
3fe2778970 SWORD25: Fix to array reversal, fixing path-finding
svn-id: r53349
2010-10-12 23:48:09 +00:00
Paul Gilbert
3e9610c601 SWORD25: Fix for path-finding
svn-id: r53348
2010-10-12 23:47:48 +00:00
Paul Gilbert
21fe28dbef SWORD25: Fix for blitting images with negative offsets
svn-id: r53347
2010-10-12 23:47:26 +00:00
Eugene Sandulenko
e0cd481d95 SWORD25: Confirmed correctness of vector images alpha blending
svn-id: r53346
2010-10-12 23:47:05 +00:00
Eugene Sandulenko
72104f0f0f SWORD25: Remove unneeded file
svn-id: r53345
2010-10-12 23:46:42 +00:00
Eugene Sandulenko
61c7cc13b0 SWORD25: Fixed debug output in GLImage::blit()
svn-id: r53344
2010-10-12 23:46:22 +00:00
Eugene Sandulenko
0716b8c1bb SWORD25: Fix vectorimage transparency
svn-id: r53343
2010-10-12 23:46:02 +00:00
Eugene Sandulenko
099406e15e SWORD25: Implement original hack with skipping green lines
svn-id: r53342
2010-10-12 23:45:41 +00:00
Eugene Sandulenko
a248e0b3f1 SWORD25: Fix bug with some vector frames not showing up.
svn-id: r53341
2010-10-12 23:45:20 +00:00
Eugene Sandulenko
2fce44d335 SWORD25: Further fixes for vectorimage rendering
svn-id: r53340
2010-10-12 23:44:59 +00:00
Eugene Sandulenko
af1fcbf71d SWORD25: Major bugfix for vector renderer. Only minor glitches are left
svn-id: r53339
2010-10-12 23:44:36 +00:00
Eugene Sandulenko
e5ac21dcac SWORD25: Fix some warnings
svn-id: r53338
2010-10-12 23:44:14 +00:00
Paul Gilbert
30f199a5a4 SWORD25: Fix memory leak in transparency commit
At the point where the alpha value was checked, a scaled image surface may have already been created, which needs to be freed.

svn-id: r53337
2010-10-12 23:43:44 +00:00
Eugene Sandulenko
cbe304c3ae SWORD25: Implement transparent bg color for images
svn-id: r53336
2010-10-12 23:43:24 +00:00
Paul Gilbert
1f184fd5a9 SWORD25: Memory leak fixes
svn-id: r53335
2010-10-12 23:43:03 +00:00
Paul Gilbert
25bb8b6243 SWORD25: Compilation fix
svn-id: r53334
2010-10-12 23:42:39 +00:00
Paul Gilbert
f5a822c340 SWORD25: Added de-allocation of data on image load error
svn-id: r53333
2010-10-12 23:42:18 +00:00
Paul Gilbert
d84400d507 SWORD25: Initialise image data block in constructor
svn-id: r53332
2010-10-12 23:41:57 +00:00
Paul Gilbert
07a8c87efc SWORD25: Added scaling support
svn-id: r53331
2010-10-12 23:41:36 +00:00
Eugene Sandulenko
795a6110cb SWORD25: Fix warnings
svn-id: r53330
2010-10-12 23:41:13 +00:00
Eugene Sandulenko
72dc197885 SWORD25: Fix compilation
svn-id: r53329
2010-10-12 23:40:51 +00:00
Eugene Sandulenko
94f1a8be03 SWORD25: Added minimal subset of libart inplace
svn-id: r53328
2010-10-12 23:40:27 +00:00
Paul Gilbert
49decb9dc5 SWORD25: Another memory leak fix
svn-id: r53327
2010-10-12 23:39:15 +00:00
Paul Gilbert
5d7922d052 SWORD25: Fix memory leak
svn-id: r53326
2010-10-12 23:38:55 +00:00
Paul Gilbert
3fc518cd0c SWORD25: Replaced some free's with delete[]
svn-id: r53325
2010-10-12 23:38:37 +00:00
Paul Gilbert
b922b58f8d SWORD25: Fix for using uninitialised doubles
svn-id: r53324
2010-10-12 23:38:16 +00:00
Eugene Sandulenko
7db8be5d4d SWORD25: bugfix for vector images
svn-id: r53323
2010-10-12 23:37:56 +00:00
Eugene Sandulenko
7ad20e3337 SWORD25: Further fixes to vector images. Still not finished.
svn-id: r53322
2010-10-12 23:37:35 +00:00
Eugene Sandulenko
a773c7a842 SWORD25: Further attempt to fix vector rendering
svn-id: r53321
2010-10-12 23:37:13 +00:00
Eugene Sandulenko
5d98d85a09 SWORD25: fix line drawing in vector images
svn-id: r53320
2010-10-12 23:36:52 +00:00
Eugene Sandulenko
e844de5141 SWORD25: Started rewriting vector renderer into proper one
Previous attempt was all wrong, as it completely incorrectly
interpreted SWF shape data.

svn-id: r53319
2010-10-12 23:36:25 +00:00
Eugene Sandulenko
5f8739209b SWORD25: Fix pen width for vector images
svn-id: r53318
2010-10-12 23:35:57 +00:00
Eugene Sandulenko
feefc111dd SWORD25: code formatting
svn-id: r53317
2010-10-12 23:35:37 +00:00
Eugene Sandulenko
1041335d34 SWORD25: partial fix for vector image rendering
svn-id: r53316
2010-10-12 23:35:14 +00:00
Eugene Sandulenko
bd3c4f2ae5 SWORD25: Fix crashes with vector renderer. Still no gfx.
svn-id: r53315
2010-10-12 23:34:47 +00:00