New engine features

Top  Previous  Next

Multiple monitors support

 

The "-mon" command line option allows you to choose the desired monitor for output in a multi monitor system.

 

main.c -mon1 -> runs the project on the first monitor

main.c -mon2 -> runs the project on the second monitor

 

 

New panel events

 

Panel events can now be triggered by right mouse clicks as well.

 

BMAP* pointer_tga = "pointer.tga";

 

function mouse_startup()

       enable_mouse = 2; // allow right click events to be triggered

       mouse_mode = 2;

       mouse_map = pointer_tga;

       while (1)

       

               vec_set(mouse_pos, mouse_cursor);

               wait(1);

       }

}

 

function click_me()

{

       if (event_type == EVENT_CLICK)

               printf("Left mouse click!");

       if (event_type == EVENT_RIGHTCLICK)

               printf("Right mouse click!");        

}

 

PANEL* test_pan =

{

       pos_x = 100;

       pos_y = 20;

       bmap = "mypanel.pcx";

       event = click_me;

       flags = VISIBLE;

}

 

 

draw_box3d

 

Draws an an axis aligned wireframe box between two corner vertices.

 

function drawboxes_startup() // draw random boxes with random colors at x = -300...300, y = -300...300, z = 100...300

{

       VECTOR corner1, corner2;

       while (1)

       {

               vec_set(corner1.x, vector(300 - random(600), 300 - random(600), 100 + random(200)));        

               vec_set(corner2.x, vector(300 - random(600), 300 - random(600), 100 + random(200)));        

               draw_box3d(corner1, corner2, vector(random(255), random(255), random(255)), 100);        

               wait (1);

       }

}

 

aum79_beta1