⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rayview.cpp

📁 quake 游戏原代码
💻 CPP
字号:
#include "ray.h"
#include "asm.h"
#include "globals.h"
#include "voxinter.h"
#include "scrconf.h"
#include <stddef.h>

void setWindowDimensions(short height)
{
// Routine to set the height of the window

   // check our height bounds to make sure they are legal
   if ((height > Get_Phys_Screen_Height())|| (height <=MIN_WINDOW_HEIGHT))
      return;

   WINDOW_HEIGHT=height;
   WINDOW_MIDDLE=height >> 1; // half the height

   // setup the new window
   setupNewScreen();
}

void setupNewScreen() // do all calulations having to do with a change in the view window
{
   clearBuff();
   VERTICAL_SCALE=(64*(WINDOW_HEIGHT>>1)<<SHIFT)
                /tan_table[VERTICAL_VIEW_RANGE>>1]; // Set the right scale factor

   if (tex_mark_table!=NULL)
      DelPtr(tex_mark_table);
   tex_mark_table=(tex_mark * )NewPtr((WINDOW_HEIGHT)*sizeof(tex_mark));

   Build_Vertical_Distance_Table();
   Build_Height_Table();
   V_Recalc_Alts();
}

void setWindowFOV(short vertangle)
{
//Routine to set the vertical FOV

// check our angle bounds to make sure they are legal
if ((vertangle>MAX_VERT_FOV) || (vertangle<=MIN_VERT_FOV))
   return;
VERTICAL_VIEW_RANGE=vertangle;

// setup the new window
setupNewScreen();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -