Rev 5242 | Rev 5251 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5242 | Rev 5243 | ||
---|---|---|---|
Line 29... | Line 29... | ||
29 | texture_draw(&game.framebuffer, &game.tex_bg, 0, 0, DRAW_MODE_REPLACE); |
29 | texture_draw(&game.framebuffer, &game.tex_bg, 0, 0, DRAW_MODE_REPLACE); |
Line 30... | Line 30... | ||
30 | 30 | ||
Line 31... | Line 31... | ||
31 | if (game.menu_index == MENU_MAIN) { |
31 | if (game.menu_index == MENU_MAIN) { |
32 | 32 | ||
- | 33 | if (game.status == STATUS_LOADING) { |
|
33 | if (game.status == STATUS_LOADING) { |
34 | game_textout_at_center( 0, 240, 0, L_LOADING ); |
34 | game_textout_at_center( 0, 240, 0, "L0ADING```" ); |
35 | game_textout_at_center( -3, 240-2, 3, L_LOADING ); |
Line 35... | Line 36... | ||
35 | } |
36 | } |
Line 36... | Line 37... | ||
36 | else { |
37 | else { |
Line 37... | Line 38... | ||
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 ); |
Line 39... | Line 40... | ||
39 | 40 | ||
40 | if (game.time) { |
41 | if (game.time) { |
- | 42 | ||
41 | 43 | game_textout_at_center( 0, 230, 0, L_LEVEL_PASSED ); |
|
42 | game_textout_at_center( 0, 230, 0, "LEVEL PA55ED" ); |
44 | game_textout_at_center( -3, 230-2, 3, L_LEVEL_PASSED ); |
43 | game_textout_at_center( -3, 230-2, 3, "LEVEL PA55ED" ); |
45 | |
44 | 46 | char s[] = L_TIME; |
|
45 | char s[] = "TIME: 000"; |
47 | int time_sec = game.time / 25; |
46 | int time_sec = game.time / 25; |
48 | char *str_num = strchr(s, 'x'); |
Line 47... | Line 49... | ||
47 | s[6] = '0' + (( time_sec / 100 ) % 10); |
49 | str_num[0] = '0' + (( time_sec / 100 ) % 10); |
48 | s[7] = '0' + (( time_sec / 10 ) % 10); |
50 | str_num[1] = '0' + (( time_sec / 10 ) % 10); |
Line 49... | Line 51... | ||
49 | s[8] = '0' + (( time_sec / 1 ) % 10); |
51 | str_num[2] = '0' + (( time_sec / 1 ) % 10); |
Line 50... | Line 52... | ||
50 | game_textout_at_center( 0, 260, 0, s ); |
52 | game_textout_at_center( 0, 260, 0, s ); |
51 | game_textout_at_center( -3, 260-2, 3, s ); |
53 | game_textout_at_center( -3, 260-2, 3, s ); |
Line 52... | Line 54... | ||
52 | }; |
54 | }; |
53 | 55 | ||
Line 90... | Line 92... | ||
90 | FIELD_Y0 + CRYSTAL_SIZE*( (game.explosions[i]>>8) & 0xFF) - (EXPLOSION_SIZE-CRYSTAL_SIZE)/2 , |
92 | FIELD_Y0 + CRYSTAL_SIZE*( (game.explosions[i]>>8) & 0xFF) - (EXPLOSION_SIZE-CRYSTAL_SIZE)/2 , |
91 | DRAW_MODE_ALPHA); |
93 | DRAW_MODE_ALPHA); |
92 | }; |
94 | }; |
Line 93... | Line 95... | ||
93 | 95 | ||
94 | 96 | ||
- | 97 | char str[] = L_TIME; |
|
95 | char str[] = "TIME: 999 "; |
98 | int time_sec = game.time / 25; |
96 | int time_sec = game.time / 25; |
99 | char *str_num = strchr(str, 'x'); |
97 | str[6] = '0' + ( (time_sec / 100) % 10); |
100 | str_num[0] = '0' + ( (time_sec / 100) % 10); |
Line 98... | Line 101... | ||
98 | str[7] = '0' + ( (time_sec / 10) % 10); |
101 | str_num[1] = '0' + ( (time_sec / 10) % 10); |
99 | str[8] = '0' + ( (time_sec / 1) % 10); |
102 | str_num[2] = '0' + ( (time_sec / 1) % 10); |
100 | 103 | ||
Line 101... | Line 104... | ||
101 | game_textout( 56+3, 32+2, 0, str ); |
104 | game_textout( 56+3, 32+2, 0, str ); |
- | 105 | // game_textout( 56-1, 32-1, 0, str ); |
|
102 | // game_textout( 56-1, 32-1, 0, str ); |
106 | game_textout( 56, 32, 3, str ); |
103 | game_textout( 56, 32, 3, str ); |
107 | |
104 | 108 | ||
Line 105... | Line 109... | ||
105 | 109 | char sstr[] = L_SCORE; |
|
106 | char sstr[] = "5C0RE: 000 0F 100 "; |
110 | str_num = strchr(sstr, 'x'); |
Line 107... | Line 111... | ||
107 | sstr[7] = '0' + ( (game.score / 100) % 10); |
111 | str_num[0] = '0' + ( (game.score / 100) % 10); |
Line 108... | Line 112... | ||
108 | sstr[8] = '0' + ( (game.score / 10) % 10); |
112 | str_num[1] = '0' + ( (game.score / 10) % 10); |
109 | sstr[9] = '0' + ( (game.score / 1) % 10); |
113 | str_num[2] = '0' + ( (game.score / 1) % 10); |
110 | 114 | ||
Line 111... | Line 115... | ||
111 | game_textout( 56+3, 64+2, 0, sstr ); |
115 | game_textout( 56+3, 64+2, 0, sstr ); |
112 | game_textout( 56, 64, 3, sstr ); |
116 | game_textout( 56, 64, 3, sstr ); |
113 | 117 | ||
Line 216... | Line 220... | ||
216 | 220 | ||
217 | // float cr_r[CRYSTALS_COUNT] = { 0.9, 0.3, 0.1, 0.7, 0.8, 0.0, 0.8 }; |
221 | // float cr_r[CRYSTALS_COUNT] = { 0.9, 0.3, 0.1, 0.7, 0.8, 0.0, 0.8 }; |
218 | // float cr_g[CRYSTALS_COUNT] = { 0.1, 0.8, 0.5, 0.0, 0.7, 0.0, 0.8 }; |
222 | // float cr_g[CRYSTALS_COUNT] = { 0.1, 0.8, 0.5, 0.0, 0.7, 0.0, 0.8 }; |
Line 219... | Line 223... | ||
219 | // float cr_b[CRYSTALS_COUNT] = { 0.0, 0.1, 0.9, 0.8, 0.0, 0.5, 0.9 }; |
223 | // float cr_b[CRYSTALS_COUNT] = { 0.0, 0.1, 0.9, 0.8, 0.0, 0.5, 0.9 }; |
220 | 224 | ||
221 | float cr_r[CRYSTALS_COUNT] = { 1.0, 0.4, 0.1, 0.9, 0.9, 0.2, 0.8 }; |
225 | float cr_r[CRYSTALS_COUNT] = { 1.0, 0.4, 0.10, 0.9, 1.0, 0.2, 0.8 }; |
Line 222... | Line 226... | ||
222 | float cr_g[CRYSTALS_COUNT] = { 0.1, 1.0, 0.6, 0.1, 0.8, 0.2, 0.8 }; |
226 | float cr_g[CRYSTALS_COUNT] = { 0.1, 1.0, 0.75, 0.1, 0.9, 0.2, 0.8 }; |
223 | float cr_b[CRYSTALS_COUNT] = { 0.0, 0.1, 1.0, 1.0, 0.0, 0.9, 0.9 }; |
227 | float cr_b[CRYSTALS_COUNT] = { 0.0, 0.1, 1.00, 1.0, 0.1, 0.9, 0.9 }; |
224 | 228 | ||
Line 355... | Line 359... | ||
355 | 359 | ||
Line 356... | Line 360... | ||
356 | 360 | ||
357 | }; |
361 | }; |
Line 358... | Line 362... | ||
358 | 362 | ||
Line 359... | Line 363... | ||
359 | void game_textures_free() { |
363 | void game_textures_free() { |
360 | free(game.scaled_framebuffer); |
364 | free(game.bgr_framebuffer); |