Subversion Repositories Kolibri OS

Rev

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

Rev 5243 Rev 5251
Line 26... Line 26...
26
 
26
 
Line 27... Line 27...
27
        if ( (game.status == STATUS_MENU) || (game.status == STATUS_LOADING) ) {
27
        if ( (game.status == STATUS_MENU) || (game.status == STATUS_LOADING) ) {
Line 28... Line -...
28
                
-
 
Line 29... Line 28...
29
            texture_draw(&game.framebuffer, &game.tex_bg, 0, 0, DRAW_MODE_REPLACE);
28
                
30
            
29
            texture_draw(&game.framebuffer, &game.tex_bg, 0, 0, DRAW_MODE_REPLACE);
31
            if (game.menu_index == MENU_MAIN) {
30
            
32
                    
31
                  
33
                if (game.status == STATUS_LOADING) {
32
            if (game.status == STATUS_LOADING) {
Line 34... Line 33...
34
                    game_textout_at_center( 0, 240, 0, L_LOADING );
33
                game_textout_at_center( 0, 240, 0, L_LOADING );
Line 35... Line 34...
35
                    game_textout_at_center( -3, 240-2, 3, L_LOADING );
34
                game_textout_at_center( -3, 240-2, 3, L_LOADING );
Line 36... Line -...
36
                }
-
 
37
                else {
-
 
Line -... Line 35...
-
 
35
            }
-
 
36
            else {
-
 
37
 
38
 
38
                texture_draw( &game.framebuffer, &game.tex_logo, 0, 50, DRAW_MODE_ALPHA );
39
                    texture_draw( &game.framebuffer, &game.tex_logo, 0, 50, DRAW_MODE_ALPHA );
39
 
40
 
40
                if (game.score) {
41
                    if (game.time) {
41
                    
42
                        
42
                    
43
                        game_textout_at_center( 0, 230, 0, L_LEVEL_PASSED );
43
                    game_textout_at_center( 0, 230, 0, L_GAME_OVER );
-
 
44
                    game_textout_at_center( -3, 230-2, 3, L_GAME_OVER );
44
                        game_textout_at_center( -3, 230-2, 3, L_LEVEL_PASSED );
45
                    
45
                        
46
                    char s[] = L_SCORE;
-
 
47
                    char *str_num;
46
                        char s[] = L_TIME;
48
                    str_num = strchr(s, 'x'); 
Line -... Line 49...
-
 
49
                    str_num[0] = '0' + ( (game.score / 100) % 10);
47
                        int time_sec = game.time / 25;
50
                    str_num[1] = '0' + ( (game.score / 10) % 10);
48
                        char *str_num = strchr(s, 'x');
51
                    str_num[2] = '0' + ( (game.score / 1) % 10);
-
 
52
                    
Line 49... Line 53...
49
                        str_num[0] = '0' + (( time_sec / 100 ) % 10);
53
                    game_textout_at_center( 0, 260, 0, s );
Line 50... Line 54...
50
                        str_num[1] = '0' + (( time_sec / 10 ) % 10);
54
                    game_textout_at_center( -3, 260-2, 3, s );
51
                        str_num[2] = '0' + (( time_sec / 1 ) % 10);
55
 
Line 52... Line 56...
52
                        game_textout_at_center( 0, 260, 0, s );
56
                };
53
                        game_textout_at_center( -3, 260-2, 3, s );
57
                
Line 54... Line 58...
54
                    };
58
                if (!game.menu_replay_timeout) {
Line 92... Line 96...
92
                    FIELD_Y0 + CRYSTAL_SIZE*( (game.explosions[i]>>8) & 0xFF) - (EXPLOSION_SIZE-CRYSTAL_SIZE)/2 , 
96
                    FIELD_Y0 + CRYSTAL_SIZE*( (game.explosions[i]>>8) & 0xFF) - (EXPLOSION_SIZE-CRYSTAL_SIZE)/2 , 
93
                    DRAW_MODE_ALPHA);
97
                    DRAW_MODE_ALPHA);
94
            };
98
            };
Line -... Line 99...
-
 
99
 
-
 
100
 
-
 
101
 
-
 
102
            int blink_visible = 0;
-
 
103
            if (game.time > 10*25) {
-
 
104
                blink_visible = 1;
-
 
105
            }
-
 
106
            else if (game.time > 5*25) {
-
 
107
                blink_visible = (game.time / 8) & 1;
-
 
108
                continue_need_redraw = 1;
-
 
109
            }
-
 
110
            else {
-
 
111
                blink_visible = (game.time / 4) & 1;
-
 
112
                continue_need_redraw = 1;
-
 
113
            };
-
 
114
            
-
 
115
            char *str_num;
95
 
116
            if (blink_visible) {
96
 
117
 
97
            char str[] = L_TIME;
118
                char str[] = L_TIME;
98
            int time_sec = game.time / 25;
119
                int time_sec = game.time / 25;
99
            char *str_num = strchr(str, 'x'); 
120
                str_num = strchr(str, 'x'); 
100
            str_num[0] = '0' + ( (time_sec / 100) % 10);
121
                str_num[0] = '0' + ( (time_sec / 10) % 10);
Line 101... Line 122...
101
            str_num[1] = '0' + ( (time_sec / 10) % 10);
122
                str_num[1] = '0' + ( (time_sec / 1) % 10);
102
            str_num[2] = '0' + ( (time_sec / 1) % 10);
-
 
103
            
123
//                str_num[2] = '0' + ( (time_sec / 1) % 10);
-
 
124
                
Line 104... Line 125...
104
            game_textout( 56+3, 32+2, 0, str );
125
                game_textout( 56+3, 32+2, 0, str );
105
//            game_textout( 56-1, 32-1, 0, str );
126
                game_textout( 56, 32, 3, str );
106
            game_textout( 56, 32, 3, str );
127
            };