Exemple #1
0
//
// D_ProcessEvents
// Send all the events of the given timestamp down the responder chain
//
void D_ProcessEvents(void)
{
    event_t *ev;

    while ((ev = D_PopEvent()) != NULL)
    {
        if (wipe && ev->type == ev_mouse)
            continue;
        if (M_Responder(ev))
            continue;           // menu ate the event
        G_Responder(ev);
    }
}
Exemple #2
0
//
// D_ProcessEvents
// Send all the events of the given timestamp down the responder chain
//
void D_ProcessEvents (void)
{
    event_t*	ev;
	
    // IF STORE DEMO, DO NOT ACCEPT INPUT
    if (storedemo)
        return;
	
    while ((ev = D_PopEvent()) != NULL)
    {
	if (M_Responder (ev))
	    continue;               // menu ate the event
	G_Responder (ev);
    }
}
Exemple #3
0
void D_ProcessEvents(void)
{
    event_t *ev;

    while ((ev = D_PopEvent()) != NULL)
    {
        if (F_Responder(ev))
        {
            continue;
        }
        if (MN_Responder(ev))
        {
            continue;
        }
        G_Responder(ev);
    }
}
Exemple #4
0
//
// D_ProcessEvents
// Send all the events of the given timestamp down the responder chain
//
void D_ProcessEvents (void)
{
    event_t*    ev;

    // haleyjd 08/22/2010: [STRIFE] there is no such thing as a "store demo" 
    // version of Strife

    // IF STORE DEMO, DO NOT ACCEPT INPUT
    //if (storedemo)
    //    return;

    while ((ev = D_PopEvent()) != NULL)
    {
        if (M_Responder (ev))
            continue;               // menu ate the event
        G_Responder (ev);
    }
}
Exemple #5
0
void H2_ProcessEvents(void)
{
    event_t *ev;

    for (;;)
    {
        ev = D_PopEvent();

        if (ev == NULL)
        {
            break;
        }

        if (F_Responder(ev))
        {
            continue;
        }
        if (MN_Responder(ev))
        {
            continue;
        }
        G_Responder(ev);
    }
}
Exemple #6
0
//
// haleyjd 20141022: [SVE] Alternate waiting on Steam clients
//
void NET_WaitForSteamLaunch(void)
{
    boolean isServer = (net_SteamNodeType == NET_STEAM_SERVER);
    const char *strConn = "Connecting Netgame";
    char numConn[64];
    char pressStr[64];
    char pressStr2[64];
    int strConnWidth, pressStrWidth, pressStrX, numConnWidth;
    const char *keyActivateName = GetNameForKey(key_menu_activate);
    const char *keyForwardName  = GetNameForKey(key_menu_forward);

    if(!keyActivateName)
        keyActivateName = "key_menu_activate";
    if(!keyForwardName)
        keyForwardName  = "key_menu_forward";

    M_snprintf(pressStr, sizeof(pressStr), "(Press %s to cancel%c",
               keyActivateName, isServer ? ',' : ')');
    if(isServer)
    {
        M_snprintf(pressStr2, sizeof(pressStr2), "%s to start now)",
                   keyForwardName);
    }
    strConnWidth  = V_BigFontStringWidth(strConn);
    pressStrWidth = M_StringWidth(pressStr);
    pressStrX     = (SCREENWIDTH - pressStrWidth) / 2;

    expected_nodes = net_SteamNumNodes;

    while(net_waiting_for_launch)
    {
        event_t *ev;

        CheckAutoLaunch();

        I_StartTic();
        
        while((ev = D_PopEvent()))
        {
            switch(ev->type)
            {
            case ev_keydown:
                if(ev->data1 == key_menu_activate)
                    I_Quit();
                if(ev->data1 == key_menu_forward && isServer)
                    StartGame(NULL, NULL);
                break;
            default:
                break;
            }
        }

        if(use3drenderer)
            RB_ClearBuffer(GLCB_COLOR);

        M_snprintf(numConn, sizeof(numConn), "%d of %d nodes connected",
                   NumConnected(), net_SteamNumNodes);
        numConnWidth = M_StringWidth(numConn);

        V_DrawFilledBox(0, 0, SCREENWIDTH, SCREENHEIGHT, 0);
        V_WriteBigText(strConn, (SCREENWIDTH - strConnWidth)/2, 60);
        M_WriteText((SCREENWIDTH - numConnWidth)/2, 100, numConn);
        M_WriteText(pressStrX, 112, pressStr);
        if(isServer)
            M_WriteText(pressStrX+12, 124, pressStr2);

        NET_CL_Run();
        NET_SV_Run();

        if(!net_client_connected)
            I_Error("Lost connection to server");

        I_FinishUpdate();
        I_Sleep(100);        
    }
}