mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-19 08:06:42 +00:00
81 lines
1.2 KiB
C
81 lines
1.2 KiB
C
|
|
void dem1()
|
|
{
|
|
untyped_file f;
|
|
integer k;
|
|
|
|
/* -- demande de disk 1 -- */
|
|
assign(f,"mort.005");
|
|
/*$i-*/
|
|
k=ioresult;
|
|
reset(f);
|
|
while (ioresult!=0)
|
|
{
|
|
show_mouse();
|
|
k= do_alert(al_mess,1);
|
|
hide_mouse();
|
|
reset(f);
|
|
}
|
|
close(f);
|
|
}
|
|
|
|
void takesav(integer n)
|
|
{
|
|
untyped_file f;
|
|
integer i;
|
|
varying_string<10> st;
|
|
|
|
dem1();
|
|
/* -- chargement du fichier 'sauve#n.mor' -- */
|
|
st= string("sav")+chr(n+48)+".mor";
|
|
assign(f,st);
|
|
reset(f,497);
|
|
blockread(f,s1,1);
|
|
if (ioresult!=0)
|
|
{
|
|
i=do_alert(err_mess,1);
|
|
exit(0);
|
|
}
|
|
s=s1;
|
|
for( i=0; i <= 389; i ++) tabdon[i+acha]=bufcha[i];
|
|
close(f);
|
|
}
|
|
|
|
void ld_game(integer n)
|
|
{
|
|
hide_mouse();
|
|
maivid();
|
|
takesav(n);
|
|
/* -- disquette 2 -- */
|
|
dem2();
|
|
/* -- mises en place -- */
|
|
theure();
|
|
dprog();
|
|
antegame();
|
|
show_mouse();
|
|
}
|
|
|
|
void sv_game(integer n)
|
|
{
|
|
untyped_file f;
|
|
integer i;
|
|
|
|
hide_mouse();
|
|
tmaj3();
|
|
dem1();
|
|
/* -- sauvegarde du fichier 'sauve#n.mor' -- */
|
|
for( i=0; i <= 389; i ++) bufcha[i]=tabdon[i+acha];
|
|
s1=s;
|
|
if (s1.mlieu== 26) s1.mlieu= 15;
|
|
assign(f,string("sav")+chr(n+48)+".mor");
|
|
rewrite(f,497);
|
|
blockwrite(f,s1,1);
|
|
close(f);
|
|
dem2();
|
|
show_mouse();
|
|
}
|
|
|
|
|
|
|
|
|