diff options
| author | hrydgard <hrydgard@gmail.com> | 2009-03-08 19:19:51 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2009-03-08 19:19:51 +0000 |
| commit | c6ffcec99146dec8f78265ef5b2a506793f974e7 (patch) | |
| tree | 4991ec4ffe214f7c1865058eba3203a27cf8556b /Source/Core/VideoCommon | |
| parent | c7a45ecf95d3b989b83b87ddaa43524aa962fa89 (diff) | |
First version of MSAA code added. No UI yet. No CSAA yet. Doesn't work in Zeldas and Metroids for unknown reason.
Automatic texture invalidation when using copy efb to ram (fixes weird flickery scanner in metroid 2).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2617 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/Src/VideoCommon.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Src/VideoCommon.h b/Source/Core/VideoCommon/Src/VideoCommon.h index 16344e4a9a..3b2cafc22a 100644 --- a/Source/Core/VideoCommon/Src/VideoCommon.h +++ b/Source/Core/VideoCommon/Src/VideoCommon.h @@ -104,6 +104,30 @@ struct TRectangle int GetWidth() const { return right - left; } int GetHeight() const { return bottom - top; } + + void FlipYPosition(int y_height, TRectangle *dest) const + { + int offset = y_height - (bottom - top); + dest->left = left; + dest->top = top + offset; + dest->right = right; + dest->bottom = bottom + offset; + } + + void FlipY(int y_height, TRectangle *dest) const { + dest->left = left; + dest->right = right; + dest->bottom = y_height - bottom; + dest->top = y_height - top; + } + + void Scale(float factor_x, float factor_y, TRectangle *dest) const + { + dest->left = (int)(factor_x * left); + dest->right = (int)(factor_x * right); + dest->top = (int)(factor_y * top); + dest->bottom = (int)(factor_y * bottom); + } }; // Logging |
