mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 11:06:44 +01:00
more msgs on console and changed font to DejaVu Sans Mono
This commit is contained in:
parent
a260fcce26
commit
04f145c2d5
4 changed files with 5 additions and 4 deletions
BIN
Courier_New.ttf
BIN
Courier_New.ttf
Binary file not shown.
BIN
DejaVuSansMono.ttf
Normal file
BIN
DejaVuSansMono.ttf
Normal file
Binary file not shown.
2
main.c
2
main.c
|
@ -146,7 +146,7 @@ int main(int argc, char **argv){
|
||||||
al_set_window_title(game.display, "Super Derpy: Muffin Attack");
|
al_set_window_title(game.display, "Super Derpy: Muffin Attack");
|
||||||
al_hide_mouse_cursor(game.display);
|
al_hide_mouse_cursor(game.display);
|
||||||
game.font = al_load_ttf_font("ShadowsIntoLight.ttf",al_get_display_height(game.display)*0.09,0 );
|
game.font = al_load_ttf_font("ShadowsIntoLight.ttf",al_get_display_height(game.display)*0.09,0 );
|
||||||
game.font_console = al_load_ttf_font("Courier_New.ttf",al_get_display_height(game.display)*0.018,0 );
|
game.font_console = al_load_ttf_font("DejaVuSansMono.ttf",al_get_display_height(game.display)*0.018,0 );
|
||||||
|
|
||||||
game.event_queue = al_create_event_queue();
|
game.event_queue = al_create_event_queue();
|
||||||
if(!game.event_queue) {
|
if(!game.event_queue) {
|
||||||
|
|
7
menu.c
7
menu.c
|
@ -21,7 +21,7 @@ void Menu_Draw(struct Game *game) {
|
||||||
|
|
||||||
al_clear_to_color(al_map_rgb(183,234,193));
|
al_clear_to_color(al_map_rgb(183,234,193));
|
||||||
float tint = (sin((game->menu.cloud_position-30)/15)+1)/2;
|
float tint = (sin((game->menu.cloud_position-30)/15)+1)/2;
|
||||||
if (tint < 0.0001) game->menu.mountain_position = (al_get_display_width(game->display)*(rand()/(float)RAND_MAX)/2)+al_get_display_width(game->display)/2;
|
if (tint < 0.0001) { PrintConsole(game, "random tint"); game->menu.mountain_position = (al_get_display_width(game->display)*(rand()/(float)RAND_MAX)/2)+al_get_display_width(game->display)/2; }
|
||||||
al_draw_tinted_bitmap(game->menu.mountain_bitmap,al_map_rgba_f(tint,tint,tint,tint),game->menu.mountain_position, 0,0);
|
al_draw_tinted_bitmap(game->menu.mountain_bitmap,al_map_rgba_f(tint,tint,tint,tint),game->menu.mountain_position, 0,0);
|
||||||
al_draw_scaled_bitmap(game->menu.cloud_bitmap,0,0,al_get_bitmap_width(game->menu.cloud_bitmap), al_get_bitmap_height(game->menu.cloud_bitmap), al_get_display_width(game->display)*(sin((game->menu.cloud_position/40)-4.5)-0.3), al_get_display_height(game->display)*0.35, al_get_bitmap_width(game->menu.cloud_bitmap)/2, al_get_bitmap_height(game->menu.cloud_bitmap)/2,0);
|
al_draw_scaled_bitmap(game->menu.cloud_bitmap,0,0,al_get_bitmap_width(game->menu.cloud_bitmap), al_get_bitmap_height(game->menu.cloud_bitmap), al_get_display_width(game->display)*(sin((game->menu.cloud_position/40)-4.5)-0.3), al_get_display_height(game->display)*0.35, al_get_bitmap_width(game->menu.cloud_bitmap)/2, al_get_bitmap_height(game->menu.cloud_bitmap)/2,0);
|
||||||
al_draw_bitmap(game->menu.cloud2_bitmap,al_get_display_width(game->display)*(game->menu.cloud2_position/100.0), al_get_display_height(game->display)/1.5,0);
|
al_draw_bitmap(game->menu.cloud2_bitmap,al_get_display_width(game->display)*(game->menu.cloud2_position/100.0), al_get_display_height(game->display)/1.5,0);
|
||||||
|
@ -51,8 +51,8 @@ void Menu_Draw(struct Game *game) {
|
||||||
|
|
||||||
game->menu.cloud_position-=0.1;
|
game->menu.cloud_position-=0.1;
|
||||||
game->menu.cloud2_position-=0.025;
|
game->menu.cloud2_position-=0.025;
|
||||||
if (game->menu.cloud_position<-80) game->menu.cloud_position=100;
|
if (game->menu.cloud_position<-80) { game->menu.cloud_position=100; PrintConsole(game, "cloud_position"); }
|
||||||
if (game->menu.cloud2_position<0) game->menu.cloud2_position=100;
|
if (game->menu.cloud2_position<0) { game->menu.cloud2_position=100; PrintConsole(game, "cloud2_position"); }
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu_Preload(struct Game *game) {
|
void Menu_Preload(struct Game *game) {
|
||||||
|
@ -201,6 +201,7 @@ int Menu_Keydown(struct Game *game, ALLEGRO_EVENT *ev) {
|
||||||
} else if (((ev->keyboard.keycode==ALLEGRO_KEY_ENTER) && (!game->menu.options) && (game->menu.selected==1)) || ((game->menu.options) && ((ev->keyboard.keycode == ALLEGRO_KEY_ESCAPE)) || ((ev->keyboard.keycode==ALLEGRO_KEY_ENTER) && (game->menu.selected==3)))) {
|
} else if (((ev->keyboard.keycode==ALLEGRO_KEY_ENTER) && (!game->menu.options) && (game->menu.selected==1)) || ((game->menu.options) && ((ev->keyboard.keycode == ALLEGRO_KEY_ESCAPE)) || ((ev->keyboard.keycode==ALLEGRO_KEY_ENTER) && (game->menu.selected==3)))) {
|
||||||
game->menu.options=!game->menu.options;
|
game->menu.options=!game->menu.options;
|
||||||
game->menu.selected=0;
|
game->menu.selected=0;
|
||||||
|
PrintConsole(game, "options state changed");
|
||||||
}
|
}
|
||||||
if (game->menu.selected==-1) game->menu.selected=3;
|
if (game->menu.selected==-1) game->menu.selected=3;
|
||||||
if (game->menu.selected==4) game->menu.selected=0;
|
if (game->menu.selected==4) game->menu.selected=0;
|
||||||
|
|
Loading…
Reference in a new issue