Changeset d4b9d28 in mainline for uspace/app/tetris/tetris.c


Ignore:
Timestamp:
2009-06-23T18:33:17Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7b47fa2
Parents:
52e4f52
Message:

Tetris high-score table now persists across multiple Tetris executions (and also propagate between concurrently running instances). It is much more stupid than the original BSD implementation, but it works.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tetris/tetris.c

    r52e4f52 rd4b9d28  
    5050#include <sys/types.h>
    5151#include <err.h>
     52#include <errno.h>
    5253#include <stdio.h>
    5354#include <stdlib.h>
     
    207208                                break;
    208209                        case 'h':
     210                                loadscores();
    209211                                showscores(firstgame);
    210212                                tetris_menu_draw(*level);
     
    298300       
    299301        scr_init();
    300         initscores();
     302        if (loadscores() != EOK)
     303                initscores();
     304
    301305        while (tetris_menu(&level)) {
    302306                fallrate = 1000000 / level;
     
    416420               
    417421                scr_clear();
     422                loadscores();
    418423                insertscore(score, level);
     424                savescores();
    419425                score = 0;
    420426        }
Note: See TracChangeset for help on using the changeset viewer.