Some questions

hello, I have some questions to you (I’m Spanish, so my English is a
little poor):

  1. I’m programming a game, and I have to blit transparent surfaces, I
    know that I must use SDL_SetColorKey(), but how exactly?

  2. In my game I read a lot of tiles, save them in memory and then, I
    load a map, and each 10 ms. I rebuild the screen from the map and tiles
    in memory and update it, it works fine, but which is the fastest way to
    do this?

  3. has anybody (or are there any library that includes) a zoom function?
    and a rotate function?–

Quoting Isaac <463141 at cepsz.unizar.es>:

Yo tambien soy Espa?ol.Y ademas el programador principal de Arianne.
Si me echas una visita pues fenomemo.

hello, I have some questions to you (I’m Spanish, so my English is a
little poor):

  1. I’m programming a game, and I have to blit transparent surfaces,
    I
    know that I must use SDL_SetColorKey(), but how exactly?

I have done this in Arianne ( http://www.arianne.cx )

I think that it was
SDL_SetColorKey(surface->format,CONSTANT,SDL_MapColor(surface->format,
R,G,B));

Take a look at the file Sprite.cpp to see it in a more detailed level.

  1. In my game I read a lot of tiles, save them in memory and then, I
    load a map, and each 10 ms. I rebuild the screen from the map and
    tiles
    in memory and update it, it works fine, but which is the fastest way
    to
    do this?

I have been thinking in this an just I added a variable to see if it
has been modified or not, and that case we don’t redraw the screen.

  1. has anybody (or are there any library that includes) a zoom
    function?
    and a rotate function?

Try SGE ( it is in the SDL libraries)>

  1. I’m programming a game, and I have to blit transparent surfaces, I
    know that I must use SDL_SetColorKey(), but how exactly?
try this:

SL_SetColorKey(sdlSurface,	// sdl surface to key.
		SDL_SRCCOLORKEY|SDL_RLEACCEL,	// enable keying flags.
		SDL_MapRGB(sdlSurface->format, rKey, gKey, bKey));
		// get colour to use as transparent and plug it in.

-dv

How do I detect if the user’s computer supports SDL_HWSURFACE ?

How do I load a BMP into a hardware surface ? SDL_LoadBMP returns a pointer
to an SDL_Surface that is by default a SDL_SWSURFACE, right ? Do I need to
convert it manually ? How ?

I’ve never used an alpha channel before…Can someone please give/point me to
a pseudo-code that will show me how to blit a 32 bit alpha containing
surface with alpha blending ? while converting a 32 bit surface to 8 bit
indexed, alpha is ignored, right ?

Does SDL Image library support 32 bit PNG (tho it does support 24 bit PNG) ?

Thank you for your kind help.
Meetul

Hi All,
I have just tried to upgrade my SDL version under Mandrake 8.0 to 1.2.2 and during the installation of SDL it complains about needing libXv.so.1 and libXxf86dga.so.1. I downloaded these RPMS from Mandrakes site.

  1. Where do I get these ( libX… )shared objects from?
  2. What RPM files are they part of?
  3. How can I find out information like this with out bothering everyone on the list
  4. and lastly when using OpenGL with SDL under Linux is there anything special I need to set up before hand to get them working together or is installation of the libraries sufficient.

Thanks in advance,

Dominique
http://www.DelphiGamer.com := for all your Delphi/Kylix game development needs;

Hi All,
I have just tried to upgrade my SDL version under Mandrake 8.0 to
1.2.2 and during the installation of SDL it complains about needing
libXv.so.1 and libXxf86dga.so.1. I downloaded these RPMS from Mandrakes
site.

note that mandrake’s got problems with RPMS quite often… especially if
you go to alpha code but they sometimes hit stable. I reccomend
installing from source (preferably a recent CVS mirror). SDL development
has led to some remarkably stable code and it’s been in bugfixing mode for
months now.

I admit I regularily run alpha Mandrake code though…

  1. Where do I get these ( libX… )shared objects from?

The answer is:
library Mandrake package
libXv.so - XFree86-libs (I’m running 4.1.0-17mdk)
libXxf86dga.so - XFree86-devel

and static versions are in XFree86-static-libs. Note that in some
versions of Mandrake, only static versions of libXxf86dga have been
provided. I have no idea why.

  1. What RPM files are they part of?
    See above
  1. How can I find out information like this with out bothering everyone
    on the list

rpm -qi --whatprovides /usr/X11R6/lib/libXxfdga.so.1 will tell you what
package has it if it’s included. I -think- mandrake provides a filelist
on their FTP site of what files are in what package…

I think that perhaps either SDL should get a little more aggressive about
providing binary versions for different platforms (and in the case of
Redhat/Mandrake/Caldera/… RPMS for each -version- as they tend to strong
binary incompatibilities with some versions. Caldera’s RPMS aren’t really
compatible with Redhat to begin with and Redhat/Mandrake haven’t been
testing as solidly for the last 6 months as before that time.

  1. and lastly when using OpenGL with SDL under Linux is there anything
    special I need to set up before hand to get them working together or is
    installation of the libraries sufficient.

Installation of libraries is sufficient - at least for current SDL. I
think this one’s in the FAQ - if not it should be g. Along with perhaps
links to how to setup the funkier OpenGL setups such as nVidia…
(and Matrox maybe - my matrox just went unaccelerated and I don’t know why
with new drivers… sigh)

G’day, eh? :slight_smile:
- TeunisOn Tue, 9 Oct 2001 Dominique at SavageSoftware.com.au wrote:

[…]

  1. and lastly when using OpenGL with SDL under Linux is there
    anything special I need to set up before hand to get them working
    together or is installation of the libraries sufficient.

Installation of libraries is sufficient - at least for current SDL. I
think this one’s in the FAQ - if not it should be g. Along with
perhaps links to how to setup the funkier OpenGL setups such as
nVidia… (and Matrox maybe - my matrox just went unaccelerated and I
don’t know why with new drivers… sigh)

Well, there is one gotcha: h/w acceleration in 24 bit mode isn’t
supported - and X doesn’t complain about it in a comprehensible way. (It
says “direct rendering disabled”, rather than “h/w acceleration
disabled”.) You have to use 16 or 32 bits.

(And 1920x1440 isn’t possible in 32 bit mode, even on a MAX card for some
reason. :-/ Probably wrong clocks and memory speed settings - but the
last time I tried a tool for tweaking them, it just blew X up, regardless
of settings… heh Will look into tweaking it manually instead - that’s
all too often the only way that really works.)

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Tuesday 09 October 2001 10:30, winterlion wrote: