1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +01:00
Files
OpenRCT2/src/openrct2/object/ImageTable.h
Michał Janiszewski 2323cc1596 Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00

44 lines
1.1 KiB
C++

/*****************************************************************************
* Copyright (c) 2014-2019 OpenRCT2 developers
*
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
*
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#pragma once
#include "../common.h"
#include "../drawing/Drawing.h"
#include <memory>
#include <vector>
interface IReadObjectContext;
interface IStream;
class ImageTable
{
private:
std::unique_ptr<uint8_t[]> _data;
std::vector<rct_g1_element> _entries;
public:
ImageTable() = default;
ImageTable(const ImageTable&) = delete;
ImageTable& operator=(const ImageTable&) = delete;
~ImageTable();
void Read(IReadObjectContext* context, IStream* stream);
const rct_g1_element* GetImages() const
{
return _entries.data();
}
uint32_t GetCount() const
{
return static_cast<uint32_t>(_entries.size());
}
void AddImage(const rct_g1_element* g1);
};