Commit 84604a9b authored by Steven Fuller's avatar Steven Fuller

wl_main.c, wl_inter.c, f_spear.h: Removed CopyProtection()

wl_menu.c, wl_menu.h, version.h: Removed GOODTIMES

f_spear.h, foreign.h: Moved rest of f_spear.h into foreign.h
parent f731c88d
......@@ -2,7 +2,7 @@ Just some random facts/thoughts/ideas/musings:
* Wolfenstein 3D for:
- PC (released, of course) [May 5, 1992]
- PC (Spear of Destiny) [Late 1992]
- PC (Spear of Destiny) [Late (September?) 1992]
- SNES
- Macintosh
- Jaguar
......@@ -19,7 +19,7 @@ Just some random facts/thoughts/ideas/musings:
* Unofficial ports:
- Linux (this, xwolf, wolfgl)
- Amiga (port of my first pc wolf3d linux port)
- Windows (wolfgl)
- Windows (wolfgl) [http://www.sourceforge.net/projects/wolfgl/]
- Acorn/Archemedes
* PC source released on:
......
......@@ -22,6 +22,7 @@ SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]);
=>
SD_StartMusic(chunk);
* getenv so that you can point an env. var to the proper dir
* merge wl_scale with wl_draw?
* refresh rate under svgalib is horrible. the screen keeps getting updated
midframe. it's due to the way CalcTics works
......@@ -58,15 +59,13 @@ key type, and for everything not scancode-based, have a function to
translate
* wl_menu uses specific scancodes for names, config file will have to use
metaname like sc_Left etc or something
* remove GOODTIMES?
* Remove the SOD manual check?
* perhaps rename UPLOAD
* add a ViewMap? (could be done similar to mac version)
* find and remove any function stubs (functions which just call another
function with same parameters, only difference is the name)
* fix wl_debug.c, lots of junk code..
* change the current parameter handling code to something like getopt
* rename goobers to debugmode, then remove debugmode for things...
* remove check for debugmode?
* look for places where gfx needs to be redrawn, like back to game etc
* fizzlefade is hackish, stipple buf would work ok in opengl, maybe only
update once per frame or such...
......
#define ENDSTR1 "Heroes don't quit, but\ngo ahead and press Y\nif you aren't one."
#define ENDSTR2 "Press Y to quit,\nor press N to enjoy\nmore violent diversion."
#define ENDSTR3 "Depressing the Y key means\nyou must return to the\nhumdrum workday world."
#define ENDSTR4 "Hey, quit or play,\nY or N:\nit's your choice."
#define ENDSTR5 "Sure you don't want to\nwaste a few more\nproductive hours?"
#define ENDSTR6 "I think you had better\nplay some more. Please\npress N...please?"
#define ENDSTR7 "If you are tough, press N.\nIf not, press Y daintily."
#define ENDSTR8 "I'm thinkin' that\nyou might wanna press N\nto play more. You do it."
#define ENDSTR9 "Sure. Fine. Quit.\nSee if we care.\nGet it over with.\nPress Y."
#define STR_ENDGAME1 "We owe you a great debt, Mr. Blazkowicz."
#define STR_ENDGAME2 "You have served your country well."
#define STR_ENDGAME3 "With the spear gone, the Allies will finally"
#define STR_ENDGAME4 "by able to destroy Hitler..."
#define STR_COPY1 "That's close, but not close enough to get"
#define STR_COPY2 "you into the game."
#define STR_COPY3 "Wow, you must have the early version of the"
#define STR_COPY4 "manual with the totally false information in it."
#define STR_COPY5 "I would let you into the game, but seeing"
#define STR_COPY6 "as that was not at all the right answer..."
#define STR_COPY7 "It's just too bad we can't get together on"
#define STR_COPY8 "this one. Sorry."
#define STR_COPY9 "Hey, you're just SO off base!"
#define STR_COPY10 "You know, I once typed that myself when"
#define STR_COPY11 "I was your age."
#define STR_COPY12 "Nops. Zero points. Zugga."
#define STR_COPY13 "Yeah...right."
#define STR_COPY14 "You must like these quizzes."
#define STR_COPY15 "Could be called \"PixelMeister\"?"
#define STR_COPY16 "Might engineer some software?"
#define STR_COPY17 "Would be found"
#define STR_COPY18 "directing creatively?"
#define STR_COPY19 "Might be found"
#define STR_COPY20 "handling operations?"
#define STR_COPY21 "Has a name familiar"
#define STR_COPY22 "to your weatherman?"
#define STR_NOPE1 "Welcome to the DOS prompt, pirate!"
#define STR_NOPE2 "Eat hot DOS prompt, goober!"
#define STR_NOPE3 "Ya know, this program doesn't cost that much."
#define STR_NOPE4 "Hey...weren't you just AT this DOS prompt?"
#define STR_NOPE5 "What's a nice user like you doin' at a DOS prompt like this?"
#define STR_NOPE6 "Well, I'm sure you just \"misplaced\" the manual..."
#define STR_NOPE7 "Run me again when you've boned up on your manual a bit."
#define STR_NOPE8 "Nice try, but no Spear."
#define STR_NOPE9 "That information is in the Spear of Destiny manual, by the way."
#define STR_MISC1 "Under \"Killing the Enemy\", what"
#define STR_MISC2 "type of enemy is pictured?"
#define STR_MISC3 "How many eyelets are on B.J.'s"
#define STR_MISC4 "boots? (see page 2)"
#define STR_MISC5 "The word \"minister\" appears in"
#define STR_MISC6 "what gray shape on page 2?"
#define STR_MISC7 "How many bullets does B.J. have"
#define STR_MISC8 "on the screen-shot in the middle"
#define STR_MISC9 "of page 9?"
#define STR_STAR "star"
#define STR_DEBRIEF " DEBRIEFING\n SESSION\n"
#define STR_ENEMY1 "Name the member of the"
#define STR_ENEMY2 "enemy forces shown above"
#define STR_CHECKMAN "CHECK YER MANUAL!"
#define STR_MAN1 "Which manual page"
#define STR_MAN2 "is the Options Menu"
#define STR_MAN3 "function"
#define STR_MAN4 "on?"
#define STR_ID1 "Which member of Id Software:"
#ifndef __FOREIGN_H__
#define __FOREIGN_H__
#define QUITSUR "Are you sure you want\n"\
"to quit this great game?"
......@@ -107,3 +110,22 @@
#define STR_SAVECHT4 "play anyway...."
#define STR_SEEAGAIN "Let's see that again!"
#ifdef SPEAR
#define ENDSTR1 "Heroes don't quit, but\ngo ahead and press Y\nif you aren't one."
#define ENDSTR2 "Press Y to quit,\nor press N to enjoy\nmore violent diversion."
#define ENDSTR3 "Depressing the Y key means\nyou must return to the\nhumdrum workday world."
#define ENDSTR4 "Hey, quit or play,\nY or N:\nit's your choice."
#define ENDSTR5 "Sure you don't want to\nwaste a few more\nproductive hours?"
#define ENDSTR6 "I think you had better\nplay some more. Please\npress N...please?"
#define ENDSTR7 "If you are tough, press N.\nIf not, press Y daintily."
#define ENDSTR8 "I'm thinkin' that\nyou might wanna press N\nto play more. You do it."
#define ENDSTR9 "Sure. Fine. Quit.\nSee if we care.\nGet it over with.\nPress Y."
#define STR_ENDGAME1 "We owe you a great debt, Mr. Blazkowicz."
#define STR_ENDGAME2 "You have served your country well."
#define STR_ENDGAME3 "With the spear gone, the Allies will finally"
#define STR_ENDGAME4 "by able to destroy Hitler..."
#endif
#endif
#ifndef __VERSION_H__
#define __VERSION_H__
/* Change WMODE to point to the executable you would like to build: */
/* WL1 = 0 */
/* WL6 = 1 */
/* SDM = 2 */
......@@ -9,31 +10,29 @@
#define WMODE 1
#endif
/* --- End of User-Modifiable Variables --- */
#if WMODE == 0
/* #define SPEAR */
/* #define SPEARDEMO */
/* #define GOODTIMES */
#define UPLOAD
#define GAMENAME "Wolfenstein 3D Shareware"
#elif WMODE == 1
/* #define SPEAR */
/* #define SPEARDEMO */
#define GOODTIMES
/* #define UPLOAD */
#define GAMENAME "Wolfenstein 3D"
#elif WMODE == 2
#define SPEAR
#define SPEARDEMO
#define GOODTIMES
/* #define UPLOAD */
#define GAMENAME "Spear of Destiny Demo"
#elif WMODE == 3
#define SPEAR
/* #define SPEARDEMO */
#define GOODTIMES
/* #define UPLOAD */
#define GAMENAME "Spear of Destiny"
......
......@@ -6,10 +6,6 @@
#include "wl_menu.h"
#include "foreign.h"
#ifdef SPEAR
#include "f_spear.h"
#endif
/*
=============================================================================
......
......@@ -20,7 +20,9 @@ boolean spearflag;
//
// ELEVATOR BACK MAPS - REMEMBER (-1)!!
//
#ifndef SPEAR
static int ElevatorBackTo[]={ 1, 1, 7, 3, 5, 3};
#endif
//===========================================================================
......
......@@ -1102,389 +1102,3 @@ void CheckHighScore (long score,word other)
}
}
#ifdef SPEAR
#ifndef SPEARDEMO
////////////////////////////////////////////////////////
//
// COPY PROTECTION FOR FormGen
//
////////////////////////////////////////////////////////
char CopyProFailedStrs[][100] = {
STR_COPY1,
STR_COPY2,
STR_COPY3,
STR_COPY4,
STR_COPY5,
STR_COPY6,
STR_COPY7,
STR_COPY8,
STR_COPY9,
"",
STR_COPY10,
STR_COPY11,
STR_COPY12,
"",
STR_COPY13,
"",
STR_COPY14,
""
},
BackDoorStrs[5][16] = {
"a spoon?",
"bite me!",
"joshua",
"pelt",
"snoops"
},
GoodBoyStrs[10][40] = {
"...is the CORRECT ANSWER!",
"",
"Consider yourself bitten, sir.",
"",
"Greetings Professor Falken, would you",
"like to play Spear of Destiny?",
"Do you have any gold spray paint?",
"",
"I wish I had a 21\" monitor...",
""
},
bossstrs[4][24] = {
"DEATH KNIGHT",
"BARNACLE WILHELM",
"UBERMUTANTUBER MUTANT",
"TRANS GROSSE"
},
WordStr[5][20] = {
"New Game",
"Sound...F4",
"Control...F6",
"Change View...F5",
"Quit...F10"},
WordCorrect[5][2] = {"3","4","4","5","5"},
MemberStr[10][40] = {
STR_COPY15,
"",
STR_COPY16,
"",
STR_COPY17,
STR_COPY18,
STR_COPY19,
STR_COPY20,
STR_COPY21,
STR_COPY22},
MemberCorrect[5][24] = {
"adrian carmack",
"john carmackjohn romero",
"tom hall",
"jay wilbur",
"kevin cloud"},
DosMessages[9][80] = {
STR_NOPE1,
STR_NOPE2,
STR_NOPE3,
STR_NOPE4,
STR_NOPE5,
STR_NOPE6,
STR_NOPE7,
STR_NOPE8,
STR_NOPE9},
MiscTitle[4][20] = {
"BLOOD TEST",
"STRAIGHT-LACED",
"QUITE SHAPELY",
"I AM WHAT I AMMO"
},
MiscStr[12][40] = {
STR_MISC1,
STR_MISC2,
"",
STR_MISC3,
STR_MISC4,
"",
STR_MISC5,
STR_MISC6,
"",
STR_MISC7,
STR_MISC8,
STR_MISC9
},
MiscCorrect[4][5] = {"ss","8",STR_STAR,"45"};
int BackDoor(char *s)
{
int i;
strlwr(s);
for (i=0;i<5;i++)
if (!strcmp(s, BackDoorStrs[i]))
{
SETFONTCOLOR(14,15);
fontnumber = 0;
PrintY = 175;
VWB_DrawPic (0,20*8,COPYPROTBOXPIC);
US_CPrint(GoodBoyStrs[i*2]);
US_CPrint(GoodBoyStrs[i*2+1]);
VW_UpdateScreen();
return 1;
}
return 0;
}
void CopyProtection(void)
{
#define TYPEBOX_Y 177
#define TYPEBOX_BKGD 0x9c
#define PRINTCOLOR HIGHLIGHT
int i,match,whichboss,bossnum,try,whichline,enemypicked[4]={0,0,0,0},
bosses[4] = { BOSSPIC1PIC,BOSSPIC2PIC,BOSSPIC3PIC,BOSSPIC4PIC },
whichone,whichpicked[4]={0,0,0,0},quiztype,whichmem,
memberpicked[5]={0,0,0,0,0},wordpicked[5]={0,0,0,0,0},whichword;
char message[30], inputbuffer[20];
enum
{
debriefing,
checkmanual,
staffquiz,
miscquiz,
totaltypes
};
try = 0;
VW_FadeOut();
CA_CacheGrChunk(C_BACKDROPPIC);
CacheLump(COPYPROT_LUMP_START,COPYPROT_LUMP_END);
CA_CacheGrChunk(STARTFONT+1);
CA_LoadAllSounds();
StartCPMusic(COPYPRO_MUS);
US_InitRndT(true);
while (try<3)
{
fontnumber = 1;
SETFONTCOLOR(PRINTCOLOR-2,15);
VWB_DrawPic (0,0,C_BACKDROPPIC);
VWB_DrawPic (0,0,COPYPROTTOPPIC);
VWB_DrawPic (0,20*8,COPYPROTBOXPIC);
WindowX = WindowY = 0;
WindowW = 320;
WindowH = 200;
PrintY = 65;
quiztype = US_RndT()%totaltypes;
switch(quiztype)
{
//
// BOSSES QUIZ
//
case debriefing:
PrintX = 0;
US_Print(STR_DEBRIEF);
SETFONTCOLOR(PRINTCOLOR,15);
while (enemypicked[whichboss = US_RndT()&3]);
enemypicked[whichboss] = 1;
bossnum = bosses[whichboss];
VWB_DrawPic(128,60,bossnum);
fontnumber = 0;
PrintY = 130;
US_CPrint(STR_ENEMY1"\n");
US_CPrint(STR_ENEMY2"\n\n");
VW_UpdateScreen();
VW_FadeIn();
PrintX = 100;
fontcolor = 15;
backcolor = TYPEBOX_BKGD;
inputbuffer[0] = 0;
PrintY = TYPEBOX_Y;
fontnumber = 1;
US_LineInput(PrintX,PrintY,inputbuffer,NULL,true,20,100);
match = 0;
for (i=0;i<strlen(bossstrs[whichboss]);i++)
if (!strnicmp(inputbuffer,bossstrs[whichboss]+i,strlen(inputbuffer)) &&
strlen(inputbuffer)>3)
match = 1;
match += BackDoor(inputbuffer);
break;
//
// MANUAL CHECK
//
case checkmanual:
while (wordpicked[whichword = US_RndT()%5]);
wordpicked[whichword] = 1;
US_CPrint(STR_CHECKMAN);
SETFONTCOLOR(PRINTCOLOR,15);
PrintY += 25;
US_CPrint(STR_MAN1);
US_CPrint(STR_MAN2);
strcpy(message,STR_MAN3" \"");
strcat(message,WordStr[whichword]);
strcat(message,"\" "STR_MAN4);
US_CPrint(message);
VW_UpdateScreen();
VW_FadeIn();
PrintX = 146;
fontcolor = 15;
backcolor = TYPEBOX_BKGD;
inputbuffer[0] = 0;
PrintY = TYPEBOX_Y;
US_LineInput(PrintX,PrintY,inputbuffer,NULL,true,6,100);
strlwr(inputbuffer);
match = 1-(strcmp(inputbuffer,WordCorrect[whichword])!=0);
match += BackDoor(inputbuffer);
break;
//
// STAFF QUIZ
//
case staffquiz:
while (memberpicked[whichmem = US_RndT()%5]);
memberpicked[whichmem] = 1;
US_CPrint(STR_ID1);
SETFONTCOLOR(PRINTCOLOR,15);
PrintY += 25;
US_CPrint(MemberStr[whichmem*2]);
US_CPrint(MemberStr[whichmem*2+1]);
VW_UpdateScreen();
VW_FadeIn();
PrintX = 100;
fontcolor = 15;
backcolor = TYPEBOX_BKGD;
inputbuffer[0] = 0;
PrintY = TYPEBOX_Y;
US_LineInput(PrintX,PrintY,inputbuffer,NULL,true,20,120);
strlwr(inputbuffer);
match = 0;
for (i=0;i<strlen(MemberCorrect[whichmem]);i++)
if (!strnicmp(inputbuffer,MemberCorrect[whichmem]+i,strlen(inputbuffer)) &&
strlen(inputbuffer)>2)
match = 1;
match += BackDoor(inputbuffer);
break;
//
// MISCELLANEOUS QUESTIONS
//
case miscquiz:
while (whichpicked[whichone = US_RndT()&3]);
whichpicked[whichone] = 1;
US_CPrint(MiscTitle[whichone]);
SETFONTCOLOR(PRINTCOLOR,15);
PrintY += 25;
US_CPrint(MiscStr[whichone*3]);
US_CPrint(MiscStr[whichone*3+1]);
US_CPrint(MiscStr[whichone*3+2]);
VW_UpdateScreen();
VW_FadeIn();
PrintX = 146;
fontcolor = 15;
backcolor = TYPEBOX_BKGD;
inputbuffer[0] = 0;
PrintY = TYPEBOX_Y;
US_LineInput(PrintX,PrintY,inputbuffer,NULL,true,6,100);
strlwr(inputbuffer);
match = 1-(strcmp(inputbuffer,MiscCorrect[whichone])!=0);
match += BackDoor(inputbuffer);
break;
}
//
// IF NO MATCH, WE'VE GOT A (MINOR) PROBLEM!
//
if (!match)
{
whichline = 2*(US_RndT()%9);
SETFONTCOLOR(14,15);
fontnumber = 0;
PrintY = 175;
VWB_DrawPic (0,20*8,COPYPROTBOXPIC);
US_CPrint(CopyProFailedStrs[whichline]);
US_CPrint(CopyProFailedStrs[whichline+1]);
VW_UpdateScreen();
SD_PlaySound(NOWAYSND);
IN_UserInput(TickBase*3);
VW_FadeOut();
try++;
}
else
{
int start;
SD_PlaySound(BONUS1UPSND);
SD_WaitSoundDone();
CA_UnCacheGrChunk (STARTFONT+1);
CA_UnCacheGrChunk (C_BACKDROPPIC);
UnCacheLump (COPYPROT_LUMP_START,COPYPROT_LUMP_END);
switch(SoundMode)
{
case sdm_Off: return;
case sdm_PC: start = STARTPCSOUNDS; break;
case sdm_AdLib: start = STARTADLIBSOUNDS;
}
for (i=0;i<NUMSOUNDS;i++,start++)
CA_UnCacheAudioChunk(start);
return;
}
}
Quit(DosMessages[US_RndT()%9]);
}
#endif // SPEARDEMO
#endif // SPEAR
......@@ -917,6 +917,7 @@ CP_itemtype MusicMenu[]=
};
#endif
#ifndef SPEARDEMO
static int songs[]=
{
#ifndef SPEAR
......@@ -953,7 +954,6 @@ static int songs[]=
#endif
};
#ifndef SPEARDEMO
void DoJukebox()
{
int which,lastsong=-1;
......@@ -1173,10 +1173,6 @@ void DemoLoop()
LastDemo = 0;
#if !defined(GOODTIMES) && defined(SPEAR) && !defined(SPEARDEMO)
CopyProtection();
#endif
StartCPMusic(INTROSONG);
if (!NoWait)
......
......@@ -11,16 +11,10 @@
//
void CP_ReadThis(void);
#ifdef SPEAR
#define STARTITEM newgame
#ifdef UPLOAD
#define STARTITEM readthis
#else
#ifdef GOODTIMES
#define STARTITEM newgame
#else
#define STARTITEM readthis
#endif
#endif
char endStrings[9][80]=
......@@ -49,7 +43,7 @@ char endStrings[9][80]=
};
CP_iteminfo
#if !defined(GOODTIMES) && !defined(SPEAR)
#ifdef UPLOAD
MainItems={MENU_X,MENU_Y,10,STARTITEM,24},
#else
MainItems={MENU_X,MENU_Y, 9,STARTITEM,24},
......@@ -70,7 +64,7 @@ MainMenu[]=
{1,STR_LG,(void *)CP_LoadGame},
{0,STR_SG,(void *)CP_SaveGame},
{1,STR_CV,(void *)CP_ChangeView},
#if !defined(GOODTIMES) && !defined(SPEAR)
#ifdef UPLOAD
{2,"Read This!",(void *)CP_ReadThis},
#endif
{1,STR_VS,(void *)CP_ViewScores},
......@@ -284,14 +278,10 @@ void US_ControlPanel(byte scancode)
switch(scancode)
{
case sc_F1:
#ifdef SPEAR
BossKey();
#ifdef UPLOAD
HelpScreens();
#else
#ifdef GOODTIMES
BossKey();
#else
HelpScreens();
#endif
#endif
goto finishup;
......@@ -394,6 +384,7 @@ void US_ControlPanel(byte scancode)
case backtodemo:
#ifdef SPEAR
/* TODO: why was this added for spear only? */
if (!ingame)
{
int start, i;
......@@ -409,6 +400,7 @@ void US_ControlPanel(byte scancode)
start = STARTADLIBSOUNDS;
break;
default:
start = 0;
break;
}
......@@ -502,8 +494,7 @@ void DrawMainMenu(void)
VW_UpdateScreen();
}
#ifndef GOODTIMES
#ifndef SPEAR
#ifdef UPLOAD
////////////////////////////////////////////////////////////////////
//
// READ THIS!
......@@ -515,10 +506,7 @@ void CP_ReadThis(void)
HelpScreens();
StartCPMusic(MENUSONG);
}
#endif
#endif
#if defined(SPEAR) || defined(GOODTIMES)
#else
////////////////////////////////////////////////////////////////////
//
// BOSS KEY
......@@ -875,11 +863,9 @@ firstpart:
//
// CHANGE "READ THIS!" TO NORMAL COLOR
//
#ifndef SPEAR
#ifndef GOODTIMES
#ifdef UPLOAD
MainMenu[readthis].active=1;
#endif
#endif
pickquick = 0;
......@@ -1258,11 +1244,9 @@ int CP_LoadGame(int quick)
// CHANGE "READ THIS!" TO NORMAL COLOR
//
#ifndef SPEAR
#ifndef GOODTIMES
#ifdef UPLOAD
MainMenu[readthis].active=1;
#endif
#endif
exit=1;
break;
......
......@@ -45,7 +45,7 @@
#define MENU_X 76
#define MENU_Y 55
#define MENU_W 178
#if defined(UPLOAD) || (!defined(GOODTIMES) && !defined(SPEAR))
#if defined(UPLOAD)
#define MENU_H 13*10+6
#else
#define MENU_H 13*9+6
......@@ -200,7 +200,7 @@ enum
loadgame,
savegame,
changeview,
#if !defined(GOODTIMES) && !defined(SPEAR)
#ifdef UPLOAD
readthis,
#endif
viewscores,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment