Example #1
0
void NET_WaitForLaunch(void)
{
    if (!TXT_Init())
    {
        fprintf(stderr, "Failed to initialize GUI\n");
        exit(-1);
    }

    I_InitWindowIcon();

    OpenWaitDialog();
    had_warning = false;

    while (net_waiting_for_launch)
    {
        UpdateGUI();
        CheckSHA1Sums();
        CheckMasterStatus();

        TXT_DispatchEvents();
        TXT_DrawDesktop();

        NET_CL_Run();
        NET_SV_Run();

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

        TXT_Sleep(100);
    }

    TXT_Shutdown();
}
Example #2
0
void I_Endoom(void)
{
#ifndef GCONSOLE // I will return to this -- Hyper_Eye
	unsigned char *endoom_data;
	unsigned char *screendata;
	int y;
	int indent;

    // Hack to stop crash with disk icon
    in_endoom = true;

	endoom_data = (unsigned char *)W_CacheLumpName("ENDOOM", PU_STATIC);

	// Set up text mode screen

	TXT_Init();

    I_SetWindowCaption();
    I_SetWindowIcon();

	// Write the data to the screen memory

	screendata = TXT_GetScreenData();

	indent = (ENDOOM_W - TXT_SCREEN_W) / 2;

	for (y=0; y<TXT_SCREEN_H; ++y)
	{
		memcpy(screendata + (y * TXT_SCREEN_W * 2),
				endoom_data + (y * ENDOOM_W + indent) * 2,
				TXT_SCREEN_W * 2);
	}

	// Wait for a keypress

	while (true)
	{
		TXT_UpdateScreen();

		if (TXT_GetChar() > 0)
            break;

        TXT_Sleep(0);
	}

	// Shut down text mode screen

	TXT_Shutdown();

	in_endoom = false;
#endif // Hyper_Eye
}
Example #3
0
static void InitTextscreen(void)
{
    SetDisplayDriver();

    if (!TXT_Init())
    {
        fprintf(stderr, "Failed to initialize GUI\n");
        exit(-1);
    }

    SetIcon();
    SetWindowTitle();
}
Example #4
0
void I_Endoom(void)
{
    unsigned char *endoom_data;
    unsigned char *screendata;
    int y;
    int indent;

    endoom_data = W_CacheLumpName(DEH_String("ENDOOM"), PU_STATIC);

    // Set up text mode screen

    TXT_Init();

    // Make sure the new window has the right title and icon
 
    I_SetWindowCaption();
    I_SetWindowIcon();
    
    // Write the data to the screen memory
  
    screendata = TXT_GetScreenData();

    indent = (ENDOOM_W - TXT_SCREEN_W) / 2;

    for (y=0; y<TXT_SCREEN_H; ++y)
    {
        memcpy(screendata + (y * TXT_SCREEN_W * 2),
               endoom_data + (y * ENDOOM_W + indent) * 2,
               TXT_SCREEN_W * 2);
    }

    // Wait for a keypress

    while (true)
    {
        TXT_UpdateScreen();

        if (TXT_GetChar() > 0)
        {
            break;
        }
        
        TXT_Sleep(0);
    }
    
    // Shut down text mode screen

    TXT_Shutdown();
}
Example #5
0
//
// I_EndDoom
//
// killough 2/22/98: Add support for ENDBOOM, which is PC-specific
// killough 8/1/98:  change back to ENDOOM
// haleyjd 10/09/05: ENDOOM emulation thanks to fraggle and
//                   Chocolate DOOM!
//
void I_EndDoom()
{
   unsigned char *endoom_data;
   unsigned char *screendata;
   int start_ms;
   int lumpnum;
   
   // haleyjd: it's possible to have quit before we even initialized
   // GameModeInfo, so be sure it's valid before using it here. Also,
   // allow ENDOOM disable in configuration.
   if(!GameModeInfo || !showendoom)
      return;
   
   if((lumpnum = wGlobalDir.checkNumForName(GameModeInfo->endTextName)) < 0)
      return;

   endoom_data = (unsigned char *)wGlobalDir.cacheLumpNum(lumpnum, PU_STATIC);
   
   // Set up text mode screen   
   if(!TXT_Init())
      return;
   
   // Make sure the new window has the right title and icon
   SDL_WM_SetCaption("Thanks for using the Eternity Engine!", NULL);
   
   // Write the data to the screen memory   
   screendata = TXT_GetScreenData();
   memcpy(screendata, endoom_data, 4000);
   
   // Wait for 10 seconds, or until a keypress or mouse click
   // haleyjd: delay period specified in config (default = 350)
   start_ms = i_haltimer.GetTime();
   
   while(i_haltimer.GetTime() < start_ms + endoomdelay)
   {
      TXT_UpdateScreen();

      if(TXT_GetChar() > 0)
         break;

      TXT_Sleep(0);
   }
   
   // Shut down text mode screen   
   TXT_Shutdown();
}
Example #6
0
int main(int argc, char *argv[])
{
    if (!TXT_Init())
    {
        fprintf(stderr, "Failed to initialise GUI\n");
        exit(-1);
    }
    
    TXT_SetDesktopTitle("Calculator demo");

    BuildGUI();

    TXT_GUIMainLoop();

    TXT_Shutdown();

    return 0;
}
Example #7
0
void I_Endoom(byte *endoom_data)
{
    unsigned char *screendata;
    int y;
    int indent;

    // Set up text mode screen

    TXT_Init();
    I_InitWindowTitle();
    I_InitWindowIcon();

    // Write the data to the screen memory

    screendata = TXT_GetScreenData();

    indent = (ENDOOM_W - TXT_SCREEN_W) / 2;

    for (y=0; y<TXT_SCREEN_H; ++y)
    {
        memcpy(screendata + (y * TXT_SCREEN_W * 2),
               endoom_data + (y * ENDOOM_W + indent) * 2,
               TXT_SCREEN_W * 2);
    }

    // Wait for a keypress

    while (true)
    {
        TXT_UpdateScreen();

        if (TXT_GetChar() > 0)
        {
            break;
        }

        TXT_Sleep(0);
    }

    // Shut down text mode screen

    TXT_Shutdown();
}
Example #8
0
int main(int argc, char *argv[])
{
    if (!TXT_Init())
    {
        fprintf(stderr, "Failed to initialise GUI\n");
        exit(-1);
    }

    TXT_SetDesktopTitle("Not Chocolate Doom Setup");

    ScrollingMenu();
    Window2();
    SetupWindow();

    TXT_GUIMainLoop();

    TXT_Shutdown();

    return 0;
}