Commit Graph

128 Commits

Author SHA1 Message Date
Tyler Trahan 2dd2910ab3
Feature: Cheat to fix station ratings at 100% (#11346) 2023-10-21 08:35:52 -04:00
frosch b5885295f0 Codechange: Use parameters, which should be used. 2023-09-19 22:49:59 +02:00
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 2023-09-19 22:49:59 +02:00
Tyler Trahan 77173a6a10 Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes 2023-09-10 08:40:25 -04:00
Peter Nelson e8015e497d Codechange: Use begin/end of nwidget parts of begin/length.
This simplifies processing nwidget parts as, unlike the remaining length, the pointer to the end of the list never changes. This is the same principle as we use(d) for tracking end instead of length for C-style strings.

And this removes 160~ instances of the lengthof() macro.
2023-09-04 10:20:45 +01:00
Patric Stout 299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed (#10761) 2023-08-12 18:14:21 +00:00
Tyler Trahan 6f057cbe6a
Codechange: Use proper date type in ClickChangeDateCheat (#11176) 2023-08-11 07:52:59 -04: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
PeterN 7e3646cf46
Codechange: Remove redundant char buffer. (#10808) 2023-05-11 21:36:11 +00:00
Tyler Trahan 6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar (#10753) 2023-05-04 13:14:12 +00:00
Tyler Trahan 930f0a16d8 Codechange: Define Date/Year/Month/Day within TimerGameCalendar class 2023-04-26 07:14:03 -04:00
Tyler Trahan 2f495c015a
Fix 7c6bf97: Don't change date and shift dates in the wrong order (#10711) 2023-04-24 17:33:03 +00:00
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 2023-04-24 15:56:01 +00:00
Tyler Trahan 7c6bf977e0
Cleanup: Fix and add comments to date cheat callback (#10699) 2023-04-23 21:20:56 +02:00
rubidium42 b19f42ecd9
Codechange: Replace some p1/p2 parameter names with better names (#10658) 2023-04-15 15:11:41 +02:00
Patric Stout 3ebc7ad16e Codechange: migrate all game-time-related timers to the new framework 2023-04-15 13:58:55 +02:00
Jonathan G Rennison 4c1406a4b5 Add: NewGRF road stops 2023-02-26 21:28:30 +01:00
Rubidium fe2bcd2a58 Codechange: migrate size related functions to Map structure 2023-01-21 17:11:40 +01:00
Patric Stout 1fb101eabb
Codechange: address CodeQL issue "Multiplication result converted to larger type" (#10306)
Most are very unlikely to ever be triggered in our codebase; two
stand out: linkgraph and money cheat. Those, potentially, could
wrap earlier than expected.
2023-01-02 20:30:02 +00:00
Peter Nelson 890b2666d3 Change: Use scaled WidgetDimensions. 2022-11-12 18:28:39 +00:00
Peter Nelson 6f95e04005 Change: Use Rect helpers for widget drawing.
This replaces repetitive and sometimes unwieldy use of constants.
2022-11-12 18:28:39 +00:00
Michael Lutz 13528bfcd0 Codechange: Un-bitstuff all remaining commands. 2021-12-16 22:28:32 +01:00
Michael Lutz 0f64ee5ce1 Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
2021-12-16 22:28:32 +01:00
Michael Lutz 549caca39c Codechange: Move command arguments to the back of the networked command function calls. 2021-12-16 22:28:32 +01:00
nchappe 2cb6351af5
Fix: Update last servicing dates when using the date cheat (#9694) 2021-11-19 00:04:22 +00:00
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 2021-05-29 21:08:25 +02:00
Patric Stout 1a1049bc0d Change: rename setting "max_heightlevel" to "map_height_limit"
This better reflects what it is, and hopefully removes a bit of
the confusion people are having what this setting actually does.

Additionally, update the text on the setting to better inform
users what it is doing exactly, so they can make an educated
decision on how to change it.

Next commit will introduce an "auto" value, which should be the
new default. The rename has as added benefit that everyone will
start out on the "auto" value.
2021-03-26 12:22:32 +01:00
Patric Stout 3dbdb1c7e3
Change: remove warning in cheat window and reduce it to a note (#8538)
Although meant as a funny joke towards the player, our social
standards have changed since 2004, and such "jokes" are no
longer acceptable by the community as a whole.

The only value of the message is that people are informed the
information is stored in the savegame. This is mostly useful for
us, developers, as some of those cheats can have side-effects
which people report.

While at it, styled the GUI a bit better, as the way the text
was presented was odd.
2021-01-09 15:14:59 +01:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 2020-12-27 10:55:42 +00:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
TTrebron 425cd3e4ca Fix #7655: Decrease buttons in cheat window do not work properly 2019-07-27 08:50:18 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
peter1138 317f69c152 Codechange: Use override specifier in Window-derived classes. 2019-03-24 16:10:04 +01:00
frosch 780e595933 (svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects. 2015-03-07 18:27:01 +00:00
frosch 310258f283 (svn r27151) -Add: Allow changing max heightlevel in scenario editor. 2015-02-14 21:55:30 +00:00
peter1138 51c7d2ab6f (svn r26956) -Codechange: GUI-scale for cheat window. 2014-10-04 19:52:23 +00:00
rubidium 0176ef274f (svn r26928) -Change: scale the heightmap colours over the whole range of heights (based on patch by ic111) 2014-09-27 11:17:54 +00:00
rubidium 7b27a28f0a (svn r26887) -Add: cheat for changing the height level (mostly due to the mess with changing snow levels and such) 2014-09-21 12:39:24 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
fonsinchen 5ab204c8a1 (svn r25867) -Fix [FS#5764]: Shift dates on link graphs when using scenario editor date tool. 2013-10-15 17:32:31 +00:00
fonsinchen bcbaa92485 (svn r25741) -Fix: shift join dates of link graph jobs when using the date cheat 2013-08-23 18:37:45 +00:00
rubidium 0fbc7140c5 (svn r25320) -Fix [FS#5577]: link graph start time was not accounted for when cheating dates 2013-06-04 15:06:22 +00:00
frosch 8157a8afd8 (svn r25290) -Add: Assign string names to notable windows. 2013-05-26 19:25:01 +00:00
frosch 56e4a8c4d6 (svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction. 2013-05-26 19:23:42 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
frosch b533523258 (svn r24801) -Codechange: Add functions to set integral DParams to suitable values for size computations. 2012-12-08 17:18:51 +00:00
frosch 03736af2ae (svn r24700) -Cleanup: Remove WDF_UNCLICK_BUTTONS and make it the default. 2012-11-11 16:10:43 +00:00
frosch 056f779334 (svn r24310) -Codechange: Add named constants for the dimensions of settings buttons, and generally make their usage more consistent. 2012-06-01 14:41:09 +00:00
frosch 198de5397e (svn r24309) -Codechange: Split some functions from gui.h to settings_gui.h 2012-06-01 10:44:45 +00:00