Commit Graph

2986 Commits

Author SHA1 Message Date
Bertrand Augereau
4920b3ab3e COMMON: Some ill-formed xml files triggered a seek(CUR, -2) in the parser 2015-11-09 22:51:15 +01:00
Paul Gilbert
89dfd36b60 CREATE_PROJECT: Add support for Visual Studio 2015 2015-09-28 19:23:58 -04:00
Bastien Bouclet
53388bf6e8 COMMON: Plug a memory leak in the FFT class 2015-07-13 18:45:31 +02:00
Martin Kiewitz
a07ff81051 COMMON: PKWARE data comp. remove temp. targetPtr
which was used for the temporary workaround in commit 4fb3264
2015-07-04 03:29:06 +02:00
Martin Kiewitz
614162e5fc COMMON: PKWARE data comp. lib. mask dictionary xs
added masking of dictionary offsets when copying from dictionary
issues should now all be fixed
2015-07-04 03:10:26 +02:00
Martin Kiewitz
4fb32647ad COMMON: PKWARE data comp. library fix
add old length+offset code for now, so that the graphical issues
in SCI don't occur anymore. Will investigate more tomorrow.
2015-07-04 02:52:56 +02:00
Martin Kiewitz
fafe22731b COMMON: PKWARE data comp. library fix
fixes dictionary issues with some compressed data
2015-07-04 02:26:12 +02:00
Martin Kiewitz
2bd0743125 COMMON: PKWARE data comp. lib. cleanup + enhanced
- uses streams now
- additional method for decompressing, when the target size is not
known
- improved comments
- added AGOS for using it
2015-07-04 01:45:34 +02:00
Bastien Bouclet
ed037a527c COMMON: Add getRevTab to FFT 2015-02-01 10:35:23 +01:00
clone2727
db64442c4a COMMON: Fix strict-alignment READ_BE_UINT64 on LE and READ_LE_UINT64 on BE 2015-01-18 14:41:15 -05:00
Willem Jan Palenstijn
cc045f7a83 COMMON: Fix strict-alignment READ_UINT64 2015-01-14 23:20:33 +01:00
Willem Jan Palenstijn
1084f2eea6 COMMON: Implement MIPS SWAP_BYTES_64 in terms of SWAP_BYTES_32 2015-01-04 22:00:00 +01:00
Willem Jan Palenstijn
7c7bdf3543 COMMON: Swap order of functions to 16, 32, 64 2015-01-04 21:59:45 +01:00
Johannes Schickel
e2e61184c6 COMMON: Fix return type of one READ_BE_UINT64 implementation.
This makes all unit tests pass for my on amd64 again. Thanks clone2727.
2015-01-04 21:30:05 +01:00
Johannes Schickel
64bad2ec4a COMMON: Fix some syntax issues.
Not compile tested. Then again it didn't look test before either. So, yay!
2015-01-04 21:17:33 +01:00
Johannes Schickel
eb4d1a6925 COMMON: Add missing readUint64/readSint64 to ReadStreamEndian. 2015-01-04 21:09:32 +01:00
Eugene Sandulenko
7865c78211 COMMON: Put more 64-bit stuff under HAVE_INT64 2015-01-04 20:47:12 +01:00
Eugene Sandulenko
f1765db70f COMMON: Put all 64-bit code under new HAVE_INT64 constant
I regrouped all functions in order to make the code less noisy
with #ifdefs
2015-01-04 20:41:50 +01:00
Eugene Sandulenko
9abd92a711 Merge pull request #508 from RichieSams/add_endian_and_stream_support_for_int64
COMMON: Add support for endian-safe reading/writing of int64
2015-01-04 19:50:33 +01:00
Adrian Astley
d497b45b1c COMMON: Fix typo that caused uint64 reads to return a uint32 2014-12-21 03:58:58 -06:00
Filippos Karapetis
bb120d0fd4 COMMON: Disable unused string 2014-12-07 17:49:55 +02:00
Willem Jan Palenstijn
7ff41ae902 COMMON: Remove executable bit 2014-11-23 17:51:13 +01:00
Stefan Kristiansson
3fb4ab1377 COMMON: make XMLParser::loadStream() fail when stream is null
Some users of this method relies on it to fail when
an invalid stream is passed to it
(E.g. VirtualKeyboard::openPack).
2014-11-22 10:02:42 +02:00
Filippos Karapetis
daf110c867 COMMON: Remove trailing whitespace 2014-10-28 15:38:52 +02:00
Filippos Karapetis
22be7f4346 COMMON: Add reference links for the enabled C++11 features in MSVC 2014-10-28 14:26:19 +02:00
Adrian Astley
c58f714610 COMMON: Add support for endian-safe reading/writing of int64 2014-09-16 13:49:27 -05:00
Роман Донченко
daceff7b2d COMMON: Use true nullptr in Visual Studio 2010+ and true override in VS 2012+
Those compilers support these features despite not being fully C++11-compliant.

<http://msdn.microsoft.com/en-us/library/hh567368.aspx> says that VS 2010
has "partial" support for override. I don't know what that entails and I
can't test it, so I err on the side of caution and only enable it in 2012
and up.
2014-09-05 23:25:19 +04:00
Einar Johan Trøan Sømåen
b7c5ce879f COMMON: Fix some Doxygen comments that seem wrong. 2014-08-29 03:28:00 +02:00
Johannes Schickel
e2313433bc COMMON: Use Common::String::clear instead of assigning "". 2014-08-12 01:43:30 +02:00
Torbjörn Andersson
278a14d96e COMMON: Fix crash when quitting on "Game data not found" dialog
ScummVM would try to look up "confirm_exit" in the active domain,
even though the active domain had been removed and pointed to an
invalid address. To avoid this, try to keep _activeDomain and
_activeDomainName updated if removeGameDomain() removes the active
domain.

For good measure, also do it if the active domain is removed by
renameGameDomain(), though I don't know if there was any case where
this would have caused trouble.
2014-08-07 22:55:52 +02:00
Torbjörn Andersson
42c9b1a2c1 COMMON: Minor whitespace fix. 2014-08-07 22:46:24 +02:00
David Turner
cb596113a7 Merge pull request #461 from digitall/vkeybdFix
Add trigger for Virtual Keyboard on long press of Middle Mouse Button
2014-06-28 14:59:08 +01:00
Joel Teichroeb
c43ce9ecf3 ALL: Remove support for MSVC8 and older
MSVC8 gives various compile error relating to templates that were changed
back in 2008, leading me to belive that no one is using it, and that there
is not point adding work arounds for a 9 year old compiler no one uses.
2014-06-21 11:32:45 -07:00
Eugene Sandulenko
c41ebe6f45 COMMON: Added align() method for BitStream 2014-06-09 22:33:45 +03:00
Johannes Schickel
559c10e91a COMMON: Don't allow debug channel 'all' to be used. 2014-06-05 16:32:27 +02:00
D G Turner
1e6fe10e3d COMMON: Add "all" option to debugflag controls in GUI Debugger. 2014-06-05 02:18:58 +01:00
Johannes Schickel
4c716539ad COMMON: Use float constants in DCT code.
Makes the DCT code use constants of type float in expressions which only use
type float values otherwise. This silences some floating point conversion
warnings in the DCT code.
2014-06-02 01:00:15 +02:00
Johannes Schickel
bab02dd42b COMMON: Some formatting fixes in RDFT code. 2014-06-02 01:00:15 +02:00
Johannes Schickel
3c0c64f820 COMMON: Use float constants in RDFT code.
We use float types in variables, thus also use them for constants. Silences
some conversion warnings.
2014-06-02 01:00:15 +02:00
Johannes Schickel
ec6f00ed1d COMMON: Make Rad<->Deg conversion use float constants.
Since we take a float parameter and return a float value we will also just
work on float values all the way. This silences some float conversion
warnings.
2014-06-02 01:00:15 +02:00
Eugene Sandulenko
c3ffbd884a Merge pull request #426 from sunmax/master
PS2: Pull request to master for latest PS2 code
2014-04-28 21:20:42 +03:00
D G Turner
b7192731b9 KEYMAPPER: Change hotkey from F8 to CTRL-F8 to reduce game conflicts. 2014-04-27 04:18:47 +01:00
D G Turner
8cf41943f6 VKEYBD: Switch hotkey from F7 to CTRL-F7 to reduce game conflicts.
Although this is harder for physically disabled users to trigger, they
can now use the long middle mouse button press instead to trigger.
2014-04-27 04:18:39 +01:00
D G Turner
e07a224a9a VKEYBD: Modify code to open vkeybd on long press of middle mouse button.
This should massively reduce any chance of a conflict with mouse usage
in games and is still easy for a person with mobility issues to perform.
2014-04-22 05:29:54 +01:00
D G Turner
5e6d05c816 VKEYBD: Add code to open virtual keyboard on middle mouse button.
This removes the need for a hardware keyboard to trigger the use
of the virtual keyboard via F7 if using the default event mapper.

As middle button is rarely used by games, this should not cause any
conflicts. Though to avoid this possibility, the event is passed to
the engine.
2014-04-22 05:29:54 +01:00
D G Turner
b8aaac27ba KEYMAPPER: Avoid blocking F8 events from engine when using keymapper.
This allows the keyboard mapper to be enabled without causing breakage
to engines which use F8.
2014-04-16 13:17:32 +01:00
D G Turner
8282298556 KEYMAPPER: Avoid blocking F7 events from engine when using vkeybd.
This allows the virtual keyboard to be enabled without causing breakage
to engines which use F7.
2014-04-16 11:53:38 +01:00
Filippos Karapetis
c3003eec85 COMMON: Reduce the warnings related to backwards seeking in ZIP files
The warnings are now changed to debug statements, are only shown once
per session (instead of once per stream) and are only enabled for debug
builds.
2014-03-28 01:30:38 +02:00
Matthew Hoops
9630753861 COMMON: Move some QuickTime Track variables into SampleDesc where they belong 2014-03-18 19:12:20 -04:00
Johannes Schickel
854e22b38b COMMON: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Max Lingua
b69a2c81a7 PS2: scummsys.h (u)int64 is "long" for PS2 2014-01-19 12:53:55 -05:00
Johannes Schickel
417064e311 Merge pull request #417 from digitall/STACK_fixes
ALL: Fix optimization unstable code on checking for null after new.
2014-01-17 17:48:16 -08:00
clone2727
9d9ced0734 Merge pull request #366 from clone2727/he-saves-target-name
RFC: Make HE games use the target name in all save files
2014-01-17 15:59:44 -08:00
D G Turner
ac4087856f ALL: Remove optimization unstable code on checking for null after new.
These issues were identified by the STACK tool.

By default, the C++ new operator will throw an exception on allocation
failure, rather than returning a null pointer.

The result is that testing the returned pointer for null is redundant
and _may_ be removed by the compiler. This is thus optimization
unstable and may result in incorrect behaviour at runtime.

However, we do not use exceptions as they are not supported by all
compilers and may be disabled.

To make this stable without removing the null check, you could qualify
the new operator call with std::nothrow to indicate that this should
return a null, rather than throwing an exception.

However, using (std::nothrow) was not desirable due to the Symbian
toolchain lacking a <new> header.
A global solution to this was also not easy by redefining "new" as "new
(std::nothrow)" due to custom constructors in NDS toolchain and various
common classes.

Also, this would then need explicit checks for OOM adding to all new
usages as per C malloc which is untidy.

For now to remove this optimisation unstable code is best as it is
likely to not be present anyway, and OOM will cause a system library
exception instead, even without exceptions enabled in the application
code.
2014-01-15 02:36:19 +00:00
Johannes Schickel
3a8c243d34 COMMON: Revert "Fix mismatched new/delete in the MemoryPool class".
This reverts commit b585addc23.

The allocation of MemoryPool's page memory is doing in MemoryPool::allocPage,
which uses ::malloc, thus we need to use ::free to free the page memory in
MemoryPool::freeUnusedPages.
2013-12-17 00:26:50 +01:00
Filippos Karapetis
b585addc23 COMMON: Fix mismatched new/delete in the MemoryPool class
Memory is allocated with new in Hashmap::allocNode() and incorrectly
freed with free() in ~MemoryPool() and freeUnusedPages().
Issue reported by Dr. Memory
2013-12-17 01:16:28 +02:00
Johannes Schickel
df07a4655b COMMON: Add Latvian language code. 2013-12-05 16:26:44 +01:00
Johannes Schickel
a94c66f1e3 COMMON: Fix order of languages.
These are sorted according to the alphabetical order of the description. Thus,
Croatian should be between Chinese (Taiwan) and Czech.
2013-12-05 16:26:44 +01:00
Johannes Schickel
abe6d30f36 COMMON: Document Common::String::unsigned_type. 2013-11-23 21:34:55 +01:00
Johannes Schickel
4c15e51ab5 COMMON: Document U32String a bit better. 2013-11-23 21:34:54 +01:00
Johannes Schickel
b90400da44 COMMON: Add simple UTF-32 string class U32String. 2013-11-23 21:34:54 +01:00
Johannes Schickel
1a6f9378aa COMMON: Add underlying type names to Common::String.
The value_type is analogous to std::basic_string::value_type.
The unsigned_type on the other hand is an unsigned type of the value_type which
allows to obtain an character without nasty sign extension.
2013-11-23 21:34:54 +01:00
Filippos Karapetis
e36f24ad69 COMMON: Define int64 and uint64 if HAVE_CONFIG_H isn't set
This fixes compilation of sword25's pluto with Visual Studio. The issue
has been revealed with commit 34169a81. The other data types are
defined in scummsys.h, thus only the missing int64 and uint64 defines
are set.
2013-11-06 18:04:09 +02:00
Eugene Sandulenko
5d6c7fbcd1 RECORDER: Initialize variable. CID 1047258 2013-11-03 01:28:03 +02:00
Filippos Karapetis
b4f8e45a3c COMMON: SEEK_END offsets are negative
This was taken directly from the old code, which either used different
semantics, or had a genuine bug
2013-11-02 19:59:22 +02:00
Filippos Karapetis
732fb69b1c COMMON: Reenable SEEK_END seeking in GZipReadStream()
This is needed by the "Mirage" Wintermute game.
Vorbis can do backward seeking, thus we need to enable this for ZIP
streams. Since this can be a potentially slow operation, we throw a
warning (once per stream) when it occurs. Originally, SEEK_END seeks
in GZipReadStream were disabled by commit 9138128f. Refer to patch
#2050337 for more information.
2013-11-02 19:19:26 +02:00
Eugene Sandulenko
874939ae89 COMMON: Make XCode 5.0.1 happier 2013-10-27 22:45:49 +02:00
Matthew Hoops
eef7f9f46b COMMON: Fix the NE group icon resource type 2013-10-27 13:15:17 -04:00
D G Turner
a1998abed4 COMMON: Fix missing arjDecoder class variable init. CID 1002929
This fixes a couple of these variables by removing them as they
are unused or set-but-unused variables.
2013-10-05 07:02:18 +01:00
Eugene Sandulenko
e11da51202 COMMON: Make Coverity 6.6.1 happier
Apparently their tools do not include __has_feature clang extension.
I've submitted the bugreport to them but in the meantime let's have this
define in the system.
2013-09-27 11:06:22 +03:00
Filippos Karapetis
dca513dc20 COMMON: Expand the warnings thrown for broken DCL compressed data
The Russian translated versions of Neverhood have invalid unpacked
sizes for some compressed resources. This helps in identifying their
resource parameters more easily
2013-09-26 10:46:09 +03:00
Eugene Sandulenko
c55411a032 COMMON: Shut more Coverity warnings in coroutines. 2013-09-21 22:45:43 +03:00
Eugene Sandulenko
91bcfb290a COMMON: Use unused variables in coroutine macros.
This should fix couple of hundreds of Coverity detected defects.
2013-09-21 09:49:17 +03:00
Matthew Hoops
3f65a02ced COMMON: Make the two INI save file functions take a String reference 2013-08-12 20:48:55 -04:00
Johannes Schickel
7c2660c97e COMMON: Add setVal to ConfigManager::Domain.
This fixes compilation in the keymapper.
2013-08-13 00:11:46 +02:00
Johannes Schickel
818d3981e3 Merge pull request #377 from lordhoto/config-manager-cleanup
Config Manager Cleanup
2013-08-12 14:30:22 -07:00
Johannes Schickel
f7d3b06711 COMMON: Get rid of write version of ConfigManager::getGameDomains.
This can be abused to insert Domains into the game domains without any checks.
Instead, only write iterator access is given.
2013-08-12 01:33:29 +02:00
Johannes Schickel
0dae60a357 COMMON: Remove commented out include in config-manager.h. 2013-08-08 16:32:41 +02:00
Johannes Schickel
6da6e4e686 COMMON: Remove outdated comments on INIFile.
These very old comments claimed that ConfigManager uses INIFile. This is not
true however. Thus removing them should clear things up a little bit.
2013-08-08 16:30:38 +02:00
Johannes Schickel
63750d6780 COMMON: Rename ConfigFile to INIFile.
This clears up that 'ConfigFile' is actually a class handling only INI-files.
2013-08-08 16:28:38 +02:00
Johannes Schickel
774d53045d COMMON: Do not let ConfigManager::Domain inherit from StringMap.
Instead we provide wrapper functionality now. Intuitively a Domain is not a
simple StringMap.
2013-08-08 03:14:23 +02:00
Johannes Schickel
4790a4abd5 COMMON: Define all Unix98/BSD math constants in scummsys.h.
This should fix compilation on mingw64 with --enable-c++11 and also make sure
the constants are present on other systems for the uncommon case they might be
missing.
2013-08-02 20:02:02 +02:00
D G Turner
17ccd18ed3 COMMON: Add comment explaining reason for defining math constants. 2013-08-02 06:23:52 +01:00
D G Turner
26a9b528da COMMON: Move definition of math constants to scummsys header.
This should have no effect on common/math.h as scummsys is included at
the top anyway, but this will fix compilation on some toolchains when
strict ANSI language compliance is enabled i.e. -std=c++11, rather than
-std=gnu11.

This causes an issue as a side effect is to set a guard which disables
various non-standard defines in the system headers i.e. the M_PI and
M_SQRT1_2 constant definitions in the MinGW x86_64 toolchain on
buildbot.

By moving this into scummsys.h after the point of system math.h
inclusion, we can ensure that M_PI etc. are always present.
2013-07-31 06:18:58 +01:00
Johannes Schickel
2f9b7ba686 COMMON: Enforce formatting guidelines a bit more in util.h. 2013-07-30 21:02:01 +02:00
Eugene Sandulenko
67af740f3a COMMON: Revert last commit as rightfully pointed out by fuzze. 2013-07-29 12:30:47 +03:00
Eugene Sandulenko
351af76f9b COMMON: Added copy constructors and copier to Rect and Point. 2013-07-29 12:25:57 +03:00
Eugene Sandulenko
2c812ade01 Merge pull request #353 from clone2727/eventrec_timer_fix
ALL: Don't use EventRecorder at all when not compiled in
2013-07-18 08:15:28 -07:00
Eugene Sandulenko
9572bc6e30 RECORDER: Fix wrong argument order 2013-07-15 14:31:34 +03:00
Sven Hesse
989ea7cb56 JANITORIAL: Remove trailing whitespace 2013-07-14 19:01:47 +02:00
Eugene Sandulenko
aaaf466c71 RECORDER: Fix CID 1046886. Uninit class variables. 2013-07-14 19:03:29 +03:00
Matthew Hoops
1f6894ab25 COMMON: Cleanup the MacResManager a bit 2013-07-11 23:45:19 -04:00
Matthew Hoops
4a7e4e5b22 ALL: Don't use EventRecorder at all when not compiled in 2013-07-06 23:54:45 -04:00
Eugene Sandulenko
3490091ba2 RECORDER: Fix tests compilation. Patch by D G Turner 2013-07-06 07:31:28 +03:00
Filippos Karapetis
ecc43c9b92 Revert "COMMON: Fix crash when the keymapper and the event recorder are enabled"
This reverts commit 93987d999c.
2013-07-05 03:05:54 +03:00
Filippos Karapetis
93987d999c COMMON: Fix crash when the keymapper and the event recorder are enabled
DefaultEventManager registers a keymapper that is supposed to be
auto-freed. However, the event recorder then sets itself as a new
keymapper, but because the autofree flag is already set,
registerMapper() ends up deleting the event recorder itself. Setting
the autofree flag before actually freeing the mapper fixes the issue
and prevents ScummVM from crashing on startup
2013-07-05 02:56:12 +03:00
Johannes Schickel
71b031be12 COMMON: Initialize EventDispatcher::_autoFreeMapper.
This fixes a branching on uninitialized variable reported by valgrind on
startup.
2013-07-05 01:45:09 +02:00
Eugene Sandulenko
49210a803a Merge pull request #331 from sev-/gsoc2012-eventsrecorder
GSoC2012: Event Recorder (reworked)
2013-07-04 04:58:54 -07:00
Johannes Schickel
a00c3e75b0 Merge pull request #342 from RichieSams/addDeleteRangeStringMethod
COMMON: Add erase method to String class
2013-07-01 05:18:49 -07:00
richiesams
e1ff60da7a COMMON: Add erase method to String class 2013-06-20 15:40:25 -05:00
Matthew Hoops
8dace22f97 COMMON: Fix custom NE resource type names 2013-06-09 21:18:33 -04:00
Willem Jan Palenstijn
dd003b6a28 COMMON: Add basic documentation for RDFT 2013-06-08 22:03:22 +02:00
Johannes Schickel
bc358b77a8 COMMON: Improve comment in CosineTable::CosineTable.
This commit changes the comment to use the same variable names as we do in the
code. Furthermore, it also makes the comment a bit easier to grasp.
2013-06-08 21:56:48 +02:00
Johannes Schickel
4da5d11e1f COMMON: Try to document the SineTable/CosineTable table entries. 2013-06-08 21:56:48 +02:00
Johannes Schickel
4efc9b152c COMMON: Save memory by allocating only required entries in Cosine-/SineTable.
The tables only contain (2^bitPrecision)/2 entries. The code allocated twice
as many entries previously.
2013-06-08 21:47:52 +02:00
Johannes Schickel
21f87070af COMMON: Fix regression in SineTable creation.
This is a regression from f4ba8a6485. The
commit replaced the static cosine and sine tables with dynamically created
ones. In the process of that a copy&paste error happened which made the sine
table use the layout of the cosine table. This commit now changes the
dynamically created sine tables to conform to the layout of the previous
static tables.
2013-06-08 21:47:51 +02:00
Alyssa Milburn
7840b5e4b9 COMMON: Add depth/flat parameters to addSubDirectoryMatching. 2013-06-06 21:41:14 +02:00
Eugene Sandulenko
f59512c47e RECORDER: Implement Events Recorder 2013-05-17 00:18:09 +03:00
Matthew Hoops
0031c41db8 COMMON: Change kPlatformPC to kPlatformDOS
"PC" was very ambiguous and now it matches what we show in the GUI.

This also corrects sword2's platform to Windows.
2013-05-02 18:43:10 -04:00
Alyssa Milburn
ace04a92a2 COMMON: Add ConfigFile::addSection function. 2013-04-19 00:22:07 +02:00
Willem Jan Palenstijn
b8df8203c5 COMMON: Don't use parserError for non-parser errors 2013-04-16 19:13:30 +02:00
Sven Hesse
ef26df5877 COMMON: Remove useless member variable FFT:_permutation 2013-04-15 18:21:29 +02:00
Thierry Crozat
33a29ca61c COMMON: Fix assert condition in String::setChar() 2013-03-20 20:10:13 +00:00
Paul Gilbert
86306893c8 Merge pull request #309 from dreammaster/hopkins
Hopkins FBI Pull Request
2013-02-24 06:36:26 -08:00
Willem Jan Palenstijn
2d1fd3b554 ALL: Fix typo (existant->existent) 2013-02-23 22:07:32 +01:00
Dreammaster
bb3285d933 Merge branch 'master' into hopkins 2013-02-15 08:25:09 -05:00
Johannes Schickel
2f73d64e80 Merge pull request #305 from giucam/bufferedseekable
Make BufferedSeekableReadStream use the buffer with SEEK_SET and SEEK_END
2013-01-28 08:43:52 -08:00
Johannes Schickel
5bfd2f6756 COMMON: Fix successive seeks in BufferedSeekableReadStream.
This fixes the failing test case added in
da8eeb9dbe.

Thanks to wjp for his input on this.
2013-01-28 17:34:37 +01:00
Johannes Schickel
354aa0f5f3 JANITORIAL: Use "End of anonymous namespace" as comment for anonymous namespaces. 2013-01-26 19:38:02 +01:00
Johannes Schickel
b4d0a8ba66 JANITORIAL: Enforce "} // End of namespace" with a single space after }. 2013-01-26 19:38:02 +01:00
Giulio Camuffo
edfcd768ba COMMON: Make BufferedSeekableReadStream use the buffer with SEEK_SET and SEEK_END 2013-01-26 19:12:26 +01:00
Johannes Schickel
36bfaa6a30 COMMON: Return NULL in wrapCompressedReadStream for compressed streams when ZLIB is disabled. 2013-01-26 15:25:13 +01:00
Johannes Schickel
59dde54519 Merge pull request #301 from lordhoto/c++11-playground
RFC: Allow use of override and nullptr. Also allow C++11 compilation.
2013-01-26 05:25:14 -08:00
Einar Johan Trøan Sømåen
5d4d65d6d9 JANITORIAL: Fix ){ -> ) { 2013-01-24 20:15:13 +01:00
Johannes Schickel
178365f5e9 COMMON: Add a header for C++11 keywords for pre-C++11 compilers.
This currently adds defines for nullptr and override, so we can use them in
pre-C++11 compilers, while taking advantage of them with C++11 compilers.
2013-01-09 07:53:41 +01:00
Tomas Jakobsson
f01d4c5aa8 COMMON: Add PackBitsReadStream to iff_container 2013-01-06 20:04:41 +01:00
Strangerke
a3ea253718 HOPKINS: Add support for BeOS full version 2012-12-14 01:53:17 +01:00
clone2727
91317c3630 Merge pull request #293 from clone2727/qtmidi
Add support for QuickTime Music playback
2012-12-13 15:49:40 -08:00
Johannes Schickel
2773f5d7af COMMON: Forbid symbols for the rest of is* from ctype.h.
I also moved the isprint case to the correct position.

This adds a FIXME to our lua code from sword25, which uses iscntrl directly.
2012-12-13 21:08:48 +01:00
Johannes Schickel
b0ba4b01a4 COMMON: Add wrapper for isprint.
This is done in the spirit of 658080deed.
2012-12-13 21:08:47 +01:00
Matthew Hoops
6b6e6c92c7 COMMON: Fix potential uninitialized memory usage 2012-12-13 00:39:48 -05:00
Paul Gilbert
798ddfaab5 Merge branch 'master' into hopkins 2012-10-31 09:34:38 +11:00
Strangerke
3f9172c7ec HOPKINS: Add detection for OS/2 and Win95 full versions 2012-10-17 18:58:45 +02:00
Johannes Schickel
efe2fe7e1f COMMON: Properly handle error indicator in MemoryWriteStream.
Thanks to waltervn for noticing that MemoryWriteStream::write doesn't handle
setting the error indicator properly.
2012-10-09 23:06:25 +02:00
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Matthew Hoops
4a458236f6 COMMON: Make QuickTimeParser::readSampleDesc take the desc size 2012-09-09 13:47:40 -04:00
Matthew Hoops
bbf0bbcd64 COMMON: Allow for parsing QuickTime MIDI files 2012-09-05 22:57:10 -04:00
Matthew Hoops
f35e820e9f Merge remote branch 'upstream/master' into pegasus 2012-09-05 11:45:25 -04:00
Matthew Hoops
2f9b1b67b0 ALL: Mark off some things as used by Pegasus 2012-08-31 22:26:02 -04:00
Alyssa Milburn
31801137b5 Merge remote-tracking branch 'origin/master' into tony
Conflicts:
	common/coroutines.cpp
	common/coroutines.h
	devtools/create_project/msbuild.cpp
	devtools/create_project/visualstudio.cpp
2012-08-28 15:54:12 +02:00
Matthew Hoops
bb1e60e8b2 Merge remote branch 'upstream/master' into pegasus
Conflicts:
	AUTHORS
	devtools/credits.pl
	gui/credits.h
2012-08-26 16:12:25 -04:00
Matthew Hoops
857b92f8ff Merge pull request #268 from clone2727/video-rewrite
VideoDecoder upgrade & partial rewrite
2012-08-26 15:41:56 -04:00
Matthew Hoops
6f9d84665f COMMON: Add MKTAG16 for 16-bit multi-character constants 2012-08-26 12:38:35 -04:00
Alyssa Milburn
f4b83283f3 COMMON: Fix waiting for multiple coroutine events.
This fixes the bWaitAll case of waitForMultipleObjects, and also the
resetting of events later in the function.
2012-08-25 14:05:04 +02:00
Alyssa Milburn
b5a63d6709 COMMON: Remove fprintf/stderr usage from xmlparser. 2012-08-15 00:15:29 +02:00
Matthew Hoops
991710d0a1 VIDEO: Adapt QuickTimeDecoder to the AdvancedVideoDecoder API 2012-07-27 11:32:51 -04:00
Einar Johan Trøan Sømåen
b398dcabaf COMMON: Add an optional argument to wrapCompressedReadStream, to simplify using streams that can't tell their size() 2012-07-18 13:54:15 +02:00
Filippos Karapetis
2c161796c5 Merge pull request #239 from bluegr/skipsavecompression
COMMON: Allow the savefile manager to create uncompressed saves
2012-07-01 11:08:08 -07:00
Thierry Crozat
50136f43c7 COMMON: Expand a bit the KeyState documentation
This follows a bug that was found in the Lure engine where keycode
was used in a place where it should have used ascii.
2012-07-01 01:03:49 +01:00
Filippos Karapetis
16adcb5145 COMMON: Simplify the documentation in openForSaving()
The new more concise description is courtesy of wjp.
2012-06-25 22:32:00 +03:00
Matthew Hoops
91efe792d5 Merge remote branch 'upstream/master' into pegasus 2012-06-24 09:37:53 -04:00
Filippos Karapetis
c9ace6426e COMMON: Add a detailed explanation on when to create uncompressed saves 2012-06-21 10:48:06 +03:00
Filippos Karapetis
4c4a127ca2 COMMON: Add documentation regarding the new parameter in openForSaving() 2012-06-21 10:48:04 +03:00
Filippos Karapetis
e10e412bba COMMON: Allow the savefile manager to create uncompressed saves
These are useful in cases where the files can be used in the original
interpreters (such as the exported characters from QFG), in order to avoid
confusion in cases where the users are unaware that these saves are
compressed and are trying to load them in the original interpreters.
2012-06-21 10:48:03 +03:00
Johannes Schickel
4fb9bceabc Merge pull request #246 from lordhoto/osystem-void-buffers
OSYSTEM: Use void buffers for screen/overlay/mouse buffers and proper pitch values for overlay code
2012-06-20 08:02:26 -07:00
Johannes Schickel
1b1b1d6615 Merge pull request #244 from clone2727/football2002-wday
COMMON: Add tm_wday to our TimeDate struct
2012-06-17 17:17:06 -07:00
Paul Gilbert
269ea2f6be COMMON: Change pulseEvent to better reflect how it works in Windows 2012-06-17 17:29:20 +10:00
Matthew Hoops
625f6cc716 Merge remote branch 'upstream/master' into pegasus 2012-06-16 01:43:32 -04:00
Johannes Schickel
aec9b9e22a ALL: Let overlay related methods in OSystem take a void * and use a proper pitch values.
This is a first step to get rid of OverlayColor, which is a requirement for
proper 4Bpp overlay support.
2012-06-16 04:17:14 +02:00
Johannes Schickel
d27d951d0b BACKENDS: Make OSystem::setMouseCursor take a "const void *" buffer.
This is mainly for consistency with OSystem::copyRectToScreen.
2012-06-16 03:28:42 +02:00
Johannes Schickel
31880186e1 BACKENDS: Let copyRectToScreen take a "const void *" instead of "const byte *" as buffer.
This removes the need to convert the parameter to copyRectToScreen to
"const byte *", which is commonly used in games, which use Graphics::Surface
to store their graphics data.
2012-06-16 02:18:01 +02:00
Johannes Schickel
51466ecfbb COMMON: Remove traces of mouse cursor target scale from OSystem docs. 2012-06-13 05:09:02 +02:00
Johannes Schickel
09ea48978a COMMON: Remove traces of overlay scale from the OSystem documentation. 2012-06-13 05:06:58 +02:00
Johannes Schickel
d99eb1e614 COMMON: Remove last traces of 8bpp overlay support from OSystem docs. 2012-06-13 04:57:55 +02:00
Matthew Hoops
b2f5721e58 COMMON: Add tm_wday to our TimeDate struct
Did not adapt bada or ps2 backends as I'm not sure how they should be handled
2012-06-09 20:21:48 -04:00
Paul Gilbert
26bb3d6732 COMMON: Changed pulseEvent to allow calling processes to finish executing first 2012-06-09 17:14:21 +10:00
Eugene Sandulenko
ec92a867da Merge pull request #243 from lordhoto/cursor-no-scale
ALL: Replace cursorTargetScale in OSystem API with a simple "do not scale" logic.
2012-06-08 23:20:28 -07:00
Johannes Schickel
8e7f874db3 COMMON: Make CoroutineScheduler's constructor and destructor private.
CoroutineSchedule is a singleton, thus it should not be possible to create
a custom instance of it.
2012-06-07 18:11:38 +02:00
Johannes Schickel
27aa097449 COMMON: Slightly adapt coroutine code to better match our guidelines.
I used astyle here, which automatically removes the use of tabs in comments.
2012-06-07 18:06:59 +02:00
Johannes Schickel
b17b38cc36 COMMON: Move coroutine documentation to the header file. 2012-06-07 18:06:13 +02:00
Paul Gilbert
b8989cafc7 COMMON: Merge of pull request #240, coroutine code cleanup 2012-06-04 21:59:10 +10:00
Johannes Schickel
a401f0a19e ALL: Replace cursorTargetScale in OSystem API with a simple "do not scale" logic.
All uses of the old target scale API actually wanted to disallow scaling of
the mouse cursor. This commit adapts our API to this and thus simplifies
backend implementations.

Some backends, most notable the Wii and Android, did some implementation of
the cursor target scale, which I didn't adapt yet. I added a TODO for the
porters there.
2012-06-03 02:02:57 +02:00
Max Horn
5de3f9c765 ALL: Correct spelling of "Mac OS X" in various places 2012-05-31 10:30:29 +02:00
Paul Gilbert
29ebb2823d COMMON: Fix comment typo in coroutine comments 2012-05-31 08:06:59 +10:00
Paul Gilbert
415831987d COMMON: Copied coroutine doxygen method descriptions to the header file 2012-05-29 21:51:10 +10:00
Paul Gilbert
5ba886ce8b COMMON: Fixed CORO_ADDR parameter names in Doxygen comments 2012-05-29 21:43:23 +10:00
Matthew Hoops
ab45e72e67 COMMON: Move InstallShield code to common
The code also now works for both data compressed with sync bytes and without
2012-05-28 16:54:49 -04:00
Paul Gilbert
a2b51174aa COMMON: Cleaned up coroutine comments 2012-05-25 23:36:18 +10:00
Paul Gilbert
839527a955 COMMON: Fix method error messages 2012-05-25 23:13:55 +10:00
Paul Gilbert
4719fd9900 COMMON: Fix comparison operation on coroutine wait methods 2012-05-25 23:06:24 +10:00
Matthew Hoops
f1f6a82cd5 Merge remote branch 'upstream/master' into pegasus 2012-05-25 00:35:38 -04:00
Matthew Hoops
ed4232cfeb COMMON: Skip junk found at the end of QuickTime files
Can occur in files and is ignored by QuickTime
2012-05-21 18:57:18 -04:00
Paul Gilbert
b63c28c1a0 COMMON: Fix comparison operation on coroutine wait methods 2012-05-20 09:22:14 +10:00
Paul Gilbert
2341570e04 COMMON: Converted Coro context structure definitions to instead use classes.
This fixes a known problem with class variables declared in a method's context definition were not having their destructors called.
2012-05-17 20:47:56 +10:00
Paul Gilbert
bd5b65f007 COMMON: Fix compilation of coroutines code when COROUTINE_DEBUG is defined 2012-05-17 20:47:02 +10:00
Paul Gilbert
8153d7868b COMMON: Improved waiting processes to store what PIDs they're waiting for
This is then used in PulseEvent to only execute processes that are specifically waiting on the given PID, rather than all waiting events.
2012-05-17 20:45:31 +10:00
Paul Gilbert
c6810c174e COMMON: Moved the Tinsel Coroutine code into it's own Common class 2012-05-17 20:39:55 +10:00
Paul Gilbert
8b214ce992 COMMON: Converted Coro context structure definitions to instead use classes.
This fixes a problem with member variables declared in a method's context definition that are object instances were not having their destructors called.
2012-05-13 18:51:41 +10:00
Paul Gilbert
8511b9b0cd COMMON: Fix compilation of coroutines code when COROUTINE_DEBUG is defined 2012-05-13 18:19:40 +10:00
Paul Gilbert
045f93f0fe COMMON: Improved waiting processes to store what PIDs they're waiting for
This is then used in PulseEvent to only execute processes that are specifically waiting on the given PID, rather than all waiting events.
2012-05-13 00:19:04 +10:00
Paul Gilbert
50153aba88 COMMON: Merged the Tinsel & Tony Coroutine schedulers into Common 2012-05-11 23:08:27 +10:00
Matthew Hoops
e80d622fa5 Merge remote branch 'upstream/master' into pegasus 2012-05-04 23:32:29 -04:00
Johannes Schickel
f23ca8b62b COMMON: Use the file cache in ZipArchive::listMembers for performance.
This avoids a new iteration through the .zip file for every listMember call.
Instead it uses the "_hash" HashMap, which already contains all the filenames
and is filled on initializing the ZipArchive by unzOpen.
2012-04-30 00:09:56 +02:00
Matthew Hoops
9971e74c4c Merge remote branch 'upstream/master' into pegasus
Conflicts:
	base/plugins.cpp
	configure
2012-04-19 08:16:24 -04:00
Filippos Karapetis
a1618c215b Merge pull request #226 from digitall/sincos
Replace large static Sin and Cos tables with dynamically generated ones.
2012-04-19 01:13:47 -07:00
D G Turner
0f66d2c701 COMMON: Update DCT & RDFT to avoid dynamic allocation of Sine/Cos Tables. 2012-04-17 22:12:20 +01:00
D G Turner
aa61c9abd3 COMMON: Refactoring of FFT class to remove repeated fft<x>() functions.
The repeated functions expanded from the original DECL_FFT macros are
now replaced by a recursive fft() function.
2012-04-17 20:23:38 +01:00
D G Turner
422334da5a COMMON: Refactoring of FFT class, removing Cosine Table Reallocations.
The cosine tables are now allocated once on object construction.
Also, only the tables necessary (less than or equal to _bits) are
created.
2012-04-16 21:05:21 +01:00
D G Turner
d04717f323 COMMON: Minor refactoring of FFT class, removing DECL_FFT macro.
This makes it easier to look at reworking the Cosine Table usage to
prevent repeated reallocation on calc() calls.
2012-04-16 15:24:47 +01:00
D G Turner
f4ba8a6485 COMMON: Replaced static Sine and Cosine tables with dynamic generated.
This removes the large static tables from the binary (which saves 500K
to 1Mb of binary size) and replaced them with a class which generates
the required tables as needed in RAM. This has been tested with QDM2
and shows no obvious performance degredation and Memprof shows no
significant rise in RAM usage.
2012-04-14 11:18:55 +01:00
D G Turner
1809b9173c COMMON: Minor reduction of sine/cosine table size (8 bytes...). 2012-04-13 10:16:48 +01:00
D G Turner
11143d4839 COMMON: Fixes for compiling without USE_BINK enabled.
The math utility classes in Common are now used by more than just Bink
Video i.e. Huffman is used by SVQ1, RDFT by QDM2 etc. so need to remove
conditional inclusion of objects in the Common Library.

This was done as these functions are very large wrt. binary size.
This is mainly due to the sine, cosine and log tables which should be
reconsidered as to whether these are needed or can be replaced by
standard sin()/cos() calls.
2012-04-13 09:17:17 +01:00
Matthew Hoops
f58d834cda COMMON: Add a KBD_META key state flag 2012-04-09 11:18:55 -04:00
Matthew Hoops
5dfa4333d1 COMMON: Hopefully fix AppleDouble files with directories 2012-04-07 21:19:11 -04:00
Joel Teichroeb
f83f5c5677 COMMON: Fix spelling of length 2012-04-04 21:22:31 -07:00
Matthew Hoops
b6374a3103 Merge remote branch 'upstream/master' into pegasus 2012-04-02 10:07:45 -04:00
Matthew Hoops
68e1a04183 AUDIO: Fix QDM2 extra data parsing 2012-03-30 14:40:14 -04:00
Matthew Hoops
e9f8d0e1a2 COMMON: Clean up the QuickTime class a bit 2012-03-30 13:39:49 -04:00
Matthew Hoops
7c4787e0dc COMMON: Read in QuickTime extra data for SVQ3 2012-03-30 13:39:48 -04:00
Filippos Karapetis
346c1fe461 GUI: Change the undithering checkbox to be an engine-specific option 2012-03-25 18:51:23 +03:00
Eugene Sandulenko
9b2471aeee Merge pull request #211 from lordhoto/game-gui-options-v2
GUI: Game gui options
2012-03-25 01:38:46 -07:00
Matthew Hoops
57abb8f843 COMMON: Make Rect::center() more readable
Thanks to Fingolfin for the suggestion
2012-03-22 00:38:12 -04:00
Matthew Hoops
71756bdf4e Merge remote branch 'upstream/master' into pegasus 2012-03-20 14:49:16 -04:00
Matthew Hoops
3c3576a224 COMMON: Make Rect::center() work properly with odd dimensions 2012-03-20 13:44:20 -04:00
Matthew Hoops
4d65be8264 COMMON: Add a READ_UINT24 macro
Complements READ_UINT16 and READ_UINT32
2012-03-20 01:06:48 +01:00
Johannes Schickel
4b2ca672f0 KYRA: Add per-game GUI option support. 2012-03-19 21:04:29 +01:00
Johannes Schickel
82ab3056fa ENGINES: Implement per-game options caching in AdvancedDetector via GUIO flags. 2012-03-19 21:04:29 +01:00
Matthew Hoops
ee0a05c32e COMMON: Add a dummy edit when a QuickTime file contains none
The edit just takes up the entire length of the track
2012-03-19 11:08:36 -04:00
Johannes Schickel
223794fb38 ALL: Make use of defined() for the preprocessor consistent.
This does not change the use of defined for some NDS source files, since they
seem to be (based on?) third party code.
2012-03-17 22:02:44 +01:00
Johannes Schickel
2c0bd426fc COMMON: Use defined() instead of defined in preprocessor macros.
Thanks to clone2727 for noticing this.
2012-03-17 21:23:42 +01:00
Christoph Mallon
a64b5e2a77 ALL: Use GCC_ATLEAST(). 2012-03-17 20:09:49 +01:00
Christoph Mallon
757fa01a28 COMMON: Add GCC_ATLEAST(major, minor) to simplify testing for versions of GCC. 2012-03-17 20:09:45 +01:00
Filippos Karapetis
2b57ccfd5e COMMON: Hopefully fix compilation
EVENT_CUSTOM_BACKEND_HARDWARE is only set when ENABLE_KEYMAPPER is set
2012-03-17 15:25:51 +02:00
Eugene Sandulenko
04d50f3703 COMMON: Use String class consistently 2012-03-17 12:55:51 +02:00
Eugene Sandulenko
34198fda35 Merge pull request #203 from fingolfin/guio-cleanup
COMMON: GuiOptions cleanup
2012-03-17 03:51:27 -07:00
Eugene Sandulenko
56252909f5 Merge pull request #202 from tsoliman/keymapper-nonkey-inputs
KEYMAPPER: Add Gesture Support
2012-03-17 03:46:46 -07:00
Christoph Mallon
e40ba4c135 JANITORIAL: Simply use *x instead of *x.get() on smart pointers. 2012-03-13 15:43:59 +01:00
Johannes Schickel
d7ba69ca27 COMMON: Mention that SafeSeekableSubReadStream is not threading safe. 2012-03-11 00:53:23 +01:00
Johannes Schickel
48efab4e5a COMMON: Rename SafeSubReadStream to SafeSeekableSubReadStream.
It actually inherits from SeekableSubReadStream, so it should be named
accordingly.
2012-03-11 00:51:20 +01:00
Johannes Schickel
5f342562d1 COMMON: Fix formatting in substream.h. 2012-03-10 02:01:34 +01:00
Matthew Hoops
1e734ab48c COMMON: Add an exists function to MacResManager 2012-03-08 08:02:06 -05:00
Tarek Soliman
c0a215282d KEYMAPPER: Add delays for *UP events coming from non-keys
Delayed entries are in a queue where each entry stores how
many milliseconds should pass based on the last entry.
2012-03-02 20:48:50 -06:00
Tarek Soliman
d12f21b31d KEYMAPPER: Map non-key custom input events
This also makes the keymapper be in charge of keymapping logic
2012-03-02 20:48:50 -06:00
Max Horn
c0d54bdd8d COMMON: Move language GUIO code to language.h 2012-02-29 12:57:34 +01:00
Max Horn
92d219715f COMMON: Replace OptionsDialog::renderType2GUIO by API in rendermode.h 2012-02-29 11:43:21 +01:00
Matthew Hoops
f17b1bf4f0 COMMON: Fix opening QuickTime files from MacBinary files 2012-02-27 18:31:20 -05:00
Tarek Soliman
533f80282b KEYMAPPER: Rename EVENT_CUSTOM_BACKEND to EVENT_CUSTOM_BACKEND_ACTION 2012-02-27 13:04:59 -06:00
Tarek Soliman
6afac4e01e KEYMAPPER: Rename HardwareKey to HardwareInput 2012-02-27 13:00:56 -06:00
Max Horn
367131ef0e COMMON: Move Language and Platform functionality into separate files 2012-02-26 15:21:36 +01:00
Max Horn
215b41b244 COMMON: Move RenderMode and GUIOptions functionality into separate files 2012-02-26 15:19:31 +01:00
athrxx
3b574466fa COMMON: distinguish between 256 colors and 16 colors PC-98 rendering modes
KYRA 1 PC-98 supports both modes in the same target. The desired mode can now be selected in the rendering options. We did have good support for the 16 colors mode of KYRA 1 already. This mode could not really be selected though (except by manually modifying the config file or the code).
2012-02-24 18:09:38 +01:00
Johannes Schickel
dac6ac66ad COMMON: Add a size_type to HashMap. 2012-02-22 20:13:33 +01:00
Johannes Schickel
5eabc4a2f3 COMMON: Add a size_type to List. 2012-02-22 20:10:04 +01:00
Johannes Schickel
03959c18dc COMMON: Slight formatting fixes in stack.h. 2012-02-22 20:08:40 +01:00
Johannes Schickel
7d8da24082 COMMON: Add a size_type to Stack and FixedStack. 2012-02-22 20:07:40 +01:00
Johannes Schickel
417cd7625c COMMON: Slight formatting fixes in array.h. 2012-02-22 20:00:11 +01:00
Johannes Schickel
d6ac369303 COMMON: Add a size_type to Array and take advantage of it.
size_type is an unsigned integer type and is used for all indices etc.
2012-02-22 19:59:26 +01:00
Tarek Soliman
6b91c94a09 KEYMAPPER: Initialize Event::customType 2012-02-22 07:04:59 -06:00
athrxx
d9c05f7121 COMMON: add gui options for rendering modes
The purpose is the same as for the sound gui options: users shouldn't be offered modes that the engine doesn't support.
2012-02-21 21:48:35 +01:00
Willem Jan Palenstijn
9ffe3e11d9 Merge pull request #182 from fingolfin/forbid-ctype
ALL: Avoid using is* macros from ctype.h
2012-02-21 11:33:32 -08:00