亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? d_main.c

?? 游戲類程序源代碼---WinDoom 3D源程序.zip
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
// Emacs style mode select   -*- C++ -*- 
//-----------------------------------------------------------------------------
//
// $Id:$
//
// Copyright (C) 1993-1996 by id Software, Inc.
//
// This source is available for distribution and/or modification
// only under the terms of the DOOM Source Code License as
// published by id Software. All rights reserved.
//
// The source is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code 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


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

#include <direct.h>
#include <malloc.h>
#include <io.h>
#include <fcntl.h>


#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"

#include "d_console.h"

// DQ addition for test
#include "dxerr.h"
// DQ end addition

char MsgText[256];
void WriteDebug(char *);


// DQ addition start
int gEyePixelOffset = 8;  // send half to each separation, rounding the odd half to the positive offset
int gLCDYaw16thDegree = 32;	// parallel views are preferred for stereo, to prevent keystoning
BOOL	bInStereo = FALSE;
extern menu_t*	currentMenu;
extern short itemOn;			// menu item skull is on
extern long ScreensYLookup[];
void GetRenderBuffer(BOOL bLeftEye, BOOL bStereo, PBUFFER RenderBuffer, PBUFFER RenderViewWindowBuffer);
extern long ScreensYLookup[];
extern BUFFER gRenderBuffer;
extern BOOL bInGame;
// DQ addition end

//
// 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

boolean         drone;

boolean		singletics = false; // debug flag to cancel adaptiveness

extern boolean plutonia, tnt;

//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;
    // 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 (CO_Responder(ev))
           {
            continue;               // console ate the event
           }
        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;
// DQ start addition
void R_ExecuteSetViewSize (int iRightPixelOffset, 
									int iLeftPixelOffset);
void R_SetCameraPosition(BOOL bLeftEye);
BOOL redrawborder = FALSE;
// DQ end addition
//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;
	 // DQ added start
	 int iEyeCounter = 0;  // right first, left second
	 BOOL bEndWipe = FALSE;
	 byte * RightEndScreen = NULL;
	 BOOL bStereo;
	 int EyeOffset;
	 int TextEyeOffset;
	 int Yaw;
	 static int StatusBarRepeat = 0;
	 boolean			Newmenuactive;
	 boolean			Prevmenuactive;
	 short			NewitemOn;
	 short			PrevitemOn;
	 short			NewlastOn;
	 short			PrevlastOn;
	 void *			NewcurrentMenu;
	 void *			PrevcurrentMenu;
	 BUFFER			RenderBuffer;
	 BUFFER			RenderViewWindowBuffer;
	 BUFFER			StartBuffer;
	 BUFFER			BackgroundBuffer;
	 BUFFER			LeftEndBuffer;
	 BUFFER			RightEndBuffer;
	 BUFFER			StatusBarBuffer;
	 boolean			bRedrawBorder;
	 static short	RedrawBorderRepeat = 0;
	 // DQ added end

    if (nodrawers)
        return;                    // for comparative timing / profiling
    //WriteDebug("D_Display\n"); 		
    redrawsbar = false;

	if (setsizeneeded)
	{
		R_ExecuteSetViewSize (EyeOffset/2, 
									-((EyeOffset+1)/2));
		oldgamestate = -1;                      // force background redraw
		borderdrawcount = 3;
	}
    // DQ start addition
	 // keep these values constant throughout this procedure, even if the user changes
	 // them with the console or menu or keyboard
	 bRedrawBorder = setsizeneeded | redrawborder;
	 if (bRedrawBorder)
	 {
		 RedrawBorderRepeat = 4;
	 }
	 redrawborder = FALSE;	// turn the flag back off.
	 bStereo = bInStereo;
	 EyeOffset = gEyePixelOffset;
	 TextEyeOffset = (bStereo ? 6 : 0);
	 Yaw = gLCDYaw16thDegree;
 
	 wipe = false;
	 if (gamestate != wipegamestate)
	 {
		 wipe = true;
	 }

	 BackgroundBuffer.Buffer	= screens[1];
	 BackgroundBuffer.YLookup	= ScreensYLookup;
	 StartBuffer.Buffer			= screens[2];
	 StartBuffer.YLookup			= ScreensYLookup;
	 LeftEndBuffer.Buffer		= screens[3];
	 LeftEndBuffer.YLookup		= ScreensYLookup;
	 StatusBarBuffer.Buffer		= screens[4];
	 StatusBarBuffer.YLookup	= ScreensYLookup;

	 Prevmenuactive = menuactive;
	 PrevcurrentMenu = currentMenu;
	 PrevitemOn = itemOn;
	 PrevlastOn = currentMenu->lastOn;
	 // keep looping while wiping.  If mono, just render left eye
	 for (iEyeCounter = (bStereo ? 0 : 1); 
				iEyeCounter < 2 && bInGame; 
				iEyeCounter++)  // 0 = right, 1 = left
	 {
		 GetRenderBuffer(iEyeCounter == 1, bStereo, &RenderBuffer, &RenderViewWindowBuffer);
		 R_SetCameraPosition(iEyeCounter == 1);	 // 0 = right, 1 = left

		if (bRedrawBorder || RedrawBorderRepeat > 0)
		{
			R_DrawViewBorder(&RenderBuffer, &BackgroundBuffer);	// DQ
			if (RedrawBorderRepeat > 0)	// repeat the border on all surfaces
			{
				RedrawBorderRepeat--;
			}
		}

	 // save the current screen if about to wipe
	 if (gamestate != wipegamestate)
		 {
		  //WriteDebug("wipe_StartScreen...\n");
		  // wipe = true;  // DQ moved outside of loop
		  // DQ - use the image that is in RenderBuffer as the wipe screen for both eyes - it
		  // is a bit old but since we almost always wipe from a static screen all buffers would
		  // have the image, and it gets garbled so the stereo effect from it is unnecessary
		  // DQ start addition
		  wipe_StartScreen(0, 0, SCREENWIDTH, SCREENHEIGHT, &StartBuffer/*DQ*/, &RenderBuffer);
		  }
		  // DQ end addition
		  //wipe_StartScreen(0, 0, SCREENWIDTH, SCREENHEIGHT); // original line
//	 else		// DQ moved outside of loop
//		 wipe = false;	// DQ moved outside of loop

		if (gamestate == GS_LEVEL && gametic)
		{
			//WriteDebug("HU_Erase...\n");
			HU_Erase(&RenderBuffer, &BackgroundBuffer);	// DQ
			//HU_Erase();
		}
		 // DQ addition end

		 // do buffered drawing
		 switch (gamestate)
			 {
			  case GS_LEVEL:
					 //WriteDebug("GS_LEVEL - 1...\n");
					 if (!gametic)
						  break;
					 //WriteDebug("GS_LEVEL - 2...\n");
					 if (automapactive)
						  AM_Drawer (&RenderBuffer/*DQ*/);
					 //WriteDebug("GS_LEVEL - 3...\n");
					 if (wipe || (viewheight != SCREENHEIGHT && fullscreen) || setsizeneeded/*DQ*/)
						  redrawsbar = true;
					 if (inhelpscreensstate && !inhelpscreens)
						  redrawsbar = true;              // just put away the help screen
					 // DQ start addition
					 // since we have up to four buffers if we are rendering directly into
					 // the display surface, and we only draw the status bar when needed, I
					 // am going to draw the status bar five consecutive renderings.  Since
					 // we rotate through the buffers, the status bar will be rendered into
					 // all of them.  If we are not rendering into the display buffer, then
					 // we just end up with four extra updates.  Five, so we will draw at least
					 // two sets of pairs
					 if (redrawsbar)
					 {
						 StatusBarRepeat = 5;
					 }
					 if (StatusBarRepeat > 0)
					 {
						 redrawsbar = TRUE;
						 StatusBarRepeat--;
					 }
					 // DQ end addition
					 //WriteDebug("GS_LEVEL - 4...\n");
					 redrawsbar = TRUE; // forced to true, so that both eyes get same image
					 ST_Drawer (viewheight == SCREENHEIGHT, redrawsbar, &RenderBuffer, &StatusBarBuffer); // DQ
					 //ST_Drawer (viewheight == SCREENHEIGHT, redrawsbar);
					 //WriteDebug("GS_LEVEL - 5...\n");
					 fullscreen = viewheight == SCREENHEIGHT;
					 break;

			  case GS_INTERMISSION:
				    // the intermission background image was put into the background buffer
				    // in the call to G_DoCompleted
					 WI_Drawer ((iEyeCounter == 0 ? -(TextEyeOffset/2) : (TextEyeOffset+1)/2)/*DQ*/,
									&RenderBuffer/*DQ*/, 
									&BackgroundBuffer/*DQ*/);
					 break;

			  case GS_FINALE:
					 F_Drawer (&RenderBuffer/*DQ*/);
					 break;

			  case GS_DEMOSCREEN:
					 D_PageDrawer (&RenderBuffer/*DQ*/);
					 break;
			 }
 
		 // draw buffered stuff to screen
		 I_UpdateNoBlit();
 
		 // draw the view directly
		 if (gamestate == GS_LEVEL && !automapactive && gametic)
		 {
			 // DQ start addition
			  //WriteDebug("R_RenderPlayerView...\n");
			  if (iEyeCounter == 0)
			  {
				  // render right eye
				  R_RenderPlayerView (&players[displayplayer], 
												(fixed_t)(EyeOffset/2) << FRACBITS,
												Yaw,

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线国产电影不卡| www.久久精品| 日韩女同互慰一区二区| 毛片av中文字幕一区二区| 91麻豆精品91久久久久同性| 婷婷丁香久久五月婷婷| 欧美日本在线播放| 免费高清不卡av| 精品国产第一区二区三区观看体验| 久久精品国产亚洲高清剧情介绍| 日韩欧美亚洲一区二区| 国产精品一品视频| 中文字幕欧美日本乱码一线二线| 91在线国内视频| 亚洲国产成人91porn| 日韩欧美国产三级电影视频| 风间由美一区二区av101| 一区二区在线免费观看| 欧美一区二区三区日韩| 国产成人免费视频网站| 玉米视频成人免费看| 欧美一区二区大片| 成人福利在线看| 性欧美大战久久久久久久久| 久久综合九色综合久久久精品综合| 成人黄色在线网站| 天天影视色香欲综合网老头| 久久精品欧美日韩| 91久久线看在观草草青青| 日本特黄久久久高潮| 国产精品麻豆欧美日韩ww| 欧美日高清视频| 岛国精品在线观看| 日韩电影在线看| 亚洲欧洲一区二区三区| 欧美一级淫片007| 色94色欧美sute亚洲线路二| 久久不见久久见中文字幕免费| 国产精品盗摄一区二区三区| 欧美一二三在线| 91蝌蚪porny| 国产福利视频一区二区三区| 日韩专区在线视频| 亚洲日本在线a| 国产欧美一区二区三区在线看蜜臀 | 一区二区三区产品免费精品久久75| 欧美另类videos死尸| 风间由美性色一区二区三区| 蜜桃视频一区二区| 亚洲第一激情av| 综合久久一区二区三区| 精品国产免费久久| 日韩一区二区三区观看| 欧美在线视频你懂得| 波多野结衣中文一区| 国产精品白丝jk黑袜喷水| 奇米一区二区三区| 丝袜美腿亚洲一区二区图片| 亚洲激情成人在线| 国产精品成人免费精品自在线观看| 精品国产三级a在线观看| 欧美精品成人一区二区三区四区| 色美美综合视频| 99久久精品国产一区| 成人ar影院免费观看视频| 国产精品99久久不卡二区| 久热成人在线视频| 免费高清在线视频一区·| 日本午夜一区二区| 日本91福利区| 日韩成人午夜电影| 日韩精品一卡二卡三卡四卡无卡| 亚洲国产精品久久久男人的天堂| 亚洲色图一区二区三区| 亚洲欧美日韩国产另类专区 | 日韩视频在线你懂得| 欧美日韩成人一区二区| 欧美美女bb生活片| 欧美午夜精品免费| 欧美亚洲高清一区二区三区不卡| 欧美中文字幕一区| 欧美日韩精品专区| 3d动漫精品啪啪一区二区竹菊 | 日韩一区和二区| 日韩午夜激情电影| 精品奇米国产一区二区三区| 日韩精品一区二区三区四区 | 成人av免费在线观看| 不卡的电视剧免费网站有什么| 成人涩涩免费视频| 一道本成人在线| 欧美日韩一本到| 日韩一级免费观看| 久久久久久日产精品| 中文字幕一区二区三区不卡| **网站欧美大片在线观看| 亚洲激情在线播放| 天天亚洲美女在线视频| 国产专区欧美精品| 91丝袜呻吟高潮美腿白嫩在线观看| 91亚洲国产成人精品一区二区三 | 久久综合成人精品亚洲另类欧美 | 奇米四色…亚洲| 国产一区二区福利| 成人理论电影网| 欧美性大战xxxxx久久久| 欧美一区二区在线播放| 久久久久久久av麻豆果冻| 亚洲欧美日韩国产成人精品影院| 香蕉久久一区二区不卡无毒影院| 麻豆精品新av中文字幕| www.综合网.com| 欧美精品丝袜久久久中文字幕| 精品久久久久一区| 日韩理论片网站| 免费在线欧美视频| 成人精品在线视频观看| 欧美日韩精品三区| 国产午夜精品理论片a级大结局| 中文字幕一区二区日韩精品绯色| 亚洲图片欧美一区| 懂色av一区二区在线播放| 91福利在线免费观看| 精品99久久久久久| 一区二区三区在线高清| 国产精品一区二区不卡| 欧美久久一二区| 中文字幕一区二区在线观看 | 亚洲一区二区在线免费看| 国产一区二区三区在线看麻豆| 一本久久a久久免费精品不卡| 精品久久国产97色综合| 亚洲一区二区视频| 国产**成人网毛片九色| 777xxx欧美| 亚洲综合小说图片| 成人av影院在线| 精品国产一区二区在线观看| 午夜影院久久久| av不卡一区二区三区| 国产欧美精品一区二区色综合| 图片区日韩欧美亚洲| 97精品久久久久中文字幕| 久久精品视频在线看| 日韩在线a电影| 欧美综合色免费| 亚洲精品中文在线影院| 成人在线视频首页| 久久久久成人黄色影片| 日本va欧美va欧美va精品| 欧美日本精品一区二区三区| 亚洲免费高清视频在线| va亚洲va日韩不卡在线观看| 国产午夜精品美女毛片视频| 精品午夜一区二区三区在线观看| 欧美日韩一区二区在线视频| 一区二区三区在线视频观看| av亚洲精华国产精华精华 | k8久久久一区二区三区| 国产亚洲一区字幕| 国产乱码精品一区二区三区av | 亚洲一区二区三区不卡国产欧美| 99在线精品观看| 国产精品伦理在线| av在线不卡免费看| 亚洲欧洲精品天堂一级| 成人avav在线| 亚洲激情男女视频| 欧美最猛黑人xxxxx猛交| 一区二区三区美女视频| 色噜噜久久综合| 亚洲国产综合在线| 欧美日韩国产色站一区二区三区| 亚洲国产cao| 欧美二区三区的天堂| 日本午夜精品视频在线观看| 日韩视频中午一区| 国产九色精品成人porny| 欧美激情中文字幕一区二区| 成人app网站| 亚洲一区二区三区四区的| 欧美精品 国产精品| 蜜桃视频在线一区| 久久久久久久久久久久久夜| 不卡的av电影在线观看| 一片黄亚洲嫩模| 91精品国产综合久久久久久久| 久久精品久久精品| 国产精品蜜臀av| 欧美午夜一区二区三区免费大片| 亚洲第一av色| 久久久亚洲高清| 99精品国产91久久久久久| 亚洲图片欧美综合| 欧美成人vps| 色伊人久久综合中文字幕| 日韩高清一区二区| 国产精品午夜在线| 欧美三区在线视频| 国内精品写真在线观看|