Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Iskhodnyy_kod_Doom

.pdf
Скачиваний:
4
Добавлен:
13.02.2015
Размер:
1.01 Mб
Скачать

"APPAREMMENT BLOQUE AUX PORTES DE L’ENFER.\n"\ "LA SEULE ISSUE EST DE L’AUTRE COTE.\n"\

"\n"\

"POUR VIVRE LA SUITE DE DOOM, JOUEZ\n"\

"A ’AUX PORTES DE L’ENFER’ ET A\n"\

"L’EPISODE SUIVANT, ’L’ENFER’!\n"

#define

E2TEXT

"VOUS AVEZ REUSSI. L’INFAME DEMON\n"\

"QUI CONTROLAIT LA BASE LUNAIRE DE\n"\

"DEIMOS

EST MORT, ET VOUS AVEZ\n"\

"TRIOMPHE! MAIS... OU ETES-VOUS?\n"\ "VOUS GRIMPEZ JUSQU’AU BORD DE LA\n"\ "LUNE ET VOUS DECOUVREZ L’ATROCE\n"\ "VERITE.\n" \

"\n"\

"DEIMOS EST AU-DESSUS DE L’ENFER!\n"\

"VOUS SAVEZ QUE PERSONNE NE S’EN\n"\

"EST JAMAIS ECHAPPE, MAIS CES FUMIERS\n"\

"VONT REGRETTER DE VOUS AVOIR CONNU!\n"\

"VOUS REDESCENDEZ RAPIDEMENT VERS\n"\

"LA SURFACE DE L’ENFER.\n"\ "\n" \

"VOICI MAINTENANT LE CHAPITRE FINAL DE\n"\

"DOOM! -- L’ENFER."

#define E3TEXT

"LE DEMON

ARACHNEEN ET REPUGNANT\n"\

"QUI A

DIRIGE L’INVASION DES BASES\n"\

"LUNAIRES ET SEME LA MORT VIENT

DE SE\n"\

"FAIRE

PULVERISER UNE FOIS POUR

TOUTES.\n"\

"\n"\

"UNE PORTE SECRETE S’OUVRE. VOUS ENTREZ.\n"\

"VOUS AVEZ PROUVE QUE VOUS POUVIEZ\n"\

"RESISTER AUX HORREURS DE L’ENFER.\n"\

"IL SAIT ETRE BEAU JOUEUR, ET LORSQUE\n"\ "VOUS SORTEZ, VOUS REVOYEZ LES VERTES\n"\ "PRAIRIES DE LA TERRE, VOTRE PLANETE.\n"\ "\n"\

"VOUS VOUS DEMANDEZ CE QUI S’EST PASSE\n"\

"SUR TERRE PENDANT QUE VOUS AVEZ\n"\

"COMBATTU LE DEMON. HEUREUSEMENT,\n"\

"AUCUN GERME DU MAL N’A FRANCHI\n"\

"CETTE PORTE AVEC VOUS..."

// after level 6, put this:

#define C1TEXT

"VOUS

ETES AU PLUS PROFOND DE L’ASTROPORT\n" \

"INFESTE DE MONSTRES, MAIS QUELQUE CHOSE\n" \

 

"NE VA PAS. ILS ONT APPORTE

LEUR PROPRE\n" \

 

"REALITE, ET LA TECHNOLOGIE

DE L’ASTROPORT\n"

\

"EST AFFECTEE PAR LEUR PRESENCE.\n" \

 

"\n"\

 

 

 

"DEVANT VOUS, VOUS VOYEZ UN

POSTE AVANCE\n" \

 

"DE L’ENFER, UNE ZONE FORTIFIEE. SI VOUS\n" \

 

"POUVEZ PASSER, VOUS POURREZ PENETRER AU\n" \

 

"COEUR DE LA BASE HANTEE ET

TROUVER \n" \

 

"L’INTERRUPTEUR DE CONTROLE

QUI GARDE LA \n" \

 

"POPULATION DE LA TERRE EN OTAGE."

 

// After level 11, put this:

 

 

#define C2TEXT

"VOUS

AVEZ GAGNE! VOTRE

VICTOIRE A PERMIS\n" \

"A L’HUMANITE D’EVACUER LA TERRE ET \n"\ "D’ECHAPPER AU CAUCHEMAR. VOUS ETES \n"\

61

"MAINTENANT LE DERNIER HUMAIN A LA SURFACE \n"\ "DE LA PLANETE. VOUS ETES ENTOURE DE \n"\ "MUTANTS CANNIBALES, D’EXTRATERRESTRES \n"\ "CARNIVORES ET D’ESPRITS DU MAL. VOUS \n"\ "ATTENDEZ CALMEMENT LA MORT, HEUREUX \n"\ "D’AVOIR PU SAUVER VOTRE RACE.\n"\

"MAIS UN MESSAGE VOUS PARVIENT SOUDAIN\n"\ "DE L’ESPACE: \"NOS CAPTEURS ONT LOCALISE\n"\ "LA SOURCE DE L’INVASION EXTRATERRESTRE.\n"\ "SI VOUS Y ALLEZ, VOUS POURREZ PEUT-ETRE\n"\

"LES ARRETER. LEUR BASE EST SITUEE AU COEUR\n"\ "DE VOTRE VILLE NATALE, PRES DE L’ASTROPORT.\n"\ "VOUS VOUS RELEVEZ LENTEMENT ET PENIBLEMENT\n"\ "ET VOUS REPARTEZ POUR LE FRONT."

// After level 20, put this:

#define C3TEXT "VOUS ETES AU COEUR DE LA CITE CORROMPUE,\n"\

"ENTOURE PAR LES CADAVRES DE VOS ENNEMIS.\n"\ "VOUS NE VOYEZ PAS COMMENT DETRUIRE LA PORTE\n"\ "DES CREATURES DE CE COTE. VOUS SERREZ\n"\

"LES DENTS ET PLONGEZ DANS L’OUVERTURE.\n"\ "\n"\

"IL DOIT Y AVOIR UN MOYEN DE LA FERMER\n"\ "DE L’AUTRE COTE. VOUS ACCEPTEZ DE\n"\ "TRAVERSER L’ENFER POUR LE FAIRE?"

// After level 29, put this:

#define

C4TEXT

"LE VISAGE HORRIBLE D’UN DEMON D’UNE\n"\

"TAILLE

INCROYABLE

S’EFFONDRE DEVANT\n"\

"VOUS LORSQUE VOUS

TIREZ UNE SALVE DE\n"\

"ROQUETTES DANS SON CERVEAU. LE MONSTRE\n"\

"SE RATATINE, SES MEMBRES DECHIQUETES\n"\ "SE REPANDANT SUR DES CENTAINES DE\n"\ "KILOMETRES A LA SURFACE DE L’ENFER.\n"\ "\n"\

"VOUS AVEZ REUSSI. L’INVASION N’AURA.\n"\ "PAS LIEU. LA TERRE EST SAUVEE. L’ENFER\n"\ "EST ANEANTI. EN VOUS DEMANDANT OU IRONT\n"\ "MAINTENANT LES DAMNES, VOUS ESSUYEZ\n"\ "VOTRE FRONT COUVERT DE SUEUR ET REPARTEZ\n"\ "VERS LA TERRE. SA RECONSTRUCTION SERA\n"\ "BEAUCOUP PLUS DROLE QUE SA DESTRUCTION.\n"

// Before level 31, put this:

#define C5TEXT

"FELICITATIONS! VOUS AVEZ TROUVE LE\n"\

"NIVEAU SECRET!

IL SEMBLE AVOIR ETE\n"\

"CONSTRUIT PAR LES HUMAINS. VOUS VOUS\n"\

"DEMANDEZ QUELS

PEUVENT ETRE LES\n"\

"HABITANTS DE CE COIN PERDU DE L’ENFER."

// Before level

32, put this:

#define C6TEXT

"FELICITATIONS! VOUS AVEZ DECOUVERT\n"\

"LE NIVEAU SUPER SECRET! VOUS FERIEZ\n"\

"MIEUX DE FONCER DANS CELUI-LA!\n"

//

// Character cast strings F_FINALE.C

//

 

#define CC_ZOMBIE

"ZOMBIE"

#define CC_SHOTGUN

"TYPE AU FUSIL"

#define CC_HEAVY

"MEC SUPER-ARME"

62

#define CC_IMP

"DIABLOTIN"

#define CC_DEMON

"DEMON"

#define CC_LOST

"AME PERDUE"

#define CC_CACO

"CACODEMON"

#define CC_HELL

"CHEVALIER DE L’ENFER"

#define CC_BARON

"BARON DE L’ENFER"

#define CC_ARACH

"ARACHNOTRON"

#define CC_PAIN

"ELEMENTAIRE DE LA DOULEUR"

#define CC_REVEN

"REVENANT"

#define CC_MANCU

"MANCUBUS"

#define CC_ARCH

"ARCHI-INFAME"

#define CC_SPIDER

"L’ARAIGNEE CERVEAU"

#define CC_CYBER

"LE CYBERDEMON"

#define CC_HERO

"NOTRE HEROS"

#endif

 

//-----------------------------------------------------------------------------

 

//

 

// $Log:$

 

//

 

//-----------------------------------------------------------------------------

 

3.4 d items.c

// Emacs style mode select -*- C++ -*- //-----------------------------------------------------------------------------

//

//$Id:$

//Copyright (C) 1993-1996 by id Software, Inc.

//This program is free software; you can redistribute it and/or

//modify it under the terms of the GNU General Public License

//as published by the Free Software Foundation; either version 2

//of the License, or (at your option) any later version.

//

//This program is distributed in the hope that it will be useful,

//but WITHOUT ANY WARRANTY; without even the implied warranty of

//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

//GNU General Public License for more details.

//

//$Log:$

//DESCRIPTION:

//-----------------------------------------------------------------------------

static const char rcsid[] = "$Id:$";

// We are referring to sprite numbers. #include "info.h"

#ifdef __GNUG__

#pragma implementation "d_items.h" #endif

#include "d_items.h"

//

// PSPRITE ACTIONS for waepons.

63

//This struct controls the weapon animations.

//Each entry is:

//ammo/amunition type

//upstate

//downstate

//readystate

//atkstate, i.e. attack/fire/hit frame

//flashstate, muzzle flash

//

weaponinfo_t weaponinfo[NUMWEAPONS] =

{

{

// fist am_noammo, S_PUNCHUP, S_PUNCHDOWN, S_PUNCH, S_PUNCH1, S_NULL

},

{

// pistol am_clip, S_PISTOLUP, S_PISTOLDOWN, S_PISTOL, S_PISTOL1, S_PISTOLFLASH

},

{

// shotgun am_shell, S_SGUNUP, S_SGUNDOWN, S_SGUN, S_SGUN1, S_SGUNFLASH1

},

{

// chaingun am_clip, S_CHAINUP, S_CHAINDOWN, S_CHAIN, S_CHAIN1, S_CHAINFLASH1

},

{

// missile launcher am_misl, S_MISSILEUP, S_MISSILEDOWN, S_MISSILE, S_MISSILE1, S_MISSILEFLASH1

},

{

// plasma rifle am_cell, S_PLASMAUP, S_PLASMADOWN, S_PLASMA, S_PLASMA1, S_PLASMAFLASH1

64

},

{

// bfg 9000 am_cell, S_BFGUP, S_BFGDOWN, S_BFG, S_BFG1, S_BFGFLASH1

},

{

// chainsaw am_noammo, S_SAWUP, S_SAWDOWN, S_SAW, S_SAW1, S_NULL

},

{

// super shotgun am_shell, S_DSGUNUP, S_DSGUNDOWN, S_DSGUN, S_DSGUN1, S_DSGUNFLASH1

},

};

3.5 d items.h

// Emacs style mode select -*- C++ -*- //-----------------------------------------------------------------------------

//

//$Id:$

//Copyright (C) 1993-1996 by id Software, Inc.

//This program is free software; you can redistribute it and/or

//modify it under the terms of the GNU General Public License

//as published by the Free Software Foundation; either version 2

//of the License, or (at your option) any later version.

//

//This program is distributed in the hope that it will be useful,

//but WITHOUT ANY WARRANTY; without even the implied warranty of

//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

//GNU General Public License for more details.

//

//DESCRIPTION:

//Items: key cards, artifacts, weapon, ammunition.

//-----------------------------------------------------------------------------

#ifndef __D_ITEMS__

#define __D_ITEMS__

65

#include "doomdef.h"

#ifdef __GNUG__ #pragma interface #endif

// Weapon info: sprite frames, ammunition use.

typedef struct

 

{

 

ammotype_t

ammo;

int

upstate;

int

downstate;

int

readystate;

int

atkstate;

int

flashstate;

} weaponinfo_t;

extern weaponinfo_t weaponinfo[NUMWEAPONS];

#endif //-----------------------------------------------------------------------------

//

// $Log:$

//

//-----------------------------------------------------------------------------

3.6 d main.c

// Emacs style mode select -*- C++ -*- //-----------------------------------------------------------------------------

//

//$Id:$

//Copyright (C) 1993-1996 by id Software, Inc.

//This program is free software; you can redistribute it and/or

//modify it under the terms of the GNU General Public License

//as published by the Free Software Foundation; either version 2

//of the License, or (at your option) any later version.

//

//This program is distributed in the hope that it will be useful,

//but WITHOUT ANY WARRANTY; without even the implied warranty of

//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

//GNU General Public License for more details.

//

//$Log:$

//DESCRIPTION:

//DOOM main program (D_DoomMain) and game loop (D_DoomLoop),

//plus functions to determine game mode (shareware, registered),

//parse command line parameters, configure game parameters (turbo),

//and call the startup functions.

//

//-----------------------------------------------------------------------------

static const char rcsid[] = "$Id: d_main.c,v 1.8 1997/02/03 22:45:09 b1 Exp $";

#define

BGCOLOR

7

#define

FGCOLOR

8

66

#ifdef NORMALUNIX #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #endif

#include "doomdef.h" #include "doomstat.h"

#include "dstrings.h" #include "sounds.h"

#include "z_zone.h" #include "w_wad.h" #include "s_sound.h" #include "v_video.h"

#include "f_finale.h" #include "f_wipe.h"

#include "m_argv.h" #include "m_misc.h" #include "m_menu.h"

#include "i_system.h" #include "i_sound.h" #include "i_video.h"

#include "g_game.h"

#include "hu_stuff.h" #include "wi_stuff.h" #include "st_stuff.h" #include "am_map.h"

#include "p_setup.h" #include "r_local.h"

#include "d_main.h"

//

//D-DoomLoop()

//Not a globally visible function,

//just included for source reference,

//called by D_DoomMain, never exits.

//Manages timing and IO,

//calls all ?_Responder, ?_Ticker, and ?_Drawer,

//calls I_GetTime, I_StartFrame, and I_StartTic

void D_DoomLoop (void);

char*

wadfiles[MAXWADFILES];

 

boolean

devparm;

// started game with -devparm

boolean

nomonsters;

// checkparm of -nomonsters

boolean

respawnparm;

// checkparm

of -respawn

boolean

fastparm;

// checkparm of

-fast

67

boolean

 

drone;

 

boolean

 

singletics = false; // debug flag to cancel adaptiveness

//extern int soundVolume;

 

//extern

int

sfxVolume;

 

//extern

int

musicVolume;

 

extern

boolean

inhelpscreens;

 

skill_t

 

startskill;

 

int

 

startepisode;

 

int

 

startmap;

 

boolean

 

autostart;

 

FILE*

 

debugfile;

 

boolean

 

advancedemo;

 

char

 

wadfile[1024];

// primary wad file

char

 

mapdir[1024];

// directory of development maps

char

 

basedefault[1024];

// default file

void D_CheckNetGame (void); void D_ProcessEvents (void);

void G_BuildTiccmd (ticcmd_t* cmd); void D_DoAdvanceDemo (void);

//

//EVENT HANDLING

//Events are asynchronous inputs generally generated by the game user.

//Events can be discarded if no responder claims them

//

 

event_t

events[MAXEVENTS];

int

eventhead;

int

eventtail;

//

//D_PostEvent

//Called by the I/O functions when input is detected

void D_PostEvent (event_t* ev)

{

events[eventhead] = *ev;

eventhead = (++eventhead)&(MAXEVENTS-1);

}

//

//D_ProcessEvents

//Send all the events of the given timestamp down the responder chain

void D_ProcessEvents (void)

{

event_t* ev;

68

// IF STORE DEMO, DO NOT ACCEPT INPUT if ( ( gamemode == commercial )

&& (W_CheckNumForName("map01")<0) ) return;

for ( ; eventtail != eventhead ; eventtail = (++eventtail)&(MAXEVENTS-1) )

{

ev

= &events[eventtail];

 

if

(M_Responder (ev))

 

 

continue;

// menu ate the event

G_Responder (ev);

}

}

//

//D_Display

//draw current display, possibly wiping it from the previous

//wipegamestate can be set to -1 to force a wipe on the next draw gamestate_t wipegamestate = GS_DEMOSCREEN;

extern boolean setsizeneeded;

extern int

 

showMessages;

void R_ExecuteSetViewSize (void);

void D_Display (void)

 

{

 

 

static

boolean

viewactivestate = false;

static

boolean

menuactivestate = false;

static

boolean

inhelpscreensstate = false;

static

boolean

fullscreen = false;

static

gamestate_t

oldgamestate = -1;

static

int

borderdrawcount;

int

 

nowtime;

int

 

tics;

int

 

wipestart;

int

 

y;

boolean

 

done;

boolean

 

wipe;

boolean

 

redrawsbar;

if (nodrawers)

 

return;

// for comparative timing / profiling

redrawsbar = false;

// change the view size if needed if (setsizeneeded)

{

R_ExecuteSetViewSize ();

oldgamestate = -1; // force background redraw borderdrawcount = 3;

}

// save the current screen if about to wipe if (gamestate != wipegamestate)

{

wipe = true;

wipe_StartScreen(0, 0, SCREENWIDTH, SCREENHEIGHT);

}

else

69

wipe = false;

 

if (gamestate == GS_LEVEL && gametic)

 

HU_Erase();

 

// do buffered drawing

 

switch

(gamestate)

 

{

 

 

case

GS_LEVEL:

 

if

(!gametic)

 

 

break;

 

if

(automapactive)

 

 

AM_Drawer ();

 

if

(wipe || (viewheight != 200 && fullscreen) )

 

redrawsbar = true;

 

if

(inhelpscreensstate && !inhelpscreens)

 

redrawsbar = true;

// just put away the help screen

ST_Drawer (viewheight == 200, redrawsbar ); fullscreen = viewheight == 200;

break;

case GS_INTERMISSION: WI_Drawer (); break;

case GS_FINALE: F_Drawer (); break;

case GS_DEMOSCREEN: D_PageDrawer (); break;

}

//draw buffered stuff to screen I_UpdateNoBlit ();

//draw the view directly

if (gamestate == GS_LEVEL && !automapactive && gametic) R_RenderPlayerView (&players[displayplayer]);

if (gamestate == GS_LEVEL && gametic) HU_Drawer ();

// clean up border stuff

if (gamestate != oldgamestate && gamestate != GS_LEVEL)

I_SetPalette (W_CacheLumpName ("PLAYPAL",PU_CACHE));

// see if the border needs to be initially drawn

if (gamestate == GS_LEVEL && oldgamestate != GS_LEVEL)

{

 

 

viewactivestate = false;

// view was

not active

R_FillBackScreen ();

// draw the pattern

into the back screen

}

 

 

// see if the border needs to be updated to the screen

if (gamestate == GS_LEVEL && !automapactive && scaledviewwidth != 320)

{

if (menuactive || menuactivestate || !viewactivestate)

borderdrawcount = 3;

 

if (borderdrawcount)

 

{

 

R_DrawViewBorder ();

// erase old menu stuff

borderdrawcount--;

 

}

 

70

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]