Commit Graph

3636 Commits

Author SHA1 Message Date
Gymnasiast 2f097e99c9
Replace strcasestr() with String::Contains() 2023-01-08 15:41:11 +01:00
Gymnasiast b6d422ff95
Migrate remaining C strings in config handling 2023-01-08 15:41:10 +01:00
Michael Steenbeek 18d9e72173
Change _GBP to money64, migrate a few usages to money64 as well 2023-01-08 15:10:22 +01:00
Michael Steenbeek 412bf8f8be
Use ride references instead of pointers 2023-01-07 14:02:18 +01:00
Gymnasiast 1f3e74b48a
Remove obsolete ride_get_track_colour()
This was useful before the fields of Ride were rearranged to actually be a TrackColour struct.
2023-01-07 02:51:58 +01:00
Stephan Spengler bfcf66a8f7
Rename ParkSetEntranceFee to fit naming pattern 2023-01-06 22:57:18 +01:00
Stephan Spengler f8ab17749d
Rename CheatSetAction to fit naming pattern 2023-01-06 22:57:15 +01:00
Stephan Spengler 32dd535044
Rename MapChangeSizeAction to fit naming pattern 2023-01-06 22:57:11 +01:00
Stephan Spengler c5805eaae6
Rename FootpathPlaceFromTrack to FootpathLayoutPlace (#19028) 2023-01-06 22:56:12 +01:00
AuraSpecs 51582e3ab0
Add special thanks lines to About window 2023-01-06 22:44:32 +01:00
Nehemiah Negussie eeb5c58238
Fix #18971: New Game does not prompt for save before quitting (#19046)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2023-01-06 08:56:46 -03:00
Michael Steenbeek 52fffb96cb
Fix #19053: MazeConstruction window does not open (#19060) 2023-01-06 08:10:09 -03:00
Henry Cheng bf986e43c6
Fix #18970: Trying to load a non-park save will now display context error (#19007)
Fix https://github.com/OpenRCT2/OpenRCT2/issues/18970
2023-01-06 08:05:04 -03:00
Gymnasiast a27b717ebd
Small Construction window cleanup 2023-01-03 23:22:10 +01:00
Gymnasiast 5b2c5d77ff
WindowRideConstructionOpen: use constants for window width/height 2023-01-03 23:22:10 +01:00
Gymnasiast 4b34bbcf7c
Use TrackTypeIsHelix() in construction window 2023-01-03 23:22:10 +01:00
James103 73738bbdc8
Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
Gymnasiast 38f7c2a159
Allow using ImageId in widgets directly 2022-12-31 15:18:22 +01:00
Gymnasiast 162b01204d
Rename rct_widget to Widget 2022-12-31 15:18:22 +01:00
Gymnasiast b97ee766d5
Refactor out IMAGE_TYPE_REMAP from widgets 2022-12-31 15:16:07 +01:00
Michael Steenbeek 246980d45d
Merge pull request #18408 from Broxzier/refactor/13778-loadsave-window
Refactor LoadSaveWindow to class
2022-12-31 14:54:49 +01:00
mdbckrtn 7e9a09d7cd
Fix #18905: Ride Construction window theme not applied correctly 2022-12-31 14:17:08 +01:00
mdbckrtn bb1c5d8ca8
Fix #18467: "Selected only" filter is active in Track Designs Manager 2022-12-31 14:10:38 +01:00
spacek531 09c8e4755f
Rename GetBrakeClosed() to IsBrakeClosed() 2022-12-31 14:06:22 +01:00
ccahiggins 279675ba45
Add shift and control modifiers to close window button (#18537)
Shift closes all but current window.
Control closes all windows of the same window class/type.

Co-authored-by: Chris Higgins <chrissywissywoo@hotmail.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-12-27 12:22:18 +00:00
frutiemax 29d40d0cba
Create Vehicle::IsCableLift() 2022-12-22 12:26:35 +01:00
spacek531 952fb9ebe2
Allow diagonal elements into special elements dropdown (#18879)
* add diagonal track elements to special elements dropdown

* rename diag to buildDirectionIsDiag

* initialize to false

* change to gtet sign

* fix this thing
2022-12-20 15:27:49 +00:00
Michael Steenbeek 458b7426b2
Merge pull request #18867 from Gymnasiast/refactor/ride-functions-2
Refactor/ride functions 2
2022-12-17 19:12:13 +01:00
Michael Steenbeek db41864e22
Close #18744: Add cheat to allow regular path as queue 2022-12-17 18:07:47 +01:00
Gymnasiast a4f7ca4682
Refactor ride_construct() to RideConstructionStart() 2022-12-17 17:16:34 +01:00
Spacek531 742294a86f
Add HasMessage() method to ResultWithMessage 2022-12-14 22:56:43 +01:00
Spacek531 d03f5e594e
Refactor track design creation return message 2022-12-14 22:56:43 +01:00
frutiemax 6d804f5323
Add RIDE_TYPE_FLAG_IS_MAZE 2022-12-14 14:21:21 +01:00
spacek531 44100234c3
Fix #18665, #18559: Add API for getting g2 icons by name
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2022-12-12 23:03:16 +00:00
Gymnasiast ca3dc801ce
Properly display "0 cars per train" 2022-12-11 23:03:47 +01:00
Gymnasiast 174d638d1d
Fix #6341: “Unlock vehicle limits” doesn’t work for setting fewer cpt 2022-12-11 23:00:51 +01:00
Rik Smeets 055f16f0e5
Fix #18696: Construction rights cannot be viewed after all are purchased 2022-12-10 22:35:59 +01:00
ccahiggins 76d491b9a2
Improve OpenGL Rectangle SetInstances Performance
Change to use glBufferSubData instead of glBufferData

An initial buffer size is set with glBufferData.
glBufferSubData is then used to copy to the existing buffer,
rather than creating a new one for each frame.

We keep track of the buffer size, and if instances size increases
above the buffer size, a new buffer is created with glBufferData
2022-12-08 21:14:31 +01:00
X123M3-256 3dfe1eedb6
Fix #18720: Can build upward helix on Alpine Coaster 2022-12-04 20:10:30 +01:00
Michael Steenbeek 4281914c73
Fix #18653: Negative ratings multipliers do not appear in Vehicle tab 2022-11-24 20:42:25 +00:00
Michael Steenbeek 9855ff5cac
Fix spelling of *_COLOR_* constants 2022-11-23 18:42:14 +00:00
AuraSpecs 0a7a50e2c5
Add tab for UCES scenarios
The order of the scenarios is listed in the same order listed on the UCES website. This also allows for translating the scenarios to other languages!

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2022-11-22 15:18:55 +01:00
Hielke Morsink e902b08876
Apply review changes 2022-11-20 21:47:56 +01:00
Hielke Morsink 056af36cdf
Move initialization to constructor 2022-11-20 21:41:24 +01:00
Hielke Morsink e22dd3ac32
Refactor LoadSaveWindow to class
Closes #13778
2022-11-20 21:39:30 +01:00
Basssiiie 5396368274
[Plugin] Fix crash when reading widget property on window that has both static and tab content (#18620) 2022-11-19 08:29:01 -03:00
Rik Smeets 9688d93e46
Open campaign tab from finished campaign news
When a marketing campaign is finished, it is likely the player wants to renew it.
This change allows the ‘Campaigns’ tab in the 'Finances' window to be opened from the news item of the finished campaign.
2022-11-18 13:26:52 +01:00
Haven Kim 7df08a304d
Fix #18244: Invention DragWindow's starting position is inconsistent (#18303) 2022-11-17 07:44:43 -03:00
73 48ba81371f
Fix #18600: Some copyright years are not updated
this will address issue report #18600
2022-11-16 11:13:32 +01:00
Haven Kim 69e5439484
Fix #17067: Random Staff Patrol Area clicks (#18329)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-11-16 00:13:24 +00:00
Michael Steenbeek bde4e2400f
Fix asset pack priority tooltips 2022-11-15 12:13:31 +01:00
Michael Steenbeek 96284123e7
Reduce usage of gCommonStringFormatBuffer 2022-11-14 23:48:34 +00:00
Michał Janiszewski 8439499004
Merge pull request #18555 from janisozaur/imageid-byval
Pass ImageId by value instead by const-ref
2022-11-13 22:15:40 +01:00
Ted John 4328860273
Add OpenSFX and OpenMSX downloads 2022-11-12 12:04:10 +01:00
Michał Janiszewski 3e4e8bccc5 Pass ImageId by value instead by const-ref
ImageId struct is 8-bytes large and can fit in CPU register. Passing it
by value lets compiler pass it in register instead of forcing to
reference it from memory.

In my tests this brings
[dome park](https://github.com/OpenRCT2/OpenRCT2/files/6134362/dome-export.zip)
benchgfx results from 42.16s down to 41.08s, or by 2.5%.
2022-11-12 00:06:05 +01:00
Duncan 482971710d
Apply code style to context functions 2022-11-06 21:49:07 +01:00
Michael Steenbeek 27f3a3a796
Create function to resize window frame 2022-11-06 10:29:40 +01:00
73 643d79b700
Changed ride vehicle list to have less padding (#18350)
Co-authored-by: Rik Smeets <30838294+rik-smeets@users.noreply.github.com>
2022-11-05 13:43:15 +01:00
Meehoi d1baf094af
Show cursor when using inverted mouse dragging (#17998) 2022-11-05 08:20:53 +01:00
Michał Janiszewski afd0346d66
Fix #18481: prevent misuse of moved-from object in WindowTooltipShow (#18483) 2022-11-02 00:19:43 +01:00
Tulio Leao 787acb903b
Close #13810: Refactor TrackDesignManage window to class (#18314)
* Close #13810: Refactor TrackDesignManage window to class

* Remove redundant condition on TrackDesignManageWindow::OnTextInput

* Make early exit ifs on TrackDesignManageWindow::OnTextInput else ifs

* Apply suggestions from code review

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2022-10-29 17:34:39 -03:00
Duncan 49e44967f0
Fix plugin text property (#18444)
* Fix text property being available for all widget classes

Due to dukglue using a template to infer the class that a method is for it ends up registering the base class rather than the derivied class. This meant that the 3 registers of text all made text available for every type of widget. To disable it for the colourpicker, custom, listview and viewport I've explicitly had to define the template and register it for all the relevant widgets

* Up scripting version
2022-10-29 15:41:41 -03:00
Tulio Leao 582863e50c
Merge pull request #18366 from Broxzier/refactor/consistent-integral-suffix 2022-10-29 12:26:43 -03:00
Hielke Morsink 31dd4bf604
Use lower-case u integral suffix 2022-10-29 16:33:05 +02:00
Hielke Morsink 97a7fcc110
Consistently use literal suffix in upper-case 2022-10-29 16:28:53 +02:00
Tulio Leao 3656ddfb14
Fix #18442: About window background is clickable (#18446) 2022-10-29 16:23:59 +02:00
Xixiang Chen 133f435350
Close #18317: Refactor InstallTrack window to class (#18412)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-10-29 09:33:40 -03:00
Raymond Zhao 0647d12de8
Close #18315: Refactor Error window to class (#18403) 2022-10-29 09:25:20 -03:00
Raymond Zhao f7364fe3db
Close #18319: Refactor SavePrompt window to class (#18335) 2022-10-29 09:19:59 -03:00
Stephan Spengler 2aa46a7dca
Change type of listviews from 'scroll_view' to 'listview'. (#18449) 2022-10-26 18:51:16 +01:00
Xixiang Chen 96b08ca801
Close #18325: Refactor tooltip window to class (#18399) 2022-10-26 06:52:32 -03:00
Raymond Zhao 6319e8b7d2
Close #18323: Refactor TitleMenu window to class (#18395) 2022-10-26 06:44:38 -03:00
Henry Cheng cf9ec0bd4a
Fix no overwrite alert on Windows if there are capitalization differences (#18375) 2022-10-26 08:19:44 +02:00
Henry Cheng 93cdfbf26a
Fix #17657: Grid disappears when buying land rights (#17793) 2022-10-25 19:46:31 +00:00
Haven Kim 5e3f1af161
Fix #17854 : InventionList reorder is inconsistent
beforeItem is a reference of an item in the vector. The List deletes the dragged item before adding it and it mutates the beforeItem pointer.
2022-10-24 22:58:11 +02:00
Raymond Zhao a3342a5484
Close #18321: Refactor TitleExit window to class (#18337) 2022-10-20 06:33:46 -03:00
Xixiang Chen 032b214ff6
Close #18320: Refactor StaffFirePrompt window to class (#18368) 2022-10-20 06:24:31 -03:00
Gymnasiast 14f9a75e0a
Refactor FontSpriteBase and font size into FontStyle 2022-10-19 11:59:26 +02:00
Gymnasiast 9ca9412205
Refactor Dark/ExtraDark into its own structure 2022-10-19 11:57:33 +02:00
Hielke Morsink f91df4138c
Merge pull request #18359 2022-10-18 23:39:49 +02:00
Thamara Andrade 9edb3966fb
Close #13785: Refactor NetworkStatus window to class (#18302) 2022-10-18 06:54:01 -03:00
Hielke Morsink 3bb8ea3668
Better annotate some magic numbers in for loops 2022-10-17 16:08:55 +00:00
Eilidh Martin fdbceae17c
Fix #18324: Refactor TitleOptions to class 2022-10-17 15:29:17 +02:00
Hielke Morsink 5fa53ad528
Rename global config functions to use TitleCase 2022-10-16 21:46:08 +02:00
Hielke Morsink 89fa8d8052
Rename public notification config data members 2022-10-16 21:46:06 +02:00
Hielke Morsink bff430805f
Rename public network config data members 2022-10-16 21:46:06 +02:00
Hielke Morsink 371470b5d5
Rename public sound config data members 2022-10-16 21:46:05 +02:00
Hielke Morsink f605b02630
Rename public interface config data members 2022-10-16 21:46:05 +02:00
Hielke Morsink abac080d3e
Rename public general config data members 2022-10-16 21:46:01 +02:00
Rik Smeets c80bd455e9
Code style: Remove struct snakes from Paint (#18341) 2022-10-14 20:26:36 +02:00
Raymond Zhao a45f898c7e
Close #18322: Refactor TitleLogo window to class 2022-10-13 12:16:16 +02:00
Duncan 406b73d904
Remove final snakes from map and world (#18304) 2022-10-12 09:14:45 -03:00
Duncan 7dd8989e70
Next chunk of World/Map.h snakes (#18296)
* Next chunk of World/Map.h snakes

* Apply clang-format
2022-10-12 06:35:20 +01:00
Michael Steenbeek 7be8f475f3
Merge pull request #18292 from Gymnasiast/fix/18290
Fix #18290: Ride and plug-in window colours not appearing
2022-10-11 21:43:53 +02:00
Duncan 67bbc8560d
Code style: Remove snakes from everything world apart from Map.h (#18273)
* Remove remaining snakes from world (outside of map)

* Initial few desnaking of Map.h
2022-10-11 19:39:24 +01:00
Gymnasiast de71ed19b5
Remove remaining usages of SPRITE_ID_PALETTE_COLOUR_1() 2022-10-11 14:54:27 +02:00
Gymnasiast 418c5a6708
Use GetColourButtonImage() for remaining windows 2022-10-11 14:44:45 +02:00
Gymnasiast 89cd86da4d
Fix #18290: Ride and plug-in window colours not appearing 2022-10-11 14:44:07 +02:00
Rik Smeets 0c78a27d9f
Fix missing validation on invalid characters in file name (#18287)
When saving a new file with a name containing '/' or '\' on Windows, the incorrect file name would be determined since these characters represent a new folder. This would trigger a failure on save.

The user's input should be validated in all cases. Before, it was only executed for folder names. This change also applies the validation on file names.
2022-10-11 13:27:11 +02:00
Michael Steenbeek 6fe19878f6
More ImageId cleanup (#18258)
* Remove more usages of uint32 image indices

* Remove unused gfx_get_sprite_size()

* Remove uint32 images from text drawing

* Remove now-unused ImageId overload

* Default-initialise ttfRunIndex

* Suppress false-alarm GCC error
2022-10-10 19:42:40 +01:00