New engine features

Top  Previous  Next

sys_memory

 

Gives the size of the virtual memory that is currently allocated by the engine for nexus and static objects, in KB.

 

PANEL* neededmemory_pan =

{

       digits(20, 80, "Needed virtual memory: %.1f KB", *, 1, sys_memory);

       flags = visible;

}

 

aum78_beta1

 

 

text_outline

 

Gives the transparency of any text outline and shadow border in relation to the text's alpha value.

 

TEXT* outline_txt =

{

       pos_x = 10;

       pos_y = 10;

       font = "Arial#24";

       string("Just testing!");

       flags = OUTLINE | VISIBLE;

}

 

function settext_startup() // fades in and out the text outline

{

       while (1)

       {

               text_outline = 50 * (1 + sin(total_frames));

               wait (1);

       }

}

 

 

Panels with negative scale factors

 

Any panel can now be horizontally and vertically flipped by using negative scale_x and scale_y factors.

 

BMAP* splash_pcx = "splash.pcx";

 

PANEL* splash_pan =

{

       pos_x = 100;

       pos_y = 100;

       bmap = "splash.pcx";

}

 

function intro_startup()

{

       wait (-3); // wait until the level is loaded

       set(splash_pan, VISIBLE); // now we can display the panel

       while(splash_pan.scale_x > -1) // flip the panel horizontally

       {

               splash_pan.pos_x = (screen_size.x - bmap_width(splash_pcx) * abs(splash_pan.scale_x)) / 2; // center the panel

               splash_pan.scale_x -= 0.04 * time_step;

               wait(1);

       }

       wait (-1); // display the flipped panel for a second

       reset(splash_pan, VISIBLE); // let's hide the panel now

}

 

aum78_beta2