Rubidium
68ff3fd062
Change: include fmt.h C++ headers in stdafx.h
...
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
2023-05-08 16:49:23 +02:00
Rubidium
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
2023-05-06 21:26:13 +02:00
Loïc Guilloux
31d1a323ef
Fix #10771 , 3901ef9: GRFConfig.filename is now a std::string ( #10774 )
2023-05-06 14:58:47 +00:00
Peter Nelson
912eb68981
Change: Extend entity override manager and station spec lists to support 16 bit IDs.
2023-05-05 07:08:40 +01:00
Rubidium
a312a6c1b2
Codechange: make md5sumToString std::string compatible
2023-05-04 23:23:32 +02:00
Peter Nelson
7ccdefa1c1
Change: Increase vehicle random data from 8 to 16 bits.
2023-05-04 21:42:28 +01:00
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar ( #10753 )
2023-05-04 13:14:12 +00:00
Patric Stout
018a26d9b6
Fix: crash in emscripten when saving games ( #10758 )
...
Don't allocate 128KB on stack, but rather on the heap.
2023-05-02 21:22:09 +00: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
aac95eeaf5
Codechange: use std::string instead of stredup/free for stories
2023-05-01 16:23:24 +02:00
Rubidium
3342967ad9
Codechange: use std::string instead of stredup/free for goals
2023-05-01 16:23:24 +02:00
Rubidium
ee723f26ba
Codechange: Make FileToSaveLoad's title std::string and simplify assignments
2023-04-29 13:23:34 +02:00
Patric Stout
36a0818bc5
Remove: buying/selling/owning company shares ( #10709 )
2023-04-29 10:16:49 +02:00
Rubidium
33c4fbff8f
Codechange: use fmt::format_to instead of seprintf to fill load crash message
2023-04-28 19:53:03 +02:00
Tyler Trahan
930f0a16d8
Codechange: Define Date/Year/Month/Day within TimerGameCalendar class
2023-04-26 07:14:03 -04:00
Patric Stout
31ad990831
Codechange: move tick-counter into TimerGameTick ( #10712 )
2023-04-24 16:55:40 +00:00
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
2023-04-24 15:56:01 +00:00
Rubidium
f5f6306af3
Codechange: use string/fmt instead of printf for ShowInfo(F)
2023-04-24 17:51:54 +02:00
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. ( #10663 )
...
This avoids a (soft) namespace conflict between the four ST_* enums.
2023-04-16 20:00:55 +01:00
Patric Stout
ed83c4b0da
Change: replace per-AI "start_date" with a global "competitors_interval" ( #10653 )
...
The per-AI "start_date" is a lot of custom code, and was rarely
used in the way it was meant.
While at it, also ported this part over to the new timer system.
2023-04-16 20:14:22 +02:00
Charles Pigott
6fc28d649e
Cleanup: Unused alloca definitions and includes
2023-04-15 16:57:00 +01:00
Charles Pigott
b282664242
Codechange: Replace all usages of alloca/AllocaM with more modern/less discouraged alternatives
2023-04-15 16:57:00 +01:00
Tyler Trahan
646a7e625b
Change: Use seconds for Linkgraph update settings ( #10610 )
2023-04-14 22:49:12 +02:00
PeterN
ce046f6d17
Fix: Abort loading savegame if road vehicle is on invalid road type. ( #10622 )
...
This can happen if NewGRFs are missing so that engine or road type definitions are wrong.
2023-04-10 19:23:18 +01:00
Charles Pigott
ce24709576
Add: Some additional debugging information when chunk sizes are incorrect
2023-04-10 18:58:48 +01:00
Charles Pigott
8aea13a85b
Codechange: Use fmt for SlErrorCorruptFmt
2023-04-10 18:58:48 +01:00
dP
e2f1cd44dc
Change: Increase max cargo age and let min cargo payment approach zero. ( #10596 )
...
Co-authored-by: Michael Lutz <michi@icosahedron.de>
2023-04-10 12:34:28 +02:00
PeterN
078e27bd84
Fix #10619 : Crash loading linkgraph for older savegames. ( #10620 )
2023-04-09 19:28:55 +01:00
Rubidium
9d2a0f3d0b
Change: make GetPartialZ consistent, meaning Z of adjacent slopes continue
...
Previously, on a straight line of a one corner up slope with the adjacent
steep sloop the Z would increase one step every two sub pixels, except for one
case where one sub pixel is skipped. Similarly, a steep slope with two
adjacent one corner up slopes, would have a bump in the height line along the
diagonal whenever it enters/leaves the steep slope tile.
2023-04-09 19:00:26 +02:00
Rubidium
e8af8daa68
Codechange: pass "ground vehicle" to GetTileSlopeZ since for tunnel/bridges there are two states
...
Previously it checked the position in non-driving direction to "guess" whether
a ground vehicle was using the function, so on tunnels/bridges it could either
return the Z of the (virtual) ground compared to the Z of the path the vehicle
would take.
2023-04-09 19:00:26 +02:00
PeterN
f1144de509
Feature: Separate rail/road and sea/air velocity units, and add knots. ( #10594 )
...
This is achieved by packing vehicle type along with the velocity so that
the string system can decode and pick the appropriate unit.
2023-04-08 12:26:13 -04:00
Peter Nelson
65e0b0dcb7
Codechange: Be consistent with how company masks are set to all.
2023-04-07 22:09:55 +01:00
Tyler Trahan
e5438891e2
Cleanup: Keep spacing saveload versions by groups of five ( #10576 )
2023-03-19 11:02:54 -04:00
Rubidium
580d0a6343
Codechange: make use of Tile in for all direct map accesses
2023-02-28 07:11:48 +01:00
Rubidium
0fb0469e47
Codechange: introduce iterator to iterate over the Tiles of a Map
...
Note: this version is using TileIndex, but that changes later
2023-02-28 07:11:48 +01:00
dP
b0542c8c49
Codechange: Don't store tree counter in the map array ( #10018 )
2023-02-26 16:39:44 -05:00
SamuXarick
6eabbaa751
Fix #10469 , 5e14a20: [Script] League Table rating element is a int64 everywhere else
2023-02-26 22:25:13 +01:00
Michael Lutz
aab580e0ac
Codechange: [Linkgraph] Drop node/edge wrappers from LinkGraph.
2023-02-26 21:41:24 +01:00
Michael Lutz
7352f812e6
Codechange: [Linkgraph] Only store present link graph edges and not all possible edges.
2023-02-26 21:41:24 +01:00
Michael Lutz
178249e7cc
Codechange: Saveload macros for entries with a custom table name.
2023-02-26 21:41:24 +01:00
Michael Lutz
fe27db3dfd
Codechange: [Linkgraph] Store edges in each node and not in a global matrix.
2023-02-26 21:41:24 +01:00
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
2023-02-26 21:28:30 +01:00
Loïc Guilloux
4072dcff49
Fix #10486 : [Script] Debug window requires AIs to be started before GS ( #10487 )
2023-02-17 12:24:51 +01:00
glx22
b080f24bd8
Codechange: move windows common to AI and GS out of ai_gui
2023-02-05 19:27:25 +01:00
Rubidium
4e65ec1dc4
Codechange: do not declare functions in blocks
2023-01-29 20:28:45 +01:00
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
2023-01-29 07:21:34 +01:00
rubidium42
1951af07c0
Codechange: do not hide parameters with local variables
2023-01-29 07:21:34 +01:00
Rubidium
5863d78cb4
Codechange: use commented out code, or guard by #ifdef
2023-01-26 23:47:55 +01:00
Peter Nelson
ede1201b6a
Codechange: Rename override manager variables.
2023-01-26 21:39:16 +01:00