forum-msg-id-134146-edit

Original date:2019-08-14 07:19:50 Edited by: petelomax Subject: Re: EuAllegro Help

ghaberek said...

There are functions in std/math.e that will make those bit shifts easier. See or_all() and shift_bits().

public constant ALLEGRO_VERSION_INT = or_all({ 
    shift_bits( ALLEGRO_VERSION,     -24 ), 
    shift_bits( ALLEGRO_SUB_VERSION, -16 ), 
    shift_bits( ALLEGRO_WIP_VERSION,  -8 ), 
    ALLEGRO_UNSTABLE_BIT 
}) 

fwiw, I would always prefer eg

public constant ALLEGRO_VERSION_INT = ALLEGRO_VERSION*#1000000 + 
                                      ALLEGRO_SUB_VERSION*#10000 + 
                                      ALLEGRO_WIP_VERSION*#100 + 
                                      ALLEGRO_UNSTABLE_BIT 
ghaberek said...

(I also recently discovered Dependencies which is a newer re-implementation of Dependency Walker for Windows 7 and up, but I haven't tried it yet. Might be worth a look.)

It sure is, works like a charm. Thanks for the tip.

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu