Commit Graph
8 Commits
Author SHA1 Message Date
Hielke Morsink 49cf840f28 Fix memset byte value too big (#7447)
`memset` takes an integer as argument which gets converted to an unsigned byte. `SPRITE_INDEX_NULL` has a value of 0xFFFF, essentially cutting it to 0xFF. Calling `std::fill_n` instead of `memcpy` assigns the given value to each element in its range rather than setting the bytes. In this case, the result is the same.

None of the other calls to `memset` in the project use values bigger than 0xFF.
2018-04-25 14:47:03 +02:00
Michał Janiszewski 764520076f Reduce header inclusion
* Update includes in PlatformEnvironment.cpp

* Update includes in ParkImporter.h

* Update includes of OpenRCT2.h

* Update includes in Intro.h

* Remove unused include from Input.cpp

* Update includes of Imaging.h

* Update includes in Game.h

* Update includes in Editor.h

* Update includes of Context.cpp

* Update includes in Cheats.cpp, CmdlineSprite.cpp

* Update includes of some source files

* Update includes in some cpp files

* Update includes in some cpp files

* Update includes in TextureCache.h

* Fix tests

* Update includes in Font.cpp

* Update includes in LightFX files

* Update some includes

* Fix GCC builds

* Update some includes

* Update some includes

* Update includes in FontsFamilies.*

* Update includes of Console.h

* Improve includes in Window.h

* Improve headers in Viewport.h/Window.h

* Fix MSVC build

* Fix network-less builds

* Reduce inclusion of Map.h
2018-03-13 13:14:02 +01:00
Gymnasiast cd8d40d8a5 Include missing header 2018-03-01 20:10:34 +01:00
Michał Janiszewski ad059a540b Round tweened positions to avoid bumping up and down 2018-03-01 14:09:14 +01:00
Michał Janiszewski ab6ce6fd13 Don't try removing sprites past the end of list 2018-02-10 13:07:52 +01:00
Gymnasiast 5cc21fd21b Replace NULL with nullptr in C++ files 2018-01-29 21:33:21 +00:00
Michael Steenbeek 47a23603ae Remove unused functions 2018-01-11 13:25:09 +01:00
Michael Steenbeek cd5a1ba888 Compile files in world folder as C++ 2018-01-11 13:25:09 +01:00