Commit Graph
620 Commits
Author SHA1 Message Date
Walter Agazzi c3589db569 AGS: Engine: don't Poll non-clickable GUIs
From upstream 95a2ef2c0d6a4c04e3985d78920bfc4a70a641c0
2023-09-23 17:10:08 +02:00
Le Philousophe c3c9f43a04 AGS: Fix build when SIZE_MAX is 64-bit sized
Closes PR #5316
2023-09-17 19:54:19 +02:00
Walter Agazzi bd41e8272d Updated build version (3.6.0.52)
Partially from upstream d64276938a02f52d5a2445cee50794a519c8a340
2023-09-16 13:32:59 +02:00
Walter Agazzi ae30f78761 AGS: Engine: support mismatching GUI numbers in legacy saves
From upstream 9d2fa2c26dda45fa53141a625c71ec63601cd9e2
2023-09-16 13:32:58 +02:00
Walter Agazzi 40e79d9e20 AGS: Engine: in legacy read save functions take game data ver as an argument
From upstream 8e280225f2c73980034db6866696f40d7bb63ad8
2023-09-02 13:23:59 +02:00
Walter Agazzi 58fc875836 AGS: Updated build version (3.6.0.51)
Partially from upstream 2a0177cc7cf114cf9585e39a7d7db68dbfc4bb8a
2023-08-13 10:58:26 +02:00
Walter Agazzi 5039b5f3a6 AGS: Engine: small refactor, rem duplicate list of restricted game options
From upstream c4efd74fd28b31ee786e85a0ecc4a7c1fcb0685a
2023-08-13 10:58:26 +02:00
Walter Agazzi ff0298be68 AGS: Engine: ignore mod and special keys when skipping speech and wait
Partially from upstream 8079c87ca11fa6b60ed2dd2ce345cda6c384c00b
2023-08-13 10:58:26 +02:00
Walter Agazzi 808b90b39f AGS: Common: fixes for CreateAllDirectories, Path::GetParent, GetFilename
Partially from upstream 3086f1b19d6d6a01c7f32871161cea6e5e3c13d8
2023-08-13 10:58:26 +02:00
Walter Agazzi 16a620e558 AGS: Updated build version (3.6.0.50)
Partially from upstream 7cfa7fc419fb9f96c03ad5047b5b4ffa313d4e27
2023-08-13 10:58:26 +02:00
Walter Agazzi 6b214f0477 AGS: Engine: fixed Buttons with invitem pic not redrawn on ActiveInventory
From upstream 37127b81ea4c006f8f79f11df746c24e4039f0ba
2023-08-13 10:58:26 +02:00
Walter Agazzi cd6a6ddc8c AGS; Engine: tidied SetGameOption()
* handle readonly options;
* don't do anything if new value equals old value;
* replace if/else sequence with a switch;
From upstream 2476bc3e517c13ef1abde83fca2e55571bcfff4a
2023-08-13 10:58:26 +02:00
Lars Sundström 49e30c93cd AGS: Remove function FileCloseNotify
In AGS there is a possibility to define a function, FileCloseNotify
with arguments, which is called when closing a file. This possibility
seems not to be used by any of the engines supported by ScummVM since
it's set to nullptr. This is not a problem in itself. Hoewever when
enabling compiler optimisiations the compiler may optimise away the
FileCloseNotify definition. This was discovered when compiling iOS
with Apple Clang in "Release" mode that the if-case in the code block
below was removed while the args parameter was left:
    if (FileCloseNotify) {
         CloseNotifyArgs args;
         args.Filepath = _fileName;
         args.WorkMode = _workMode;
         FileCloseNotify(args);
     }

This caused a nullptr exception since FileCloseNotify was nullptr.
A bit strange behavior by the compiler which could remove the entire
code block above.

Since the FileCloseNotify is not used in ScummVM, remove it as it
only seems to be used in upstream by the emscripten code which is
not part of the ScummVM repository.
2023-07-21 16:48:03 +02:00
Walter Agazzi bf8655b35e AGS: When loading images convert to supported pixelformats
This ensures that the surfaces mantain a format supported by Allegro,
and is required after commit b458ced:
"IMAGE: Speed up 16/24/32bpp BMP decoding"
to support 24bpp
2023-06-21 10:10:42 +03:00
Walter Agazzi a9edfcaae7 AGS: Updated build version (3.6.0.49)
Partially from upstream b5f3bb1ed063cba192f8f11e3c8a0c54b3dd9bbd
2023-06-19 22:01:30 +03:00
Walter Agazzi d74aa04fc3 AGS: Common: fixed GUIButton::IsImageButton() not accounting for neg values
from upstream c684713cc3f87e2a8d2c863955bf8293d00a2f7b
2023-06-19 22:01:30 +03:00
Thierry Crozat 4dcde68f4a AGS: Remove unnecessary include of std/math.h 2023-06-06 08:59:58 +01:00
Walter Agazzi 8d08d05f7f AGS: Updated build version (3.6.0.48)
Partially from upstream ad45540abe6c776574e02e6e57fba7758410ec40
2023-05-14 23:04:38 +02:00
Walter Agazzi b2b5626f09 AGS: Engine: fixed one instance of utf8 char read in split_lines()
From upstream dd50a9976f77d504952171209c1597483318e1c2
2023-05-14 23:04:38 +02:00
Walter Agazzi 7c96b06aa6 AGS: Common: fixed memory leak in String::ReverseUTF8()
From upstream 57e866411b77af9e3a942bccf4a8c59bfa3d12cd
2023-05-14 23:04:38 +02:00
Walter Agazzi e6516e0667 AGS: Small workaround for transparent purple texts
Prevent purple texts from turning transparent in some games (such as
Billy Masters, A Fragment of Her, Hutton Grammar School)
2023-05-13 21:11:36 +02:00
Walter Agazzi fe3434ab9b AGS: Don't assign palette values if array is unallocated
Fixes a segfault in Last 'n' Furious
2023-05-01 18:42:30 +02:00
Eugene Sandulenko d66d996b21 AGS: COmment out unused variable 2023-04-29 20:28:20 +02:00
Walter Agazzi 74b5ea9f44 AGS: Updated build version (3.6.0.47), marking "final" 3.6.0
Partially from upstream 820ee6c41427e3529a22ef46ac2799297a050876
2023-04-29 13:11:41 +02:00
Walter Agazzi ea65074e6b AGS: Engine: expanded a compat comment in find_free_audio_channel()
From upstream 4392ef832f131c8fd1e5ded00b095f78cf4815ca
2023-04-29 13:11:41 +02:00
Walter Agazzi 1b3a417e75 AGS: Common: in IniFile replaced string indexes from int with size_t
This is long overdue since String class changed int indexes to size_t.

From upstream b81f9e31e8b8bbbbf46e570427d16deea5102d3a
2023-04-29 13:11:41 +02:00
Walter Agazzi 53a472650d AGS: Common: moved iagsstream to util dir (api dir proved to be excessive)
From upstream 2de0701f47cb189b51aa429cd8ef4812b6dae9ef
2023-04-29 13:11:41 +02:00
Walter Agazzi a89fe3cd9e AGS: Updated build version (3.6.0.46)
Partially from upstream 2b03d989c8ac5de3dac49b483bd216aaeb807354
2023-04-29 13:11:41 +02:00
Walter Agazzi c537416279 AGS: Engine: renamed WalkArea.Light to PlayerView, matching its real purpose
Apparently, this field was used to store light level of the
walkable area in pre-2.55 engines, prior to introduction of the
Regions.
In current engine, when loading games that old, this value is
copied into Regions for backwards compatibility.
While in newer games it actually stores "player character
view" override.

Renamed update_shadow_areas() into update_player_view(),
and tidied the code for clarity.

From upstream 71e7dc880b4496dd6937cec00a56f0de66137482
2023-04-29 13:11:41 +02:00
Walter Agazzi 84187b3bea AGS: Updated build version (3.6.0.45)
Partially from upstream cdb0b7fef561aa5badc3522342e2f0b1d20d0b4d
2023-04-29 13:11:41 +02:00
Walter Agazzi 430758510e AGS: Engine: center the SDL window ourselves on desktop platforms
This is not implemented and just add a  stub
Partially from upstream 82b19ca27b682c497422ad8eac532ceb88c67e62
2023-04-29 13:11:41 +02:00
Walter Agazzi 7d7a6c6b4e AGS: Engine: improvements to ValidateWindowSize()
Screen limits are hardcoded in ScummVM's implementation, so this function
does not really validate anything
Partially from upstream cbe729f93c9b204db41ddd1b28c455d4a98ff703
2023-04-29 13:11:41 +02:00
Walter Agazzi 7d7f9a3b42 AGS: Common: fix font parameters were used and checked for null later
From upstream a746ae013e8874c816cedf24c89452c25fc189a0
2023-04-29 13:11:41 +02:00
Walter Agazzi 8a5a290ea5 AGS: Common: added more comments to Bitmap functions
Partially from upstream 9a1221e7c11326c6ae469285f62dbe3a0a1e4c32
2023-04-29 13:11:41 +02:00
Walter Agazzi 0c3fdb6945 AGS: Common: enhanced arg order in CreateClearBitmap() for consistency
Partially from upstream 5518f00ba54680d9e314d192f4afc433519f2afa
2023-04-29 13:11:41 +02:00
Walter Agazzi 993db0fbf3 AGS: Updated build version (3.6.0.44)
Partially from upstream 8cde9d29c1854a7baee489829fa36fdfa8c41a93
2023-04-29 13:11:41 +02:00
Walter Agazzi 3b37a13af6 AGS: Common: in ConvertUtf8ToAscii() fallback to strcopy if setlocale failed
setlocale equivalent is not actually implemented so this does nothing
From upstream f4bd0604c73aad7ecf05bf6e3f22dbe161434b2c
2023-04-29 13:11:41 +02:00
Walter Agazzi b10d63b9a8 AGS: Updated build version (3.6.0.43)
Partially from upstream 8dce503b05728edabe6205e7fbf3f660ed31e957
2023-04-29 13:11:41 +02:00
Walter Agazzi a8df307602 AGS: Common: add Close Notify to FileStream
- with FileStream::FileCloseNotify we can run an event when a file closes
- the arguments are a struct so we can expand them later if needed easily

From upstream 2c170cacb84f56004d86d8e981710777c9c09554
2023-04-29 13:11:41 +02:00
Walter Agazzi 17cbbe1252 AGS: Engine: fixed idle anim speed always set in backwards compat mode
Was broken by 0f19fc3
From upstream 899b6be0ea088737799e075e7906bc3308108699
2023-04-29 13:11:41 +02:00
Walter Agazzi c387b37714 AGS: Updated build version (3.6.0.42)
Partially from upstream 0432b26a2b875b7ee36f32fb321342d11901c459
2023-04-29 13:11:41 +02:00
Walter Agazzi 374ce9bffc AGS: Common: width of empty text should be zero
From upstream 9c9277dae1b56650b7022a824579626cfdb62728
2023-04-29 13:11:41 +02:00
D G Turner be309e97eb AGS: Fix GCC Compiler Warnings 2023-03-12 20:58:29 +00:00
Walter Agazzi bdec317f27 AGS: Updated build version (3.6.0.41)
Partially from upstream 81b5fbc917d83a02cebc152969fd769b2b7b9b15
2023-03-12 20:58:29 +00:00
Walter Agazzi 07bbbcd233 AGS: Engine: replaced couple more shared_ptr<char> with vector<char>
From upstream 1cccdfea5c1009123de7ba25be72b2757f74d06f
2023-03-12 20:58:28 +00:00
Walter Agazzi 15d43b09ad AGS: Common: add AGS_PLATFORM_MOBILE for Android and iOS
Partially from upstream 4404881c6a49e3a74f316998ee46368b00895fc7
2023-03-12 20:58:28 +00:00
Walter Agazzi 953356c758 AGS: Common: call OnMouseLeave on focused control in ResetOverControl()
From upstream b8de51fedf0318e8243e1fc3872c61f366a23144
2023-03-12 20:58:28 +00:00
Walter Agazzi 89ea094df1 AGS: Engine: fixed idle_anim_speed after restoring old save in updated game
From upstream 0f19fc3d2b9efbc4eb809032bcb7d60b652e1150
2023-03-12 20:58:28 +00:00
Walter Agazzi 43723e170a AGS: Engine: in SetMemoryBackBuffer() don't reset batch surfs during render
In ALSoftwareGraphicsDriver:
* Save index of a currently rendered sprite batch (or none, if not inside
a render pass).
* In SetMemoryBackBuffer() don't reset virtual screen subbitmaps
  unless we are outside render pass.
* In InitSpriteBatch() also test if batch's surface is subbitmap to the
  current virtual screen (in case one was replaced, but batch's surface
  stayed).

Partially from upstream 5dd078961020da6478347dac01dea729471333d1
2023-03-12 20:58:28 +00:00
Walter Agazzi 0f90b07118 AGS: Common: also assert in GetScanLineForWriting()
From upstream 872598fea699341c7de82484b43678d91dcc425e
2023-03-12 20:58:28 +00:00