 |
MakeScrRect |
Function (ROM Call 0x42D) |
Puts four coordinates into a SCR_RECT and returns a pointer to it.
MakeScrRect is used to create a SCR_RECT from four screen coordinates.
For example, it can be used to convert a WIN_RECT to a SCR_RECT like this
(s is a SCR_RECT, and rect is a WIN_RECT):
MakeScrRect (rect.x0, rect.y0, rect.x1, rect.y1, &s);
In GNU C (like TIGCC is), it is generally faster to use this cast constructors instead of calling MakeScrRect:
s = (SCR_RECT){{x0, y0, x1, y1}};
See also: SetWinClip, MakeWinRect