Commit Graph

97 Commits

Author SHA1 Message Date
Peter Nelson a1b03ee69e
Codechange: Replace platform-specific calls with std::filesystem::last_write_time. (#12487) 2024-04-15 18:10:19 +00:00
Patric Stout a1487ce620
Add: list_[scenario|heightmap] and load_[scenario|height] console commands (#11867) 2024-01-23 14:01:25 +01:00
Patric Stout 090616b4c9
Add: allow loading heightmaps from command-line (#11870)
If you want to load a file from tar, you have to give the file
inside the tar in order for it to work:

<tar-file>/<dir-in-tar>/<file>.png
2024-01-22 22:35:25 +00:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Rubidium fbd71a9d72 Codechange: replace C-style string processing with C++-style for the listing callbacks 2023-06-05 23:25:49 +02:00
Rubidium 324c43eeb2 Codechange: let FiosGetDiskFreeSpace only return disk space and split FiosGetCurrentPath off 2023-05-31 10:56:33 +02:00
Peter Nelson 91e140c722 Codechange: Use unique_ptr for fios company properties.
This is the data used to show company names in the saveload window.
2023-05-18 12:18:30 +01:00
Peter Nelson c38df2d589 Codechange: Use std::map instead of custom SmallMap. 2023-05-18 12:18:30 +01:00
Peter Nelson 00bf42353a Codechange: Place gamelog into its own class, along with internal data.
Data is now stored in vectors to avoid manual memory management and
passing lengths around.
2023-05-02 19:47:55 +01:00
Rubidium 1f3b7e2efd Codechange: use std::string instead of stredup for saveload error messages 2023-05-01 16:23:24 +02:00
Rubidium 3a822fcd01 Codechange: Make FiosItem's name and title std::string 2023-04-29 13:23:34 +02:00
Rubidium f0a1ddd81c Codechange: let FiosBrowseTo return a bool 2023-04-29 13:23:34 +02:00
Tyler Trahan 930f0a16d8 Codechange: Define Date/Year/Month/Day within TimerGameCalendar class 2023-04-26 07:14:03 -04:00
Rubidium 4e65ec1dc4 Codechange: do not declare functions in blocks 2023-01-29 20:28:45 +01:00
Loïc Guilloux 460991ecf4
Feature: Persistant rotation of numbered auto/netsave after restart (#9397)
It was always starting from 0 on openttd restart.
Now the most recent auto/netsave number will be used as a base to generate the next filename.
2021-07-17 12:48:35 +02:00
Rubidium fa6abe1646 Cleanup: remove the old FIO slot functions 2021-05-08 12:39:34 +02:00
Rubidium c097bc9d7d Codechange: let NewGRF sounds make use of RandomAccessFile instead of the FIO slot functions 2021-05-08 12:39:34 +02:00
PeterN f018471b36
Cleanup: Remove old FiosList helper methods. (#9139) 2021-04-29 22:46:42 +01:00
rubidium42 84985c1223 Codechange: [Network] Do not leak os_abstraction.h via fios.h 2021-04-27 18:17:34 +01:00
Michael Lutz b408fe77f7 Codechange: Use std::string in file scanners. 2020-12-27 13:19:25 +01:00
Michael Lutz 65f65ad2ad Codechange: Convert some more FIO functions to take std::string. 2020-12-27 13:19:25 +01:00
Michael Lutz 79240eab1e Codechange: Make use of the improved C++17 emplace_back function. 2020-12-15 00:29:30 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
glx 5b77102b63 Codechange: use std::sort() to sort file lists 2019-04-13 12:49:18 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 2019-03-28 00:09:33 +01:00
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 2019-03-26 20:15:57 +00:00
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 2019-03-26 20:15:57 +00:00
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 2019-03-26 20:15:57 +00:00
Henry Wilson 097328c3d7 Codechange: Replaced SmallVector::Get() const with std alternatives 2019-03-26 20:15:57 +00:00
Henry Wilson aa7ca7fe64 Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + n 2019-03-26 20:15:57 +00:00
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 2019-03-26 20:15:57 +00:00
Henry Wilson 9cba6f7193 Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit() 2019-03-26 20:15:57 +00:00
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 2019-03-26 20:15:57 +00:00
damfr 868c6f924a Add: Filter box to the save and load windows (#6974)
Save and heightmap names can be filtered.
2018-11-25 20:54:25 +01:00
frosch ec9a920aab (svn r27729) -Codechange: Do not count static NewGRF when checking for the maximum number of NewGRFs in a game.
-Codechange: Remove LAST_GRF_SLOT and MAX_NEWGRFS. Now NETWORK_MAX_GRF_COUNT is the only constant to specify the maximum number of non-static NewGRF.
-Codechange: Increase the number of file slots, effectively increasing the maximum number of static NewGRF and baseset GRFs.
2017-01-14 13:12:49 +00:00
alberth 0adfb1ac6f (svn r27653) -Fix(r27647): Rename FileOperation enum and values to SaveLoadOperation to avoid nameclash with windows compiler toolkit. 2016-09-04 16:06:50 +00:00
alberth df9a9f074a (svn r27649) -Codechange: Introduce detailed file type enum, rebuild FiosType with it. 2016-09-04 12:57:20 +00:00
alberth 88bdf482c0 (svn r27648) -Codechange: Remove remaining _saveload_mode usage. 2016-09-04 12:56:56 +00:00
alberth 75ad6d0100 (svn r27647) -Codechange: Introduce file operations, and use it to replace most of SaveLoadDialogMode 2016-09-04 12:56:23 +00:00
alberth 2d7201781b (svn r27646) -Codechange: Move _fios_items variable into the SaveLoadWindow class. 2016-09-04 12:55:54 +00:00
alberth d6cd3b1605 (svn r27644) -Codechange: Split GetFiosItem into BuildFileList and FindItem, and move both to FileList. 2016-09-04 12:54:52 +00:00
alberth caf3379746 (svn r27642) -Codechange: FiosGet* file query functions take a destination file list. 2016-09-04 12:54:03 +00:00
alberth bc08fe7c5f (svn r27641) -Codechange: Fold the _fios_items file list vector into its own class. 2016-09-04 12:50:22 +00:00
alberth 2fa0fdb176 (svn r27638) -Codechange: Move FiosType enum, move and rename SetFiosType function. 2016-09-04 12:47:07 +00:00
alberth 9135f7130e (svn r27635) -Codechange: Move FileType and FileToSaveLoad structure definitions. 2016-09-04 12:45:40 +00:00
alberth d6812947f3 (svn r27634) -Codechange: Improve name of the SmallFiosItem struct. 2016-09-04 12:45:11 +00:00
alberth a52864ef27 (svn r27633) -Codechange: Extract _saveload_mode use from BuildFileList 2016-09-04 12:44:42 +00:00
rubidium 21f991e235 (svn r26489) -Codechange: properly account for the end of buffers in the file io code instead of assuming MAX_PATH is okay 2014-04-23 21:23:21 +00:00
rubidium b3e93d6520 (svn r26057) -Fix: a number of possibly uninitialised variables 2013-11-23 13:12:19 +00:00