Walter Agazzi
8d90ee9c2c
AGS: Move valid_handles to globals
2024-10-30 18:07:42 +02:00
Walter Agazzi
5ce015027f
AGS: Add const_casts, comment out unneeded bindings
2024-10-30 18:07:42 +02:00
Walter Agazzi
dc16de544e
AGS: Common: Stream::Seek() returns new position
...
This was done for the IAGSStream in plugin api in the first iteration,
but lost when fixing the api recently.
From upstream e248f320074d8430f14c1c4e513e5fb120e55eb2 and
76b49c0c7a4df46b06aebea86573999f29400809
2024-10-30 18:07:42 +02:00
Walter Agazzi
41b5b9edbd
AGS: Engine: sync Character's legacy name field in old Str* script functions
...
Detect when a legacy string function (StrCopy, StrCat, StrFormat, etc) modifies
Character's fixed-sized field, and sync that with the new unrestricted property value.
Also fixed check_strcapacity() which incorrectly use new Character field's size instead
of legacy field size after recent changes.
From upstream ad7d19232bf9d69b6060e0cb20585628a6687c9f and
e1a06c5abf2ae0dd55dedc25404f71ef8c4b2fe5
2024-10-30 18:07:42 +02:00
Walter Agazzi
d59eeaf4a6
AGS: Common: improved Stream::HasErrors(), renamed to GetError()
...
Renamed HasErrors to GetError.
Require this method to clear any error flags after reading them, so to actually make
this function practical.
From upstream e62e98a6cf6364d5dba5e90dd7b1ef2c96df2ce6
2024-10-30 18:07:42 +02:00
Walter Agazzi
960bccaf86
AGS: Engine: removed my_strncpy() and remade check_strlen() w/o global var
...
From upstream 28d73ee1d4a8dfbb76c3d53ab5b62cfbed01bcd1
2024-10-30 18:07:42 +02:00
Walter Agazzi
4e41e60781
AGS: Engine: store ScriptString in memory similarly to dynamic array
...
This potentially allows to access any metadata while passing string pointer around the script functions.
As a consequence: never wrap external buffer, always allocate your own.
From upstream 043758b1bb5116f038c5c597d17fe9524b92b3c2
2024-10-30 18:07:42 +02:00
Walter Agazzi
df504348ed
AGS: Script API: Restore leftover bindings
...
From upstream
720114e8a873dc69bf54de4148d2da77ae6561c6
c68e2b02ebddcd33184270cd95b66eb34521e1d1
2024-10-30 18:07:42 +02:00
Walter Agazzi
cec77078f6
AGS: Convert several files to new API registering
2024-10-30 18:07:42 +02:00
Walter Agazzi
4ba37782f4
AGS: Script API: implemented File_GetPath
...
From upstream c68e2b02ebddcd33184270cd95b66eb34521e1d1
2024-10-30 18:07:42 +02:00
Walter Agazzi
8af54c7f21
AGS: Script API: implemented File.ResolvePath()
...
File.ResolvePath resolves a script path into the filesystem path, in exact
same way as the engine does it when searching for a file.
Partially from upstream 720114e8a873dc69bf54de4148d2da77ae6561c6
2024-10-30 18:07:42 +02:00
Walter Agazzi
951a8ee7e0
AGS: Engine: ScriptFileHandle stores Stream in unique_ptr
...
From upstream 6fd4ec5a5e301bd63b34d62b14b96016779a64db
2024-10-30 18:07:42 +02:00
Walter Agazzi
6c517c2dbd
AGS: Engine: corrected few File::Open and File::Test calls
...
Partially from upstream b717b457f9d5ac92400e9e59951c936501846f8d
2024-10-30 18:07:42 +02:00
Walter Agazzi
3a5ccd4cba
AGS: Engine: moved dynamic object management functions to a separate unit
...
From upstream 1a9df937e3ac9eba0c2f5b663507a52569d635e0
2024-10-30 18:07:42 +02:00
Walter Agazzi
015937d586
AGS: Add workaround for qfg2agdi to allow importing sci exported chars
...
Fixes TRAC #12335
2024-01-31 14:50:07 +01:00
Walter Agazzi
20487eb9f4
AGS: Remap GameDataDirToken to saves directory
...
Games may attempt to create files in %appdata%, which is not supported.
Redirect to the saves directory, prepending the gameid.
This fixes an immediate crash in "Beat the Buzzer" and "There's Something in
the Pipes", which create .ini files using the iniFile2 module.
2023-05-30 11:51:39 +02:00
Walter Agazzi
d372745e35
AGS: Prevent savepath manipulation in ScummVM
...
Completes commit 8e77b04062d865e35bbadedce2fb7ba4971b837c.
We don't support subdirs in saves, the previous change causes some
games to be unable to save/restore
2023-03-12 20:58:27 +00:00
Walter Agazzi
72592cc9e0
AGS: Engine: fixed ResolveScriptPath not handling subdirs correctly
...
from upstream 8d0e0cb3c20db0beddffc36c688ed33005a43d7c
2023-03-12 20:58:27 +00:00
Thierry Crozat
75a67377d6
AGS: Script API: added File.WriteRawInt(), complementing ReadRawInt
...
From upstream cf23239bcce2e50377866090a11f1489602fdd65
2022-12-15 22:40:17 +01:00
Paul Gilbert
b1649597d7
AGS: Replaced Math/std Min/Max with ScummVM macros
...
Inspired by 6dee5ee6f271c600e30879d892295ea6069e8cc9
2022-05-05 22:41:10 -07:00
Paul Gilbert
21ab95f5ab
AGS: Remove RegisterGameWithGameExplorer()
...
From upstream 1554207f04dc6999994d02956587b302bb56f858
2022-04-29 22:20:39 -07:00
Paul Gilbert
a6f42ad1ab
AGS: Fixing various "unused va/arg" warnings + removed empty funcs
...
From upstream 61771ecd638338806c40d0da2bf1addea06cac90
2022-04-25 21:44:40 -07:00
Paul Gilbert
a1a0323d28
AGS: Removed few redundant function args
...
From upstream 4c80a7fb3afdfd8d7b82f16b7aeac5418565f608
2022-04-24 16:00:03 -07:00
Paul Gilbert
ffba3046d2
AGS: Fixed File_ReadRawLineImpl failing at char values >127
...
From upstream 643e55f2b2b8237f27dc75e724bc87fa12339d7e
2022-04-12 22:27:52 -07:00
Paul Gilbert
dc4c149e30
AGS: Fixed PackfileFromAsset() - potential nullptr access
...
From upstream 0f675976046afbc9c1440b078b78f08d68363456
2022-04-10 19:39:09 -07:00
Paul Gilbert
0408ce2b72
AGS: Fixed unnecessary registration of empty optional data paths
...
From upstream af24f3c307b3080e4ec8a7215dcac496f9ce38c6
2022-04-08 22:17:50 -07:00
Paul Gilbert
9a5b149176
AGS: Moved script paths slashes fixup to ResolveScriptPath()
...
From upstream 6249e0fd9529b54b435b299c78394c1fa1efcbe2
2022-04-05 20:42:57 -07:00
Paul Gilbert
ccba1ca389
AGS: Code rewrite: split MakeGameDataDir() to make things bit clear
...
From upstream 403e680373732d984c97845d20f32dd53f5c23f1
2022-03-31 20:29:04 -07:00
Paul Gilbert
8d8b786079
AGS: Don't mkdirs in the platform driver, return FSLocation instead
...
From upstream 13312e9a1d3a427f49ccfe4e78f7d0736123a809
2022-03-31 20:04:43 -07:00
Paul Gilbert
e37ab7b725
AGS: Implemented "localuserconf" option in cmdline and global config
...
From upstream 109a9d985f498ed31308e2e97e1b97fa306c87c0
2022-03-31 19:36:12 -07:00
Paul Gilbert
263ae9d8fd
AGS: File.ReadRawLineBack() can read lines longer than 200 chars
...
From upstream 4a1e1440d115b2259b9b960e01753a4ddabedd2e
2022-03-23 20:32:53 -07:00
Paul Gilbert
a94d641150
AGS: AssetManager lets use AssetPath struct to call its methods
...
From upstream d12adb27fcfb988596ea3ba7d755567a6bdbe6b9
2022-03-20 22:11:55 -07:00
Paul Gilbert
b61a661907
AGS: Removed redundant asset_size param from AssetManager::OpenAsset
...
From upstream 9d8456d4202be698b0a3117679745a8200c1ab9b
2022-03-20 22:11:54 -07:00
Paul Gilbert
c09781e98e
AGS: Removed redundant file mode params from AssetManager's methods
...
From upstream d07278a40d4374767fe10cd736475f41c843f10e
2022-03-20 22:11:54 -07:00
Paul Gilbert
a69197bbe0
AGS: Implemented support for opening assets for reading in script
...
From upstream e19d343b2d2cda2757d821532de195bd234f49f0
2022-03-20 22:11:53 -07:00
Paul Gilbert
78b9068a91
AGS: Replace "localuserconf" option with "user-conf-dir"
...
From upstream 9edb428aa028164081cd9a4f9050cf5fa0767964
2022-03-17 21:49:26 -07:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+
2021-12-26 18:48:43 +01:00
Thierry Crozat
4e3033cf74
AGS: Use case insensitive comparison for prefix in ResolveScriptPath
2021-09-01 12:33:45 +01:00
Thierry Crozat
4127d0a8fe
AGS: Add some debug messages to ResolveScriptPath
2021-08-30 21:44:00 +01:00
Thierry Crozat
c4e7dde7ce
AGS: Remove unused variable
...
This is not present in the upstream code either. I guess this was
part of some intermediate changes we did, but is no longer needed.
2021-08-30 21:44:00 +01:00
Thierry Crozat
047f4a060b
AGS: Flatten paths in the save directory
...
ScummVM does not support using sub-directories in the save directory,
so we flatten the path by replacing '/' with '-'.
This fixes saving and loading with the in-game dialogs in Strangeland.
Fixes bug #12864 .
2021-08-30 21:15:53 +01:00
Paul Gilbert
00ade063b9
AGS: In File api functions replaced quit with a warning on error
...
From upstream b703e7d25041e1b6bf99b76a89ca422351e04ace
2021-07-27 22:03:35 -07:00
Paul Gilbert
c89b21b901
AGS: Shifting more classes to plugins/core/
2021-07-16 19:48:14 -07:00
Paul Gilbert
d9bbf9775c
AGS: Rewrote ci_find_file() into File::FindFileCI()
...
From upstream 4e2df949ff36bbb6d08e402586dc8c2bb02ecad9
2021-07-10 18:56:59 -07:00
Paul Gilbert
0ba468d1c9
AGS: CreateAllDirectories works explicitly with sub_dirs parameter
...
From upstream 80f54e2c17830121bbe8b8501f22536c90b3f760
2021-07-10 18:56:56 -07:00
Paul Gilbert
4ae9574c64
AGS: Simplified use of FSLocation and ResolvedPath
...
From upstream 89f62716b7f200250326b041d9d58e65dde896e1
2021-07-10 18:56:56 -07:00
Thierry Crozat
30764bbc41
AGS: Fix regression when trying to delete files
...
This for examples fixes deleting savegames from the ingame save
dialog in QfG2 AGDI.
The issue is that the file name we get from get_save_game_path(int)
in DeleteSaveSlot(int) contains the "/saves/" prefix, so we
cannot directly pass it to the ScummVM savefile manager.
2021-06-21 21:41:58 +01:00
Thierry Crozat
6227100f8f
AGS: Fix regression in FillDirList
...
This reapply the changes from 8fb9b5f9 to properly list the files
in the game data dir and in the savegame dir.
This for example fixes listing *.tra files in the options in
Kathy Rain.
2021-06-21 21:05:09 +01:00
Paul Gilbert
3a60a8db2f
AGS: Convert other global strings to const char *
2021-06-13 21:09:17 -07:00
Paul Gilbert
a9837a9039
AGS: removed FixSlashAfterToken, not necessary with ConcatPaths
...
From upstream bda7710a06121129748e5f5a93916085f55e9f14
2021-06-13 21:09:07 -07:00