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@...
(Continue reading)

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
>>
(Continue reading)

Luke Crook | 4 Nov 2008 03:43
Gravatar

"-p"


I'm dying here.

Elliot is right, I think using a predicate "-p" to set and test if  
alpha/color keying is enabled makes no sense whatsoever.

"-p" is a test for equality, or a test if something is a type-of something.

Great.
- Luke
Luke Crook | 4 Nov 2008 18:32
Gravatar

Re: "-p"

On Tue, 04 Nov 2008 05:05:26 -0800, Andreas Davour <ante@...>  
wrote:

> Elliot is indeed right. A predicate is not supposed to be settable, it
> just returns t or nil (or maybe a type-something, yes). I do have
> feelings about it.

OK.

- To set/test status:

(alpha-enabled-p *surface*)
(pixel-alpha-enabled-p *surface*)
(color-key-enabled-p *surface*)
(rle-accel-enabled-p *surface*)

(setf (enable-alpha *surface*) T/NIL)
(setf (enable-pixel-alpha *surface*) T/NIL)
(setf (enable-color-key *surface*) T/NIL)
(setf (enable-rle-accel *surface*) T/NIL)

- To set/get the value of:

(alpha *surface*)
(color-key *surface*)

(setf (alpha *surface*) 0-255)
(setf (color-key *surface*) *color*)
Luke Crook | 4 Nov 2008 19:05
Gravatar

Re: "-p"

On Tue, 04 Nov 2008 09:32:04 -0800, Luke Crook <luke@...> wrote:

> (setf (enable-alpha *surface*) T/NIL)
> (setf (enable-pixel-alpha *surface*) T/NIL)
> (setf (enable-color-key *surface*) T/NIL)
> (setf (enable-rle-accel *surface*) T/NIL)

The above doesn't make sense either as there is no corresponding function  
(enable-alpha *surface*). So I think removing the defsetf is the way to go.

(enable-alpha T/NIL :surface *default-surface*)
(enable-pixel-alpha T/NIL :surface *default-surface*)
(enable-color-key T/NIL :surface *default-surface*)
(enable-rle-accel T/NIL :surface *default-surface*)

- Luke
Luke Crook | 4 Nov 2008 22:28
Gravatar

Re: "-p"

On Tue, 04 Nov 2008 10:08:39 -0800, Andreas Davour <ante@...>  
wrote:

> On Tue, 4 Nov 2008, Luke Crook wrote:
>
>> On Tue, 04 Nov 2008 09:32:04 -0800, Luke Crook <luke@...> wrote:
>>
>> (enable-alpha T/NIL :surface *default-surface*)
>> (enable-pixel-alpha T/NIL :surface *default-surface*)
>> (enable-color-key T/NIL :surface *default-surface*)
>> (enable-rle-accel T/NIL :surface *default-surface*)
>
> That looks good to me.
>
> I have a hard time wrapping my head around setf functions. I tried to
> get some explanations in c.l.l and even though the answers made sense I
> lost it as soon as I left the computer and tried to think about it
> again...

I couldn't make a decision, so I just kept both the SETF and the non SETF  
versions.

- Luke
David O'Toole | 1 Dec 2008 15:23
Picon
Gravatar

my game project update


Hey Luke and friends, 

here is a narrated screencast video I made today of my early-alpha
roguelike game engine, which is about 85% of the way ported to Common
Lisp (from Emacs Lisp).

http://dto.mamalala.org/rlx-explod.ogv

Project info is at http://dto.mamalala.org/notebook/rlx.html

What do people thinK? 
Luke Crook | 1 Dec 2008 21:40
Gravatar

Re: my game project update


Great video :)

How much work was involved to use lispbuilder-sdl as the back-end?

- Luke

On Mon, 01 Dec 2008 06:23:59 -0800, David O'Toole <dto@...> wrote:

>
> Hey Luke and friends,
>
> here is a narrated screencast video I made today of my early-alpha
> roguelike game engine, which is about 85% of the way ported to Common
> Lisp (from Emacs Lisp).
>
> http://dto.mamalala.org/rlx-explod.ogv
>
> Project info is at http://dto.mamalala.org/notebook/rlx.html
>
> What do people thinK?
>
> _______________________________________________
> application-builder mailing list
> application-builder@...
> http://www.lispniks.com/mailman/listinfo/application-builder
David O'Toole | 1 Dec 2008 22:42
Picon
Gravatar

Re: my game project update

Hi Luke, 

It wasn't much work. Lispbuilder-sdl is pretty easy once you get the
hang of it. Virtually all the SDL specific code is in console.lisp in
the repo:

http://github.com/dto/rlx/raw/master/console.lisp

On Mon, 2008-12-01 at 12:40 -0800, Luke Crook wrote:
> Great video :)
> 
> How much work was involved to use lispbuilder-sdl as the back-end?
> 
> - Luke
> 
> On Mon, 01 Dec 2008 06:23:59 -0800, David O'Toole <dto@...> wrote:
> 
> >
> > Hey Luke and friends,
> >
> > here is a narrated screencast video I made today of my early-alpha
> > roguelike game engine, which is about 85% of the way ported to Common
> > Lisp (from Emacs Lisp).
> >
> > http://dto.mamalala.org/rlx-explod.ogv
> >
> > Project info is at http://dto.mamalala.org/notebook/rlx.html
> >
> > What do people thinK?
> >
(Continue reading)

Oisín Mac Fhearaí | 1 Dec 2008 15:52
Picon

Re: my game project update

2008/12/1 David O'Toole <dto@...>:
>
> Hey Luke and friends,
>
> here is a narrated screencast video I made today of my early-alpha
> roguelike game engine, which is about 85% of the way ported to Common
> Lisp (from Emacs Lisp).
>
> http://dto.mamalala.org/rlx-explod.ogv
>
> Project info is at http://dto.mamalala.org/notebook/rlx.html
>
> What do people thinK?

It seems like a very specific-purpose library, but looks very nice,
and the screencap video worked great. Nicely done :)
David O'Toole | 1 Dec 2008 18:18
Picon
Gravatar

Re: my game project update

Hello,

Although it is tailored to roguelike games, I've tried to define
"roguelike" very broadly in order to perhaps push the boundaries of
what is possible in the genre. And one can ignore or turn off many
functionalities and even bypass large parts of the system. For example
it would not be difficult at all to write a tetris game or pacman.

I will keep the group posted!

On Mon, Dec 1, 2008 at 9:52 AM, Oisín Mac Fhearaí <denpashogai@...m> wrote:
> 2008/12/1 David O'Toole <dto@...>:
>>
>> Hey Luke and friends,
>>
>> here is a narrated screencast video I made today of my early-alpha
>> roguelike game engine, which is about 85% of the way ported to Common
>> Lisp (from Emacs Lisp).
>>
>> http://dto.mamalala.org/rlx-explod.ogv
>>
>> Project info is at http://dto.mamalala.org/notebook/rlx.html
>>
>> What do people thinK?
>
> It seems like a very specific-purpose library, but looks very nice,
> and the screencap video worked great. Nicely done :)
> _______________________________________________
> application-builder mailing list
> application-builder@...
(Continue reading)

Luke J Crook | 4 Nov 2008 11:36
Gravatar

Re: "-p"

On Mon, 03 Nov 2008 18:43:08 -0800, Luke Crook <luke@...> wrote:

> "-p" is a test for equality, or a test if something is a type-of  
> something.

The following seems to make sense;

- To set/test status:

(alpha-enabled? *surface*)
(pixel-alpha-enabled? *surface*)
(color-key-enabled? *surface*)
(rle-accel-enabled? *surface*)

(setf (alpha-enabled? *surface*) T/NIL)
(setf (pixel-alpha-enabled? *surface*) T/NIL)
(setf (color-key-enabled? *surface*) T/NIL)
(setf (rle-accel-enabled? *surface*) T/NIL)

- To set/get the value of:

(alpha *surface*)
(color-key *surface*)

(setf (alpha *surface*) 0-255)
(setf (color-key *surface*) *color*)

- Luke
Justin Heyes-Jones | 4 Nov 2008 11:45
Picon
Gravatar

Re: "-p"

2008/11/4 Luke J Crook <luke@...>:
> On Mon, 03 Nov 2008 18:43:08 -0800, Luke Crook <luke@...> wrote:
>
>> "-p" is a test for equality, or a test if something is a type-of
>> something.
>
> The following seems to make sense;

Agreed.

Except to throw a spanner in the works I prefer -p to ?