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
Paul Gilbert
eb1e337edd
AGS: Removed String's "const char*" conversion operator
...
From upstream 7c426674e7e53bffe9120f8ffc059b77fa03a606
2021-06-13 21:08:59 -07:00
Paul Gilbert
91c7eeef14
AGS: Provided String method variants with "const String&" argument
...
From upstream 1e33b06b3329b6b0a79c9fe818c012741c08ae2a
2021-06-13 21:08:57 -07:00
Paul Gilbert
7cb1094a60
AGS: Re-enable savegame code
2021-06-13 21:08:54 -07:00
Paul Gilbert
701396361c
AGS: Import of fresh codebase
2021-06-13 21:08:44 -07:00
Thierry Crozat
7681edc8c6
AGS: Add sanity check in path mapping in case the file name is empty
2021-04-28 01:47:10 +01:00
Thierry Crozat
8fee01379f
AGS: Fix remapping of paths that contain two consecutive path separators
...
This fixes bug #12477 . Heroin's Quest tries to create a file named
"$SAVEGAMEDIR$\\hqrecord.dat" and when remapping this name the
second backslash was left in the name. Creating a file with a
backslash in the name worked on some system, but failed at least
on Windows.
2021-04-28 01:44:34 +01:00
Thierry Crozat
5fde2a493c
AGS: Fix deleting files
...
The code was using ::remove() to remove files, and this does
not handle the "/saves/" prefix. Now it uses File::DeleteFile,
whose implementation was already fixed in the previous commit.
Also it only allows removing files from the savegame directory.
Since this is also the only directory where we allow creating
files, this is consistent and safer.
2021-04-16 01:14:46 +01:00
Thierry Crozat
0b68518ae6
AGS: Adding flag to debug file paths
2021-03-20 22:43:36 +00:00
Paul Gilbert
80cb4183eb
AGS: Move allegro error globals to Globals
2021-03-13 11:12:41 -08:00
Paul Gilbert
a18be9c938
AGS: Move miscellaneous engine/ac/ globals to Globals
2021-03-12 21:30:58 -08:00
Thierry Crozat
8fb9b5f9d5
AGS: Fix FillDirList implementation
...
This function is used to list files that match a given pattern.
For example Kathy Rain uses it to list ./*.tra files. The
original engine uses al_findfirst() and al_findnext().
This fixes listing the available languages in the Kathy
Rain in-game options.
2021-03-13 03:28:22 +00:00
Thierry Crozat
1bad267805
AGS: Map savegame names and other save files to use gameid
...
AGS uses agssave.xxx for its savegames, and it was already
changed to use the gameid in ScummVM, except when this is
called from scripts. Some games, such as If On A Winter's
Night Four Travelers, access savegames from scripts and
those are now mapped to ScummVm names. This solves the
missing Continue menu on the start screen for IOAWN4T
when we already saved the game.
Some games also save additional files in the save game
directory, and they can have generic names such as
'playersettings.dat', or 'user.cfg', and since we use
the same savegame path for all games, to avoid any
conflict we now prepend the game target name to all the
files created or read from there.
2021-03-13 03:28:22 +00:00
Paul Gilbert
37b563ef35
AGS: Move game globals to Globals
2021-03-07 19:23:24 -08:00
Paul Gilbert
9b4f54cf77
AGS: Move file.cpp globals to Globals
2021-03-06 15:11:39 -08:00
Paul Gilbert
f07da658f1
AGS: Move engine.cpp globals to Globals
2021-03-06 15:11:38 -08:00
Paul Gilbert
94423abaa1
AGS: Move usetup to Globals
2021-03-05 21:36:00 -08:00
Paul Gilbert
887472c8c1
AGS: Moved a lot of game.cpp globals to Globals
2021-02-28 13:27:21 -08:00
Paul Gilbert
1a8ae27b58
AGS: Move game & spriteset into Globals
2021-02-26 21:28:53 -08:00