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

📄 rayinit.cpp

📁 quake 游戏原代码
💻 CPP
字号:
#include "ray.h"
#include "globals.h"
#include "voxinter.h"
#include "prevarr.h"
#include "sprinter.h"
#include <stdio.h>
#include <mem.h>
#include <stdlib.h>
#include <string.h>
#include "sprinter.h"
#include "scrconf.h"
#include "fixed.h"
#include "raybuff.h"
#include "getangle.h"

void    initRay()
        {
        F_Init();
        Init_Objects();
        WINDOW_HEIGHT=Get_Phys_Screen_Height();
        WINDOW_MIDDLE=WINDOW_HEIGHT/2;
        WINDOW_WIDTH=Get_Phys_Screen_Width();
        WINDOW_MIDDLEW=WINDOW_WIDTH/2;
        HORIZ_VIEW_RANGE=ANGLE_60;
        VERTICAL_VIEW_RANGE=ANGLE_60;
        VERTICAL_SCALE=13312;
        Build_Tables();
        Init_Get_Angle();
        SCALE_FACTOR=fixeddiv(WINDOW_MIDDLEW, tan_table[HORIZ_VIEW_RANGE>>1]);
        Init_Buffer();
        Setup_Prev_Arrays();
        Set_View_Angle(ANGLE_0);
        Render_Init();
        SetRenderMode(MODE_3D);
        Init_Voxel();
        }

void closeRay()
{
Clear_Prev_Arrays();
Close_Objects();
Render_Close();
Close_Voxel();
F_Shutdown();
DelPtr(tan_table);
DelPtr(inv_tan_table);
DelPtr(rcos_table);
DelPtr(rsin_table);
DelPtr(inv_cos_table);
DelPtr(distance_table);
//DelPtr(movement_table;
DelPtr(height_table);
}

⌨️ 快捷键说明

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