Commit Graph

502 Commits

Author SHA1 Message Date
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
Alyssa Milburn
76b8afc336 SWORD25: Fix Theora audio endianism 2011-05-23 16:49:52 +02:00
Matthew Hoops
45f9720f7c SWORD25: Properly use Theora picture offset/dimensions 2011-05-23 10:03:59 -04:00
Max Horn
252e7a1ec3 SWORD25: Fix ambiguous typing 2011-05-23 13:05:35 +02:00
Alyssa Milburn
f1a7ec7117 SWORD25: Fix screenshot endianism issue 2011-05-23 12:12:26 +02:00
Alyssa Milburn
9983231294 SWORD25: De-hardcode target name in thumbnail code
This just uses the provided filename rather than trying to recreate
it with a hard-coded target (causing crashes with other targets).
(Also, add an error check rather then crashing there, just in case.)
2011-05-23 11:55:34 +02:00
Alyssa Milburn
9b43822a42 SWORD25: Fix error string parameter 2011-05-23 10:52:53 +02:00
Paul Gilbert
c13275e657 SWORD25: Replaced accidental backslash in include filename 2011-05-23 18:50:57 +10:00
Paul Gilbert
2ebacc64be SWORD25: Moved detection entries into detection_tables.h 2011-05-23 18:41:18 +10:00
Paul Gilbert
27a6d9b910 SWORD25: Added detection entries for other languages
This is needed now, since changing the language in-game updates the ScummVM language setting, and there must be a matching detection entry for each language.
2011-05-23 18:41:17 +10:00
Paul Gilbert
b5609eb4a1 SWORD25: Added proxy code for converting writing config.lua to update the ScummVM game settings 2011-05-23 18:41:17 +10:00
Paul Gilbert
3556875c49 SWORD25: Created proxy class that presents ScumMVM settings as a valid config.lua file 2011-05-23 18:41:16 +10:00
Thierry Crozat
d2a55b42c9 ENGINES: Further unify engine names 2011-05-22 12:47:35 +01:00
eriktorbjorn
f6b3b72eae SWORD25: Don't assume that all locales use decimal point
The trydecpoint() function *is* used, though probably only in
countries which don't use a decimal point. We can't use the ISO C
locale functions here because they're not fully implemented on
some platforms, e.g. Android. Hopefully this method will work.
2011-05-20 18:34:42 +02:00
Paul Gilbert
cbf7f740e4 SWORD25: Re-implement two LUA library I/O functions necessary for detecting and creating the config.lua configuration file 2011-05-20 18:45:33 +10:00
Paul Gilbert
fcae7bb497 SWORD25: Fix to properly signal when movie playback has ended 2011-05-19 21:52:45 +10:00
Matthew Hoops
d1f907485e SWORD25: Implement TheoraDecoder::pauseVideoIntern() 2011-05-18 10:05:14 -04:00
Matthew Hoops
14e1cc728f SWORD25: Properly use endOfVideo() 2011-05-18 10:05:14 -04:00
Matthew Hoops
f8323cc672 SWORD25: Make Theora handle the case when the packet eos is not set 2011-05-18 10:05:13 -04:00
Matthew Hoops
0addffbfd3 GRAPHICS: Add a YUV to RGB table lookup for use with Theora
Based on the video/mpeg_player.* one, which is based on lots of other things (too many to name, go see the file)
2011-05-18 10:05:13 -04:00
Matthew Hoops
f559741bfc SWORD25: Fix a/v sync with using the TheoraDecoder standalone
Hopefully should fix a/v sync from in-game. If not, the engine needs to be changed slightly
2011-05-18 10:05:13 -04:00
Max Horn
fb31fa2d6a SWORD25: Name the random source 2011-05-17 12:17:28 +02:00
Thierry Crozat
3c59e37035 ENGINES: Unify engine names
This unifies the engine names in MetaEngine::getName() and the
credits. In particular drop "Engine" or "engine" from the names when
it was present and use expanded names in credits when the
MetaEngine uses it (e.g. "Beneath a Steel Sky" instead of "BASS").
2011-05-16 00:11:32 +01:00
md5
5f583eda0d SWORD25 (LUA): Removed unused non-portable locale code 2011-05-15 13:46:22 +03:00
md5
b34e776e51 SWORD25 (LUA): Clarified the use of os_remove() 2011-05-15 11:25:46 +03:00
Matthew Hoops
e6452518dd SWORD25: Begin fixing the TheoraDecoder implementation
getFrameRate() and endOfVideo() have been fixed so it can be used as a standalone decoder. a/v sync still needs to be fixed
2011-05-15 02:20:49 -04:00
eriktorbjorn
7557cbd617 SWORD25: Fix format string warning. 2011-05-14 15:09:03 +02:00
md5
cd54d761e1 SWORD25 (LUA): Disabled a lot of non-portable LUA functions
sword25 doesn't use these (thankfully)
2011-05-14 14:58:29 +03:00
md5
dcf9daf4cf SWORD25 (LUA): Some compilation optimizations
For Android, define stroll() inside luaconf.h
For PS2, don't use the visibility attribute, as the PS2 gcc isn't
particularly happy about it...
2011-05-14 12:32:34 +03:00
md5
5b488e4c79 SWORD25: Stop linking directly against zlib.
Also, don't compress game data in newer saves, as the whole saved game is
compressed anyway
2011-05-13 23:06:53 +03:00
md5
2d3ad096ab SWORD25: Fix compilation when libvorbis is not present 2011-05-13 21:09:31 +03:00
md5
ef96967285 SWORD25 (LUA): Whitespace fixes 2011-05-13 20:55:14 +03:00
md5
854783ea93 SWORD25 (LUA): Hopefully fixed compilation for the Android platform 2011-05-13 20:52:33 +03:00
md5
b3bc35c62a SWORD25: Added a version field for savegame thumbnails 2011-05-13 19:19:58 +03:00
md5
3ec466853a SWORD25: Replaced the PNG thumbnail encoding code, used in saved games
- Savegame thumbnails are now created using a flat image format,
instead of PNG. This allows us to remove the PNG encoding code used
in the engine. Note that the saved games we create cannot be used
with the original engine anyway, so this change does not break
savegame compatibility with the original game (it's already broken).
- Compatibility is preserved with older saved games that were made with
ScummVM.
- Moved the embedded thumbnail reading code out of the PNG loader class,
to stop it from needlessly checking every PNG file.
- With this change, libpng is no longer required for the sword25 engine
2011-05-13 18:49:14 +03:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
md5
f20c8b963a SWORD25: Disabled code which isn't necessary with our PNG decoder 2011-05-05 22:12:38 +03:00
md5
d7334628bd SWORD25: Moved the thumbnail handling code to its appropriate place
PNGLoader is able to load images embedded in saved games already. This
helps remove some duplicate code
2011-05-05 22:03:15 +03:00
md5
51136ac4ae SWORD25: Marked more functions as unused 2011-05-05 22:00:52 +03:00
md5
0ef807146e SWORD25: Remove thumbnails from the cache when saving a new game 2011-05-05 20:14:21 +03:00
md5
2af3759a78 SWORD25: Fixed the thumbnail creation code, and removed a hack 2011-05-05 20:13:06 +03:00
md5
921030f4ef SWORD25: Initial code for showing savegame thumbnails
There is currently a bug and only the thumbnail of the first save slot is
shown
2011-05-05 18:33:22 +03:00
md5
a428835b38 SWORD25: Removed the saved game filename from the savegame meta info struct 2011-05-05 13:33:39 +03:00
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