-
Notifications
You must be signed in to change notification settings - Fork 0
/
LFP3_mvd5044.asm
557 lines (459 loc) · 20.1 KB
/
LFP3_mvd5044.asm
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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# Author: Mio Diaz
# Purpose: Final Project
# Text based choose your adventure game
# Important:
# the Bitmap Display tool must be connected to MARS and set to:
# unit width in pixels: 1
# unit height in pixels: 1
# display width in pixels: 1024
# display height in pixels: 1024
# base address for display: 0x10040000 (heap)
# all characters entered must be UPPERCASE
################################
##------ GAME MECHANICS ------##
################################
# Enter the letter in brackets to make that selection
# game will determine your fate based on your selection
# each game play won't be the same as the last
# winning or losing is all based on your actions
## stretch goals:
##
## 1) inventory
#
## 2) normal or nightmare mode
#
## 3) hope or death picker
## random gen will pick between 0-1
## 0 will be hope and 1 will be death
## based on your response some will lead to hope
## other responses are based on chance
## the fate of certain paths - if the end of a path is reached -
## will be predetermined
##----- FILES ----##
####################
.include "macros.asm"
.include "gameDialog.asm"
.include "img_macros.asm"
.data
StackBeg:
.word 0 : 40
StackEnd:
ColorTb:
# 0x00RRGGBB
.word 0x000000 # black [0]
.word 0x0000ff # blue [1]
.word 0x00ff00 # green [2]
.word 0xff0000 # red [3]
.word 0x00ffff # Blue-Green [4]
.word 0xff00ff # Blue-Red [5]
.word 0xffff00 # Green-Red [6]
.word 0xffffff # White [7]
.word 0xffA500 # orange [8]
Colors:
.word 0x000000 # background color (black)
.word 0x207f00 # foreground color (green)
##----- SCRIPT TABLES --##
##########################
menu:
.asciiz "\n [P]LAY [T]UTORIAL [Q]UIT \n"
tutorial_menu:
.asciiz " [M]ENU [Q]UIT \n"
user_op:
.asciiz "\n W hat would you like to do? :: "
inGame_op:
.asciiz "\n And your choice is to ::::: "
scene1_op:
.asciiz "\n [W]ALK AROUND \n"
scene2_op:
.asciiz "\n [O]PEN \n"
scene3_op:
.asciiz "\n [K]NOCK [E]XPLORE \n"
scene4_op:
.asciiz "\n [U]PSTAIRS [K]ITCHEN \n"
scene5_op_kitchen:
.asciiz "\n Enter the [B]ASEMENT"
end_menu:
.asciiz " \n [Q]UIT [M]ENU "
##--- HOPE ----##
#################
DigitTable:
# digits
.byte ' ', 0,0,0,0,0,0,0,0,0,0,0,0
.byte '0', 0x7e,0xff,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xff,0x7e
.byte '1', 0x38,0x78,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18
.byte '2', 0x7e,0xff,0x83,0x06,0x0c,0x18,0x30,0x60,0xc0,0xc1,0xff,0x7e
.byte '3', 0x7e,0xff,0x83,0x03,0x03,0x1e,0x1e,0x03,0x03,0x83,0xff,0x7e
.byte '4', 0xc3,0xc3,0xc3,0xc3,0xc3,0xff,0x7f,0x03,0x03,0x03,0x03,0x03
.byte '5', 0xff,0xff,0xc0,0xc0,0xc0,0xfe,0x7f,0x03,0x03,0x83,0xff,0x7f
.byte '6', 0xc0,0xc0,0xc0,0xc0,0xc0,0xfe,0xfe,0xc3,0xc3,0xc3,0xff,0x7e
.byte '7', 0x7e,0xff,0x03,0x06,0x06,0x0c,0x0c,0x18,0x18,0x30,0x30,0x60
.byte '8', 0x7e,0xff,0xc3,0xc3,0xc3,0x7e,0x7e,0xc3,0xc3,0xc3,0xff,0x7e
.byte '9', 0x7e,0xff,0xc3,0xc3,0xc3,0x7f,0x7f,0x03,0x03,0x03,0x03,0x03
# special characters
.byte '+', 0x00,0x00,0x00,0x00,0x10,0x38,0x10,0x00,0x00,0x00,0x00,0x00
.byte '-', 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00
.byte '*', 0x28,0x10,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.byte '/', 0x00,0x00,0x18,0x18,0x00,0x7e,0x7e,0x00,0x18,0x18,0x00,0x00
.byte '\\', 0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x00,0x00,0x00,0x00
.byte '=', 0x00,0x00,0x00,0x00,0x7e,0x00,0x7e,0x00,0x00,0x00,0x00,0x00
.byte '.', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10
.byte '[', 0xff,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xff
.byte ']', 0xff,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0xff
.byte '_', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff
.byte '@', 0x00,0x00,0x00,0x00,0x00,0x70,0x24,0x98,0xa8,0x98,0x80,0x78
.byte '!', 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x08,0x08
.byte '|', 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08
.byte '(', 0x60,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x60
.byte ')', 0x06,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x06
.byte ':', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10
.byte '^', 0x3c,0x3c,0xc3,0xc3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.byte '~', 0x28,0x41,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.byte '$', 0x20,0x78,0xa0,0xa0,0x78,0x24,0x24,0x78,0x20,0x00,0x00,0x00
.byte ',', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10
.byte '{', 0x18,0x20,0x20,0x40,0x20,0x20,0x18,0x00,0x00,0x00,0x00,0x00
.byte '}', 0x0c,0x02,0x02,0x01,0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00
.byte ';', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x20
.byte '<', 0x00,0x00,0x00,0x20,0x40,0x80,0x40,0x20,0x00,0x00,0x00,0x00
.byte '>', 0x00,0x00,0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x00,0x00,0x00
.byte '?', 0x00,0x00,0x00,0x00,0x00,0x38,0x44,0x04,0x08,0x10,0x00,0x10
# uppercase alphabet
.byte 'A', 0x18,0x3c,0x66,0xc3,0xc3,0xc3,0xff,0xff,0xc3,0xc3,0xc3,0xc3
.byte 'B', 0xfc,0xfe,0xc3,0xc3,0xc3,0xfe,0xfe,0xc3,0xc3,0xc3,0xfe,0xfc
.byte 'C', 0x7e,0xff,0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xff,0x7e
.byte 'D', 0xfc,0xfe,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xfe,0xfc
.byte 'E', 0xff,0xff,0xc0,0xc0,0xc0,0xfe,0xfe,0xc0,0xc0,0xc0,0xff,0xff
.byte 'F', 0xff,0xff,0xc0,0xc0,0xc0,0xfe,0xfe,0xc0,0xc0,0xc0,0xc0,0xc0
.byte 'G', 0x3e,0x3e,0xc0,0xc0,0xc0,0xc0,0xc7,0xc7,0xc3,0xc3,0x7e,0x7e
.byte 'H', 0xc3,0xc3,0xc3,0xc3,0xc3,0xff,0xff,0xc3,0xc3,0xc3,0xc3,0xc3
.byte 'I', 0xff,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0xff
.byte 'J', 0xff,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0xf8
.byte 'K', 0xc3,0xc3,0xc3,0xc3,0xcc,0xf0,0xf0,0xcc,0xc3,0xc3,0xc3,0xc3
.byte 'L', 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc3,0xc3,0xff,0xff
.byte 'M', 0xc3,0xe7,0xdb,0xdb,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3
.byte 'N', 0xc3,0xc3,0xf3,0xf3,0xdb,0xdb,0xcf,0xc7,0xc3,0xc3,0xc3,0xc3
.byte 'O', 0xff,0xff,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xff,0xff
.byte 'P', 0xff,0xff,0xc3,0xc3,0xff,0xff,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0
.byte 'Q', 0x7e,0x7e,0xc3,0xc3,0xc3,0xc3,0xdb,0xdb,0xc6,0xc6,0x7b,0x7b
.byte 'R', 0xfc,0xfc,0xc3,0xc3,0xff,0xff,0xd8,0xd8,0xcc,0xcc,0xcf,0xcf
.byte 'S', 0x3c,0x3c,0xc3,0xc3,0xc0,0x3c,0x3c,0x03,0xc3,0xc3,0x3c,0x3c
.byte 'T', 0xff,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18
.byte 'U', 0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xff,0xff
.byte 'V', 0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x3c,0x3c,0x3c,0x3c
.byte 'W', 0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xdb,0xdb,0xe7,0xe7,0xc3,0xc3
.byte 'X', 0xc3,0xc3,0xc3,0xc3,0x3c,0x3c,0x3c,0x3c,0xc3,0xc3,0xc3,0xc3
.byte 'Y', 0xc3,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x18,0x18,0x18,0x18,0x18
.byte 'Z', 0xff,0xff,0x03,0x03,0x0c,0x0c,0x30,0x30,0xc0,0xc0,0xff,0xff
# lowercase
.byte 'a', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x01,0x07,0x09,0x07
.byte 'b', 0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0xe0,0x90,0x90,0xe0
.byte 'c', 0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x90,0x80,0x80,0x90,0x60
.byte 'd', 0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x70,0x90,0x90,0x70
.byte 'e', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x90,0xf0,0x80,0x60
.byte 'f', 0x00,0x00,0x00,0x00,0x00,0x0c,0x10,0x0c,0x10,0x10,0x10,0x10
.byte 'g', 0x00,0x00,0x00,0x00,0x00,0x38,0x48,0x48,0x38,0x08,0x08,0x30
.byte 'h', 0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0xe0,0x90,0x90,0x90
.byte 'i', 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x10,0x10,0x10
.byte 'j', 0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x10,0x10,0x10,0x10,0x20
.byte 'k', 0x00,0x00,0x00,0x00,0x00,0x80,0x90,0xa0,0xc0,0xa0,0x90,0x90
.byte 'l', 0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40
.byte 'm', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xa8,0xa8,0xa8,0xa8
.byte 'n', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x88,0x88,0x88,0x88
.byte 'o', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x88,0x88,0x88,0x70
.byte 'p', 0x00,0x00,0x00,0x00,0x00,0x60,0x70,0x70,0xe0,0x80,0x80,0x80
.byte 'q', 0x00,0x00,0x00,0x00,0x00,0x06,0x09,0x09,0x09,0x07,0x01,0x01
.byte 'r', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xc0,0x80,0x80,0x80
.byte 's', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x80,0x60,0x10,0xa0
.byte 't', 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0xf0,0x40,0x40,0x30
.byte 'u', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x90,0x90,0x90,0x70
.byte 'v', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x88,0x50,0x20
.byte 'w', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0xa8,0xa8,0x50
.byte 'x', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x90,0x60,0x90,0x90
.byte 'y', 0x00,0x00,0x00,0x00,0x00,0x90,0x90,0x90,0x70,0x10,0x10,0x60
.byte 'z', 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x10,0x60,0x80,0xf0
# other chars
.byte '`', 0x00,0x00,0x00,0x00,0x66,0x99,0x81,0x81,0x42,0x22,0x18,0x18 # heart
# add additional characters here....
# first byte is the ascii character
# next 12 bytes are the pixels that are "on" for each of the 12 lines
.byte 0, 0,0,0,0,0,0,0,0,0,0,0,0
.text
la $sp, StackEnd
main:
# $$\ $$\
# $$$\ $$$ |
# $$$$\ $$$$ | $$$$$$\ $$$$$$$\ $$\ $$\
# $$\$$\$$ $$ |$$ __$$\ $$ __$$\ $$ | $$ |
# $$ \$$$ $$ |$$$$$$$$ |$$ | $$ |$$ | $$ |
# $$ |\$ /$$ |$$ ____|$$ | $$ |$$ | $$ |
# $$ | \_/ $$ |\$$$$$$$\ $$ | $$ |\$$$$$$ |
# \__| \__| \_______|\__| \__| \______/
# [P]lay [T]utorial [Q]uit
fillScreen
_printRoad(DigitTable, Colors) # print img
_printTitle(DigitTable, Colors)
gameTitlePage(DigitTable, Colors)
# print to bitmap display
printDialog(128, 700, user_op, DigitTable, Colors)
printDialog(128, 760, menu, DigitTable, Colors)
# MARS I/O Display for Char Input
printStr_arg(menu)
printStr_arg(user_op)
# grab user input
get_Char
# determine path
j _determineSelection
# if fall through end game
j endGame
###############################
#---- Level selection menu
#----- placeholder
###############################
#----- endGame
#--- if player wants to Quit exit prog
endGame:
fillScreen
quit
#----- getTutorial
#---- if players want to get help print tutorial
getTutorial:
fillScreen
_printTutorial(DigitTable, Colors)
help(DigitTable, Colors) # screen dialog
# print to bitmap display
printDialog(128, 750, tutorial_menu, DigitTable, Colors)
printDialog(128, 700, inGame_op, DigitTable, Colors)
# MARS I/O Display for Char Input
printStr_arg(tutorial_menu)
printStr_arg(user_op)
get_Char
## player choice
beq $v0, 'M', main
beq $v0, 'Q', endGame
#---- $v0 char input
# compare
_determineSelection:
beq $v0, 'Q', endGame # if quit
beq $v0, 'P', scene1 # if play
beq $v0, 'T', getTutorial # if Tutorial
# if not any of these loop and request input again
# provide error message for input invalid
printStr("Invalid input try again\n")
j main
#---- end _determineSelection ----#
scene1:
# $$$$$$\ $$\
# $$ __$$\ $$$$ |
# $$ / \__| $$$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\ \_$$ |
# \$$$$$$\ $$ _____|$$ __$$\ $$ __$$\ $$ __$$\ $$ |
# \____$$\ $$ / $$$$$$$$ |$$ | $$ |$$$$$$$$ | $$ |
# $$\ $$ |$$ | $$ ____|$$ | $$ |$$ ____| $$ |
# \$$$$$$ |\$$$$$$$\ \$$$$$$$\ $$ | $$ |\$$$$$$$\ $$$$$$\
# \______/ \_______| \_______|\__| \__| \_______| \______|
# [W]alk [S]tay
fillScreen
_printCar(DigitTable, Colors)
scene1_diag(DigitTable, Colors)
# Scene End
printDialog(256, 720, scene1_op, DigitTable, Colors)
#printDialog(128, 700, inGame_op, DigitTable, Colors)
# MARS I/O Display for Char Input
printStr_arg(scene1_op)
printStr_arg(user_op)
get_Char
# continue to next base scene
beq $v0, 'W', scene2
# else determine rand to see if there is hope or death
# beq $v0, 'S', _determineFate
printStr("Invalid input try again\n")
j scene1
##-- placeholder for random fate selector
_determineFate:
printStr("You died or have hope... let the fates decide")
quit
scene2:
# $$$$$$\ $$$$$$\
# $$ __$$\ $$ __$$\
# $$ / \__| $$$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\ \__/ $$ |
# \$$$$$$\ $$ _____|$$ __$$\ $$ __$$\ $$ __$$\ $$$$$$ |
# \____$$\ $$ / $$$$$$$$ |$$ | $$ |$$$$$$$$ | $$ ____/
# $$\ $$ |$$ | $$ ____|$$ | $$ |$$ ____| $$ |
# \$$$$$$ |\$$$$$$$\ \$$$$$$$\ $$ | $$ |\$$$$$$$\ $$$$$$$$\
# \______/ \_______| \_______|\__| \__| \_______| \________|
# [O]pen [R]un
fillScreen
# print to bitmap display
_printGate(DigitTable, Colors)
scene2_diag(DigitTable, Colors)
# MARS I/O Display for Char Input
printStr_arg(scene2_op)
printStr_arg(user_op)
get_Char
## player choice
beq $v0, 'O', scene3
#beq $v0, 'R', _determineFate
j scene2
scene3:
# $$$$$$\ $$$$$$\
# $$ __$$\ $$ ___$$\
# $$ / \__| $$$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\ \_/ $$ |
# \$$$$$$\ $$ _____|$$ __$$\ $$ __$$\ $$ __$$\ $$$$$ /
# \____$$\ $$ / $$$$$$$$ |$$ | $$ |$$$$$$$$ | \___$$\
# $$\ $$ |$$ | $$ ____|$$ | $$ |$$ ____| $$\ $$ |
# \$$$$$$ |\$$$$$$$\ \$$$$$$$\ $$ | $$ |\$$$$$$$\ \$$$$$$ |
# \______/ \_______| \_______|\__| \__| \_______| \______/
# [K]nock [T]urn around [E]xplore
fillScreen
# print to bitmap display
_printHouse(DigitTable, Colors)
scene3_diag(DigitTable, Colors)
# MARS I/O Display for Char Input
printStr_arg(scene3_op)
printStr_arg(user_op)
get_Char
# user selection path
beq $v0, 'K', scene4
beq $v0, 'E', scene5_backyard
# beq $v0, 'T', _determineFate
j scene3
scene4:
# $$$$$$\ $$\ $$\
# $$ __$$\ $$ | $$ |
# $$ / \__| $$$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\ $$ | $$ |
# \$$$$$$\ $$ _____|$$ __$$\ $$ __$$\ $$ __$$\ $$$$$$$$ |
# \____$$\ $$ / $$$$$$$$ |$$ | $$ |$$$$$$$$ | \_____$$ |
# $$\ $$ |$$ | $$ ____|$$ | $$ |$$ ____| $$ |
# \$$$$$$ |\$$$$$$$\ \$$$$$$$\ $$ | $$ |\$$$$$$$\ $$ |
# \______/ \_______| \_______|\__| \__| \_______| \__|
# [U]pstairs [K]itchen
# door opens and you step inside
fillScreen
# print to bitmap display
_printDoor(DigitTable, Colors)
scene4_diag_house(DigitTable, Colors)
# MARS I/O Display for Char Input
printStr_arg(scene4_op)
printStr_arg(user_op)
# get char
get_Char
# determine user selection
beq $v0, 'U', scene5_upstairs
beq $v0, 'K', scene5_kitchen
#beq $v0, 'C', _determineFate
j scene4
scene5_upstairs:
# $$$$$$\ $$$$$$$\
# $$ __$$\ $$ ____|
# $$ / \__| $$$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\ $$ |
# \$$$$$$\ $$ _____|$$ __$$\ $$ __$$\ $$ __$$\ $$$$$$$\
# \____$$\ $$ / $$$$$$$$ |$$ | $$ |$$$$$$$$ | \_____$$\
# $$\ $$ |$$ | $$ ____|$$ | $$ |$$ ____| $$\ $$ |
# \$$$$$$ |\$$$$$$$\ \$$$$$$$\ $$ | $$ |\$$$$$$$\ \$$$$$$ |
# \______/ \_______| \_______|\__| \__| \_______| \______/
# [U]pstairs
# upstairs
fillScreen
# print to bitmap display
_printHall(DigitTable, Colors)
bedroom_end(DigitTable, Colors)
pause # pause for 5 s
j end_game_survive # go to end game
scene5_backyard:
# $$$$$$\ $$$$$$$\
# $$ __$$\ $$ ____|
# $$ / \__| $$$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\ $$ |
# \$$$$$$\ $$ _____|$$ __$$\ $$ __$$\ $$ __$$\ $$$$$$$\
# \____$$\ $$ / $$$$$$$$ |$$ | $$ |$$$$$$$$ | \_____$$\
# $$\ $$ |$$ | $$ ____|$$ | $$ |$$ ____| $$\ $$ |
# \$$$$$$ |\$$$$$$$\ \$$$$$$$\ $$ | $$ |\$$$$$$$\ \$$$$$$ |
# \______/ \_______| \_______|\__| \__| \_______| \______/
#
# backyard
fillScreen
# print to bitmap display
_printTardis(DigitTable, Colors)
backyard_end(DigitTable, Colors)
pause # pause for 2 min
j end_game_survive # go to end game
scene5_kitchen:
# $$$$$$\ $$$$$$$\
# $$ __$$\ $$ ____|
# $$ / \__| $$$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\ $$ |
# \$$$$$$\ $$ _____|$$ __$$\ $$ __$$\ $$ __$$\ $$$$$$$\
# \____$$\ $$ / $$$$$$$$ |$$ | $$ |$$$$$$$$ | \_____$$\
# $$\ $$ |$$ | $$ ____|$$ | $$ |$$ ____| $$\ $$ |
# \$$$$$$ |\$$$$$$$\ \$$$$$$$\ $$ | $$ |\$$$$$$$\ \$$$$$$ |
# \______/ \_______| \_______|\__| \__| \_______| \______/
# Enter the [B]ASEMENT
# kitchen
fillScreen
# print to bitmap display
scene5_diag_kitchen(DigitTable, Colors)
_printBasementDoor(DigitTable, Colors)
# MARS I/O Display for Char Input
printStr_arg(scene5_op_kitchen)
printStr_arg(user_op)
get_Char
#leads to open door in basement
beq $v0, 'B', scene5_basement
j scene5_kitchen
scene5_basement:
# $$$$$$\ $$$$$$$\
# $$ __$$\ $$ ____|
# $$ / \__| $$$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\ $$ |
# \$$$$$$\ $$ _____|$$ __$$\ $$ __$$\ $$ __$$\ $$$$$$$\
# \____$$\ $$ / $$$$$$$$ |$$ | $$ |$$$$$$$$ | \_____$$\
# $$\ $$ |$$ | $$ ____|$$ | $$ |$$ ____| $$\ $$ |
# \$$$$$$ |\$$$$$$$\ \$$$$$$$\ $$ | $$ |\$$$$$$$\ \$$$$$$ |
# \______/ \_______| \_______|\__| \__| \_______| \______/
# [U]pstairs [K]itchen [C]all out
# basement
fillScreen
# print to bitmap display
_printPC(DigitTable, Colors)
basement_end(DigitTable, Colors)
pause # pause 2 min
j end_game_survive # go to end game
end_game_survive:
# $$$$$$$$\ $$\
# $$ _____| $$ |
# $$ | $$$$$$$\ $$$$$$$ |
# $$$$$\ $$ __$$\ $$ __$$ |
# $$ __| $$ | $$ |$$ / $$ |
# $$ | $$ | $$ |$$ | $$ |
# $$$$$$$$\ $$ | $$ |\$$$$$$$ |
# \________|\__| \__| \_______|
# winning ending jump table
# [U]pstairs [K]itchen [C]all out
# it was you all along
# you belong in the home
# you never really left
fillScreen
# print to bitmap
_printTown(DigitTable, Colors)
printDialogLiteral(256, 300, "You survived the pandemic. Congrats! ", DigitTable, Colors)
printDialog(256, 380, user_op, DigitTable, Colors)
printDialog(256, 600, end_menu, DigitTable, Colors)
# MARS I/O Display for Char Input
printStr("\nYou made it to the end congrats \n")
printStr_arg(user_op)
get_Char
# determine user selection
beq $v0, 'Q', endGame # if quit
beq $v0, 'M', main # if play
j endGame
end_game_demise:
# $$$$$$$\ $$\ $$\
# $$ __$$\ $$ | $$ |
# $$ | $$ | $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$\
# $$ | $$ |$$ __$$\ \____$$\\_$$ _| $$ __$$\
# $$ | $$ |$$$$$$$$ | $$$$$$$ | $$ | $$ | $$ |
# $$ | $$ |$$ ____|$$ __$$ | $$ |$$\ $$ | $$ |
# $$$$$$$ |\$$$$$$$\ \$$$$$$$ | \$$$$ |$$ | $$ |
# \_______/ \_______| \_______| \____/ \__| \__|
# potential death jump table
#fillScreen
# MARS I/O Display for Char Input
#printStr("You didn't survive.... \n")
#j main
# potential hope jump table
# randomize whether death or hope is selected by chance