Re: [Guile-sdl-devel] I'm back.
Status: Beta
Brought to you by:
joels
|
From: Alex S. <fo...@de...> - 2001-07-03 22:46:30
|
>>>>> "Joel" == Joel Smith <jo...@mo...> writes:
Joel> Are we sure that we want to use the smob:member and
Joel> smob:set-member! convention? Its just that I have never
Joel> seen it used before. Would it be better to use smob-member
Joel> and smob-member-set! Vikram seemed to suggest that he had
Joel> seen the use of smob:member somewhere though.
There are two places you'll typically see `:' in scheme names: one is
as an alternate prefix separator, so our functions could be
sdl:create-rgb-surface, etc. This matches the XML namespace syntax,
but apart from that is less common than using `-', and we all picked
sdl- so we should stick with that.
Where you'll also see `:' is in accessors. If you look at some of the
POSIX functions, you'll see this in things like the filesystem stat
accessors, pwent fields, and the networking functions. On the other
hand, these are only accessors, the :set-foo! is my invention. Also,
this syntax isn't used in the other modules we're likely to want to
work with (gtk/opengl), so we might want to avoid it. But there are a
few things I want to clean up before worrying about that.
Specifically, the enums/flags. I'm in the middle of converting these
to two different conceptual types. Any function expecting a
constant/enum as input will take either a symbol (and convert it
automatically) or the numerical value. Any function expecting a
logior'ed flags fields will take either a list of the symbols for that
flag, or (if you need it for efficiency) the exact numerical value.
Functions return the symbol (or list of symbols) for these
values... this may seem like a lot of extra work for the lists, but
this is a fairly rare operation, and not something you're likely to
put in a loop. Also, if we decide we need to optimize this, we can
add specific test functions. So instead of
(memq 'SDL_SRCALPHA (sdl-surface:flags surface))
to test if surface uses alpha blending (effectively expanding and
contracting the flags list), you could do
(sdl-surface:flags-srcalpha? surface)
Also, to keep things simple and consistent with other modules, I think
we should just stick to the SDL_FOO style symbols for constants.
Joel> Also the ./configure script does not seem to check for the
Joel> SDL libraries. The checking is commented out. I think we
Joel> really need to put it in.
I had commented it our while getting everything else working on my
system, since I believe (last I checked), you'll get an error if you
uncomment those lines, and I didn't feel like mucking with autoconf
yet.
Joel> If both of you want to offically join the sourceforge
Joel> project then I can give you cvs access. Then we can upload
Joel> the lastest version :)
Yes, please :) I Hope to have the flags stuff done this evening, so we
should wait for that and put in proper autoconf checks for SDL and the
two separate modules before announcing a new release (would this be
0.2.0)?
--
Alex Shinn <fo...@de...>
Lisper, Smalltalker, and all around poor speaker
|