#include<acknex.h>
#include<default.c>
typedef struct PEINT {
var toucher ; // touched
var bon_rep ; // good answer
var mau_rep ; // bad answer
var jeu ; // game
char slettre[2];
STRING* s_mi;
} PEINT;
// ----------------- definitions
PEINT* STmi = {toucher = 4; bon_rep = 3; mau_rep = 5; jeu=21; slettre = "bx"; s_mi= "#100";}
//------------------ panel
PANEL* p_resultats = {
pos_x = 0;
pos_y = 0;
layer 900;
digits (10,100," jeu no: %.0f ",*,1,STmi.jeu);
digits (350, 100, "toucher = %.0f",*,1,STmi.toucher);
digits (550,100,"bonne rp: %.0f ",*,1,STmi.bon_rep);
digits (650,100,"mau choix: %.0f ",*,1,STmi.mau_rep);
digits (300,130,"value of STmi.lettre: %s ",*,1,STmi.slettre);
digits (300,160,"value of STmi.s_mi: %s ",*,1,STmi.s_mi);
flags = OVERLAY ;
}
function give_new_val ()
{
while (STmi == NULL) { wait (1); }
p_resultats.flags |= VISIBLE;
// change the values to
STmi.toucher = 14;
STmi.bon_rep = 13;
STmi.mau_rep = 15;
STmi.jeu = 222;
//-----------------------------
STmi.slettre = "by";
STmi.s_mi = "cv";
// str_cpy(STmi.slettre, "mmmm"); //not working..error 1515
// str_cpy(STmi.slettre,STmi.s_mi); //not working..error 1515
//------------------------------
}
function main()
{
video_set(800,600,32,1);
screen_color.blue = 255;
wait(2);
level_load("");
wait (3) ;
give_new_val ();
}
//