1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 16:24:35 +01:00
Commit Graph

158 Commits

Author SHA1 Message Date
ζeh Matt
8ae8a26a0f Merge remote-tracking branch 'upstream/develop' into new-save-format 2021-09-28 01:53:18 +03:00
ζeh Matt
274bc039af Fix out of bounds access 2021-09-28 01:26:22 +03:00
ζeh Matt
185cfdea0f Refactor GetSpatialIndexOffset and fix overflow 2021-09-28 00:25:15 +03:00
duncanspumpkin
664dd4386c Merge branch 'develop' into HEAD 2021-09-18 19:09:46 +01:00
Duncan
c05068e8d1 Replace sprite_left,t,r,b with SpriteRect (#15408)
* Replace sprite_left,t,r,b with SpriteRect

This is required for the NSF. I had to add a silly constructor to rct_sprite for now. Will eventually be removed one day...

* Fix compilation and memory leak

* Add some UB to prevent some other UB

* Make review change
2021-09-18 19:07:35 +01:00
Gymnasiast
0f183e9ad2 Make FreeEntity take a reference 2021-09-12 18:29:37 +02:00
Gymnasiast
93c656f91d Merge remote-tracking branch 'upstream/develop' into new-save-format 2021-08-29 15:39:42 +02:00
ZehMatt
de364aa15a Rename type SpriteBase to EntityBase 2021-08-26 15:37:16 +03:00
duncanspumpkin
0652b326e1 Fix merge issues add ride use history 2021-08-17 22:39:58 +01:00
duncanspumpkin
0fae81c530 Merge branch 'develop' into HEAD 2021-08-17 21:55:39 +01:00
Duncan
223b926f8c Use std::vector for ride use memory (#14884)
* Use std::vector for ride use memory

* Use new system for import/export

* Remove legacy field

* Add replay entity size protection to prevent crash

* Increment network version

* Update replays

* Move function to header

* Move constant to RCT12 header as used for both 1 and 2

* Align naming with nsf
2021-08-17 21:29:35 +01:00
duncanspumpkin
5bac7821c9 Merge develop 2021-06-04 13:11:47 +01:00
Duncan
03378782ff Split off litter code to litter.cpp (#14799)
* Split off litter code to litter.cpp

* Use PATH_CLEARANCE
2021-06-03 08:27:03 +01:00
duncanspumpkin
98f9f24909 Remove sprite.h includes where possible 2021-05-29 08:54:33 +01:00
duncanspumpkin
ee981e62e1 Move CreateEntity funcs to Entity header. Remove dead enum 2021-05-29 08:18:23 +01:00
duncanspumpkin
63bcb3c3e5 Move particle structs to particle files 2021-05-29 08:07:32 +01:00
duncanspumpkin
3199029168 Split off EntityTweener into seperate file 2021-05-29 07:47:49 +01:00
Duncan
39fcc5d078 Split up Sprite header (#14764)
* Remove fields from rct_sprite union

* more header fun

* Fix guest include
2021-05-29 06:01:32 +01:00
Ted John
2b2159976d Merge branch 'develop' into new-save-format 2021-05-17 21:33:29 +01:00
Gymnasiast
8c374b07e6 Make litterNames static 2021-05-13 16:26:23 +02:00
duncanspumpkin
8282fde827 move Litter functions into class and refactor 2021-05-13 16:11:13 +02:00
Ted John
34f9d5ae8e Remove staff limit and increase patrol area to whole map 2021-05-11 22:38:03 +01:00
Duncan
d46e4a9bb1 Network serialiser for entities (#14541)
* Start a network serialiser for entities

will be used only for checksums and replay diffs

* Continue work

* Use the new serailser for checksums

* Use new serialiser for replays

* keep compilers happy

* Try create checksum stream

* Fix compiling

* Split off class into seperate file

* Update Xcode project

* Increment network version

* Fix pragma mistake

* Fix none network builds

* Update replays

* Improve ChecksumStream and use FNV internally

* Small cleanups

* satisfy compilers

* Revert change of checksum size to simplfy rerecording

* Zero initialise data

* Fix serialiser

* Update replays again

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
Co-authored-by: Matt <m.moninger.h@gmail.com>
2021-05-09 19:12:44 +01:00
Ted John
6db0c01fdc Merge branch 'develop' into new-save-format 2021-04-25 15:03:45 +01:00
Duncan
a9e1f2e89c Remove SpriteBase::flags (#14460)
* Remove SpriteBase::flags

* Increment network version

* update replays
2021-04-11 18:02:19 +01:00
Ted John
3173a63726 Replace gScenarioTicks with gCurrentTicks 2021-04-06 00:07:13 +01:00
Duncan
619b2afc15 Compute checksum by entity type (#14383)
* Compute checksum by entity type

* Copy only the entity size

* Update replays and network version
2021-03-27 09:36:41 +00:00
Duncan
a4a08ea8b4 Reorg entity import to follow export design (#14177)
* Add CreateEntityAt

* Reorg entity import to follow export design

* Move definitions just because gcc refuses to fix bugs

* Use CreateEntityAt

* Fix freeid allocation

* Streamline freeId reset and add statics
2021-03-26 05:48:38 +00:00
Duncan
ccfa22c230 Entity type4: Remove MiscEntityType and add FountainType (#14344)
* Move jumpingfountain type out of misc entity type

* Remove SubType for MiscEntities as it is no longer required

* Update replays

* Apply review comments

* Increment network version
2021-03-22 21:24:50 +00:00
Duncan
df7a284822 Entity type 2: Remove sprite_identifier (#14334)
* Start changing the underlying type

* Further work

* Complete refactor

* Further cleanup

* Remove pointless check

* Increment network and plugin versions

* Add defaults

* Further defaults

* Fix test paint

* Update replays
2021-03-17 08:04:41 +00:00
Duncan
6ec379cd0e Split Entity Lists by Entity type (#14326)
* Make initial changes to add entity type

* Make further corrections

* Revert header changes

* Fix mistakes
2021-03-16 11:18:06 +00:00
Duncan
5474194905 Implement train view and remove linked_list_index (#13956)
* Make train manager view

* Remove linked list index field

* Remove merge mistake

* Fix further rebase errors

* Rename and add comments

* Update replays

* Fix Xcode project

* Increment network version

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2021-03-15 08:13:00 +00:00
Michał Janiszewski
ac6e4fc0d6 Move SPRITE_INDEX_NULL, MAX_SPRITES to their new homes 2021-02-25 10:56:27 +01:00
Matt
ed4d8b4552 Add getter and setter for location in SpriteBase 2021-02-21 09:52:32 +02:00
Duncan
8c5cd61b69 Split free id's into seperate vector (#13924) 2021-01-26 07:42:56 +00:00
Duncan
eb52391b9a Remove next_in_quadrant (#13754)
* Use std::vector of quadrants

* Prevent ptr invalidation issues

* Remove next_in_quadrant

* Make review changes

* Rebuild next_in_quadrant for S6Export

* Fix formatting

* Constexpr where possible

* Increment network version and update replays
2021-01-23 07:36:46 +00:00
Duncan
1a11456f36 Rework remove floating to use EntityList (#13895) 2021-01-22 14:36:55 +00:00
Duncan
f80531070b Implement EntityLists (#13853)
* Implement EntityLists

* Remove dead code

* Use alternative name for iterator

* Add comments

* Increment network version

* Update replays

* Remove further dead code

* Update replays again
2021-01-21 18:36:34 +00:00
Duncan
3321720d4a Split up misc list access to be type specific (#13870)
* Split up misc list access to be type specific

Took the opertunity to use a fold expression to simplify the code

* Increment network version
2021-01-21 08:29:02 +00:00
Duncan
4ff5b9a89f Reset Entity to 0 on removal (#13835)
This is to force any use after remove bugs to the surface
2021-01-16 15:48:39 +00:00
Duncan
d5ada2dca1 Remove type from SpriteBase (#13735)
* 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
2021-01-10 15:14:34 +00:00
skdltmxn
b0a8ebc808 Refactor to use push_back more efficient (#13726) 2021-01-08 20:59:55 +00:00
ζeh Matt
a6080b7996 Refactor code to dynamically add and remove viewports (#13687) 2021-01-07 19:06:49 +00:00
ζeh Matt
e6d1fcce5d Merge pull request #13698 from ZehMatt/perf/tweening
Improve performance of tweening entities between ticks
2021-01-05 19:47:24 +02:00
ζeh Matt
12c6854a3e Fix #13701: Use correct max zoom level for peeps on invalidation 2021-01-05 18:24:52 +01:00
Matt
f77076def6 Apply review suggestions 2021-01-05 19:19:02 +02:00
Matt
876b55727e Correctly remove entities from tweening list when object is removed 2021-01-05 01:35:18 +02:00
Matt
b1561001b7 Apply review suggestions 2021-01-05 01:18:25 +02:00
Matt
c442ef6207 Improve performance of tweening entities between ticks 2021-01-05 00:26:58 +02:00
Matt
19b63a1825 Refactor logic of MoveTo to always imply invalidation 2021-01-02 16:22:28 +02:00