Elliott Slaughter | 3 Nov 2008 20:35
Picon
Gravatar

surfaces.lisp: get-surface-rect

Hi,

What does the parameter b do in the following code from surfaces.lisp?

(defun get-surface-rect (b &key (surface *default-surface*) (rectangle (rectangle)))
  (check-type surface sdl-surface)
  (check-type rectangle rectangle)
  (sdl-base::get-surface-rect (fp surface) (fp rectangle))
  rectangle)

It looks like a typo to me.

Thanks.

--
Elliott Slaughter

"Any road followed precisely to its end leads precisely nowhere." - Frank Herbert

_______________________________________________
application-builder mailing list
application-builder@...
http://www.lispniks.com/mailman/listinfo/application-builder
Elliott Slaughter | 3 Nov 2008 20:43
Picon
Gravatar

Missing get-color-key

Hi,

On Fri, Jul 25, 2008 at 9:06 AM, Luke Crook <luke-bul7fGZb+kRBDgjK7y7TUQ@public.gmane.org> wrote:
Added, but not tested, GET-ALPHA and GET-COLOR-KEY.

With the newest version lispbuilder (r738), I'm getting warnings when I try to use get-color-key:

; caught STYLE-WARNING:
;   undefined function: LISPBUILDER-SDL:GET-COLOR-KEY

And I don't see the name anywhere in lispbuilder-sdl except the package definition.

$ grep get-color-key */*.lisp
sdl/package.lisp:   #:get-color-key

Any help would be appreciated. Thanks.


--
Elliott Slaughter

"Any road followed precisely to its end leads precisely nowhere." - Frank Herbert
_______________________________________________
application-builder mailing list
application-builder@...
http://www.lispniks.com/mailman/listinfo/application-builder
Justin Heyes-Jones | 3 Nov 2008 22:37
Picon
Gravatar

Re: Missing get-color-key

Luke changed a few things with color keys and sent an email about it
to the list recently. Although i don't think this was one of the
changes. I'm not sure we ever exposed the function?

2008/11/3 Elliott Slaughter <elliottslaughter@...>:
> Hi,
>
> On Fri, Jul 25, 2008 at 9:06 AM, Luke Crook <luke@...> wrote:
>>
>> Added, but not tested, GET-ALPHA and GET-COLOR-KEY.
>
> With the newest version lispbuilder (r738), I'm getting warnings when I try
> to use get-color-key:
>
> ; caught STYLE-WARNING:
> ;   undefined function: LISPBUILDER-SDL:GET-COLOR-KEY
>
> And I don't see the name anywhere in lispbuilder-sdl except the package
> definition.
>
> $ grep get-color-key */*.lisp
> sdl/package.lisp:   #:get-color-key
>
> Any help would be appreciated. Thanks.
>
>
> --
> Elliott Slaughter
>
> "Any road followed precisely to its end leads precisely nowhere." - Frank
> Herbert
>
> _______________________________________________
> application-builder mailing list
> application-builder@...
> http://www.lispniks.com/mailman/listinfo/application-builder
>
>
Justin Heyes-Jones | 3 Nov 2008 22:38
Picon
Gravatar

Re: surfaces.lisp: get-surface-rect

Yeah it looks like a typo. I've fixed it locally, but I've lost my
sourceforge login. I'll submit shortly if I get in.

Justin

2008/11/3 Elliott Slaughter <elliottslaughter@...>:
> Hi,
>
> What does the parameter b do in the following code from surfaces.lisp?
>
> (defun get-surface-rect (b &key (surface *default-surface*) (rectangle
> (rectangle)))
>   (check-type surface sdl-surface)
>   (check-type rectangle rectangle)
>   (sdl-base::get-surface-rect (fp surface) (fp rectangle))
>   rectangle)
>
> It looks like a typo to me.
>
> Thanks.
>
> --
> Elliott Slaughter
>
> "Any road followed precisely to its end leads precisely nowhere." - Frank
> Herbert
>
> _______________________________________________
> application-builder mailing list
> application-builder@...
> http://www.lispniks.com/mailman/listinfo/application-builder
>
>
Luke Crook | 4 Nov 2008 00:37
Gravatar

Re: Missing get-color-key

On Mon, 03 Nov 2008 11:43:48 -0800, Elliott Slaughter  
<elliottslaughter@...> wrote:

> Hi,
>
> On Fri, Jul 25, 2008 at 9:06 AM, Luke Crook <luke@...> wrote:
>>
>> Added, but not tested, GET-ALPHA and GET-COLOR-KEY.
>>
>
> With the newest version lispbuilder (r738), I'm getting warnings when I  
> try
> to use get-color-key:
>
> ; caught STYLE-WARNING:
> ;   undefined function: LISPBUILDER-SDL:GET-COLOR-KEY
>
> And I don't see the name anywhere in lispbuilder-sdl except the package
> definition.
>

As Justin said, I made changes upon changes; appologies for that.

(enable-color-key-p *blah*)
(setf (enable-color-key-p *blah) T/NIL)

(color-key-p *blah*)
(setf (color-key-p *blah*) *color*)

(clear-color-key *blah*)

(enable-alpha-p)
(setf (enable-alpha-p *blah*) T/NIL)

(surface-alpha-p *blah*)
(setf (surface-alpha-p *blah*) 0-255)

I think set-color-key and set-alpha can be deprecated.

- Luke
Elliott Slaughter | 4 Nov 2008 01:37
Picon
Gravatar

Re: Missing get-color-key

On Mon, Nov 3, 2008 at 3:37 PM, Luke Crook <luke-bul7fGZb+kRBDgjK7y7TUQ@public.gmane.org> wrote:

On Mon, 03 Nov 2008 11:43:48 -0800, Elliott Slaughter
<elliottslaughter-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> On Fri, Jul 25, 2008 at 9:06 AM, Luke Crook <luke-bul7fGZb+kRBDgjK7y7TUQ@public.gmane.org> wrote:
>>
>> Added, but not tested, GET-ALPHA and GET-COLOR-KEY.
>>
>
> With the newest version lispbuilder (r738), I'm getting warnings when I
> try
> to use get-color-key:
>
> ; caught STYLE-WARNING:
> ;   undefined function: LISPBUILDER-SDL:GET-COLOR-KEY
>
> And I don't see the name anywhere in lispbuilder-sdl except the package
> definition.
>

As Justin said, I made changes upon changes; appologies for that.

(color-key-p *blah*)
(setf (color-key-p *blah*) *color*)

So color-key-p returns the color-key, right? Why the "-p"; is it a predicate? (enable-color-key-p is a predicate, right?)

Thanks.

--
Elliott Slaughter

"Any road followed precisely to its end leads precisely nowhere." - Frank Herbert
_______________________________________________
application-builder mailing list
application-builder@...
http://www.lispniks.com/mailman/listinfo/application-builder
Luke Crook | 4 Nov 2008 02:36
Gravatar

Re: Missing get-color-key

On Mon, 03 Nov 2008 16:37:36 -0800, Elliott Slaughter  
<elliottslaughter@...> wrote:

> On Mon, Nov 3, 2008 at 3:37 PM, Luke Crook <luke@...> wrote:
>
>> (color-key-p *blah*)
>> (setf (color-key-p *blah*) *color*)
>>
>
> So color-key-p returns the color-key, right?

Correct.

> Why the "-p"; is it a
> predicate? (enable-color-key-p is a predicate, right?)

I have been going back and forth on appending the "-p" on the defsetf form.

Anyone have any feelings on;

    (setf (color-key *blah*) *color*), versus
    (setf (color-key-p *blah*) *color*)

Same goes for enable-color-key-p, enable-alpha-p, surface-alpha-p and  
rle-accel-p as these all have defsetf forms.

- Luke
Justin Heyes-Jones | 4 Nov 2008 03:37
Picon
Gravatar

Re: surfaces.lisp: get-surface-rect

Submitted the fix.

2008/11/3 Justin Heyes-Jones <justinhj@...>:
> Yeah it looks like a typo. I've fixed it locally, but I've lost my
> sourceforge login. I'll submit shortly if I get in.
>
> Justin
>
> 2008/11/3 Elliott Slaughter <elliottslaughter@...>:
>> Hi,
>>
>> What does the parameter b do in the following code from surfaces.lisp?
>>
>> (defun get-surface-rect (b &key (surface *default-surface*) (rectangle
>> (rectangle)))
>>   (check-type surface sdl-surface)
>>   (check-type rectangle rectangle)
>>   (sdl-base::get-surface-rect (fp surface) (fp rectangle))
>>   rectangle)
>>
>> It looks like a typo to me.
>>
>> Thanks.
>>
>> --
>> Elliott Slaughter
>>
>> "Any road followed precisely to its end leads precisely nowhere." - Frank
>> Herbert
>>
>> _______________________________________________
>> application-builder mailing list
>> application-builder@...
>> http://www.lispniks.com/mailman/listinfo/application-builder
>>
>>
>
Justin Heyes-Jones | 4 Nov 2008 03:39
Picon
Gravatar

Re: Missing get-color-key

2008/11/3 Luke Crook <luke@...>:
> Anyone have any feelings on;
>
>    (setf (color-key *blah*) *color*), versus
>    (setf (color-key-p *blah*) *color*)
>
> Same goes for enable-color-key-p, enable-alpha-p, surface-alpha-p and
> rle-accel-p as these all have defsetf forms.
>
> - Luke

I don't have strong feelings on this, but it seems like if you can set
it, then it shouldn't have the -p postfix.

Does color-key-p currently return the color key on a surface?

Justin
Luke Crook | 4 Nov 2008 03:42
Gravatar

Re: Missing get-color-key

On Mon, 03 Nov 2008 18:39:23 -0800, Justin Heyes-Jones  
<justinhj@...> wrote:

>
> Does color-key-p currently return the color key on a surface?

Yup.

Now that I actually think about this, what business does a predicate "-p"  
have returning the color-key of a surface?

color-key-p should mean, "is this a object a type-of COLOR-KEY". Which is  
clearly is not. Back to the drawing board.

- Luke

Gmane