1 /***************************************************************************** 2 * Copyright (c) 2014-2020 OpenRCT2 developers 3 * 4 * For a complete list of all authors, please refer to contributors.md 5 * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 6 * 7 * OpenRCT2 is licensed under the GNU General Public License version 3. 8 *****************************************************************************/ 9 10 #pragma once 11 12 #include "../world/Footpath.h" 13 #include "Object.h" 14 15 class FootpathObject final : public Object 16 { 17 private: 18 rct_footpath_entry _legacyType = {}; 19 PathSurfaceDescriptor _pathSurfaceDescriptor = {}; 20 PathSurfaceDescriptor _queueSurfaceDescriptor = {}; 21 PathRailingsDescriptor _pathRailingsDescriptor = {}; 22 23 public: GetLegacyData()24 void* GetLegacyData() override 25 { 26 return &_legacyType; 27 } 28 GetPathSurfaceDescriptor()29 const PathSurfaceDescriptor& GetPathSurfaceDescriptor() const 30 { 31 return _pathSurfaceDescriptor; 32 } 33 GetQueueSurfaceDescriptor()34 const PathSurfaceDescriptor& GetQueueSurfaceDescriptor() const 35 { 36 return _queueSurfaceDescriptor; 37 } 38 GetPathRailingsDescriptor()39 const PathRailingsDescriptor& GetPathRailingsDescriptor() const 40 { 41 return _pathRailingsDescriptor; 42 } 43 44 void ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* stream) override; 45 void ReadJson(IReadObjectContext* context, json_t& root) override; 46 void Load() override; 47 void Unload() override; 48 49 void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; 50 }; 51