Rev 5243 | Go to most recent revision | Show entire file | Ignore 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 -... | Line 28... | ||
- | 28 | ||
28 | 29 | texture_draw(&game.framebuffer, &game.tex_bg, 0, 0, DRAW_MODE_REPLACE); |
|
- | 30 | ||
- | 31 | ||
- | 32 | if (game.status == STATUS_LOADING) { |
|
- | 33 | game_textout_at_center( 0, 240, 0, L_LOADING ); |
|
- | 34 | game_textout_at_center( -3, 240-2, 3, L_LOADING ); |
|
- | 35 | } |
|
- | 36 | else { |
|
- | 37 | ||
Line 29... | Line -... | ||
29 | texture_draw(&game.framebuffer, &game.tex_bg, 0, 0, DRAW_MODE_REPLACE); |
- | |
30 | - | ||
31 | if (game.menu_index == MENU_MAIN) { |
- | |
32 | - | ||
33 | if (game.status == STATUS_LOADING) { |
- | |
34 | game_textout_at_center( 0, 240, 0, L_LOADING ); |
- | |
35 | game_textout_at_center( -3, 240-2, 3, L_LOADING ); |
- | |
36 | } |
38 | texture_draw( &game.framebuffer, &game.tex_logo, 0, 50, DRAW_MODE_ALPHA ); |
37 | else { |
- | |
38 | - | ||
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_LEVEL_PASSED ); |
44 | game_textout_at_center( -3, 230-2, 3, L_GAME_OVER ); |
45 | 45 | ||
46 | char s[] = L_TIME; |
46 | char s[] = L_SCORE; |
47 | int time_sec = game.time / 25; |
47 | char *str_num; |
- | 48 | str_num = strchr(s, 'x'); |
|
48 | char *str_num = strchr(s, 'x'); |
49 | str_num[0] = '0' + ( (game.score / 100) % 10); |
49 | str_num[0] = '0' + (( time_sec / 100 ) % 10); |
50 | str_num[1] = '0' + ( (game.score / 10) % 10); |
50 | str_num[1] = '0' + (( time_sec / 10 ) % 10); |
- | |
Line -... | Line 51... | ||
- | 51 | str_num[2] = '0' + ( (game.score / 1) % 10); |
|
- | 52 | ||
- | 53 | game_textout_at_center( 0, 260, 0, s ); |
|
51 | str_num[2] = '0' + (( time_sec / 1 ) % 10); |
54 | game_textout_at_center( -3, 260-2, 3, s ); |
52 | game_textout_at_center( 0, 260, 0, s ); |
55 | |
53 | game_textout_at_center( -3, 260-2, 3, s ); |
- | |
54 | }; |
- | |
55 | 56 | }; |
|
Line 56... | Line -... | ||
56 | game_textout_at_center( 0, 300, 0, L_START ); |
- | |
- | 57 | ||
57 | game_textout_at_center( -3, 300-2, 3, L_START ); |
58 | if (!game.menu_replay_timeout) { |
- | 59 | game_textout_at_center( 0, 300, 0, L_START ); |
|
- | 60 | game_textout_at_center( -3, 300-2, 3, L_START ); |
|
- | 61 | }; |
|
Line 58... | Line 62... | ||
58 | 62 | ||
59 | 63 | ||
Line 60... | Line 64... | ||
60 | }; |
64 | }; |
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); |
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); |
123 | // str_num[2] = '0' + ( (time_sec / 1) % 10); |
103 | 124 | ||
104 | game_textout( 56+3, 32+2, 0, str ); |
125 | game_textout( 56+3, 32+2, 0, str ); |
Line 105... | Line 126... | ||
105 | // game_textout( 56-1, 32-1, 0, str ); |
126 | game_textout( 56, 32, 3, str ); |
106 | game_textout( 56, 32, 3, str ); |
127 | }; |
107 | 128 |