[SDL] I have a tiny feature request
Sean Middleditch
elanthis at awesomeplay.com
Fri Aug 3 23:27:09 PDT 2007
On Fri, 2007-08-03 at 23:20 -0500, matt wrote:
> On Fri, 3 Aug 2007 16:17:15 -0400
> Jonathan Dearborn <grimfang4 at hotmail.com> wrote:
>
> > Hey,
> >
> > Could the pixel access be done through macros in the SDL #includes?
> > Why would it have to be a function?
> > Jonny D
>
> not sure macro's are a good idea. arguments in those can be tricky,
> like i++ can expand to more than that.
Good point. In pixel access functions, that sort of thing would be
very, very common.
However, I don't believe any argument would need to be expanded more
than once. It really is as simple as (y*span+x). The only parameter
which would be expanded more than once is the surface itself; once to
access the pixel data, and once to access the horizontal span.
>
> matt
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
--
Sean Middleditch <elanthis at awesomeplay.com>
More information about the SDL
mailing list