-
Notifications
You must be signed in to change notification settings - Fork 0
/
CASTRUM.C
58 lines (53 loc) · 1.32 KB
/
CASTRUM.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* Sancti Georgii Castrum */
/* Avventura nel castello di San Giorgio Canavese - Jena Soft 1988 */
#include <graphics.h>
#include <stdio.h>
#include <stdlib.h>
#include <io.h>
#include "set.h"
#include "drivers.h"
#include "globals.h"
#include "musica.h"
#include "funckeys.h"
#include "agisci.h"
#include "status.h"
#include "room.h"
void main(int argc, char **argv)
{
int az ;
int o1,o2 ;
int again=1 ;
t_barrette i ;
FILE * mus ;
void * pt ;
loadvariables() ;
initeverything(argc,argv) ;
mus = fopen("ballo.mca","rb") ;
pt = malloc((int)filelength(fileno(mus)));
fread(pt,1,(int)filelength(fileno(mus)),mus);
fclose(mus) ;
/*play(pt) ;*/
for (i=punti; i<=antipatia; ++i)
stato.barrette[i] = (double)rand()*100.0/32767.0 ;
stato.dovesei = 1 ;
buildobjtables(3) ;
outstatus() ;
outsoleluna() ;
outwatch() ;
azione(-11,0,0) ;
while(again) {
updatetempo(10) ;
outsoleluna() ;
outwatch() ;
menuselect(&az,&o1,&o2) ;
if (az) azione(az,o1,o2);
for (i=punti; i<=antipatia; ++i) {
stato.barrette[i]+=rand()/32767.0-0.4 ;
if (stato.barrette[i]>100.0) stato.barrette[i]=10+random(10) ;
else if (stato.barrette[i]<0.0) stato.barrette[i]=random(100) ;
}
outstatus() ;
if (az==-128) again=0 ;
}
closegraph() ;
} /* prog "castrum.exe" */