//////////////////////////////////////////////////////////////////////
// test.c
#include <acknex.h>
#include <default.c>
#include "headers.h"
FONT* standard_font = "ackfont.pcx";
PANEL* info_panel =
{ pos_x = 20;
pos_y = 20;
flags = SHOW;
digits = 0,0,3.0,standard_font,1,test;
digits = 0,10,3.0,standard_font,1,test2;
}
TEXT* status_text =
{ pos_x = 20;
pos_y = 70;
flags = SHOW;
font = standard_font;
strings = 1;
string("Status: N/A");
}
TEXT* save_text =
{ pos_x = 20;
pos_y = 40;
flags = SHOW;
font = standard_font;
strings = 3;
string("This is the first string","This is the second string","This is the third string");
}
function save_game()
{ game_save("test",1,SV_ALL);
str_cpy((status_text.pstring)[0],"Status: Game Saved.");
}
function mem_clear()
{ str_cpy((save_text.pstring)[0]," ");
str_cpy((save_text.pstring)[1]," ");
str_cpy((save_text.pstring)[2]," ");
str_cpy((status_text.pstring)[0],"Status: Memory Cleared.");
}
function load_game()
{ game_load("test",1);
str_cpy((status_text.pstring)[0],"Status: Game Loaded.");
}
function main()
{ on_f1 = save_game;
on_f2 = mem_clear;
on_f3 = load_game;
while(key_esc==0)
{ wait(1);
}
}