mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
srb2::Draw: add clip method, optionally switch between draw chain's cliprect or global cliprect
This commit is contained in:
parent
510c82ca6d
commit
9adf6e9568
2 changed files with 13 additions and 0 deletions
|
|
@ -154,6 +154,12 @@ public:
|
|||
Chain& clipx() { return clipx(x_, x_ + width_); }
|
||||
Chain& clipy() { return clipy(y_, y_ + height_); }
|
||||
|
||||
// True to use internal clipping state
|
||||
// False to use global state (default)
|
||||
// Changing the clipping dimensions implicitly sets
|
||||
// this to true
|
||||
Chain& clip(bool yes);
|
||||
|
||||
Chain& colormap(const UINT8* colormap);
|
||||
Chain& colormap(UINT16 color);
|
||||
Chain& colormap(INT32 skin, UINT16 color);
|
||||
|
|
@ -255,6 +261,7 @@ public:
|
|||
METHOD(stretch);
|
||||
METHOD(clipx);
|
||||
METHOD(clipy);
|
||||
METHOD(clip);
|
||||
METHOD(colormap);
|
||||
METHOD(colorize);
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,12 @@ inline Draw::Chain& Draw::Chain::clipy(float top, float bottom)
|
|||
return *this;
|
||||
}
|
||||
|
||||
inline Draw::Chain& Draw::Chain::clip(bool yes)
|
||||
{
|
||||
clip_ = yes;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline Draw::Chain& Draw::Chain::colormap(const UINT8* colormap)
|
||||
{
|
||||
colormap_ = colormap;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue