Important question (Please READ!)

I am in the process of converting SDL_Rects from x, y, w, h to
minx, maxx, miny, maxy

This makes it much easier to do clipping, BUT you suddenly need
lots of helper macro functions:

SDL_SetRect(rect, x, y, w, h)
SDL_OffsetRect(rect, xoff, yoff)
SDL_MoveRect(rect, xpos, ypos)

It also makes code quite incompatible.

Thoughts? Comments? Please reply soon.

See ya!
-Sam Lantinga (slouken at devolution.com)–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

Sam Lantinga writes:

I am in the process of converting SDL_Rects from x, y, w, h to
minx, maxx, miny, maxy

This makes it much easier to do clipping, BUT you suddenly need
lots of helper macro functions:

SDL_SetRect(rect, x, y, w, h)
SDL_OffsetRect(rect, xoff, yoff)
SDL_MoveRect(rect, xpos, ypos)

It also makes code quite incompatible.

sounds fine to me, will break some code but i only have 15 source
files right now so it’s no biggie

j

ok for me

tomaasz

I am in the process of converting SDL_Rects from x, y, w, h to
minx, maxx, miny, maxy

It also makes code quite incompatible.
Then we need to change some code… :wink:

Thoughts? Comments? Please reply soon.
What kind of improvements could be gotten from this change?

grt,

  • JasperOn Thu, 3 Sep 1998, Sam Lantinga wrote:

±----
| Beheer Commisaris | Homepage: http://www.il.fontys.nl/~jasper
| IGV Interlink | PGP-key: finger @Jasper_Berlijn |
| E-mail: @Jasper_Berlijn |
----+

I am in the process of converting SDL_Rects from x, y, w, h to
minx, maxx, miny, maxy

It also makes code quite incompatible.
Then we need to change some code… :wink:

Thoughts? Comments? Please reply soon.
What kind of improvements could be gotten from this change?

Much faster blit clipping. :slight_smile:

See ya!
-Sam Lantinga (slouken at devolution.com)–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

I am in the process of converting SDL_Rects from x, y, w, h to
minx, maxx, miny, maxy

This makes it much easier to do clipping, BUT you suddenly need
lots of helper macro functions:

SDL_SetRect(rect, x, y, w, h)
SDL_OffsetRect(rect, xoff, yoff)
SDL_MoveRect(rect, xpos, ypos)

It also makes code quite incompatible.

Thoughts? Comments? Please reply soon.

I’ve always felt that the t, l, b, r approach was more elegant, for the
reasons of clipping(which is something you tend to do a lot!).

njhOn Thu, 3 Sep 1998, Sam Lantinga wrote:

Thoughts? Comments? Please reply soon.
What kind of improvements could be gotten from this change?

The only thing which gets more complicated is code which moves fixed sized
rectangles around the screen(a la sprites). Everything else become
simpler.

njhOn Thu, 3 Sep 1998, Jasper Berlijn wrote: