Skip to content
This repository was archived by the owner on Mar 6, 2025. It is now read-only.

Commit afc0cfd

Browse files
committed
update load screen
1 parent 2991a61 commit afc0cfd

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

loadScreen.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ namespace tileworld {
55
super(null);
66
controller.setRepeatDefault(300, 60);
77
controller.A.onEvent(ControllerButtonEvent.Pressed, () => {
8-
if ( (this.col() == 5 || this.col() == 7) && (this.row() == 2 || this.row() == 4) ) {
9-
let prefix = this.col() == 5 ? (this.row() == 2 ? "TW1-" : "TW3-") : (this.row() == 2 ? "TW2-" : "TW4-");
8+
let first = this.col() >= 4 && this.col() <= 5;
9+
let second = this.col() >= 6 && this.col() <= 7;
10+
if ( ( first || second) && (this.row() == 2 || this.row() == 4) ) {
11+
let prefix = first ? (this.row() == 2 ? "TW1-" : "TW3-") : (this.row() == 2 ? "TW2-" : "TW4-");
1012
this.p = loadProject(prefix);
1113
this.update();
1214
if (!this.p) {
@@ -31,8 +33,8 @@ namespace tileworld {
3133
}
3234

3335
private makeIt(col: number, row: number, id: string) {
34-
this.drawImage(col-1, row, rightArrow);
35-
this.fillTile(col, row, this.col() == col && this.row() == row ? 7 : 11);
36+
this.drawImage(col-1, row, diskIcon);
37+
this.fillTile(col, row, (this.col() == col || this.col() == col -1) && this.row() == row ? 7 : 11);
3638
screen.print(id, (col << 4) + 6, (row << 4) + 4 + yoff);
3739
}
3840

@@ -60,7 +62,9 @@ namespace tileworld {
6062
screen.print("TileWorld", 6, yoff + 4);
6163
this.fillTile(2,2,12); this.fillTile(3,2,12);
6264
screen.print("Load", (2 << 4) + 4, (2 << 4) + 4 + yoff);
63-
65+
this.fillTile(2, 3, 12); this.fillTile(3, 3, 12);
66+
screen.print("Game", (2 << 4) + 4, (3 << 4) + 4 + yoff);
67+
6468
this.makeIt(5, 2, "1");
6569
this.makeIt(7, 2, "2");
6670
this.makeIt(5, 4, "3");

sprites.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ namespace tileworld {
22

33
// all sprites go here
44

5-
65
export const colorCursor = img`
76
5 5 5 5 5 5 5 5
87
5 . . . . . . 5
@@ -567,6 +566,24 @@ export const garbageCan = img`
567566
. . . . . . . . . . . . . . . .
568567
. . . . . . . . . . . . . . . .
569568
`;
569+
export const diskIcon = img`
570+
. . . . . . . . . . . . . . . .
571+
. . . . . . . . . . . . . . . .
572+
. . 1 1 1 1 1 1 1 1 1 1 1 1 . .
573+
. . 1 6 1 6 6 6 6 6 6 1 6 1 . .
574+
. . 1 6 1 6 6 6 6 6 6 1 6 1 . .
575+
. . 1 6 1 6 6 6 6 6 6 1 6 1 . .
576+
. . 1 6 1 1 1 1 1 1 1 1 6 1 . .
577+
. . 1 6 6 6 6 6 6 6 6 6 6 1 . .
578+
. . 1 6 6 6 6 6 6 6 6 6 6 1 . .
579+
. . 1 6 6 1 1 1 1 1 1 6 6 1 . .
580+
. . 1 6 6 1 6 6 6 6 1 6 6 1 . .
581+
. . 1 6 6 1 6 6 6 6 1 6 6 1 . .
582+
. . 1 1 6 1 6 6 6 6 1 6 6 1 . .
583+
. . . 1 1 1 1 1 1 1 1 1 1 1 . .
584+
. . . . . . . . . . . . . . . .
585+
. . . . . . . . . . . . . . . .
586+
`;
570587
export const help = img`
571588
. . . . . . . . . . . . . . . .
572589
. . . . . . . . . . . . . . . .

0 commit comments

Comments
 (0)