Filippos Karapetis
065e83e44f
SCI: Store script sizes in 32-bit integers
...
Since scripts can be larger than 64KB, and getBufSize() returns a 32-bit
integer, adapt variables that store script sizes accordingly
2012-06-18 12:20:07 +03:00
Filippos Karapetis
2b50824133
SCI: Add setter/getter methods to reg_t's
...
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
2012-06-18 05:24:06 +03:00
Filippos Karapetis
3c04d333f2
SCI: Add a check for empty VMD file names
2012-06-18 05:24:04 +03:00
Johannes Schickel
084c1259fc
SCI: Get rid of casts on OSystem::copyRectToScreen calls.
2012-06-16 02:39:00 +02:00
Filippos Karapetis
a0add53c60
SCI: Change getClassAddress() to only require the caller segment
...
The caller offset is never actually used inside the function
2012-06-15 22:32:17 +03:00
Filippos Karapetis
041b1447c0
SCI: Replace RAW_IS_OBJECT with a method
2012-06-15 22:32:15 +03:00
Filippos Karapetis
5ca22a1104
SCI: Fix warnings
...
Thanks to DrMcCoy for reporting them
2012-06-15 22:32:15 +03:00
Filippos Karapetis
160732b2f7
Revert "SCI: Change Script::getObject() to accept a reg_t"
...
This reverts commit 577d7e41c9 .
2012-06-15 22:32:14 +03:00
Filippos Karapetis
562a8a980c
SCI: Further cleanup of the script code
...
Merge the init() and load() Script methods and reset the script when
necessary
2012-06-15 12:53:17 +03:00
Filippos Karapetis
9aaefbd536
SCI: _propertyOffsetsSci3 and classpos should be 32-bit integers
...
These are needed for future handling of large SCI3 script files
2012-06-15 12:24:18 +03:00
Filippos Karapetis
e1ae110860
SCI: Clean up the script initialization code
2012-06-15 12:24:16 +03:00
Filippos Karapetis
577d7e41c9
SCI: Change Script::getObject() to accept a reg_t
...
This is needed for upcoming changes to the Script class
2012-06-15 12:24:14 +03:00
Filippos Karapetis
27f2b6e4dd
SCI: Change the script buffer size to be a size_t as well
...
This will be needed in the future to load large SCI3 scripts
2012-06-14 12:20:43 +03:00
Filippos Karapetis
9c8ff41181
SCI: Add known large SCI3 scripts
2012-06-14 12:20:41 +03:00
Filippos Karapetis
21b6b81f16
SCI: A separate implementation is needed for syncStringHeap() for SCI3
2012-06-14 12:20:39 +03:00
Filippos Karapetis
0a3fb38bc7
SCI: Add handling of two more configuration settings for LSL7
2012-06-14 12:20:37 +03:00
Filippos Karapetis
e4f08a4644
SCI: Fix the loading screen and the loading functionality in Shivers
...
Shivers uses extra special hardcoded save files together with the normal
ones that are used to store slot names and spot descriptions. The scheme
is a bit odd, and since the names of the extra save files are hardcoded,
this scheme is problematic to use. We skip the creation of these files
altogether and use virtual files instead, which means that the
(broken) spot descriptions won't be visible next to each save
description. This isn't a major issue for now, and it's left as a future
TODO to implement this feature in a cleaner way, and not with extra save
files. This scheme fixes the slot descriptions in the loading screen.
Also, kCD(1) has been implemented, which fixes loading of the save
states themselves
2012-06-13 22:56:43 +03:00
Filippos Karapetis
045613af95
SCI: Shuffle the kernel functions inside kfile.cpp
...
This puts them in the order that they are defined in the kernel tables
2012-06-13 12:55:07 +03:00
Filippos Karapetis
93024c073b
SCI: Handle the torindebug config setting for Torin's Passage French
...
Thanks to LePhilousophe for testing and providing a patch
2012-06-13 12:27:02 +03:00
Filippos Karapetis
e2613d2242
SCI: Add a workaround for the French version of Torin's Passage
...
Thanks to LePhilousophe for playing and providing the workaround
2012-06-13 12:27:00 +03:00
Filippos Karapetis
694f0f534a
SCI: Only include kSave_subops if ENABLE_SCI32 is defined
2012-06-13 12:26:58 +03:00
Filippos Karapetis
098f162ecc
SCI: Use the later SCI file functions for the SCI0 ones
...
They are essentially the same (with the exception of the return values),
so unifying them reduces code duplication
2012-06-13 12:26:57 +03:00
Filippos Karapetis
944a774e6a
SCI: Change kSave() to be a kernel function with subops
2012-06-13 12:26:55 +03:00
Filippos Karapetis
5a17ea0585
SCI: Move all file-related functions in file.*
...
This way, there is a clear separation of the actual SCI kernel file
functions and the file classes and wrappers of ScummVM
2012-06-13 12:26:53 +03:00
Filippos Karapetis
a209359a67
SCI: Reorder the file kernel functions a bit
2012-06-13 12:26:51 +03:00
Filippos Karapetis
aeac51d726
SCI: Implement the file operations needed for the save dialog in Phantasmagoria
...
Phantasmagoria's scripts keep polling for the existence of the savegame
index file and request to read and write it using the same parameters
when opening it. The index file is closed and reopened for every save
slot, which is slow and can be much slower on non-desktop devices.
Also, the game scripts request seeking in writable streams and request
to expand the existing index file.
To provide this functionality and to reduce constant slow file opening
and closing, this virtual class has been introduced
2012-06-13 12:26:49 +03:00
Filippos Karapetis
f76c71d968
SCI: Add debug code to automatically skip robot videos
2012-06-13 12:26:48 +03:00
Matthew Hoops
ef8239df48
SCI: Fix comment in kString(at)
2012-06-11 20:10:49 -04:00
Filippos Karapetis
ea06210b92
SCI: Add support for variable selectors in kListFirstTrue / kListAllTrue
...
This is used by Torin's Passage (e.g. when trying to open the menu).
Based on a slightly modified patch by LePhilousophe
2012-06-11 21:17:21 +03:00
Filippos Karapetis
15306bc554
SCI: Return the default value for unknown configuration settings
...
Based on a patch by LePhilousophe
2012-06-11 21:17:19 +03:00
Filippos Karapetis
b812ed50c8
SCI: Bugfix for negative numbers in kString(at)
...
Fixes one of the bugs in the savegame selection screen in Phantasmagoria
2012-06-11 11:54:11 +03:00
Filippos Karapetis
0ccfd614aa
SCI: Add more verbose debug output for DoAudio in SCI2.1
2012-06-11 11:54:09 +03:00
Johannes Schickel
49fafb48a7
GUI: Refactor default savegame description creation.
...
Formerly the GMM, AGI and SCI duplicated the logic for USE_SAVEGAME_TIMESTAMP.
Now I added a method to SaveLoadChooser instead, which takes care of this. This
might not be the best placement of such a functionality, thus I added a TODO
which talks about moving it to a better place.
2012-06-10 05:04:59 +02:00
Johannes Schickel
7c5cf1b400
GUI: Add helper to SaveLoadChooser, which uses the currently active target.
...
This reduces the code duplication in all client code, which formerly duplicated
the querying of the plugin, game id etc. and now simply calls the newly added
method runModalWithCurrentTarget() on a SaveLoadChooser object.
2012-06-10 04:53:17 +02:00
Johannes Schickel
15046a7529
GUI: Get rid of SaveLoadChooser::setSaveMode.
...
We already pass the title and process button name to the constructor of
SaveLoadChooser and then do not offer any way of changing it, thus changing
the edit mode of the chooser is kind of pointless and was never actually used.
Instead we pass the mode on SaveLoadChooser construction now.
2012-06-10 04:19:45 +02:00
Filippos Karapetis
ca3ea849d8
SCI: Update information on kGetSierraProfileInt
...
Thanks to LePhilousophe for his feedback and observations on this
2012-06-09 16:29:14 +03:00
Filippos Karapetis
dc11d223cd
SCI: Initial implementation of AddLine, UpdateLine, DeleteLine
2012-06-09 15:36:36 +03:00
Filippos Karapetis
de3f6a19ed
SCI: Initial implementation of kScrollWindow, used in some SCI21 games
...
This is used in LSL6 hires and SQ6. This initial implementation is hackish
and only works in SQ6 (nothing is shown in LSL6)
2012-06-07 11:27:59 +03:00
Lars Skovlund
c1dd3d5c29
SCI32: Implement GetConfig("language")
2012-06-02 18:50:46 +02:00
Lars Skovlund
403b646c13
SCI32: Case-insensitive configuration getters
2012-05-30 18:43:39 +02:00
Filippos Karapetis
e77fc29101
SCI: Add a TODO in kFileIOReadRaw
2012-05-26 19:06:54 +03:00
Filippos Karapetis
f15582b190
SCI: Map another missing kFileIO call
...
This is used to change directories in the save/load dialog (unused by us)
2012-05-26 16:42:38 +03:00
Filippos Karapetis
5af1ccbac6
SCI: Implement kGetConfig and kGetSierraProfileInt
...
This fixes the sluggish game speed in Phantasmagoria (DOS/Windows)
2012-05-26 16:41:11 +03:00
Filippos Karapetis
79926b305c
SCI: Bugfix for kFileIOReadRaw
...
Avoid overwriting the target buffer with junk when no data has been read
2012-05-26 16:23:03 +03:00
Filippos Karapetis
beef27fc10
SCI: Map the rarely used VibrateMouse kernel function to be an empty call
...
This is a function used to implement vibration in the floppy version of
QFG4 for exotic force feedback mice, such as the Logitech Cyberman
2012-05-24 01:44:25 +03:00
Filippos Karapetis
5a8a28bb22
SCI: Add a workaround for a hack used in the NRS script patches for QFG3
...
The patched script 33 in the NRS patch attempts to perform kAbs() on an
object. Return a dummy value instead. Fixes bugs #3528416 and #3528542
2012-05-22 10:50:39 +03:00
Matthew Hoops
92b907e856
SCI: Silence unused variable warnings
2012-05-21 00:07:28 -04:00
Filippos Karapetis
b5eac1b35b
SCI: Fix case of the SciOpcodes enum
2012-05-20 21:35:27 +03:00
Filippos Karapetis
6fb9511c93
SCI: Remove the hackish (and wrong) SCI32 fade code
2012-05-20 20:26:45 +03:00
Filippos Karapetis
f8c24b5d88
SCI: Split the SCI32 graphics kernel functions in a separate file
2012-05-20 20:16:15 +03:00