Removal of SDL_SetClipping() breaks Aleph One/SDL

I just thought I would make it know that SDL_SetClipping() is used in
Aleph One/SDL, and it’s removal from the upcoming version will break
compatibility. It’s presumably not too difficult to change datatypes
and call SDL_SetClipRect(), but few users keep on top of new versions of
support libraries like SDL.

Just thought I would let you know. I don’t know what other projects
call this function, so I figured it might be worthwhile to mention.–
Ian Pitcher, 0.33333333 of Technician
@Ian_Pitcher | http://www.technician.org/
“Soon it will work everywhere!” - Konstantin Raudive, via. clock radio

I just thought I would make it know that SDL_SetClipping() is used in
Aleph One/SDL, and it’s removal from the upcoming version will break
compatibility. It’s presumably not too difficult to change datatypes
and call SDL_SetClipRect(), but few users keep on top of new versions of
support libraries like SDL.

Just thought I would let you know. I don’t know what other projects
call this function, so I figured it might be worthwhile to mention.

Thanks. As far as I know that’s the only program that has ever used it.
The SDL_SetClipping() function was for clipping only a portion of the
source surface when blitting. The new SDL_SetClipRect() function does
normal destination clipping (blits don’t affect the unclipped areas of
the destination surface)

It would be fairly easy to add source clipping again, if it’s really needed,
but it would slow down blitting slightly as the source rectangle clipping
is optimized to just clip to the surface area.

… he writes half-asleep…

-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Thanks. As far as I know that’s the only program that has ever used it.
The SDL_SetClipping() function was for clipping only a portion of the
source surface when blitting. The new SDL_SetClipRect() function does
normal destination clipping (blits don’t affect the unclipped areas of
the destination surface)

It would be fairly easy to add source clipping again, if it’s really needed,
but it would slow down blitting slightly as the source rectangle clipping
is optimized to just clip to the surface area.

It doesn’t really matter to me, since Christian Bauer is the one who’s
doing the SDL port. The only place the SDL_SetClipping() function is
used is in the menus as far as I can tell. I’ll try to use the new
function, but I’m pretty slow when it comes to figuring out my own code,
let alone other people’s.

This will force me to switch back to an older version of SDL, since I
can’t play any upcoming improvements to the Aleph One engine. See, I
knew if I looked closely, my selfish motives would become apparent. I
must have my fix of Marathon :slight_smile:

Thanks–
Ian Pitcher, 0.33333333 of Technician
@Ian_Pitcher | http://www.technician.org/
“Soon it will work everywhere!” - Konstantin Raudive, via. clock radio

I’ve managed to duplicate the behavior with the new function. I’ll just
send Christian a patch to see if I’ve broken anything. Thanks for
explaining the difference, Sam.–
Ian Pitcher, 0.33333333 of Technician
@Ian_Pitcher | http://www.technician.org/
“Soon it will work everywhere!” - Konstantin Raudive, via. clock radio

Well, I suppose thats what sdl-config --version is for.
:/On Fri, 15 Sep 2000, Ian Pitcher wrote:

I just thought I would make it know that SDL_SetClipping() is used in
Aleph One/SDL, and it’s removal from the upcoming version will break
compatibility. It’s presumably not too difficult to change datatypes
and call SDL_SetClipRect(), but few users keep on top of new versions of
support libraries like SDL.

Just thought I would let you know. I don’t know what other projects
call this function, so I figured it might be worthwhile to mention.


Ian Pitcher, 0.33333333 of Technician
ipitcher at technician.org | http://www.technician.org/
“Soon it will work everywhere!” - Konstantin Raudive, via. clock radio

Martin

Bother! said Pooh, as he shot the sheriff.

Hi!On Fri, Sep 15, 2000 at 01:01:05AM -0400, Ian Pitcher wrote:

I just thought I would make it know that SDL_SetClipping() is used in
Aleph One/SDL,

Yes, it’s used for highlighting the buttons in the main menu. The game has
two full-screen pictures of the menu: a normal one and one with all buttons
highlighted. But the draw_picture() function doesn’t take source or destination
rectangles. Instead, when the user clicks a button, the program sets the
clipping region to the button rectangle (which it also needs for detecting
whether the click hit a button) and draws the "all buttons highlighted"
picture. In this way, only the clicked button will get highlighted.

It should be possible to perform the clipping myself with rectangle
calculations and drop the call to SDL_SetClipping() (or SDL_SetClipRect()
or whatever…).

Bye,
Christian


/ Coding on PowerPC and proud of it
/ http://www.uni-mainz.de/~bauec002/

Well, I suppose thats what sdl-config --version is for.

Until now, I wasn’t aware that sdl-config automatically updated function
calls when the function itself is removed or replaced. Now I know. How
useful !

Ian Pitcher, 0.33333333 of Technician
@Ian_Pitcher | http://www.technician.org/
“Soon it will work everywhere!” - Konstantin Raudive, via. clock radio

It should be possible to perform the clipping myself with rectangle
calculations and drop the call to SDL_SetClipping() (or SDL_SetClipRect()
or whatever…).

Christian,

As I said earlier, I have replaced it. If you want me to send you my
changes, I will. Let me know.–
Ian Pitcher, 0.33333333 of Technician
@Ian_Pitcher | http://www.technician.org/
“Soon it will work everywhere!” - Konstantin Raudive, via. clock radio

Uh…your not being serious, are you?
I meant, just use sdl-config --version to determine what version of SDL is
installed.On Fri, 15 Sep 2000, Ian Pitcher wrote:

Well, I suppose thats what sdl-config --version is for.

Until now, I wasn’t aware that sdl-config automatically updated function
calls when the function itself is removed or replaced. Now I know. How
useful !

Ian Pitcher, 0.33333333 of Technician
ipitcher at technician.org | http://www.technician.org/
“Soon it will work everywhere!” - Konstantin Raudive, via. clock radio

Martin

Bother, said Pooh as he violated Eeyore.

That would be useful. Heheh.

Uh…your not being serious, are you?
I meant, just use sdl-config --version to determine what version of SDL is
installed.

Well, I suppose thats what sdl-config --version is for.

Until now, I wasn’t aware that sdl-config automatically updated function
calls when the function itself is removed or replaced. Now I know. How
useful !

Ian Pitcher, 0.33333333 of Technician
ipitcher at technician.org | http://www.technician.org/
“Soon it will work everywhere!” - Konstantin Raudive, via. clock radio

Martin

Bother, said Pooh as he violated Eeyore.

-Sam Lantinga, Lead Programmer, Loki Entertainment Software> On Fri, 15 Sep 2000, Ian Pitcher wrote:

Uh…your not being serious, are you?
I meant, just use sdl-config --version to determine what version of SDL is
installed.

Sorry, I didn’t mean to come off like a jerk but I suppose I did
anyway. The point is moot now, as Christian taught me a thing-or-two by
not using either function, and wrote his own clipping code.–
Ian Pitcher, 0.33333333 of Technician
@Ian_Pitcher | http://www.technician.org/
“Soon it will work everywhere!” - Konstantin Raudive, via. clock radio