Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Chicken Scheme Allegro binding

Credits go to SiegeLord for helping out!
This thread is locked; no one can reply to it. rss feed Print
Chicken Scheme Allegro binding
caomatto
Member #15,884
February 2015

I am trying the Scheme binding for Allegro 5, and I am finding it really interesting.
I can understand practically everything on how to use it, except for one thing: ENUM types.

How should I use an enum type?
For example, if I write
(new-display-flags-set! windowed)
at run-time it says "unbound variable windowed".

How to use display-flag enums like windowed, fullscreen, noframe, ... or any other enum type?

In other words, what is (for example) the Scheme equivalent for the C instruction
al_set_new_display_flags(ALLEGRO_WINDOWED);?

SiegeLord
Member #7,827
October 2006
avatar

I know nothing about Scheme, but perhaps something like this might work? (new-display-flags-set! (display-flag->int 'windowed))?

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

caomatto
Member #15,884
February 2015

Thank you! Now it works! :)

Go to: