OpenRCT2/src/openrct2/EditorObjectSelectionSession.h

45 lines
1.7 KiB
C
Raw Normal View History

/*****************************************************************************
2020-07-21 15:04:34 +02:00
* Copyright (c) 2014-2020 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"
2018-01-02 20:36:42 +01:00
#include "object/Object.h"
#include "util/Util.h"
2018-06-22 23:25:16 +02:00
#include <vector>
enum EDITOR_INPUT_FLAGS
2020-04-20 10:39:26 +02:00
{
2020-11-07 20:28:01 +01:00
INPUT_FLAG_EDITOR_OBJECT_SELECT = (1 << 0), // Set when you want to select an object, not set when you want to deselect it.
2020-04-20 10:39:26 +02:00
INPUT_FLAG_EDITOR_OBJECT_1 = (1 << 1),
2020-11-07 20:28:01 +01:00
INPUT_FLAG_EDITOR_OBJECT_SELECT_OBJECTS_IN_SCENERY_GROUP = (1 << 2),
2020-04-20 10:39:26 +02:00
INPUT_FLAG_EDITOR_OBJECT_ALWAYS_REQUIRED = (1 << 3)
};
extern bool _maxObjectsWasHit;
extern std::vector<uint8_t> _objectSelectionFlags;
extern int32_t _numSelectedObjectsForType[EnumValue(ObjectType::Count)];
bool editor_check_object_group_at_least_one_selected(ObjectType checkObjectType);
bool editor_check_object_group_at_least_one_surface_selected(bool queue);
void editor_object_flags_free();
void unload_unselected_objects();
2018-02-11 18:56:12 +01:00
void sub_6AB211();
void reset_selected_object_count_and_size();
void finish_object_selection();
2020-11-07 20:28:01 +01:00
bool window_editor_object_selection_select_object(uint8_t isMasterObject, int32_t flags, const ObjectRepositoryItem* item);
bool window_editor_object_selection_select_object(uint8_t isMasterObject, int32_t flags, const ObjectEntryDescriptor& entry);
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.
*/
int32_t editor_remove_unused_objects();