mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Move BoundingBox out of RenderBase
They were essentially just pass-though methods
This commit is contained in:
@ -49,6 +49,18 @@ private:
|
||||
std::array<BBoxType, NUM_BBOX_VALUES> m_values = {};
|
||||
std::array<bool, NUM_BBOX_VALUES> m_dirty = {};
|
||||
bool m_is_valid = true;
|
||||
|
||||
// Nintendo's SDK seems to write "default" bounding box values before every draw (1023 0 1023 0
|
||||
// are the only values encountered so far, which happen to be the extents allowed by the BP
|
||||
// registers) to reset the registers for comparison in the pixel engine, and presumably to detect
|
||||
// whether GX has updated the registers with real values.
|
||||
//
|
||||
// We can store these values when Bounding Box emulation is disabled and return them on read,
|
||||
// which the game will interpret as "no pixels have been drawn"
|
||||
//
|
||||
// This produces much better results than just returning garbage, which can cause games like
|
||||
// Ultimate Spider-Man to crash
|
||||
std::array<u16, 4> m_bounding_box_fallback = {};
|
||||
};
|
||||
|
||||
extern std::unique_ptr<BoundingBox> g_bounding_box;
|
||||
|
Reference in New Issue
Block a user