-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprintHiScore.inc
More file actions
63 lines (40 loc) · 818 Bytes
/
printHiScore.inc
File metadata and controls
63 lines (40 loc) · 818 Bytes
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
59
60
61
62
63
procedure printHiScore;
var p: PByte absolute $e0;
i, a, b, l: byte;
t: TString;
procedure printDigits;
begin
if l > 0 then begin
a:=(ord(t[l])- 47) shl 3 + 96;
dec(l);
end else
a:=8 + 96;
if l>0 then begin
b:=(ord(t[l]) - 47) shl 3;
dec(l);
end else
b:=8;
for i:=7 downto 0 do
p[i]:=digitH[a+i] or digitH[b+i];
end;
procedure printDigits_hi;
begin
if l > 0 then begin
a:=(ord(t[l])- 47) shl 3;
dec(l);
end else
a:=8;
for i:=7 downto 0 do
p[i]:=(p[i] and $0f) or digitH[i + a];
end;
begin
hiscore_:=hiscore;
str(hiscore, t);
l:=length(t);
p:=pointer(PMB_PAGE+$700+98);
printDigits_hi;
p:=pointer(PMB_PAGE+$600+98);
printDigits;
p:=pointer(PMB_PAGE+$500+98);
printDigits;
end;