(Tutorial) Map name in Episodes

View previous topic View next topic Go down

(Tutorial) Map name in Episodes

Post by Officer-M. John (Admin) on Thu Jan 05, 2017 1:07 pm

It came the idea to have episodes can Map names. Can you give me that which one should be the Map name.

WL_INTER.CPP:

Code:

boolean
PreloadUpdate (unsigned current, unsigned total)
{
    unsigned w = WindowW - scaleFactor * 10;

    VWB_BarScaledCoord (WindowX + scaleFactor * 5, WindowY + WindowH - scaleFactor * 3,
        w, scaleFactor * 2, BLACK);
    w = ((int32_t) w * current) / total;
    if (w)
    {
        VWB_BarScaledCoord (WindowX + scaleFactor * 5, WindowY + WindowH - scaleFactor * 3,
            w, scaleFactor * 2, 0x37);       //SECONDCOLOR);
        VWB_BarScaledCoord (WindowX + scaleFactor * 5, WindowY + WindowH - scaleFactor * 3,
            w - scaleFactor * 1, scaleFactor * 1, 0x32);

    }
    VW_UpdateScreen ();
//      if (LastScan == sc_Escape)
//      {
//              IN_ClearKeysDown();
//              return(true);
//      }
//      else
    return (false);
}

void
PreloadGraphics (void)
{
// char mapname[17];
// byte pos=0;

    DrawLevel ();
    ClearSplitVWB ();           // set up for double buffering in split screen


    VWB_BarScaledCoord (0, 0, screenWidth, screenHeight - scaleFactor * STATUSLINES, bordercol);

 SETFONTCOLOR(0xf,0x0);
 fontnumber = 0;
 PrintY=2;
 US_CPrint("Now entering...");

//    while (currentmapname[pos]>=32 && pos<16)
//    {
//         mapname[pos] = currentmapname[pos];
//         pos++;
//    }
    
    if (gamestate.episode == 0 && mapon == 0)
    {
        US_CPrint("Wolf1 Map1");
    }
    else if (gamestate.episode == 0 && mapon == 6)
    {
        US_CPrint("Wolf1 Map7");
    }

// mapname[pos] = 0;

// US_CPrint(mapname);

    LatchDrawPicScaledCoord ((screenWidth-scaleFactor*224)/16,
        (screenHeight-scaleFactor*(STATUSLINES+48))/2, GETPSYCHEDPIC);

    WindowX = (screenWidth - scaleFactor*224)/2;
    WindowY = (screenHeight - scaleFactor*(STATUSLINES+48))/2;
    WindowW = scaleFactor * 28 * 8;
    WindowH = scaleFactor * 48;

    VW_UpdateScreen ();
    VW_FadeIn ();

//      PM_Preload (PreloadUpdate);
    PreloadUpdate (10, 10);
    IN_UserInput (70);
    VW_FadeOut ();

    DrawPlayBorder ();
    VW_UpdateScreen ();
}
avatar
Officer-M. John (Admin)
Admin

Posts : 328
Join date : 2015-10-02
Age : 19

View user profile http://wolf3dfanboys.usersboard.com

Back to top Go down

Re: (Tutorial) Map name in Episodes

Post by Ferir987 on Fri Jan 06, 2017 11:01 am

There no map name in the Code!
I dont see one!
avatar
Ferir987
Cool mod maker
Cool mod maker

Posts : 211
Join date : 2016-04-15
Age : 19
Location : Hungary,Heves Gyöngyös country

View user profile https://jhoni196.blogspot.hu/

Back to top Go down

Re: (Tutorial) Map name in Episodes

Post by Officer-M. John (Admin) on Fri Jan 06, 2017 11:09 am

It is in the level name code.

You see:

Code:

    if (gamestate.episode == 0 && mapon == 0)
    {
        US_CPrint("Wolf1 Map1");
    }
    else if (gamestate.episode == 0 && mapon == 6)
    {
        US_CPrint("Wolf1 Map7");
    }
avatar
Officer-M. John (Admin)
Admin

Posts : 328
Join date : 2015-10-02
Age : 19

View user profile http://wolf3dfanboys.usersboard.com

Back to top Go down

Re: (Tutorial) Map name in Episodes

Post by Ferir987 on Fri Jan 06, 2017 11:09 am

oh 'now i see..
avatar
Ferir987
Cool mod maker
Cool mod maker

Posts : 211
Join date : 2016-04-15
Age : 19
Location : Hungary,Heves Gyöngyös country

View user profile https://jhoni196.blogspot.hu/

Back to top Go down

Re: (Tutorial) Map name in Episodes

Post by Officer-M. John (Admin) on Fri Mar 03, 2017 10:27 am

I updated the Code (removed unnecessary code):

WL_INTER.CPP:

Code:

boolean
PreloadUpdate (unsigned current, unsigned total)
{
    unsigned w = WindowW - scaleFactor * 10;

    VWB_BarScaledCoord (WindowX + scaleFactor * 5, WindowY + WindowH - scaleFactor * 3,
        w, scaleFactor * 2, BLACK);
    w = ((int32_t) w * current) / total;
    if (w)
    {
        VWB_BarScaledCoord (WindowX + scaleFactor * 5, WindowY + WindowH - scaleFactor * 3,
            w, scaleFactor * 2, 0x37);      //SECONDCOLOR);
        VWB_BarScaledCoord (WindowX + scaleFactor * 5, WindowY + WindowH - scaleFactor * 3,
            w - scaleFactor * 1, scaleFactor * 1, 0x32);

    }
    VW_UpdateScreen ();
//      if (LastScan == sc_Escape)
//      {
//              IN_ClearKeysDown();
//              return(true);
//      }
//      else
    return (false);
}

void
PreloadGraphics (void)
{
    DrawLevel ();
    ClearSplitVWB ();          // set up for double buffering in split screen


    VWB_BarScaledCoord (0, 0, screenWidth, screenHeight - scaleFactor * STATUSLINES, bordercol);

 SETFONTCOLOR(0xf,0x0);
 fontnumber = 0;
 PrintY=2;
 US_CPrint("Now entering...");
   
    if (gamestate.episode == 0 && mapon == 0)
    {
        US_CPrint("Wolf1 Map1");
    }
    else if (gamestate.episode == 0 && mapon == 6)
    {
        US_CPrint("Wolf1 Map7");
    }

    LatchDrawPicScaledCoord ((screenWidth-scaleFactor*224)/16,
        (screenHeight-scaleFactor*(STATUSLINES+48))/2, GETPSYCHEDPIC);

    WindowX = (screenWidth - scaleFactor*224)/2;
    WindowY = (screenHeight - scaleFactor*(STATUSLINES+48))/2;
    WindowW = scaleFactor * 28 * 8;
    WindowH = scaleFactor * 48;

    VW_UpdateScreen ();
    VW_FadeIn ();

//      PM_Preload (PreloadUpdate);
    PreloadUpdate (10, 10);
    IN_UserInput (70);
    VW_FadeOut ();

    DrawPlayBorder ();
    VW_UpdateScreen ();
}
avatar
Officer-M. John (Admin)
Admin

Posts : 328
Join date : 2015-10-02
Age : 19

View user profile http://wolf3dfanboys.usersboard.com

Back to top Go down

Re: (Tutorial) Map name in Episodes

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum