forum-msg-id-134140-edit

Original date:2019-08-13 19:27:31 Edited by: Icy_Viking Subject: EuAllegro Help

Hello all,

I am working on updating EuAllegro for the most current version of Allegro. I almost got it, but I'm having a little trouble with it.

C Code

#define ALLEGRO_RELEASE_NUMBER   1 
#define ALLEGRO_VERSION_STR      "5.2.5" 
#define ALLEGRO_DATE_STR         "2019" 
#define ALLEGRO_DATE             20190224    /* yyyymmdd */ 
#define ALLEGRO_VERSION_INT \ 
    ((ALLEGRO_VERSION << 24) | (ALLEGRO_SUB_VERSION << 16) | \ 
    (ALLEGRO_WIP_VERSION << 8) | ALLEGRO_RELEASE_NUMBER | \ 
    ALLEGRO_UNSTABLE_BIT) 

Eu Code

--Wrapper Code 
public constant ALLEGRO_VERSION = 5, 
				ALLEGRO_SUB_VERSION = 2, 
				ALLEGRO_WIP_VERSION = 5 
				 
public constant ALLEGRO_RELEASE_NUMBER = 1 
 
public constant ALLEGRO_UNSTABLE_BIT = 8589934592 
 
public constant ALLEGRO_VERSION_INT = or_bits(ALLEGRO_VERSION * power(2, 24), or_bits(ALLEGRO_SUB_VERSION * power(2, 16), or_bits(ALLEGRO_WIP_VERSION * power(2, 8), or_bits(ALLEGRO_UNSTABLE_BIT * power (2, 4), ALLEGRO_RELEASE_NUMBER))))  
 
--Sample Program 
--Display a simple window 
 
without warning 
 
include std/machine.e 
include EuAllegro.ew 
 
atom ret = al_install_system(ALLEGRO_VERSION_INT,0) --error comes from here 
 
atom dis = al_create_display(800,600) 
 
al_set_new_window_title("Simple Window") 
 
al_flip_display() 
 
al_rest(5.0) 
 
al_destroy_display(dis) 
 
Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu