#include <acknex.h>
#include <default.c>
var health = 200;
BMAP* panel = "panel.bmp";
BMAP* healthbar = "window.bmp";
BMAP* knob = "slider.bmp";
STRING* s_health = "Health";
ENTITY* car1 = "car1.mdl";
TEXT* t_health =
{
pos_x = 44;
pos_y = 22;
layer = 10;
string (s_health);
FLAGS = SHOW;
}
function main ()
{
level_load("room.wmb");
vec_set(camera.x, vector(16,447,358));
vec_set(camera.pan,vector(90,-89,0));
screen_size.x = 500;
screen_size.y = 500;
screen_color.green = 150;
mouse_mode = 4;
}
PANEL* first_panel =
{
BMAP = panel;
window(40,10,50,3,healthbar,health,NULL);
digits(7,12,3,"Arial#15",1,health);
vslider(7,52,31,knob,200,0,health);
FLAGS = OVERLAY | SHOW | OUTLINE;
}
action* car =
{
car1 = me;
while (1)
{
if (key_a)
my.pan -= 3 * time_step;
if (key_d)
my.pan += 3 * time_step;
if (key_w)
c_move(car1,vector(5 * time_step,0,0),nullvector,GLIDE);
if (key_s)
c_move(car1,vector(5 * time_step,0,0),nullvector,GLIDE);
}
}