Debian Codegraph @

Source/Core/VideoBackends/Software/SWBoundingBox.h

raw symbols SCIP
1 // Copyright 2021 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include "Common/CommonTypes.h"
7
8 #include "VideoCommon/BoundingBox.h"
9
10 namespace BBoxManager
11 {
12 // Indicates a coordinate of the bounding box.
13 enum class Coordinate
14 {
15 Left, // The X coordinate of the left side of the bounding box.
16 Right, // The X coordinate of the right side of the bounding box.
17 Top, // The Y coordinate of the top of the bounding box.
18 Bottom, // The Y coordinate of the bottom of the bounding box.
19 };
20
21 // Gets a particular coordinate for the bounding box.
22 u16 GetCoordinate(Coordinate coordinate);
23
24 // Sets a particular coordinate for the bounding box.
25 void SetCoordinate(Coordinate coordinate, u16 value);
26
27 // Updates all bounding box coordinates.
28 void Update(u16 left, u16 right, u16 top, u16 bottom);
29 } // namespace BBoxManager
30
31 namespace SW
32 {
33 class SWBoundingBox final : public BoundingBox
34 {
35 public:
36 bool Initialize() override { return true; }
37
38 protected:
39 std::vector<BBoxType> Read(u32 index, u32 length) override;
40 void Write(u32 index, std::span<const BBoxType> values) override;
41 };
42
43 } // namespace SW