(Old code tutorial) Display Mapname at beginning of Level - Darkone from Wolf Planet forum

Go down

(Old code tutorial) Display Mapname at beginning of Level - Darkone from Wolf Planet forum

Post by Officer-M. John (Admin) on Sat Mar 26, 2016 5:38 pm

Searching through Darkone's NewWolf Classic source, I stumbled upon this simple piece of code that displays the mapname at the beginning of each level.

First, you need to include my ingame messages variation tutorial. Then open WL_GAME.C and find the SetupGameLevel function. Look for this line at the bottom:

Code:

CA_LoadAllSounds ();

Add this underneath:

Code:

// display map name
  {
      char name[16];
      int n;
   
      for(n=0; n<16; n++)
        name[n]=mapheaderseg[mapon]->name[n];

      Msg_Printf(name);
  }

Save and compile. Credit goes to Darkone for this code.

There you go
-Deathshead

Writte by Deathshead on Wed Apr 06, 2005 11:36 am
avatar
Officer-M. John (Admin)
Admin

Posts : 377
Join date : 2015-10-02
Age : 20

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

Back to top Go down

Re: (Old code tutorial) Display Mapname at beginning of Level - Darkone from Wolf Planet forum

Post by Officer-M. John (Admin) on Sat Feb 24, 2018 12:13 pm

If you use this code tutorial then you use with fixs because it will works. I tested with fixs on 4GW:

http://wolf3dfanboys.usersboard.com/t93-old-code-tutorial-a-variation-on-wsj-s-ingame-messages-from-wolf-planet-forum#715

(You can find in this topic the fixs).
avatar
Officer-M. John (Admin)
Admin

Posts : 377
Join date : 2015-10-02
Age : 20

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

Back to top Go down

Re: (Old code tutorial) Display Mapname at beginning of Level - Darkone from Wolf Planet forum

Post by Ferir987 on Mon Feb 26, 2018 10:07 pm

Why do we need this extra codes?
avatar
Ferir987
Cool mod maker
Cool mod maker

Posts : 239
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: (Old code tutorial) Display Mapname at beginning of Level - Darkone from Wolf Planet forum

Post by Officer-M. John (Admin) on Wed Feb 28, 2018 5:06 pm

Because it will not work and you get error on compile. I tested on 4GW.
avatar
Officer-M. John (Admin)
Admin

Posts : 377
Join date : 2015-10-02
Age : 20

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

Back to top Go down

Re: (Old code tutorial) Display Mapname at beginning of Level - Darkone from Wolf Planet forum

Post by Ferir987 on Sat Mar 03, 2018 8:48 pm

I understand....
avatar
Ferir987
Cool mod maker
Cool mod maker

Posts : 239
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: (Old code tutorial) Display Mapname at beginning of Level - Darkone from Wolf Planet forum

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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