STRING* str_hour="";
STRING* str_minute="";
STRING* str_mode="";
TEXT* txt_date_info =
{
layer = 1;
pos_x = 50;
pos_y = 10;
string (str_month,str_day,str_year,str_hour,str_minute,str_mode);
flags = CENTER_X | SHOW;
}
function get_date()
{
var file_handle=0;
if(file_exists("date.txt"))
{
file_handle=file_open_read("date.txt");
var i=0;
for(i=0;i<6;i++)
{
file_str_read(file_handle,(txt_date_info.pstring)[i]);
}
if(run_mode > 7)
{
str_cpy((txt_date_info.pstring)[5],"RELEASE,");}
file_close(file_handle);}
}
function store_date()
{
if(run_mode>7)
return;
var file_handle=0;
var dates[5];
dates[0]=sys_month;
dates[1]= sys_day;
dates[2]=sys_year;
dates[3]=sys_hours;
dates[4]=sys_minutes;
beep();
file_handle=file_open_write("date.txt");
var i=0;
for(i=0;i<5;i++)
{
str_for_num((txt_date_info.pstring)[i], dates[i]);
str_cat((txt_date_info.pstring)[i],",");
file_str_write(file_handle,(txt_date_info.pstring)[i]);
}
str_cpy((txt_date_info.pstring)[5],"DEVELOPMENT,");
file_str_write(file_handle,(txt_date_info.pstring)[5]);
file_close(file_handle);
get_date();
}
function main()
{
vec_set(screen_size,vector(800,400,0));
vec_set(screen_color,vector(50,1,1)); // dark blue
vec_set(sky_color,vector(50,1,1)); // dark blue
video_window(NULL,NULL,0,"My New Game");
d3d_antialias = 1;
shadow_stencil = 3;
level_load(NULL);
vec_set(camera.x,vector(-250,0,50));
vec_set(camera.pan,vector(0,-15,0));
wait(1);
on_p=store_date;
get_date();
}