-
Notifications
You must be signed in to change notification settings - Fork 0
/
MICROSRC.txt
294 lines (265 loc) · 6.3 KB
/
MICROSRC.txt
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
[i]MICRON34
[i]"000003333330000000033CCCCCC33000003CCFFFFFFCC30003CCF333333FCC3003CF3DDDDDD3FC303CF3D00FFFDD3FC33CF3D0F33FFD3FC33CF3DF3EE3FD3FC33CF3DF3EE3FD3FC33CF3DFF33FFD3FC33CF3DDFFFFDD3FC303CF3DDDDDD3FC3003CCF333333FCC30003CCFFFFFFCC30000033CCCCCC330000000033333300000"
[i]Omicron 34
// If OmicronC and/or OmicronU is not present, throw an error
0->A->B->R
If Detect(0,"OmicronC")=0
ClrHome
Output(0,0,"Appvar OmicronC.8xv
Output(1,0,"not found!"
1->A
End
If Detect(0,"OmicronU")=0
R+3*(A=1->R
Output(0+R,0,"Appvar OmicronU.8xv
Output(1+R,0,"not found!
1->B
End
If A or B
If R
Output(6,0,"Please send these files
Else
Output(3,0,"Please send this file
End
Output(4+R,0,"to your calculator
Repeat KEY
getKey->KEY
End
ClrHome
Return
End
// Check for the save appvar, OmicronS; if non-existant, set WEEK to 1 and
//POINTS and PROGRESS to 0
If Detect(0,"OmicronS")=0
Open("OmicronS","w+"->SLOT
If SLOT=0
ClrHome
Output(0,0,"Failed to open
Output(1,0,"OmicronS.8xv
Output(3,0,"Please report this error
Output(4,0,"in this Cemetech thread:
Output(5,0,"cemetech/t16070
Pause
ClrHome
Return
End
Write("OmicronS",8,1,SLOT
1->A
Write(^^oA,3,1,SLOT
0->A
Write(^^oA,3,1,SLOT
Write(^^oA,3,1,SLOT
Write(^^oA,3,1,SLOT
1->A
Write(^^oA,3,1,SLOT
Write(^^oA,3,1,SLOT
End
CloseAll
// All of the contents of OmicronS are retrieved and stored to variables
Open("OmicronS","r"->SLOT
Seek(8,0,SLOT
Alloc(3->WEEK
Read(^^oWEEK,3,1,SLOT
|EWEEK->WEEK
Alloc(3->POINTS
Read(^^oPOINTS,3,1,SLOT
|EPOINTS->POINTS
Alloc(3->PROGRESS
Read(^^oPROGRESS,3,1,SLOT
|EPROGRESS->PROGRESS
Alloc(3->MAXOUT
Read(^^oMAXOUT,3,1,SLOT
|EMAXOUT->MAXOUT
Alloc(3->UPGRADEI
Read(^^oUPGRADEI,3,1,SLOT
|EUPGRADEI->UPGRADEI
Alloc(3->UPGRADEII
Read(^^oUPGRADEII,3,1,SLOT
|EUPGRADEII->UPGRADEII
CloseAll
// This will save the week number to CURRWEEK, so when the game opens the
// latest week will appear, but will allow the player to select the
// desired week without the program resetting the Week number every time
// the Challenge Menu opens
WEEK->CURRWEEK
// Places the selection box in the Challenge Menu according to current Week
If CURRWEEK=WEEK
If MAXOUT!=1
PROGRESS+1->SELECT
Else
PROGRESS->SELECT
End
End
// Define all of the sprites
AsmComp(SPRITES
Begin
SetDraw(1
1->SELECTION
Repeat KEY=15
// Draw the main menu
FillScreen(222
SetColor(0
FillTriangle(0,0,0,50,50,0
FillTriangle(320,240,320,190,270,240
SetColor(222
FillTriangle(0,0,0,40,40,0
FillTriangle(320,240,320,200,280,240
SetColor(0
FillTriangle(0,0,0,30,30,0
FillTriangle(320,240,320,210,290,240
SetColor(222
FillTriangle(0,0,0,20,20,0
FillTriangle(320,240,320,220,300,240
SetTextScale(3,4
SetTextBGColor(222
SetTextFGColor(0
PrintStringXY("Omicron 34",50,20
SetColor(0
Rectangle(120,90,70,75
For(X,0,3
FillRectangle(130,100+15*X,5,7
End
SetTextScale(1,1
SetTextFGColor(0
SetTextTransparentColor(255
PrintStringXY("PLAY",140,100
PrintStringXY("HELP",140,115
PrintStringXY("ABOUT",140,130
PrintStringXY("EXIT",140,145
// Selection arrow loop
Repeat KEY=54 or KEY=9 or KEY=15
PrintStringXY(">",130,100+15*(SELECTION-1)
Blit(1
Repeat KEY
getKey->KEY
End
// Erase arrow
If KEY=1 or KEY=4
SetColor(0
FillRectangle(130,100+15*(SELECTION-1),5,7
End
If KEY=1
SELECTION+1-4*(SELECTION=4->SELECTION
End
If KEY=4
SELECTION-1+4*(SELECTION=1->SELECTION
End
End
Goto END
// This is the door animation
Lbl DOORS
SetDraw(0
For(X,0,160
SetColor(0
FillRectangle(X,0,1,240
FillRectangle(319-X,0,1,240
If X>10
SetColor(107
FillRectangle(X-10,10,1,220
FillRectangle(329-X,10,1,220
End
End
Pause 1000
For(X,0,160
If X<=150
SetColor(0
FillRectangle(150-X,0,10,240
FillRectangle(170+X,0,10,240
End
SetColor(BGCOLOR
FillRectangle(160-X,0,5,240
FillRectangle(160+X,0,5,240
End
SetDraw(1
Return
// This is the help for all of the menus and challenges
Lbl GAMEAID
AsmComp(HELP
Return
Lbl END
If KEY=54 or KEY=9
// The Challenge Menu
If SELECTION=1
181->BGCOLOR
Call DOORS
AsmComp(CHALMENU
Call DOORS
End
// Main Menu Help
If SELECTION=2
SetDraw(0
PrintStringXY("Press [mode] anytime for help",60,200
PrintStringXY("To return to the previous menu or",43,210
PrintStringXY("exit a puzzle, press [clear]",66,220
Repeat KEY
getKey->KEY
End
0->KEY
SetDraw(1
End
// The About Menu
If SELECTION=3
181->BGCOLOR
Call DOORS
FillScreen(181
SetTextScale(2,2
SetTextBGColor(181
SetTextFGColor(0
PrintStringXY("ABOUT",120,10
SetTextScale(1,1
PrintStringXY("Omicron 34 is Captain Calc's spy entry for",20,60
PrintStringXY("Cemetech Contest 23",90,75
PrintStringXY("Version: 1.0 CE",10,135
PrintStringXY("Forum Thread (contest): cemetech/t16070",10,150
PrintStringXY("Press [prgm] to view credits",60,220
Blit(1
Repeat KEY
getKey->KEY
End
// The Credits
If KEY=31
181->BGCOLOR
Call DOORS
FillScreen(181
SetTextScale(2,2
PrintStringXY("CREDITS",110,10
SetTextScale(1,1
PrintStringXY("I would like to thank all of the following",5,40
PrintStringXY("for the assistance, advice, and",5,55
PrintStringXY("encouragement they gave during this",5,70
PrintStringXY("project's development:",5,85
PrintStringXY("PT_",150,110
PrintStringXY("MateoConLechuga",100,125
PrintStringXY("dankcalculatorbro",95,140
PrintStringXY("commandblockguy",101,155
PrintStringXY("e\psilon5",131,170
PrintStringXY("Argus",140,185
Blit(1
Repeat KEY
getKey->KEY
End
End //If KEY=31
// Zero the key variable to prevent "fall throughs"
0->KEY
181->BGCOLOR
Call DOORS
End //If SELECTION=3 (the About menu)
// If 'Exit' selected
If SELECTION=4
15->KEY
End
End // If KEY=54 or KEY=9
End // Repeat KEY=15
// Save game progress to OmicronS
CloseAll
Open("OmicronS","r+"->SLOT
Seek(8,0,SLOT
Write(^^oWEEK,3,1,SLOT
Write(^^oPOINTS,3,1,SLOT
Write(^^oPROGRESS,3,1,SLOT
Write(^^oMAXOUT,3,1,SLOT
Write(^^oUPGRADEI,3,1,SLOT
Write(^^oUPGRADEII,3,1,SLOT
SetArchiveStatus(1,SLOT
CloseAll
det(1