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
|
#include <conio.h>
#include <stdio.h>
#include <peekpoke.h>
void port_stats() {
cursor(0);
clrscr();
chlinexy(1, 1, 26);
chlinexy(1, 7, 26);
chlinexy(1, 13, 26);
cvlinexy(0, 2, 5);
cvlinexy(27, 2, 5);
cvlinexy(0, 8, 5);
cvlinexy(27, 8, 5);
chlinexy(0, 15, 40);
cputcxy(0, 1, 17); // upper left corner
cputcxy(0, 7, 1); // |-
cputcxy(0, 13, 26); // lower left corner
cputcxy(27, 1, 5); // upper right corner
cputcxy(27, 7, 4); // -|
cputcxy(27, 13, 3); // lower right corner
cputsxy(1, 2, "Hong Kong Warehouse");
cputsxy(4, 3, "Opium In use");
cputsxy(4, 4, "Silk ");
cputsxy(4, 5, "Arms Vacant");
cputsxy(4, 6, "General ");
cputsxy(1, 8, "Hold ");
cputsxy(16, 8, "Guns ");
cputsxy(4, 9, "Opium ");
cputsxy(4, 10, "Silk ");
cputsxy(4, 11, "Arms ");
cputsxy(4, 12, "General ");
cputsxy(32, 2, "Date");
cputsxy(29, 3, "15 ");
cputsxy(30, 5, "Location");
cputsxy(32, 8, "Debt");
cputsxy(29, 11, "Ship Status");
cputsxy(0, 14, "Cash: ");
cputsxy(20, 14, "Bank: ");
}
int main(void) {
char *screenmem = PEEK(88)+256*PEEK(89);
FILE *f = fopen("H:PORTSTAT.DAT", "wb");
port_stats();
fwrite(screenmem, 40, 16, f);
fclose(f);
cgetc();
return 0;
}
|