-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintro.ras
143 lines (126 loc) · 3.19 KB
/
intro.ras
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
program intro;
@setvalue "exomizer_toggle" 0
@setvalue "remove_unused_symbols" "0"
@ifndef IS_DEMO
@setvalue "output_type" "prg"
@endif
// @use "demounit"
@use "tables/luminosities"
@use "screen/fadeinout"
@use "screen/screen"
var
@perlinnoise "title/per1.bin" 40 25 2 1 1 170 140
fadedata : incbin("title/per1.bin",$C000);
@export "title/title.flf" "title/title.bin" 256
i,j: byte;
exit: boolean;
ready: boolean;
img_data:incbin("title/title_data.bin", $6000);
img_col : incbin("title/title_color.bin");
levStringsHead: Array[3] of string = ("LEVELSET:","AUTHOR:","NOTES:");
@ifndef IS_DEMO
music: incsid("music/fizz_intro_2000.sid",2);
@endif
@startblock $5000 "levelset"
maxSingleLevels: byte = 40;
maxMultiLevels: byte = 30;
levStrings: Array[5] of string = ("<TITLE>","<AUTHOR>","<N1>","<N2>","<N3>");
@endblock
@startblock $3000 "code"
procedure InitLevelSetInfo();
var
levStr: string;
begin
levStr := "L";
screen_bg_col:=black;
screen_fg_col:=black;
clearscreen(0,^$0400);
clearscreen(0,^$D800);
@ifdef IS_DEMO
asm(
"
ldx #<localVariable_InitLevelSetInfo_levStr
ldy #>localVariable_InitLevelSetInfo_levStr
jsr $200
");
@endif
//poke(^53272,0,23);
Screen::PrintStringColor(levStringsHead[0],0,0,@WHITE);
Screen::PrintStringColor(levStringsHead[1],0,1,@WHITE);
Screen::PrintStringColor(levStringsHead[2],0,3,@WHITE);
Screen::PrintStringColor(levStrings[0],11,0,@WHITE);
Screen::PrintStringColor(levStrings[1],11,1,@WHITE);
Screen::PrintStringColor(levStrings[2],0,3,@WHITE);
Screen::PrintStringColor(levStrings[3],0,4,@WHITE);
Screen::PrintStringColor(levStrings[4],0,5,@WHITE);
exit := false;
i := 0;
j := 0;
while(exit = false and j < 255) do begin
inc(i);
if(i = 255) then inc(j);
ReadJoy2();
if(joy2 & JOY_FIRE = JOY_FIRE) then exit := true;
end;
poke(^$08FD,0,maxSingleLevels);
poke(^$08FE,0,maxMultiLevels);
end;
procedure InitTitle();
begin
setmulticolormode();
setbitmapmode();
setcharsetandscreenlocation($6000,$4400);
setbank(VIC_BANK1);
//copyimagecolordata(#img_col,1);
screen_bg_col:=black;
screen_fg_col:=black;
clearscreen(0,^$4400);
clearscreen(0,^$D800);
InitSid(^$2000);
end;
interrupt RasterMain();
begin
startirq(0);
setmulticolormode();
setbitmapmode();
setcharsetandscreenlocation($6000,$4400);
setbank(VIC_BANK1);
call(^$2003);
ReadJoy2();
if(joy2 & JOY_FIRE = JOY_FIRE and ready = true) then exit := true;
if(getkey() = KEY_SPACE and ready = true) then exit := true;
closeIrq();
end;
@endblock
// This effect starts at $0900!
begin
// Executed in stand-alone
@ifndef IS_DEMO
disableciainterrupts();
preventirq();
setmemoryconfig(1,0,0);
maxSingleLevels := 48;
maxMultiLevels := 30;
@endif
InitLevelSetInfo();
InitTitle();
// Loop();
ready := false;
exit := false;
StartRasterChain(RasterMain(), 0, 0); // Don't use kernal
FadeInOut::InitCols(#Luminosities::fromBlue);
FadeInOut::DefaultFadeIn(#img_col,$4400,#fadedata,2);
ready := true;
while(exit = false) do begin end;
setmulticolormode();
setbitmapmode();
setcharsetandscreenlocation($6000,$4400);
setbank(VIC_BANK1);
FadeInOut::DefaultFadeOut(#img_col,$4400,#fadedata,2);
@ifdef IS_DEMO
asm("
jmp @bootStartAddress
");
@endif
Loop();
end.