The Spear Of Destiny

This tutorial teaches you how to add the Spear of Destiny into wolfenstein.  Lets get started...
 
Open up wl_game.c and search for spearflag
 
You should see this:
#ifdef SPEAR
if (spearflag)
{
 SD_StopSound(); 
SD_PlaySound(GETSPEARSND);
if (DigiMode != sds_Off)
 {
 long lasttimecount = TimeCount;
while(TimeCount < lasttimecount+150)
 //while(DigiPlaying!=false)SD_Poll();
}
 else
SD_WaitSoundDone();
ClearMemory ();
gamestate.oldscore = gamestate.score;
 gamestate.mapon = 20;
SetupGameLevel ();
StartMusic ();
PM_CheckMainMem ();
player->x = spearx;
player->y = speary;
player->angle = spearangle;
spearflag = false;
 Thrust (0,0);
 goto startplayloop;
 }
#endif
 
Now just remove the #ifdef SPEAR and the #endif
 
Now the spear is in wolf3d, but of course the GETSPEARSND sound isn't in wolf3d so you will have to put your own sound in replace of that.  Also now that the spear is in wolf3d open up wl_act1.c and there you will see a list of objects, this is were the spear will be used.  For example lets say we wanted to use the water puddle change this:
 
{SPR_STAT_0} to this {SPR_STAT_0,bo_spear}
 
Thats all another easy tutorial.