mirror of https://github.com/OpenRCT2/OpenRCT2.git
Split up Sprite header (#14764)
* Remove fields from rct_sprite union * more header fun * Fix guest include
This commit is contained in:
parent
21bb949322
commit
39fcc5d078
|
@ -20,6 +20,7 @@
|
|||
#include <openrct2/core/Console.hpp>
|
||||
#include <openrct2/interface/Viewport.h>
|
||||
#include <openrct2/rct2/T6Exporter.h>
|
||||
#include <openrct2/ride/Vehicle.h>
|
||||
#include <openrct2/ui/WindowManager.h>
|
||||
#include <openrct2/world/Sprite.h>
|
||||
|
||||
|
|
|
@ -28,9 +28,12 @@
|
|||
#include <openrct2/ride/Ride.h>
|
||||
#include <openrct2/ride/RideData.h>
|
||||
#include <openrct2/ride/Track.h>
|
||||
#include <openrct2/ride/Vehicle.h>
|
||||
#include <openrct2/scenario/Scenario.h>
|
||||
#include <openrct2/windows/Intent.h>
|
||||
#include <openrct2/world/Balloon.h>
|
||||
#include <openrct2/world/Banner.h>
|
||||
#include <openrct2/world/Duck.h>
|
||||
#include <openrct2/world/Footpath.h>
|
||||
#include <openrct2/world/LargeScenery.h>
|
||||
#include <openrct2/world/Map.h>
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
#include <openrct2/peep/Staff.h>
|
||||
#include <openrct2/sprites.h>
|
||||
#include <openrct2/world/Climate.h>
|
||||
#include <openrct2/world/Entity.h>
|
||||
#include <openrct2/world/Park.h>
|
||||
#include <openrct2/world/Sprite.h>
|
||||
|
||||
// clang-format off
|
||||
enum WINDOW_GAME_BOTTOM_TOOLBAR_WIDGET_IDX
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <openrct2/ride/RideData.h>
|
||||
#include <openrct2/ride/Track.h>
|
||||
#include <openrct2/ride/TrainManager.h>
|
||||
#include <openrct2/ride/Vehicle.h>
|
||||
#include <openrct2/world/EntityList.h>
|
||||
#include <openrct2/world/Entrance.h>
|
||||
#include <openrct2/world/Footpath.h>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <openrct2/peep/Peep.h>
|
||||
#include <openrct2/peep/Staff.h>
|
||||
#include <openrct2/sprites.h>
|
||||
#include <openrct2/world/Sprite.h>
|
||||
#include <openrct2/world/Entity.h>
|
||||
|
||||
static constexpr const rct_string_id WINDOW_TITLE = STR_RECENT_MESSAGES;
|
||||
static constexpr const int32_t WH = 300;
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include <openrct2/ride/TrackData.h>
|
||||
#include <openrct2/ride/TrackDesign.h>
|
||||
#include <openrct2/ride/TrackDesignRepository.h>
|
||||
#include <openrct2/ride/Vehicle.h>
|
||||
#include <openrct2/sprites.h>
|
||||
#include <openrct2/windows/Intent.h>
|
||||
#include <openrct2/world/EntityList.h>
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
#include <openrct2/peep/Staff.h>
|
||||
#include <openrct2/sprites.h>
|
||||
#include <openrct2/windows/Intent.h>
|
||||
#include <openrct2/world/Entity.h>
|
||||
#include <openrct2/world/Footpath.h>
|
||||
#include <openrct2/world/Park.h>
|
||||
#include <openrct2/world/Sprite.h>
|
||||
|
||||
static constexpr const rct_string_id WINDOW_TITLE = STR_STRINGID;
|
||||
static constexpr const int32_t WW = 190;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/interface/Colour.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/world/Sprite.h>
|
||||
#include <openrct2/world/Entity.h>
|
||||
|
||||
static constexpr const rct_string_id WINDOW_TITLE = STR_SACK_STAFF;
|
||||
static constexpr const int32_t WW = 200;
|
||||
|
|
|
@ -20,12 +20,15 @@
|
|||
#include <openrct2/core/Memory.hpp>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/ride/Vehicle.h>
|
||||
#include <openrct2/scenario/ScenarioRepository.h>
|
||||
#include <openrct2/scenario/ScenarioSources.h>
|
||||
#include <openrct2/sprites.h>
|
||||
#include <openrct2/title/TitleSequence.h>
|
||||
#include <openrct2/util/Util.h>
|
||||
#include <openrct2/world/Sprite.h>
|
||||
#include <openrct2/world/Balloon.h>
|
||||
#include <openrct2/world/Duck.h>
|
||||
#include <openrct2/world/Entity.h>
|
||||
|
||||
// clang-format off
|
||||
struct TITLE_COMMAND_ORDER {
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "network/network.h"
|
||||
#include "peep/Staff.h"
|
||||
#include "platform/Platform2.h"
|
||||
#include "ride/Vehicle.h"
|
||||
#include "scenario/Scenario.h"
|
||||
#include "scripting/ScriptEngine.h"
|
||||
#include "title/TitleScreen.h"
|
||||
|
|
|
@ -11,7 +11,14 @@
|
|||
|
||||
#include "core/CircularBuffer.h"
|
||||
#include "peep/Peep.h"
|
||||
#include "ride/Vehicle.h"
|
||||
#include "world/Balloon.h"
|
||||
#include "world/Duck.h"
|
||||
#include "world/EntityList.h"
|
||||
#include "world/Fountain.h"
|
||||
#include "world/Litter.h"
|
||||
#include "world/MoneyEffect.h"
|
||||
#include "world/Particle.h"
|
||||
#include "world/Sprite.h"
|
||||
|
||||
static constexpr size_t MaximumGameStateSnapshots = 32;
|
||||
|
@ -50,7 +57,7 @@ struct GameStateSnapshot_t
|
|||
for (size_t i = 0; i < numSprites; i++)
|
||||
{
|
||||
auto entity = getEntity(i);
|
||||
if (entity == nullptr || entity->misc.Type == EntityType::Null)
|
||||
if (entity == nullptr || entity->base.Type == EntityType::Null)
|
||||
continue;
|
||||
indexTable.push_back(static_cast<uint32_t>(i));
|
||||
}
|
||||
|
@ -77,9 +84,9 @@ struct GameStateSnapshot_t
|
|||
}
|
||||
auto& sprite = *entity;
|
||||
|
||||
ds << sprite.misc.Type;
|
||||
ds << sprite.base.Type;
|
||||
|
||||
switch (sprite.misc.Type)
|
||||
switch (sprite.base.Type)
|
||||
{
|
||||
case EntityType::Vehicle:
|
||||
reinterpret_cast<Vehicle&>(sprite).Serialise(ds);
|
||||
|
@ -172,7 +179,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
|
|||
for (auto& sprite : spriteList)
|
||||
{
|
||||
// By default they don't exist.
|
||||
sprite.misc.Type = EntityType::Null;
|
||||
sprite.base.Type = EntityType::Null;
|
||||
}
|
||||
|
||||
snapshot.SerialiseSprites([&spriteList](const size_t index) { return &spriteList[index]; }, MAX_ENTITIES, false);
|
||||
|
@ -497,48 +504,61 @@ struct GameStateSnapshots final : public IGameStateSnapshots
|
|||
|
||||
void CompareSpriteData(const rct_sprite& spriteBase, const rct_sprite& spriteCmp, GameStateSpriteChange_t& changeData) const
|
||||
{
|
||||
CompareSpriteDataCommon(spriteBase.misc, spriteCmp.misc, changeData);
|
||||
if (spriteBase.misc.Type == spriteCmp.misc.Type)
|
||||
CompareSpriteDataCommon(spriteBase.base, spriteCmp.base, changeData);
|
||||
if (spriteBase.base.Type == spriteCmp.base.Type)
|
||||
{
|
||||
switch (spriteBase.misc.Type)
|
||||
switch (spriteBase.base.Type)
|
||||
{
|
||||
case EntityType::Guest:
|
||||
CompareSpriteDataGuest(
|
||||
static_cast<const Guest&>(spriteBase.peep), static_cast<const Guest&>(spriteCmp.peep), changeData);
|
||||
static_cast<const Guest&>(spriteBase.base), static_cast<const Guest&>(spriteCmp.base), changeData);
|
||||
break;
|
||||
case EntityType::Staff:
|
||||
CompareSpriteDataStaff(
|
||||
static_cast<const Staff&>(spriteBase.peep), static_cast<const Staff&>(spriteCmp.peep), changeData);
|
||||
static_cast<const Staff&>(spriteBase.base), static_cast<const Staff&>(spriteCmp.base), changeData);
|
||||
break;
|
||||
case EntityType::Vehicle:
|
||||
CompareSpriteDataVehicle(spriteBase.vehicle, spriteCmp.vehicle, changeData);
|
||||
CompareSpriteDataVehicle(
|
||||
static_cast<const Vehicle&>(spriteBase.base), static_cast<const Vehicle&>(spriteCmp.base), changeData);
|
||||
break;
|
||||
case EntityType::Litter:
|
||||
CompareSpriteDataLitter(spriteBase.litter, spriteCmp.litter, changeData);
|
||||
CompareSpriteDataLitter(
|
||||
static_cast<const Litter&>(spriteBase.base), static_cast<const Litter&>(spriteCmp.base), changeData);
|
||||
break;
|
||||
case EntityType::SteamParticle:
|
||||
CompareSpriteDataSteamParticle(spriteBase.steam_particle, spriteCmp.steam_particle, changeData);
|
||||
CompareSpriteDataSteamParticle(
|
||||
static_cast<const SteamParticle&>(spriteBase.base), static_cast<const SteamParticle&>(spriteCmp.base),
|
||||
changeData);
|
||||
break;
|
||||
case EntityType::MoneyEffect:
|
||||
CompareSpriteDataMoneyEffect(spriteBase.money_effect, spriteCmp.money_effect, changeData);
|
||||
CompareSpriteDataMoneyEffect(
|
||||
static_cast<const MoneyEffect&>(spriteBase.base), static_cast<const MoneyEffect&>(spriteCmp.base),
|
||||
changeData);
|
||||
break;
|
||||
case EntityType::CrashedVehicleParticle:
|
||||
CompareSpriteDataVehicleCrashParticle(
|
||||
spriteBase.crashed_vehicle_particle, spriteCmp.crashed_vehicle_particle, changeData);
|
||||
static_cast<const VehicleCrashParticle&>(spriteBase.base),
|
||||
static_cast<const VehicleCrashParticle&>(spriteCmp.base), changeData);
|
||||
break;
|
||||
case EntityType::ExplosionCloud:
|
||||
case EntityType::CrashSplash:
|
||||
case EntityType::ExplosionFlare:
|
||||
CompareSpriteDataMisc(spriteBase.misc, spriteCmp.misc, changeData);
|
||||
CompareSpriteDataMisc(
|
||||
static_cast<const MiscEntity&>(spriteBase.base), static_cast<const MiscEntity&>(spriteCmp.base),
|
||||
changeData);
|
||||
break;
|
||||
case EntityType::JumpingFountain:
|
||||
CompareSpriteDataJumpingFountain(spriteBase.jumping_fountain, spriteCmp.jumping_fountain, changeData);
|
||||
CompareSpriteDataJumpingFountain(
|
||||
static_cast<const JumpingFountain&>(spriteBase.base),
|
||||
static_cast<const JumpingFountain&>(spriteCmp.base), changeData);
|
||||
break;
|
||||
case EntityType::Balloon:
|
||||
CompareSpriteDataBalloon(spriteBase.balloon, spriteCmp.balloon, changeData);
|
||||
CompareSpriteDataBalloon(
|
||||
static_cast<const Balloon&>(spriteBase.base), static_cast<const Balloon&>(spriteCmp.base), changeData);
|
||||
break;
|
||||
case EntityType::Duck:
|
||||
CompareSpriteDataDuck(spriteBase.duck, spriteCmp.duck, changeData);
|
||||
CompareSpriteDataDuck(
|
||||
static_cast<const Duck&>(spriteBase.base), static_cast<const Duck&>(spriteCmp.base), changeData);
|
||||
break;
|
||||
case EntityType::Null:
|
||||
break;
|
||||
|
@ -567,21 +587,21 @@ struct GameStateSnapshots final : public IGameStateSnapshots
|
|||
const rct_sprite& spriteBase = spritesBase[i];
|
||||
const rct_sprite& spriteCmp = spritesCmp[i];
|
||||
|
||||
changeData.entityType = spriteBase.misc.Type;
|
||||
changeData.entityType = spriteBase.base.Type;
|
||||
|
||||
if (spriteBase.misc.Type == EntityType::Null && spriteCmp.misc.Type != EntityType::Null)
|
||||
if (spriteBase.base.Type == EntityType::Null && spriteCmp.base.Type != EntityType::Null)
|
||||
{
|
||||
// Sprite was added.
|
||||
changeData.changeType = GameStateSpriteChange_t::ADDED;
|
||||
changeData.entityType = spriteCmp.misc.Type;
|
||||
changeData.entityType = spriteCmp.base.Type;
|
||||
}
|
||||
else if (spriteBase.misc.Type != EntityType::Null && spriteCmp.misc.Type == EntityType::Null)
|
||||
else if (spriteBase.base.Type != EntityType::Null && spriteCmp.base.Type == EntityType::Null)
|
||||
{
|
||||
// Sprite was removed.
|
||||
changeData.changeType = GameStateSpriteChange_t::REMOVED;
|
||||
changeData.entityType = spriteBase.misc.Type;
|
||||
changeData.entityType = spriteBase.base.Type;
|
||||
}
|
||||
else if (spriteBase.misc.Type == EntityType::Null && spriteCmp.misc.Type == EntityType::Null)
|
||||
else if (spriteBase.base.Type == EntityType::Null && spriteCmp.base.Type == EntityType::Null)
|
||||
{
|
||||
// Do nothing.
|
||||
changeData.changeType = GameStateSpriteChange_t::EQUAL;
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
#include "../localisation/Localisation.h"
|
||||
#include "../localisation/StringIds.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Entity.h"
|
||||
#include "../world/Park.h"
|
||||
#include "../world/Sprite.h"
|
||||
|
||||
GuestSetNameAction::GuestSetNameAction(uint16_t spriteIndex, const std::string& name)
|
||||
: _spriteIndex(spriteIndex)
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
|
||||
#include "../Input.h"
|
||||
#include "../network/network.h"
|
||||
#include "../peep/Peep.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../world/Sprite.h"
|
||||
#include "../world/Entity.h"
|
||||
|
||||
PeepPickupAction::PeepPickupAction(PeepPickupType type, uint32_t spriteId, const CoordsXYZ& loc, NetworkPlayerId_t owner)
|
||||
: _type(type)
|
||||
|
|
|
@ -19,12 +19,14 @@
|
|||
#include "../localisation/StringIds.h"
|
||||
#include "../network/network.h"
|
||||
#include "../ride/Ride.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "../scenario/Scenario.h"
|
||||
#include "../ui/UiContext.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Banner.h"
|
||||
#include "../world/Climate.h"
|
||||
#include "../world/Duck.h"
|
||||
#include "../world/Footpath.h"
|
||||
#include "../world/Location.hpp"
|
||||
#include "../world/Map.h"
|
||||
|
|
|
@ -19,10 +19,11 @@
|
|||
# include "../interface/Window_internal.h"
|
||||
# include "../paint/Paint.h"
|
||||
# include "../ride/Ride.h"
|
||||
# include "../ride/Vehicle.h"
|
||||
# include "../util/Util.h"
|
||||
# include "../world/Climate.h"
|
||||
# include "../world/Entity.h"
|
||||
# include "../world/Map.h"
|
||||
# include "../world/Sprite.h"
|
||||
# include "Drawing.h"
|
||||
|
||||
# include <algorithm>
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "../platform/platform.h"
|
||||
#include "../ride/Ride.h"
|
||||
#include "../ride/RideData.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Climate.h"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "../peep/Staff.h"
|
||||
#include "../ride/Ride.h"
|
||||
#include "../ride/TrackDesign.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "../ui/UiContext.h"
|
||||
#include "../ui/WindowManager.h"
|
||||
#include "../world/Climate.h"
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include "Window_internal.h"
|
||||
|
||||
#include "../world/Entity.h"
|
||||
#include "../world/EntityList.h"
|
||||
#include "../world/Sprite.h"
|
||||
#include "Viewport.h"
|
||||
|
||||
void rct_window::SetLocation(const CoordsXYZ& coords)
|
||||
{
|
||||
|
|
|
@ -18,11 +18,13 @@
|
|||
#include "../localisation/Date.h"
|
||||
#include "../localisation/Localisation.h"
|
||||
#include "../management/Research.h"
|
||||
#include "../peep/Peep.h"
|
||||
#include "../ride/Ride.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Entity.h"
|
||||
#include "../world/Location.hpp"
|
||||
#include "../world/Sprite.h"
|
||||
|
||||
News::ItemQueues gNewsItems;
|
||||
|
||||
|
|
|
@ -10,7 +10,11 @@
|
|||
#include "../../drawing/Drawing.h"
|
||||
#include "../../interface/Viewport.h"
|
||||
#include "../../localisation/StringIds.h"
|
||||
#include "../../world/Balloon.h"
|
||||
#include "../../world/Duck.h"
|
||||
#include "../../world/Fountain.h"
|
||||
#include "../../world/MoneyEffect.h"
|
||||
#include "../../world/Particle.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../Paint.h"
|
||||
#include "Paint.Sprite.h"
|
||||
|
|
|
@ -16,7 +16,16 @@
|
|||
#include "../../ride/RideData.h"
|
||||
#include "../../ride/TrackDesign.h"
|
||||
#include "../../ride/VehiclePaint.h"
|
||||
#include "../../world/Balloon.h"
|
||||
#include "../../world/Climate.h"
|
||||
#include "../../world/Duck.h"
|
||||
#include "../../world/EntityList.h"
|
||||
#include "../../world/Fountain.h"
|
||||
#include "../../world/Litter.h"
|
||||
#include "../../world/MapAnimation.h"
|
||||
#include "../../world/MoneyEffect.h"
|
||||
#include "../../world/Park.h"
|
||||
#include "../../world/Particle.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../Paint.h"
|
||||
|
||||
|
|
|
@ -13,14 +13,15 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../localisation/Localisation.h"
|
||||
#include "../../object/ObjectList.h"
|
||||
#include "../../peep/Peep.h"
|
||||
#include "../../peep/Staff.h"
|
||||
#include "../../ride/Track.h"
|
||||
#include "../../ride/TrackDesign.h"
|
||||
#include "../../ride/TrackPaint.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../../world/Footpath.h"
|
||||
#include "../../world/Map.h"
|
||||
#include "../../world/Scenery.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Surface.h"
|
||||
#include "../Paint.h"
|
||||
#include "../Supports.h"
|
||||
|
|
|
@ -21,10 +21,11 @@
|
|||
#include "../../object/TerrainEdgeObject.h"
|
||||
#include "../../object/TerrainSurfaceObject.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../peep/Peep.h"
|
||||
#include "../../peep/Staff.h"
|
||||
#include "../../ride/TrackDesign.h"
|
||||
#include "../../sprites.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../../world/Surface.h"
|
||||
#include "Paint.TileElement.h"
|
||||
|
||||
|
|
|
@ -25,15 +25,18 @@
|
|||
#include "../ride/ShopItem.h"
|
||||
#include "../ride/Station.h"
|
||||
#include "../ride/Track.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "../scenario/Scenario.h"
|
||||
#include "../scripting/HookEngine.h"
|
||||
#include "../scripting/ScriptEngine.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Balloon.h"
|
||||
#include "../world/Climate.h"
|
||||
#include "../world/Footpath.h"
|
||||
#include "../world/LargeScenery.h"
|
||||
#include "../world/Map.h"
|
||||
#include "../world/MoneyEffect.h"
|
||||
#include "../world/Park.h"
|
||||
#include "../world/Scenery.h"
|
||||
#include "../world/Sprite.h"
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "../sprites.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Balloon.h"
|
||||
#include "../world/Climate.h"
|
||||
#include "../world/Entrance.h"
|
||||
#include "../world/Footpath.h"
|
||||
|
|
|
@ -921,7 +921,8 @@ private:
|
|||
bool UpdatePatrollingFindGrass();
|
||||
};
|
||||
|
||||
static_assert(sizeof(Peep) <= 512);
|
||||
static_assert(sizeof(Guest) <= 512);
|
||||
static_assert(sizeof(Staff) <= 512);
|
||||
|
||||
struct rct_sprite_bounds
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../world/Sprite.h"
|
||||
#include "Peep.h"
|
||||
|
||||
#include <iterator>
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "../ride/RideData.h"
|
||||
#include "../ride/Station.h"
|
||||
#include "../ride/Track.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "../scenario/Scenario.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../windows/Intent.h"
|
||||
|
|
|
@ -38,17 +38,25 @@
|
|||
#include "../ride/Station.h"
|
||||
#include "../ride/Track.h"
|
||||
#include "../ride/TrainManager.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "../scenario/Scenario.h"
|
||||
#include "../scenario/ScenarioRepository.h"
|
||||
#include "../scenario/ScenarioSources.h"
|
||||
#include "../util/SawyerCoding.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../world/Balloon.h"
|
||||
#include "../world/Climate.h"
|
||||
#include "../world/Duck.h"
|
||||
#include "../world/EntityList.h"
|
||||
#include "../world/Entrance.h"
|
||||
#include "../world/Footpath.h"
|
||||
#include "../world/Fountain.h"
|
||||
#include "../world/LargeScenery.h"
|
||||
#include "../world/Litter.h"
|
||||
#include "../world/MapAnimation.h"
|
||||
#include "../world/MoneyEffect.h"
|
||||
#include "../world/Park.h"
|
||||
#include "../world/Particle.h"
|
||||
#include "../world/Scenery.h"
|
||||
#include "../world/SmallScenery.h"
|
||||
#include "../world/Sprite.h"
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "../object/ObjectLimits.h"
|
||||
#include "../object/ObjectManager.h"
|
||||
#include "../object/ObjectRepository.h"
|
||||
#include "../peep/Peep.h"
|
||||
#include "../peep/Staff.h"
|
||||
#include "../rct12/SawyerChunkWriter.h"
|
||||
#include "../ride/Ride.h"
|
||||
|
@ -39,12 +40,20 @@
|
|||
#include "../ride/ShopItem.h"
|
||||
#include "../ride/Station.h"
|
||||
#include "../ride/TrackData.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "../scenario/Scenario.h"
|
||||
#include "../util/SawyerCoding.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../world/Balloon.h"
|
||||
#include "../world/Climate.h"
|
||||
#include "../world/Duck.h"
|
||||
#include "../world/EntityList.h"
|
||||
#include "../world/Fountain.h"
|
||||
#include "../world/Litter.h"
|
||||
#include "../world/MapAnimation.h"
|
||||
#include "../world/MoneyEffect.h"
|
||||
#include "../world/Park.h"
|
||||
#include "../world/Particle.h"
|
||||
#include "../world/Sprite.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "../object/ObjectLimits.h"
|
||||
#include "../object/ObjectManager.h"
|
||||
#include "../object/ObjectRepository.h"
|
||||
#include "../peep/Peep.h"
|
||||
#include "../peep/Staff.h"
|
||||
#include "../rct12/RCT12.h"
|
||||
#include "../rct12/SawyerChunkReader.h"
|
||||
|
@ -44,14 +45,22 @@
|
|||
#include "../ride/Station.h"
|
||||
#include "../ride/Track.h"
|
||||
#include "../ride/TrainManager.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "../scenario/Scenario.h"
|
||||
#include "../scenario/ScenarioRepository.h"
|
||||
#include "../util/SawyerCoding.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../world/Balloon.h"
|
||||
#include "../world/Climate.h"
|
||||
#include "../world/Duck.h"
|
||||
#include "../world/EntityList.h"
|
||||
#include "../world/Entrance.h"
|
||||
#include "../world/Fountain.h"
|
||||
#include "../world/Litter.h"
|
||||
#include "../world/MapAnimation.h"
|
||||
#include "../world/MoneyEffect.h"
|
||||
#include "../world/Park.h"
|
||||
#include "../world/Particle.h"
|
||||
#include "../world/Scenery.h"
|
||||
#include "../world/Sprite.h"
|
||||
#include "../world/Surface.h"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "Ride.h"
|
||||
#include "RideData.h"
|
||||
#include "Track.h"
|
||||
#include "Vehicle.h"
|
||||
#include "VehicleData.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "../common.h"
|
||||
#include "../localisation/StringIds.h"
|
||||
#include "../peep/Peep.h"
|
||||
#include "../sprites.h"
|
||||
#include "../world/Sprite.h"
|
||||
|
||||
|
|
|
@ -10,10 +10,12 @@
|
|||
#include "Station.h"
|
||||
|
||||
#include "../Game.h"
|
||||
#include "../peep/Peep.h"
|
||||
#include "../scenario/Scenario.h"
|
||||
#include "../world/Location.hpp"
|
||||
#include "../world/Sprite.h"
|
||||
#include "Track.h"
|
||||
#include "Vehicle.h"
|
||||
|
||||
static void ride_update_station_blocksection(Ride* ride, StationIndex stationIndex);
|
||||
static void ride_update_station_dodgems(Ride* ride, StationIndex stationIndex);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "../world/Map.h"
|
||||
#include "../world/MapAnimation.h"
|
||||
#include "../world/Park.h"
|
||||
#include "../world/Particle.h"
|
||||
#include "../world/Scenery.h"
|
||||
#include "../world/SmallScenery.h"
|
||||
#include "../world/Sprite.h"
|
||||
|
|
|
@ -365,6 +365,7 @@ private:
|
|||
void UpdateLandscapeDoor() const;
|
||||
void UpdateLandscapeDoorBackwards() const;
|
||||
};
|
||||
static_assert(sizeof(Vehicle) <= 512);
|
||||
|
||||
struct train_ref
|
||||
{
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
#include "../paint/Paint.h"
|
||||
#include "../paint/sprite/Paint.Sprite.h"
|
||||
#include "../ride/RideData.h"
|
||||
#include "../world/Sprite.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "../world/Entity.h"
|
||||
#include "Track.h"
|
||||
|
||||
#include <iterator>
|
||||
|
|
|
@ -13,11 +13,12 @@
|
|||
#include "../../paint/Supports.h"
|
||||
#include "../../paint/tile_element/Paint.TileElement.h"
|
||||
#include "../../sprites.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../../world/Map.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../RideData.h"
|
||||
#include "../TrackData.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
#include "../VehiclePaint.h"
|
||||
|
||||
#ifndef NO_VEHICLES
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
|
||||
|
|
|
@ -10,9 +10,11 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../peep/Peep.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
|
||||
static constexpr const uint8_t edges_1x4_ne_sw[] = {
|
||||
EDGE_NW | EDGE_SE,
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
|
||||
struct haunted_house_bound_box
|
||||
{
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
|
||||
/** rct2: 0x0142805C */
|
||||
static constexpr const uint32_t merry_go_round_rider_offsets[] = { 0, 32, 64, 96, 16, 48, 80, 112 };
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../peep/Peep.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../../world/Map.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Surface.h"
|
||||
#include "../RideData.h"
|
||||
#include "../TrackData.h"
|
||||
|
|
|
@ -11,10 +11,11 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../peep/Peep.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
|
||||
#include "../Vehicle.h"
|
||||
enum
|
||||
{
|
||||
SPR_SPACE_RINGS_FENCE_NE = 22146,
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
|
||||
|
|
|
@ -11,9 +11,10 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
|
||||
/** rct2: 0x008A2ABC */
|
||||
static void paint_enterprise_structure(
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "../../world/Sprite.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
#include "../VehiclePaint.h"
|
||||
|
||||
enum
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
|
||||
/** rct2: 0x01428010 */
|
||||
static constexpr const uint32_t swinging_inverter_ship_base_sprite_offset[] = { 0, 16, 0, 16 };
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
|
||||
// 1 2 0 3 4
|
||||
static constexpr const uint8_t track_map_1x5[][5] = {
|
||||
|
|
|
@ -12,11 +12,12 @@
|
|||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../sprites.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../../world/Map.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../RideData.h"
|
||||
#include "../TrackData.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
|
||||
#include <iterator>
|
||||
|
||||
|
|
|
@ -11,9 +11,10 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
|
||||
/** rct2: 0x0076E5C9 */
|
||||
static void paint_twist_structure(
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "../../world/Sprite.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
#include "../VehiclePaint.h"
|
||||
|
||||
#ifndef NO_VEHICLES
|
||||
|
|
|
@ -12,9 +12,10 @@
|
|||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../paint/sprite/Paint.Sprite.h"
|
||||
#include "../../world/Sprite.h"
|
||||
#include "../../world/Entity.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
#include "../Vehicle.h"
|
||||
#include "../VehiclePaint.h"
|
||||
|
||||
enum
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "../util/Util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Climate.h"
|
||||
#include "../world/Duck.h"
|
||||
#include "../world/Map.h"
|
||||
#include "../world/Park.h"
|
||||
#include "../world/Scenery.h"
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# include "../common.h"
|
||||
# include "../ride/Ride.h"
|
||||
# include "../ride/TrainManager.h"
|
||||
# include "../world/Balloon.h"
|
||||
# include "../world/Duck.h"
|
||||
# include "../world/EntityList.h"
|
||||
# include "../world/Map.h"
|
||||
# include "Duktape.hpp"
|
||||
|
|
|
@ -12,6 +12,11 @@
|
|||
#include "../core/DataSerialiser.h"
|
||||
#include "../peep/Peep.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "Balloon.h"
|
||||
#include "Duck.h"
|
||||
#include "Fountain.h"
|
||||
#include "MoneyEffect.h"
|
||||
#include "Particle.h"
|
||||
#include "Sprite.h"
|
||||
|
||||
static void EntityBaseSerialise(SpriteBase& base, DataSerialiser& stream)
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "../Game.h"
|
||||
#include "../interface/Viewport.h"
|
||||
#include "../object/StationObject.h"
|
||||
#include "../peep/Peep.h"
|
||||
#include "../ride/Ride.h"
|
||||
#include "../ride/RideData.h"
|
||||
#include "../ride/Track.h"
|
||||
|
|
|
@ -21,8 +21,14 @@
|
|||
#include "../interface/Viewport.h"
|
||||
#include "../localisation/Date.h"
|
||||
#include "../localisation/Localisation.h"
|
||||
#include "../peep/Peep.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "../scenario/Scenario.h"
|
||||
#include "Balloon.h"
|
||||
#include "Duck.h"
|
||||
#include "Fountain.h"
|
||||
#include "MoneyEffect.h"
|
||||
#include "Particle.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
@ -36,6 +42,9 @@ static std::vector<uint16_t> _freeIdList;
|
|||
|
||||
static bool _spriteFlashingList[MAX_ENTITIES];
|
||||
|
||||
constexpr const uint32_t SPATIAL_INDEX_SIZE = (MAXIMUM_MAP_SIZE_TECHNICAL * MAXIMUM_MAP_SIZE_TECHNICAL) + 1;
|
||||
constexpr const uint32_t SPATIAL_INDEX_LOCATION_NULL = SPATIAL_INDEX_SIZE - 1;
|
||||
|
||||
static std::array<std::vector<uint16_t>, SPATIAL_INDEX_SIZE> gSpriteSpatialIndex;
|
||||
|
||||
constexpr size_t GetSpatialIndexOffset(int32_t x, int32_t y)
|
||||
|
@ -135,7 +144,7 @@ std::string rct_sprite_checksum::ToString() const
|
|||
|
||||
SpriteBase* try_get_sprite(size_t spriteIndex)
|
||||
{
|
||||
return spriteIndex >= MAX_ENTITIES ? nullptr : &_spriteList[spriteIndex].misc;
|
||||
return spriteIndex >= MAX_ENTITIES ? nullptr : &_spriteList[spriteIndex].base;
|
||||
}
|
||||
|
||||
SpriteBase* get_sprite(size_t spriteIndex)
|
||||
|
|
|
@ -11,17 +11,11 @@
|
|||
#define _SPRITE_H_
|
||||
|
||||
#include "../common.h"
|
||||
#include "../peep/Peep.h"
|
||||
#include "../ride/Vehicle.h"
|
||||
#include "Balloon.h"
|
||||
#include "Duck.h"
|
||||
#include "Entity.h"
|
||||
#include "Fountain.h"
|
||||
#include "Litter.h"
|
||||
#include "MoneyEffect.h"
|
||||
#include "Particle.h"
|
||||
#include "SpriteBase.h"
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
class DataSerialiser;
|
||||
|
||||
struct ExplosionFlare : MiscEntity
|
||||
|
@ -55,23 +49,7 @@ struct SteamParticle : MiscEntity
|
|||
union rct_sprite
|
||||
{
|
||||
uint8_t pad_00[0x200];
|
||||
MiscEntity misc;
|
||||
Peep peep;
|
||||
Litter litter;
|
||||
Vehicle vehicle;
|
||||
Balloon balloon;
|
||||
Duck duck;
|
||||
JumpingFountain jumping_fountain;
|
||||
MoneyEffect money_effect;
|
||||
VehicleCrashParticle crashed_vehicle_particle;
|
||||
CrashSplashParticle crash_splash;
|
||||
SteamParticle steam_particle;
|
||||
|
||||
// Default constructor to prevent non trivial construction issues
|
||||
rct_sprite()
|
||||
: pad_00()
|
||||
{
|
||||
}
|
||||
SpriteBase base;
|
||||
};
|
||||
assert_struct_size(rct_sprite, 0x200);
|
||||
|
||||
|
@ -91,9 +69,6 @@ enum
|
|||
SPRITE_FLAGS_PEEP_FLASHING = 1 << 9, // Deprecated: Use sprite_set_flashing/sprite_get_flashing instead.
|
||||
};
|
||||
|
||||
constexpr const uint32_t SPATIAL_INDEX_SIZE = (MAXIMUM_MAP_SIZE_TECHNICAL * MAXIMUM_MAP_SIZE_TECHNICAL) + 1;
|
||||
constexpr const uint32_t SPATIAL_INDEX_LOCATION_NULL = SPATIAL_INDEX_SIZE - 1;
|
||||
|
||||
rct_sprite* create_sprite(EntityType type);
|
||||
template<typename T> T* CreateEntity()
|
||||
{
|
||||
|
|
|
@ -25,10 +25,17 @@
|
|||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/network/network.h>
|
||||
#include <openrct2/object/ObjectManager.h>
|
||||
#include <openrct2/peep/Peep.h>
|
||||
#include <openrct2/platform/platform.h>
|
||||
#include <openrct2/rct2/S6Exporter.h>
|
||||
#include <openrct2/ride/Ride.h>
|
||||
#include <openrct2/ride/Vehicle.h>
|
||||
#include <openrct2/world/Balloon.h>
|
||||
#include <openrct2/world/Duck.h>
|
||||
#include <openrct2/world/Fountain.h>
|
||||
#include <openrct2/world/MoneyEffect.h>
|
||||
#include <openrct2/world/Park.h>
|
||||
#include <openrct2/world/Particle.h>
|
||||
#include <openrct2/world/Sprite.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
@ -110,7 +117,7 @@ static std::unique_ptr<GameState_t> GetGameState(std::unique_ptr<IContext>& cont
|
|||
{
|
||||
rct_sprite* sprite = reinterpret_cast<rct_sprite*>(GetEntity(spriteIdx));
|
||||
if (sprite == nullptr)
|
||||
res->sprites[spriteIdx].misc.Type = EntityType::Null;
|
||||
res->sprites[spriteIdx].base.Type = EntityType::Null;
|
||||
else
|
||||
res->sprites[spriteIdx] = *sprite;
|
||||
}
|
||||
|
@ -426,47 +433,56 @@ static void CompareSpriteDataDuck(const Duck& left, const Duck& right)
|
|||
COMPARE_FIELD(state);
|
||||
}
|
||||
|
||||
static void CompareSpriteDataMisc(const MiscEntity& left, const MiscEntity& right)
|
||||
{
|
||||
COMPARE_FIELD(frame);
|
||||
}
|
||||
|
||||
static void CompareSpriteData(const rct_sprite& left, const rct_sprite& right)
|
||||
{
|
||||
CompareSpriteDataCommon(left.misc, right.misc);
|
||||
if (left.misc.Type == right.misc.Type)
|
||||
CompareSpriteDataCommon(left.base, right.base);
|
||||
if (left.base.Type == right.base.Type)
|
||||
{
|
||||
switch (left.misc.Type)
|
||||
switch (left.base.Type)
|
||||
{
|
||||
case EntityType::Guest:
|
||||
CompareSpriteDataGuest(static_cast<const Guest&>(left.peep), static_cast<const Guest&>(right.peep));
|
||||
CompareSpriteDataGuest(static_cast<const Guest&>(left.base), static_cast<const Guest&>(right.base));
|
||||
break;
|
||||
case EntityType::Staff:
|
||||
CompareSpriteDataStaff(static_cast<const Staff&>(left.peep), static_cast<const Staff&>(right.peep));
|
||||
CompareSpriteDataStaff(static_cast<const Staff&>(left.base), static_cast<const Staff&>(right.base));
|
||||
break;
|
||||
case EntityType::Vehicle:
|
||||
CompareSpriteDataVehicle(left.vehicle, right.vehicle);
|
||||
CompareSpriteDataVehicle(static_cast<const Vehicle&>(left.base), static_cast<const Vehicle&>(right.base));
|
||||
break;
|
||||
case EntityType::Litter:
|
||||
CompareSpriteDataLitter(left.litter, right.litter);
|
||||
CompareSpriteDataLitter(static_cast<const Litter&>(left.base), static_cast<const Litter&>(right.base));
|
||||
break;
|
||||
case EntityType::SteamParticle:
|
||||
CompareSpriteDataSteamParticle(left.steam_particle, right.steam_particle);
|
||||
CompareSpriteDataSteamParticle(
|
||||
static_cast<const SteamParticle&>(left.base), static_cast<const SteamParticle&>(right.base));
|
||||
break;
|
||||
case EntityType::MoneyEffect:
|
||||
CompareSpriteDataMoneyEffect(left.money_effect, right.money_effect);
|
||||
CompareSpriteDataMoneyEffect(
|
||||
static_cast<const MoneyEffect&>(left.base), static_cast<const MoneyEffect&>(right.base));
|
||||
break;
|
||||
case EntityType::CrashedVehicleParticle:
|
||||
CompareSpriteDataCrashedVehicleParticle(left.crashed_vehicle_particle, right.crashed_vehicle_particle);
|
||||
CompareSpriteDataCrashedVehicleParticle(
|
||||
static_cast<const VehicleCrashParticle&>(left.base), static_cast<const VehicleCrashParticle&>(right.base));
|
||||
break;
|
||||
case EntityType::JumpingFountain:
|
||||
CompareSpriteDataJumpingFountain(left.jumping_fountain, right.jumping_fountain);
|
||||
CompareSpriteDataJumpingFountain(
|
||||
static_cast<const JumpingFountain&>(left.base), static_cast<const JumpingFountain&>(right.base));
|
||||
break;
|
||||
case EntityType::Balloon:
|
||||
CompareSpriteDataBalloon(left.balloon, right.balloon);
|
||||
CompareSpriteDataBalloon(static_cast<const Balloon&>(left.base), static_cast<const Balloon&>(right.base));
|
||||
break;
|
||||
case EntityType::Duck:
|
||||
CompareSpriteDataDuck(left.duck, right.duck);
|
||||
CompareSpriteDataDuck(static_cast<const Duck&>(left.base), static_cast<const Duck&>(right.base));
|
||||
break;
|
||||
case EntityType::ExplosionCloud:
|
||||
case EntityType::CrashSplash:
|
||||
case EntityType::ExplosionFlare:
|
||||
COMPARE_FIELD(misc.frame);
|
||||
CompareSpriteDataMisc(static_cast<const MiscEntity&>(left.base), static_cast<const MiscEntity&>(right.base));
|
||||
break;
|
||||
case EntityType::Null:
|
||||
break;
|
||||
|
@ -490,8 +506,8 @@ static void CompareStates(
|
|||
|
||||
for (size_t spriteIdx = 0; spriteIdx < MAX_ENTITIES; ++spriteIdx)
|
||||
{
|
||||
if (importedState->sprites[spriteIdx].misc.Type == EntityType::Null
|
||||
&& exportedState->sprites[spriteIdx].misc.Type == EntityType::Null)
|
||||
if (importedState->sprites[spriteIdx].base.Type == EntityType::Null
|
||||
&& exportedState->sprites[spriteIdx].base.Type == EntityType::Null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue