Commit Graph
645 Commits
Author SHA1 Message Date
Walter Agazzi f8ddba8488 AGS: Updated build version (3.6.0.58)
Partially from upstream 3a1fc8d8f3f768506e3b56f840563b6d4211c567
2024-04-02 23:21:11 +02:00
Walter Agazzi f09519834c AGS: Engine: updated unload_game_file(), fix few things not reset
This is not as important in case of game quit, as it is in case of RunAGSGame().

* Adjusted order of data release in unload_game_file() to be in sync with 3.6.1 (as much as possible).
* Fixed GameSetupStruct not releasing some of the data in Free().

Noteably this fixes font infos to not getting fully reset on RunAGSGame().
from upstream 1cc9d22095d0ee90541ce506fa54c538de7ca4ad
2024-03-28 12:03:33 +01:00
Walter Agazzi 59e2d4955e AGS: Common: fix all_buttons_disabled's type, for clarity
from upstream a60eb5d2f484c1783f4a52f46dfcae94f5e07865
2024-03-28 12:02:40 +01:00
Walter Agazzi d30db56310 AGS: Updated build version (3.6.0.57)
Partially from upstream eaec1e8f3843a719a32640a18f88fae88f8d29f4
2024-03-28 12:02:39 +01:00
Walter Agazzi dacccc343e AGS: Engine: fix use of global "walkspeed" variables in the pathfinder
These variables had to be set using set_route_move_speed() call in order for
the find_route() and calculate_move_stage() work properly.
But it's not obvious, and easy to forget. So turn them into function arguments instead.

This fixes Character.AddWaypoint potentially using wrong walkspeed, if there are
multiple characters or objects moving simultaneously.
An example of a script that would cause a bug:

    cEgo.AddWaypoint(20, 20);
    oObject0.Move(0, 160, 1, eNoBlock, eAnywhere);
    cEgo.AddWaypoint(200, 200);

from upstream 9a00255a2699845bd0e53054d81c24e6955f663e
2024-03-28 12:01:52 +01:00
Walter Agazzi dfb4598c31 AGS: Common: fix String::Trim*() to avoid asserts for extended chars
This complements 82abea8
From upstream 82ffab07df0bdf4a016addcc6050ba7f2b5e8fdc
2024-03-28 12:00:55 +01:00
Walter Agazzi 5d7c835c53 AGS: fixed wrong offset calculation when writing TRA
This was broken at some point... see commits:
f93f44c, e74b5ca
From upstream f49c8c90a198dbe187d811ea861afd19f094acdd
2024-03-28 12:00:55 +01:00
Walter Agazzi a1ae05f537 AGS: Fix uninitialized value
Partially from upstream 8ccd9fde8817df951146da7c94a6b3330397a062
2024-03-28 12:00:55 +01:00
Walter Agazzi 0f438f51c7 AGS: Common: fix String::IsNullOrSpace() to avoid asserts for extended chars
From upstream 4aa8d0ce7324dafcbd528ca904189604c5a9fe0d
2024-03-28 12:00:55 +01:00
Walter Agazzi d1d5d2ed7d AGS: Updated build version (3.6.0.56)
Partially from upstream 95c62e15aa7bfa173a2b53ab20770a36e633f6fe
2024-01-17 03:12:32 +01:00
Walter Agazzi 2c35d26b82 AGS: Updated build version (3.6.0.55)
Partially from upstream b9f4415f24e52b90b3fddd10cf81b7bd97d715e8
2024-01-17 03:12:32 +01:00
Walter Agazzi 4eaac90e4e AGS: Common: safer reading of fixed-len string fields
From upstream 458a524a418f30142f5fe2e512902b7e00e97eec
2024-01-17 03:12:30 +01:00
Walter Agazzi a7266499a5 AGS: Engine: misspelling fix: perfomance->performance
From upstream c4cf67ac5bc5ac3463609eeefea16c1caa8abab9
2024-01-17 03:12:29 +01:00
Walter Agazzi e2d455ee9e AGS: Updated build version (3.6.0.54)
Paritally from upstream 7a471ddeb30ee16f00397ac6939b334dbba6b717
2024-01-17 03:12:29 +01:00
Walter Agazzi 0f39d8c525 AGS: Common: small fix for GUITextBox::CalcGraphicRect()
From upstream 3529f4b2e5e41c6662abc9e2ec07e4113605137e
2024-01-17 03:12:29 +01:00
Walter Agazzi 8aa46edc16 AGS: Common: account for Font's height when calculating ListBox and TextBox
Historically these controls could draw text beyond their vertical bounds too (in non-clipping mode).
From upstream c9572541a6f8d38ed2ca1ba7af8e235c5d56c8f2
2024-01-17 03:12:28 +01:00
Walter Agazzi bcf5ebaae5 AGS: Common: account Font's YOffset when calculating GUI's graphical rect
This fixes fonts with a custom VerticalOffset set getting unexpectedly clipped by a control's texture. Fixes Button and Label controls.
From upstream 02b15886d09b1025ac051bc8adfd6c3e5e7cd171
2024-01-17 03:12:28 +01:00
Walter Agazzi 6f4b702810 AGS: Common: small fix to the OpenMainGameFile's error msg
from upstream d297b2d76a1b98a8fd3bb6bcdb752e0286c11db7
2024-01-17 03:12:28 +01:00
Le Philousophe 728b2cbac7 AGS: Migrate engine to Path 2023-12-24 13:19:25 +01:00
Le Philousophe db5041ecb0 COMMON: Make savepath a Path object 2023-12-24 13:19:25 +01:00
Walter Agazzi 9b5dddd9ac AGS: Remove overzealous assert in spritecache
The assertion is reduntant since there's already an identical check with error
logging and it should not trigger for remapped sprites.
Fixes TRAC #14730
2023-12-11 02:11:38 +01:00
Walter Agazzi 5d885dc53a AGS: Updated build version (3.6.0.53)
Partially from upstream 8a66ece938ca73d8bcd49d86424f5e061673a660
2023-11-02 20:06:27 +01:00
Walter Agazzi 531a915261 AGS: Engine: hotfix config failing at cs filter names in "disabled"
From upstream 79847cc5e59236cfd93d6d98218c01d5f3cfa03f
2023-11-02 20:06:27 +01:00
Walter Agazzi 3cc56da41c Revert "AGS: Engine: don't Poll non-clickable GUIs"
This reverts commit c3589db569,
which breaks GUI functions in Kathy Rain
2023-11-02 20:06:26 +01:00
Kaloyan Chehlarski de20f4b395 AGS: Remove unused function
Removed ExtractScriptTextReader() from room_file.cpp,
since it was just a leftover forgotten after a refactoring.
2023-10-28 16:19:34 +03:00
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