Commit Graph

3921 Commits

Author SHA1 Message Date
Thunderforge
fd129ebc0c JANITORIAL: "Mac OS X" and "OS X" to "macOS" in comments
Apple's desktop operating system was formerly called "Mac OS X" and "OS X", but since 2016 it has been called "macOS" (starting with version 10.12).

Changing across all comments and documentation to use this current terminology, except in cases where the historical versions are explicitly referenced. No code changes are made; we should consider changing those in future PRs.
2022-01-29 14:15:05 +01:00
hackingdemon
453f7cfffe COMMON: Fix BufferedWriteStream::pos() method
The pos() method of BufferedWriteStream should return the stream position
but actually returns the buffer position. That completely breaks saving
the game in AGS engine on the platforms using BufferedWriteStream wrapper
for savefile handling, such as Nintendo Switch. AGS engine's save file
writing functions use GetPosition() with later Seek() on stream,
so an invalid return value from GetPosition() results in invalid save files
that cannot be loaded and are skipped by the engine.
2022-01-18 15:31:59 +00:00
trembyle
7b1fe3df42 COMMON: Add platform for Tandy Color Computer 1/2
This platform was supported by Sierra for early and pri-AGI games.
CoCo 1 and 2 were not generally forward compatible with CoCo 3,
which was officially supported by Sierra for KQ3 and LSL1 only.
2022-01-03 18:34:45 -05:00
Paweł Kołodziejski
20cb0ae228
ALL: Cleanup ResidualVM -> ScummVM 2021-12-26 21:19:38 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Filippos Karapetis
a160058d06 COMMON: Add more engine-specific options
We have reached the limit of 16 engine-specific options in SCI, so
we're adding 16 more for future additions
2021-12-19 11:35:48 +02:00
Le Philousophe
ba136b6f29 COMMON: Add JOYSTICK_BUTTON_INVALID to be used when no button is pressed 2021-11-29 00:04:45 +01:00
Paweł Kołodziejski
2a7aa00c85
BACKENDS: Remove PixelBuffer leftovers 2021-11-27 21:22:09 +01:00
Cameron Cawley
a21961516a GRAPHICS: Split ScalerPluginObject into two classes 2021-11-23 23:32:58 +01:00
Paweł Kołodziejski
f5ccb90ddf
COMMON: Put debug traces to defined level to avoid printing them always 2021-11-23 15:19:01 +01:00
Torbjörn Andersson
8574d19f20 KYRA: First attempt at loading Kyra1 StuffIt archive
This doesn't work. Not even close.
2021-11-22 18:39:23 +01:00
Eugene Sandulenko
192b05930a
COMMON: Mark human-readable bytes as translatable 2021-11-18 22:38:43 +01:00
athrxx
1b64bf837b GUI: fix for 9e92ffe (missing code line)
(somehow one line went missing when moving that commit to master. It would still work, but much, much less efficiently)
2021-11-15 22:45:41 +01:00
athrxx
9e92ffea44 GUI: make parsing of GUI options more precise
The parsing was rather lazy and would e. g. find "ega" in "midiSegaCD", so that the launcher offered me an "EGA" rendering mode for EOB SegaCD. Now, there is less lenience, but ScummVM will always write the string in the correct format anyway...
2021-11-15 16:18:56 +01:00
athrxx
aefb23d44c GUI: add missing GUIO settings for mac b/w mode
(I noticed that I got offered macintosh b/w mode for EOB DOS and Amiga versions)
2021-11-14 16:19:32 +01:00
Orgad Shaneh
cb61ec37c4 COMMON: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Orgad Shaneh
7adcd48a41 COMMON: Use override
Using clang-tidy modernize-use-override
2021-11-14 14:35:15 +02:00
Cameron Cawley
5022489277 BACKENDS: Refactor the API for creating Mutexes 2021-11-12 20:19:45 +01:00
sluicebox
946bb818ea VIDEO: QuickTime comments, mild cleanup 2021-11-12 18:47:22 +02:00
trembyle
5ef7793578 COMMON: Return updated language from obsolete code
When an obsolete language code is encountered in a user's
config file, we translate this to the updated language ID.
2021-11-11 12:06:15 +01:00
trembyle
c740f96f63 COMMON: Normalize and document language maintenance
* Add documentation to add or maintain language values
* Fix and reorder existing entries to match ISO standards
2021-11-11 12:06:15 +01:00
Orgad Shaneh
7a4e5612de JANITORIAL: Replace new[]/memset with new[]()
Mostly done using the following Ruby script:

(Dir.glob('**/*.cpp') + Dir.glob('**/*.h')).each do |file|
  s = File.read(file, encoding: 'iso8859-1')
  t = s.gsub(/(([\w_.\[\]]+)\s*=\s*new\s+\S+?\[[^\]]+?\](?!\())([^\{\}]*?)\n\s+memset\(\s*\2\s*,\s*0\s*,[^;]*;/m, '\1()\3')
  if t != s
    File.open(file, 'w') { |io| io.write(t) }
  end
end
2021-11-10 19:53:15 +01:00
Cameron Cawley
6dbb129f40 BACKENDS: Allow activating the system virtual keyboard using the keymapper 2021-11-01 16:54:39 +01:00
Eugene Sandulenko
f0af2b513b
COMMON: Remove c++11-compat.h. It is not needed anymore 2021-10-31 23:07:36 +02:00
Eugene Sandulenko
44bc2e2eab
COMMON: Fix punycode implementation for upper Unicode characters 2021-10-31 23:00:35 +02:00
Alexandre Detiste
6044504762 JANITORIAL: typos
some in the variable names, some in the comments;
no change for the strings that interract with original games assets
2021-10-31 20:46:31 +01:00
neuromancer
0925d2b823 COMMON: changed type of variable in the directory count loop 2021-10-31 19:15:06 +01:00
neuromancer
c608f28f05 COMMON: removed convertPath 2021-10-31 19:15:06 +01:00
neuromancer
ceaf573ecf COMMON: extended InstallShieldV3 support to read all the files in every subdirectory 2021-10-31 19:15:06 +01:00
Eugene Sandulenko
3b281bd85c
COMMON: Further synchronisation of the escape characters for punycode 2021-10-31 19:26:48 +02:00
Eugene Sandulenko
b9c5ef933f
COMMON: Sync punycode with JS/Python code:
* Allow [] in file names
* Process files ending with spaces or dots
2021-10-31 16:36:27 +02:00
Eugene Sandulenko
c544e5119b
COMMON: Remove USE_CXX11 checks, it is now always present 2021-10-31 11:52:29 +02:00
Le Philousophe
454e30312c COMMON: Add isAscii function to replace non standard isascii 2021-10-24 15:11:18 +03:00
Eugene Sandulenko
63870b65fa
AD: Properly seek to the tail of file for md5 computation 2021-10-19 21:09:15 +03:00
Eugene Sandulenko
841254e6f1
AD: Fix seeking for tail md5 2021-10-19 13:05:22 +03:00
Eugene Sandulenko
91b91c0cba
COMMON: Fix bug in Mac resfork data size calculation. This invalidates many detection entries 2021-10-17 20:48:02 +03:00
Eugene Sandulenko
4eea8524f7
COMMON: Add possibility to compute md5 for tail of resfork data 2021-10-17 20:48:01 +03:00
Thierry Crozat
32d4173fda COMMON: Remove unused and useless getCurrentCharset in TransMan
Now all translations use unicode.
2021-10-02 23:50:21 +01:00
Thierry Crozat
ebd8915009 GUI: Simplify builtin language check 2021-10-02 23:50:21 +01:00
Cameron Cawley
987c0eb76a COMMON: Add a signed version of uintptr 2021-09-19 11:21:41 +03:00
TehGelly
0992fa9c3b
COMMON: Change PRNG Function to Xorshift* (#3341)
The old RNG method had non-standard periods, ranging from some seeds looping on themselves (seed = 1184201285) to some seeds having periods as low as 11 or 48, as listed in https://github.com/scummvm/scummvm/pull/3340. This is a problem even for games that run the RNG once a frame, as the possibilities for random events is greatly reduced should the initial seed be in one of these sets of small periods.

Xorshift* is a standard, fast, non-cryptographic PRNG with academic backing that has period 2^32-1 (all seeds lead to another seed except 0, which is excluded from the initial seeds).  Many different flavors are possible, as listed in the paper, but the choice implemented in this pull request uses only a single 32-bit integer as a state, like the old PRNG.

Co-authored-by: Thierry Crozat <criezy@scummvm.org>
Co-authored-by: Filippos Karapetis <bluegr@gmail.com>
2021-09-09 21:46:08 +03:00
Scott Percival
666f241d29 EVENTRECORDER: Remove backwards compatibility 2021-09-09 19:32:02 +02:00
Scott Percival
fb421a0ca7 EVENTRECORDER: Change file format to big-endian
Previously the file format had all chunks, offsets and values stored in
little-endian format. The one exception was screenshots, which used the
existing THMB code in graphics/thumbnail.cpp, that is entirely
big-endian. Any tooling which attempts to parse the Event Recorder file
format must make a special exception for THMB chunks, and read the chunk
size and contents as big-endian.

In the interests of making the file format more consistant
to parse, and given that backwards compatibility is not required for
this iteration of Event Recorder, this patch changes everything to
big-endian.
2021-09-09 19:32:02 +02:00
Scott Percival
1040bd2862 EVENTRECORDER: Fixes based on feedback 2021-09-09 19:32:02 +02:00
Scott Percival
84707ec828 EVENTRECORDER: Prevent recursive call to warpMouse 2021-09-09 19:32:02 +02:00
Scott Percival
5cbcd98963 EVENTRECORDER: Add screen update tracking
Screen update boundaries are now used as sync points.
Screenshots are now processed on a screen update boundary.

This change increments the version of the Event Recorder
file format to 2; version 1 files will still play back as
before, without synchronising to screen updates.
2021-09-09 19:32:02 +02:00
Torbjörn Andersson
15916e02f1 COMMON: Fix Valgrind warning in PEResources
As with NEResources, _disposeFileHandle was never set.
2021-09-06 08:37:25 +02:00
Torbjörn Andersson
e14ffec25a COMMON: Fix _disposeFileHandle not being set
If there is a file handle, the clear() method checks if it should be
disposed of. However, the _disposeFileHandle variable was never set, so
it's unlikely that _exe was ever deleted. I found this out from a
Valgrind warning when quitting Buried in Time.

This seems like a very obvious fix to me, and as such it seems like a
good candidate for backporting to the release branch. On the other hand,
maybe there are cases where it worked by sheer, dumb luck? I'm not
familiar enough with where and how it is used.
2021-09-06 08:01:08 +02:00
Torbjörn Andersson
24ea36d3e9 COMMON: Don't decompress more bytes than the file specifies (bug 12900)
When running my CD version of Buried in Time, the loadFromCompresedEXE()
function would try to decompress beyond the allocated buffer, causing it
to crash. Up to that point, the decompressed data was identical to what
I would get if I let the original installer decompress the EXE and DLL
files.

So keep track of how many bytes have been decompressed, and terminate
when the upper limit is reached.
2021-09-05 21:26:49 +03:00
Matthew Duggan
2c4aae5294 COMMON: Use const references where possible in punycode
As suggested by coverity.
2021-09-04 23:15:23 +03:00