Commit Graph

312 Commits

Author SHA1 Message Date
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