Ejemplo n.º 1
0
void		display_footer(void)
{
	glEnable(GL_TEXTURE_2D);
	glDisable(GL_LIGHTING);
	glMatrixMode(GL_PROJECTION);
	glPushMatrix();
	glLoadIdentity();
	glOrtho(-1, 1, -1, 1, 0, 100);
	glMatrixMode(GL_MODELVIEW);
	select_player();
	display_inv();
	glMatrixMode(GL_PROJECTION);
	glPopMatrix();
	glMatrixMode(GL_MODELVIEW);
	glEnable(GL_LIGHTING);
	glDisable(GL_TEXTURE_2D);
}
Ejemplo n.º 2
0
/*! \brief Main menu
 *
 * Main menu that calls all the other little menus :)
 */
void menu(void)
{
    int stop = 0, ptr = 0, z = -1;

    play_effect(SND_MENU, 128);
    timer_count = 0;
    while (!stop)
    {
        check_animation();
        drawmap();
        draw_mainmenu(-1);
        draw_sprite(double_buffer, menuptr, 204 + xofs, ptr * 8 + 73 + yofs);
        blit2screen(xofs, yofs);
        readcontrols();
        if (PlayerInput.up)
        {
            unpress();
            ptr--;
            if (ptr < 0)
            {
                ptr = 5;
            }
            play_effect(SND_CLICK, 128);
        }
        if (PlayerInput.down)
        {
            unpress();
            ptr++;
            if (ptr > 5)
            {
                ptr = 0;
            }
            play_effect(SND_CLICK, 128);
        }
        /* Allow player to rearrange the party at any time by pressing LEFT */
        if (PlayerInput.left)
        {
            z = select_player();
            if (z > 0)
            {
                party_newlead();
            }
        }
        if (PlayerInput.balt)
        {
            unpress();
            switch (ptr)
            {
                case 0:
                    camp_item_menu();
                    break;
                case 3:
                    spec_items();
                    break;
                case 5:
                    quest_info();
                    break;
                default:
                    z = select_player();
                    if (z >= 0)
                    {
                        switch (ptr)
                        {
                            case 1:
                                camp_spell_menu(z);
                                break;
                            case 2:
                                equip_menu(z);
                                break;
                            case 4:
                                status_screen(z);
                                break;
                        }
                    }
                    break;
            }
        }
        if (PlayerInput.bctrl)
        {
            unpress();
            stop = 1;
        }
        if (close_menu == 1)
        {
            close_menu = 0;
            stop = 1;
        }
    }
}