2017-12-03 00:15:05 +01:00
|
|
|
/*****************************************************************************
|
2019-03-17 08:16:15 +01:00
|
|
|
* Copyright (c) 2014-2019 OpenRCT2 developers
|
2017-12-03 00:15:05 +01:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
2017-12-03 00:15:05 +01:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
2017-12-03 00:15:05 +01:00
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common.h"
|
2018-01-02 20:36:42 +01:00
|
|
|
#include "object/Object.h"
|
2017-12-03 00:15:05 +01:00
|
|
|
|
2018-06-22 23:25:16 +02:00
|
|
|
#include <vector>
|
|
|
|
|
2020-04-24 17:19:06 +02:00
|
|
|
enum EDITOR_INPUT_FLAGS
|
2020-04-20 10:39:26 +02:00
|
|
|
{
|
|
|
|
INPUT_FLAG_EDITOR_OBJECT_1 = (1 << 1),
|
|
|
|
INPUT_FLAG_EDITOR_OBJECT_2 = (1 << 2),
|
|
|
|
INPUT_FLAG_EDITOR_OBJECT_ALWAYS_REQUIRED = (1 << 3)
|
|
|
|
};
|
|
|
|
|
2017-12-03 00:15:05 +01:00
|
|
|
extern bool _maxObjectsWasHit;
|
2018-06-20 17:28:51 +02:00
|
|
|
extern std::vector<uint8_t> _objectSelectionFlags;
|
|
|
|
extern int32_t _numSelectedObjectsForType[OBJECT_TYPE_COUNT];
|
2017-12-03 00:15:05 +01:00
|
|
|
|
2018-06-20 17:28:51 +02:00
|
|
|
bool editor_check_object_group_at_least_one_selected(int32_t objectType);
|
2017-12-03 00:15:05 +01:00
|
|
|
void editor_object_flags_free();
|
|
|
|
void unload_unselected_objects();
|
2018-02-11 18:56:12 +01:00
|
|
|
void sub_6AB211();
|
2017-12-03 00:15:05 +01:00
|
|
|
void reset_selected_object_count_and_size();
|
2020-04-24 17:19:06 +02:00
|
|
|
void finish_object_selection();
|
2018-06-22 23:25:16 +02:00
|
|
|
int32_t window_editor_object_selection_select_object(uint8_t bh, int32_t flags, const rct_object_entry* entry);
|
2017-12-03 00:15:05 +01:00
|
|
|
|
2018-02-01 18:49:14 +01:00
|
|
|
/**
|
2018-06-22 23:25:16 +02:00
|
|
|
* Removes all unused objects from the object selection.
|
|
|
|
* @return The number of removed objects.
|
|
|
|
*/
|
2018-06-20 17:28:51 +02:00
|
|
|
int32_t editor_remove_unused_objects();
|