Code Editing Tutorials
Creating EndText between levels


Creating internal art (EndText between levels):

by Codetech



*NOTE* This is the first and the only tutorial on the matter

(at least the only one I've seen).





Part 1: Making a Basic EndText between levels

Part 2: Making a Tekkoudan like Endart



======================================

!IMPORTANT!



DO THIS STEP BEFORE YOU MAKE ANY OTHER CHANGES...

======================================



The following line deals with external art files (HELPART and ENDARTX)



Step 1:

Open file version.h:



Step 2:

Change this...



#define ARTSEXTERN



...into this:



//#define ARTSEXTERN





Now you can look into the tutorials...



=======================================

Part 1: Making a basic EndText between levels

=======================================



Intro:

Welcome to the first part of the internal art tutorial.

In this section we'll learn how to create EndTexts appearing

after selected levels (or after each of them)! Let's go to the

first step.



Step 1:

Fire up the compiler you prefer (Borland c++ 3.0 / 3.1), I bet

you've heard enough lecture about the difference between them

so I spare you from that, ok enough tlaking let's go to the

source!



Step 2:

Open file WL_GAME.C, and do a text search for "ex_completed"

(exclude the quotes).

You should find this:



switch (playstate)

{

case ex_completed:

case ex_secretlevel:

gamestate.keys = 0;

DrawKeys ();

VW_FadeOut ();



ClearMemory ();



LevelCompleted (); // do the intermission



Step 3:

Here's a piece of Haunted House source the, EndText doesn't

appear after the 4th. level or the 21 st. (See how I reduce one

from the actual level number, because wolfenstein's first

level is level 0).

It goes like this:





switch (gamestate.mapon)

{

case 3: <--- No EndText here (level 4) or...

break;



case 20: <-- ... here (level 21)

break;




<--- Add other cases here, BUT REMEMBER -1 --->



default: <-- But every other level gets the EndText after being completed

VW_FadeOut ();

ClearMemory ();

StartCPMusic(CORNER_MUS);

EndText ();

ClearMemory ();

DrawPlayScreen ();

break;


}



Step 3 (Continued):

If you want to make the EndText appear after warping, add another

case above the ex_completed. We also have to go to WL_DEBUG.C,

but let's check that later, shall we.

Here's how you do it:



switch (playstate)

{

case ex_warped: <--- Add this!

case ex_completed:

case ex_secretlevel:




Step 4:

WARNING!

If you forget to create a EndartX (X = Map number, this time don't -1)

the game will get jammed to a black screen! Now let's compile the file

and link it to the exe. Save if everything went Ok!



Step 5:

Let's open file WL_INTER.C. Do a text search for "PM_Preload (PreloadUpdate)"

(No quotes!).

This is what you should find:



PM_Preload (PreloadUpdate);

IN_UserInput (70);

VW_FadeOut ();



DrawPlayBorder ();

VW_UpdateScreen ();




Step 6:

Now we must edit it to this:



PM_Preload (PreloadUpdate);

IN_UserInput (70);

VW_FadeOut ();



DrawPlayBorder ();

VW_UpdateScreen ();



DrawPlayScreen ();
<--- Add this!



Step 7:

Now compile the file and link it to the exe. Save if everything

went Ok!



Step 8:

If you added the extra case in the Step 3, check this, others SKIP TO NEXT ONE.

Do a text search for: "W = warp"

Edit the warp cheat to this:



else if (Keyboard[sc_W]) // W = warp to level

{

CenterWindow(26,3);

PrintY+=6;



US_Print(" Warp to which level (1-60): ");



VW_UpdateScreen();

esc = !US_LineInput (px,py,str,NULL,true,2,0);

if (!esc)

{

level = atoi (str);



if (level>0 && level<61)



{

// -2 Since I added

// ex_warped case to

// wl_game.c

gamestate.mapon = level-2;

playstate = ex_warped;

}

}

return 1;

}



...Repeat Step 7





Step 9:

Now compile all the files and link them to the exe. Save if everything

went Ok!



Step 10:

Open file WL_TEXT.C, and change wherever it says gamestate.episode

to gamestate.mapon.

Repeat Step 7



Step 11:

Voíla! We're all set for the test! (REMEMBER TO CREATE AN

ENDARTX. X=MAP NUMBER DON'T -1) :)



==================================

Part 2: Making a Tekkoudan like Endart

==================================



I know how to do this, but the tutorial isn't finished...

...Coming soon (I hope)!



==================================

By: Codetech Software 2002

==================================




 

Get back to the Dome tutorials
Jump to the top