Changeset 3bacee1 in mainline for uspace/app/tetris
- Timestamp:
- 2018-04-12T16:27:17Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3cf22f9
- Parents:
- 76d0981d
- git-author:
- Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
- File:
-
- 1 edited
-
uspace/app/tetris/tetris.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tetris/tetris.c
r76d0981d r3bacee1 52 52 53 53 static volatile const char copyright[] = 54 "@(#) Copyright (c) 1992, 1993\n"55 "\tThe Regents of the University of California. All rights reserved.\n";54 "@(#) Copyright (c) 1992, 1993\n" 55 "\tThe Regents of the University of California. All rights reserved.\n"; 56 56 57 57 #include <sys/time.h> … … 185 185 printf("Level = %d (press keys 1 - 9 to change)", level); 186 186 moveto(9, 10); 187 printf("Preview is %s (press 'p' to change)", (showpreview ? "on " : "off"));187 printf("Preview is %s (press 'p' to change)", (showpreview ? "on " : "off")); 188 188 moveto(12, 10); 189 189 printf("Press 'h' to show hiscore table."); … … 204 204 int i = getchar(); 205 205 206 switch (i) {207 case 'p':208 showpreview = !showpreview;209 moveto(9, 21);210 if (showpreview)211 printf("on ");212 else213 printf("off");214 break;215 case 'h':216 loadscores();217 showscores(firstgame);218 tetris_menu_draw(*level);219 break;220 case 's':221 firstgame = 0;222 return 1;223 case 'q':224 return 0;225 case '1':226 case '2':227 case '3':228 case '4':229 case '5':230 case '6':231 case '7':232 case '8':233 case '9':234 *level = i - '0';235 moveto(8, 18);236 printf("%d", *level);237 break;206 switch (i) { 207 case 'p': 208 showpreview = !showpreview; 209 moveto(9, 21); 210 if (showpreview) 211 printf("on "); 212 else 213 printf("off"); 214 break; 215 case 'h': 216 loadscores(); 217 showscores(firstgame); 218 tetris_menu_draw(*level); 219 break; 220 case 's': 221 firstgame = 0; 222 return 1; 223 case 'q': 224 return 0; 225 case '1': 226 case '2': 227 case '3': 228 case '4': 229 case '5': 230 case '6': 231 case '7': 232 case '8': 233 case '9': 234 *level = i - '0'; 235 moveto(8, 18); 236 printf("%d", *level); 237 break; 238 238 } 239 239 } … … 259 259 260 260 while ((ch = getopt(argc, argv, "ck:ps")) != -1) 261 switch (ch) {261 switch (ch) { 262 262 case 'c': 263 263 /*
Note:
See TracChangeset
for help on using the changeset viewer.
