Subversion Repositories Kolibri OS

Rev

Rev 5251 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5251 Rev 5260
Line 217... Line 217...
217
};
217
};
Line 218... Line 218...
218
 
218
 
Line -... Line 219...
-
 
219
 
219
 
220
void game_reg_init() {
Line 220... Line 221...
220
void game_reg_init() {
221
    
Line 221... Line 222...
221
    
222
 
Line -... Line 223...
-
 
223
    game.loader_counter = 0;
-
 
224
    
222
    game.loader_counter = 0;
225
    game.menu_replay_timeout = 0;
Line 223... Line 226...
223
    
226
    
Line 224... Line 227...
224
    game.menu_replay_timeout = 0;
227
    game.process_timer = 0;
Line 409... Line 412...
409
    
412
    
410
    if (game.status == STATUS_LOADING) {
413
    if (game.status == STATUS_LOADING) {
411
        game.loader_counter++;
414
        game.loader_counter++;
Line -... Line 415...
-
 
415
        if (game.loader_counter == 2) {
-
 
416
            
-
 
417
            // Hiscore file...
-
 
418
            
-
 
419
            rskos_file_load(HISCORE_FILENAME, (unsigned char*)&game.hiscore, 4);
-
 
420
            
-
 
421
            DEBUG10f("hiscore: %d \n", game.hiscore);
-
 
422
            
412
        if (game.loader_counter == 2) {
423
            // Textures...
Line 413... Line 424...
413
                
424
            
Line 531... Line 542...
531
        
542
        
532
        if (game.time < 1) {
543
        if (game.time < 1) {
533
            // Game Over
544
            // Game Over
534
            game.status = STATUS_MENU;
545
            game.status = STATUS_MENU;
-
 
546
            game.need_redraw = 1;
-
 
547
            
-
 
548
            if (game.score > game.hiscore) {
-
 
549
                game.hiscore = game.score;
-
 
550
                rskos_file_save(HISCORE_FILENAME, (unsigned char*)&game.hiscore, 4);
-
 
551
            };
535
            game.need_redraw = 1;
552
            
Line 536... Line 553...
536
            soundbuf_play(&game.sound_bang);
553
            soundbuf_play(&game.sound_bang);
537
            
554
            
Line 629... Line 646...
629
 
646
 
Line 630... Line 647...
630
void GameKeyDown(int key, int first) {
647
void GameKeyDown(int key, int first) {
Line 631... Line 648...
631
    
648
    
Line 632... Line 649...
632
    if (key == RS_KEY_A) {
649
    if (key == RS_KEY_A) {
Line 633... Line 650...
633
    
650
    
634
        game.need_redraw = 1;
651
        game.time = 50;