mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-08 14:16:44 +01:00
little fixes
This commit is contained in:
parent
69ded985b9
commit
631e3bc940
2 changed files with 2 additions and 1 deletions
|
@ -49,7 +49,7 @@ void About_Preload(struct Game *game) {
|
||||||
}
|
}
|
||||||
game->about.text_bitmap = al_create_bitmap(al_get_display_width(game->display)*0.4, al_get_display_height(game->display)*2.35);
|
game->about.text_bitmap = al_create_bitmap(al_get_display_width(game->display)*0.4, al_get_display_height(game->display)*2.35);
|
||||||
al_set_target_bitmap(game->about.text_bitmap);
|
al_set_target_bitmap(game->about.text_bitmap);
|
||||||
al_clear_to_color(al_map_rgba(255,0,0,0));
|
al_clear_to_color(al_map_rgba(0,0,0,0));
|
||||||
al_draw_text(game->about.font, al_map_rgb(255,255,255), 0.5*al_get_bitmap_width(game->about.text_bitmap), 0.015*al_get_bitmap_height(game->about.text_bitmap), ALLEGRO_ALIGN_CENTRE, "Super Derpy: Muffin Attack");
|
al_draw_text(game->about.font, al_map_rgb(255,255,255), 0.5*al_get_bitmap_width(game->about.text_bitmap), 0.015*al_get_bitmap_height(game->about.text_bitmap), ALLEGRO_ALIGN_CENTRE, "Super Derpy: Muffin Attack");
|
||||||
al_draw_text(game->about.font, al_map_rgb(255,255,255), 0.5*al_get_bitmap_width(game->about.text_bitmap), 0.035*al_get_bitmap_height(game->about.text_bitmap), ALLEGRO_ALIGN_CENTRE, "Version 0.1");
|
al_draw_text(game->about.font, al_map_rgb(255,255,255), 0.5*al_get_bitmap_width(game->about.text_bitmap), 0.035*al_get_bitmap_height(game->about.text_bitmap), ALLEGRO_ALIGN_CENTRE, "Version 0.1");
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ int Map_Keydown(struct Game *game, ALLEGRO_EVENT *ev) {
|
||||||
} else if ((ev->keyboard.keycode==ALLEGRO_KEY_LEFT) || (ev->keyboard.keycode==ALLEGRO_KEY_RIGHT) || (ev->keyboard.keycode==ALLEGRO_KEY_UP) || (ev->keyboard.keycode==ALLEGRO_KEY_DOWN)) {
|
} else if ((ev->keyboard.keycode==ALLEGRO_KEY_LEFT) || (ev->keyboard.keycode==ALLEGRO_KEY_RIGHT) || (ev->keyboard.keycode==ALLEGRO_KEY_UP) || (ev->keyboard.keycode==ALLEGRO_KEY_DOWN)) {
|
||||||
if (game->fx) al_play_sample(game->map.click_sample, 1.0, 0.0, 1.0, ALLEGRO_PLAYMODE_ONCE, NULL);
|
if (game->fx) al_play_sample(game->map.click_sample, 1.0, 0.0, 1.0, ALLEGRO_PLAYMODE_ONCE, NULL);
|
||||||
} else if (ev->keyboard.keycode==ALLEGRO_KEY_ENTER) {
|
} else if (ev->keyboard.keycode==ALLEGRO_KEY_ENTER) {
|
||||||
|
if (game->fx) al_play_sample(game->map.click_sample, 1.0, 0.0, 1.0, ALLEGRO_PLAYMODE_ONCE, NULL);
|
||||||
PrintConsole(game, "Selecting level %d...", game->map.selected);
|
PrintConsole(game, "Selecting level %d...", game->map.selected);
|
||||||
UnloadGameState(game);
|
UnloadGameState(game);
|
||||||
game->gamestate = GAMESTATE_LOADING;
|
game->gamestate = GAMESTATE_LOADING;
|
||||||
|
|
Loading…
Reference in a new issue