Exemple #1
0
int
main(int argc,
     char *argv[]) {

  gui_mode(argc, argv);

  return 0;

}
Exemple #2
0
int
combat_frame()
{

    if (!combat_mode)
        return 0;

    if (active_character->action != CHARACTER_STAY) {
        character_frame(active_character);
        map_display(0, 0);
        goto end_combat_frame;
    }


    if (gui_mode() == DIALOG_MESSAGE) {
        gui_frame();

        if (gui_mode() != DIALOG_MESSAGE) {

            if (combat_who_attacked->life <= 0 &&
                game_in_party(combat_who_attacked))
                gui_player_dead(combat_who_attacked, 0);

            combat_character_finished();

        }

        goto end_combat_frame;
    }

    if (combat_attack_animation) {
        combat_attack_animation = 0;

        /* message switches to next player */
        gui_message(combat_result_text, 1);
        goto end_combat_frame;
    }

    if (game_in_party(active_character)) {

        if (gui_frame() != MAIN_MENU)
            goto end_combat_frame;

        if (game_get_moving())
            combat_player_move();
    } else {
        combat_enemy_move();
        if (active_character->x < 0)
            goto end_combat_frame;
    }


    if (!combat_attack_animation && active_character->ap <= 0)
        combat_character_finished();

    map_display(0, 0);

end_combat_frame:

    map_animate_frame();

    return combat_mode;
}