I’m attempting to use SDL_MapSurface() in a chunk of code, but I’m getting
implicit declaration errors when compiling.
I checkec the /usr/local/include/SDL directory, and truly enough there doesn’t
seem to be an SDL_MapSurface function in any of the include files. However,
the function does show up in SDL-0.9.9/src/SDL_pixels.c.
The SDL documentation doesn’t say that I can’t use it. Am I missing something
here?
Thanks
Alex—
[alex southgate]
[@Alexander_Southgate]
[(212)677-2977]
Master Southgate wrote:
I’m attempting to use SDL_MapSurface() in a chunk of code, but I’m getting
implicit declaration errors when compiling.
You probably want to use SDL_DisplayFormat instead. The docs aren’t updated.
m.–
“We can deny everything, except that we have the possibility of being better.
Simply reflect on that.”
– His Holiness The Dalai Lama
I’m attempting to use SDL_MapSurface() in a chunk of code, but I’m getting
implicit declaration errors when compiling.
The function is no longer necessary as of SDL 0.9.x
I checkec the /usr/local/include/SDL directory, and truly enough there doesn’t
seem to be an SDL_MapSurface function in any of the include files. However,
the function does show up in SDL-0.9.9/src/SDL_pixels.c.
The SDL documentation doesn’t say that I can’t use it. Am I missing something
here?
Where did the documentation show you that you could use it?
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/
The HTML Docs, in the Function Reference. They don’t say that I can’t use it.
extern SDL_Surface *SDL_DisplayFormat(SDL_Surface *surface);
This function takes a surface and copies it to a new surface of the pixel
format and colors of the
video framebuffer, suitable for fast blitting onto the display surface. It calls
SDL_ConvertSurface()e
etc…
</From the Docs>
I’m trying to do a fade to black of an 8-bit BMP that I have loaded
with LoadBMP. I figure I need to set the palette of the screen
surface to that of the image surface, so that I can directly manipulate
the screen’s palette, instead of manipulating the image’s palette, and blitting
the image to the screen surface at every update. Here is where I thought I
could use MapSurface to copy the image’s format, palette and all, to the screen
surface’s format. What method would you suggest?
Thanks
AlexOn 22-Mar-99 Sam Lantinga wrote:
I’m attempting to use SDL_MapSurface() in a chunk of code, but I’m getting
implicit declaration errors when compiling.
The function is no longer necessary as of SDL 0.9.x
I checkec the /usr/local/include/SDL directory, and truly enough there
doesn’t
seem to be an SDL_MapSurface function in any of the include files. However,
the function does show up in SDL-0.9.9/src/SDL_pixels.c.
The SDL documentation doesn’t say that I can’t use it. Am I missing
something
here?
Where did the documentation show you that you could use it?
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software
[alex southgate]
[@Alexander_Southgate]
[(212)677-2977]