|
@@ -109,7 +109,7 @@ static void display_ground(void) |
|
|
for(i = 0; i < 80; i++) |
|
|
for(i = 0; i < 80; i++) |
|
|
{ |
|
|
{ |
|
|
/* Draw the sky */ |
|
|
/* Draw the sky */ |
|
|
cucul_set_color(cv, CUCUL_COLOR_LIGHTBLUE, CUCUL_COLOR_LIGHTCYAN); |
|
|
|
|
|
|
|
|
cucul_set_color_ansi(cv, CUCUL_LIGHTBLUE, CUCUL_LIGHTCYAN); |
|
|
for(j = h - 24; j < h - 18 + ((40 - i) * (40 - i) / (40 * 40 / 10)) + (i & 1); j++) |
|
|
for(j = h - 24; j < h - 18 + ((40 - i) * (40 - i) / (40 * 40 / 10)) + (i & 1); j++) |
|
|
cucul_putchar(cv, i, j, ' '); |
|
|
cucul_putchar(cv, i, j, ' '); |
|
|
cucul_putchar(cv, i, j++, 0x2591); |
|
|
cucul_putchar(cv, i, j++, 0x2591); |
|
@@ -121,7 +121,7 @@ static void display_ground(void) |
|
|
cucul_putchar(cv, i, j++, 0x2593); |
|
|
cucul_putchar(cv, i, j++, 0x2593); |
|
|
cucul_putchar(cv, i, j++, 0x2593); |
|
|
cucul_putchar(cv, i, j++, 0x2593); |
|
|
cucul_putchar(cv, i, j++, 0x2593); |
|
|
cucul_putchar(cv, i, j++, 0x2593); |
|
|
cucul_set_color(cv, CUCUL_COLOR_LIGHTBLUE, CUCUL_COLOR_LIGHTBLUE); |
|
|
|
|
|
|
|
|
cucul_set_color_ansi(cv, CUCUL_LIGHTBLUE, CUCUL_LIGHTBLUE); |
|
|
for( ; j < h; j++) |
|
|
for( ; j < h; j++) |
|
|
cucul_putchar(cv, i, j, ' '); |
|
|
cucul_putchar(cv, i, j, ' '); |
|
|
|
|
|
|
|
@@ -129,14 +129,14 @@ static void display_ground(void) |
|
|
|
|
|
|
|
|
/* Draw the ground */ |
|
|
/* Draw the ground */ |
|
|
j = h - ground[i]; |
|
|
j = h - ground[i]; |
|
|
cucul_set_color(cv, CUCUL_COLOR_BLACK, CUCUL_COLOR_LIGHTBLUE); |
|
|
|
|
|
|
|
|
cucul_set_color_ansi(cv, CUCUL_BLACK, CUCUL_LIGHTBLUE); |
|
|
if(i >= 4 && ground[i] == ground[i - 6] |
|
|
if(i >= 4 && ground[i] == ground[i - 6] |
|
|
&& ground[i] != ground[i - 7]) |
|
|
&& ground[i] != ground[i - 7]) |
|
|
{ |
|
|
{ |
|
|
cucul_putstr(cv, i - 3, j - 2, "Omm"); |
|
|
cucul_putstr(cv, i - 3, j - 2, "Omm"); |
|
|
cucul_putstr(cv, i - 6, j - 1, "(/)-(/)"); |
|
|
cucul_putstr(cv, i - 6, j - 1, "(/)-(/)"); |
|
|
} |
|
|
} |
|
|
cucul_set_color(cv, CUCUL_COLOR_RED, CUCUL_COLOR_GREEN); |
|
|
|
|
|
|
|
|
cucul_set_color_ansi(cv, CUCUL_RED, CUCUL_GREEN); |
|
|
if(ground[i + 1] > ground[i]) |
|
|
if(ground[i + 1] > ground[i]) |
|
|
cucul_putchar(cv, i, j++, 0x2588); // UTF-8: 0x259f |
|
|
cucul_putchar(cv, i, j++, 0x2588); // UTF-8: 0x259f |
|
|
else if(ground[i + 1] < ground[i]) |
|
|
else if(ground[i + 1] < ground[i]) |
|
@@ -146,7 +146,7 @@ static void display_ground(void) |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
cucul_putchar(cv, i, j++, 0x2584); |
|
|
cucul_putchar(cv, i, j++, 0x2584); |
|
|
cucul_set_color(cv, CUCUL_COLOR_RED, CUCUL_COLOR_BROWN); |
|
|
|
|
|
|
|
|
cucul_set_color_ansi(cv, CUCUL_RED, CUCUL_BROWN); |
|
|
cucul_putchar(cv, i, j++, 0x2593); |
|
|
cucul_putchar(cv, i, j++, 0x2593); |
|
|
cucul_putchar(cv, i, j++, 0x2592); |
|
|
cucul_putchar(cv, i, j++, 0x2592); |
|
|
cucul_putchar(cv, i, j++, 0x2591); |
|
|
cucul_putchar(cv, i, j++, 0x2591); |
|
@@ -160,7 +160,7 @@ static void display_stuff(void) |
|
|
cucul_blit(cv, shipx, shipy, ship, NULL); |
|
|
cucul_blit(cv, shipx, shipy, ship, NULL); |
|
|
cucul_blit(cv, 68, h - 22, alien, NULL); |
|
|
cucul_blit(cv, 68, h - 22, alien, NULL); |
|
|
cucul_blit(cv, 52, h - 16, alien, NULL); |
|
|
cucul_blit(cv, 52, h - 16, alien, NULL); |
|
|
cucul_set_color(cv, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE); |
|
|
|
|
|
|
|
|
cucul_set_color_ansi(cv, CUCUL_WHITE, CUCUL_BLUE); |
|
|
cucul_printf(cv, 2, h - 2, " %i fps ", 1000000 / (1 + caca_get_display_time(dp))); |
|
|
cucul_printf(cv, 2, h - 2, " %i fps ", 1000000 / (1 + caca_get_display_time(dp))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|