When switching from variable frame to fixed frame the entity positions could become corrupted. This would cause to end up being stuck inside of tiles that they could not path out of. When switching from normal speed to hyperspeed the rendering switches from variable to fixed frame. Therefore entitys could end up corrupted when enabling hyperspeed. Due to the way the corruption occured a hang or crash could also occur.
* Import RCT1 tile elements by x/y
* Clean up wall import
* Move tile pointers creation to a separate function and to heap
* Create class for tile pointer index
* Move type field into sub structures
* Use type for misc_type
* Use type for l_type
* Rename to SubType
* Rename SpriteGeneric to MiscEntity
* Rename generic to misc
* Add extra nullptr checks for compilers that cant understand
* Make review changes
* Increment network version
* Update replays
If cmake variables contain just empty strings, don't add them to
the compile definitions, as this can result in incorrect version
strings in the compiled program
Signed-off-by: Mathias Gibbens <mathias@calenhad.com>
Co-authored-by: Mathias Gibbens <mathias@calenhad.com>
- sprite building would save a file with just the sprite file header
and then immediately open it again at the beginning of compilation
- sprite file generation is now entirely in memory until the final
output file is saved on success
- added validation of no file activity in the failed build test case;
failed builds will not generate a file or edit an existing one
* fix for bug #13611; handled too few sig figs fixed point case
* added unit test cases to cover modified fixed point code
* removed blank line to satistfy clang-format
* sorted includes in formatting tests for clang-format
* removed redundant static_cast
- already a char literal and assigning to char[] so code
is functionally equivalent
This brings feature parity with Rollercoaster Tycoon Classic (RCTC)
Includes:
* Re-enabled buttons: Ride List, Map, Scenery, Path, Clear Scenery
* Add all standard footpaths and core scenery objects to the object selection
The max limit of 4 rides has not changed; other object types can have more than 4
Only a minimum set of scenery is enabled, as the full set cannot be included
Includes:
* Corkscrew Roller Coaster
* Hypercoaster
* Steel Wild Mouse
* Spinning Wild Mouse
* Water Coaster
* Car Ride
* Monster Trucks
Some pieces are incorrectly labelled (log bumps and rotation control toggle),
and need to be investigated further
* Fix#13567: Cure guests of severe gluttony
Incorrect assumption that bitscanforward itertated over 64 bits meant that food that was previously within the ExtraItemFlags would never get removed from the peeps inventory. bitscanforward function has been replaced with a 64bit version
* Bump network version
* Merge all cmdsprite global state into single struct
* Move MakeEntries into a member function
* Use std::optional for sprite file open
* Move sprite_file_save to a member function
* Make sprite_file_close a member function and rename open
* Remove global variable
* Make Entries a vector
* Make Data a vector
* Use FileStream for Open
* Use FileStream for Save
* Renmae Image Import/Export functions and cleanup
* Extract out common item AddImage
* Simplify SpriteFile::AddImage
* Header and struct cleanup
* Make suggested changes
* Moving all definitions from B...Actions to source
* Moving all definitions from C...Actions to source
* Moving all definitions from F...Actions to source
* Moving all definitions from G...Actions to source
* Moving all definitions from L...Actions to source
* Moving all definitions from M...Actions to source
* Moving all definitions from N...Actions to source
* Moving all definitions from P...Actions to source
As not all objects load images in the same order the previous code could end up with sprite index's that were incorrect. There also was no reason to make the code object specific as we can just access the image table directly.
* Moving all definitions from R...Actions to source
* Moving all definitions from S...Actions to source
* Moving all definitions from T...Actions to source
* Moving all definitions from W...Actions to source
* Split up SmallSceneryPlace/Remove
Added undo function for Remove Scenery
* Refactor: Balloon and Banner actions hpp=>h/cpp
* Refactor: rename all action *.hpp files to *.cpp
This is preparation for separation in later commits. Note that without
the complete set of commits in this branch, the code will not build.
* Refactor Clear, Climate, Custom, and Footpath actions hpp=>h/cpp
* VSCode: add src subdirectories to includePath
* Refactor Guest actions hpp=>h/cpp
* Refactor Land actions hpp=>h/cpp
* Refactor LargeScenery actions hpp=>h/cpp
* Refactor Load, Maze, Network actions hpp=>h/cpp
* Refactor Park actions hpp=>h/cpp
* Refactor/style: move private function declarations in actions *.h
Previous action .h files included private function declarations with
private member variables, before public function declarations. This
commit re-orders the header files to the following order:
- public member variables
- private member variables
- public functions
- private functions
* Refactor Pause action hpp=>h/cpp
* Refactor Peep, Place, Player actions hpp=>h/cpp
* Refactor Ride actions hpp=>h/cpp
* Refactor Scenario, Set*, Sign* actions hpp=>h/cpp
* Refactor SmallScenerySetColourAction hpp=>h/cpp
* Refactor Staff actions hpp=>h/cpp
* Refactor Surface, Tile, Track* actions hpp=>h/cpp
* Refactor Wall and Water actions hpp=>h/cpp
* Fix various includes and other compile errors
Update includes for tests.
Move static function declarations to .h files
Add explicit includes to various files that were previously implicit
(the required header was a nested include in an action hpp file, and the
action .h file does not include that header)
Move RideSetStatus string enum to the cpp file to avoid unused imports
* Xcode: modify project file for actions refactor
* Cleanup whitespace and end-of-file newlines
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
* Merge LitterType into the shop item descriptor
* Merge ConsumptionTime into ShopItem descriptor
* Merge in DiscardContainer into ShopItemDiscriptor
* Simplify itemOrderPreference
* Simplify guest code by using 64bit flags
* Remove operators for ShopItem
* Move PeepThoughtType TooMuch GoodValue into ShopItemDescriptor
* Reorg Get Flags and Has functions to make intention clear
* Constexpr shop item descriptors
* Constexpr shop item descriptors to compile time gen constants
* Fix formatting and spelling
* Revert operator++ removal
* Fix#13495: Add properties for park value, guests and company value
* Add more park attributes to plugin API
* Fix#13431: [Plugin] UI disabled widgets can still be interacted with.
* Fix#13078: [Plugin] Add colour picker widget
* Fix: #13509 [Plugin] Add ability to format strings
* Fix#13510: [Plugin] list view scroll resets when items is set.
* Fix#13512: [Plugin] Add item separators to list view
Eradicate all coded format tokens. All internal strings now contain raw tokens such as `{STRINGID}` and `{RED}`. New iterators have been created to iterate the tokens and the UTF-8 codepoints.
Formatting strings has been re-written and a new template version is available.
* refactor: integrated PEEP_ITEM into SHOP_ITEM
* refactor: converted merged enum to flag
Only former occurrences of PEEP_ITEM
* cleanUp: code cleaned after merging
* refactor: converted ShopItem to strong enum
code reformatting
* refactor: ShopItem enum items renamed
code formatted
* refactor: new getter and setter functions for Item...Flags
* refactor: replaced all occurrences of ItemStandardFlags
with appropriate getter and setter functions.
COMPARE_FIELD macro needs to be commented out or the flag has to stay public.
* refactor: all occurrences of ItemExtraFlags replaced
with proper function calls. COMPARE_FIELD macro issue not resolved.
* refactor: introduced new variable for unified item flags
* refactor: adapted accessor functions
accessor functions were modified to accommodate both standard and extra ShopItem flags
* refactor: ItemExtraFlags accessor functions are replaced
with general functions
* refactor: reverted to original uint32_t flag variables
* refactor: implemented suggested changes
* refactor: integrate additional comments
* refactor: incorporated requested changes
* refactor: incorporated requested changes
added static_cast<PeepThoughtType> in lines 1572 and 1590