@@ -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" ) ;
0 commit comments