国外网站找到的雷神之锤源码 雷神之锤源码
quake2 quake2
aaa
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1284 2001-12-22 16:32 quake2
eadme.txt
文件 14969 2001-12-22 16:32 quake2gnu.txt
文件 5556 2001-12-22 19:54 quake2quake2-3.213.15_Changes.txt
文件 6727 2001-12-22 19:54 quake2quake2-3.213.16_Changes.txt
文件 8761 2001-12-22 19:54 quake2quake2-3.213.17_Changes.txt
文件 3358 2001-12-22 19:54 quake2quake2-3.213.18_changes.txt
文件 3660 2001-10-02 14:10 quake2quake2-3.213.19_Changes.txt
文件 4327 2001-10-02 14:10 quake2quake2-3.213.20_Changes.txt
文件 4810 2001-12-22 20:24 quake2quake2-3.213.21_Changes.txt
文件 8971 2001-12-22 20:07 quake2quake2-3.21changes.txt
文件 14969 2001-12-22 16:32 quake2quake2-3.21gnu.txt
文件 10950 2001-12-22 16:32 quake2quake2-3.21joystick.txt
文件 10452 2001-10-02 14:10 quake2quake2-3.21makefile
文件 41698 2001-12-22 19:36 quake2quake2-3.21quake2.dsp
文件 1558 2001-12-22 19:37 quake2quake2-3.21quake2.dsw
文件 1284 2001-12-22 16:32 quake2quake2-3.21
eadme.txt
文件 10852 2001-10-02 14:10 quake2quake2-3.21clientadivtab.h
文件 6476 2001-12-22 16:32 quake2quake2-3.21clientanorms.h
文件 1954 2001-10-02 14:10 quake2quake2-3.21clientasm_i386.h
文件 2233 2001-10-02 14:10 quake2quake2-3.21clientlock16.h
文件 2183 2001-10-02 14:10 quake2quake2-3.21clientlock8.h
文件 952 2001-12-22 16:32 quake2quake2-3.21clientcdaudio.h
文件 13473 2001-12-22 16:32 quake2quake2-3.21clientcl_cin.c
文件 39957 2001-12-22 16:32 quake2quake2-3.21clientcl_ents.c
文件 51749 2001-12-22 16:32 quake2quake2-3.21clientcl_fx.c
文件 13685 2001-12-22 16:32 quake2quake2-3.21clientcl_input.c
文件 2981 2001-12-22 16:32 quake2quake2-3.21clientcl_inv.c
文件 41849 2001-12-22 16:32 quake2quake2-3.21clientcl_main.c
文件 26384 2001-12-22 16:32 quake2quake2-3.21clientcl_newfx.c
文件 19316 2001-12-22 16:32 quake2quake2-3.21clientcl_parse.c
............此处省略346个文件信息
/*
Copyright (C) 1997-2001 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.
You should have received a copy of the GNU General Public License
along with this program; if not write to the Free Software
Foundation Inc. 59 Temple Place - Suite 330 Boston MA 02111-1307 USA.
*/
#include “client.h“
typedef struct
{
byte *data;
int count;
} cblock_t;
typedef struct
{
qboolean restart_sound;
int s_rate;
int s_width;
int s_channels;
int width;
int height;
byte *pic;
byte *pic_pending;
// order 1 huffman stuff
int *hnodes1; // [256][256][2];
int numhnodes1[256];
int h_used[512];
int h_count[512];
} cinematics_t;
cinematics_t cin;
/*
=================================================================
PCX LOADING
=================================================================
*/
/*
==============
SCR_LoadPCX
==============
*/
void SCR_LoadPCX (char *filename byte **pic byte **palette int *width int *height)
{
byte *raw;
pcx_t *pcx;
int x y;
int len;
int dataByte runLength;
byte *out *pix;
*pic = NULL;
//
// load the file
//
len = FS_LoadFile (filename (void **)&raw);
if (!raw)
return; // Com_Printf (“Bad pcx file %s
“ filename);
//
// parse the PCX file
//
pcx = (pcx_t *)raw;
raw = &pcx->data;
if (pcx->manufacturer != 0x0a
|| pcx->version != 5
|| pcx->encoding != 1
|| pcx->bits_per_pixel != 8
|| pcx->xmax >= 640
|| pcx->ymax >= 480)
{
Com_Printf (“Bad pcx file %s
“ filename);
return;
}
out = Z_Malloc ( (pcx->ymax+1) * (pcx->xmax+1) );
*pic = out;
pix = out;
if (palette)
{
*palette = Z_Malloc(768);
memcpy (*palette (byte *)pcx + len - 768 768);
}
if (width)
*width = pcx->xmax+1;
if (height)
*height = pcx->ymax+1;
for (y=0 ; y<=pcx->ymax ; y++ pix += pcx->xmax+1)
{
for (x=0 ; x<=pcx->xmax ; )
{
dataByte = *raw++;
if((dataByte & 0xC0) == 0xC0)
{
runLength = dataByte & 0x3F;
dataByte = *raw++;
}
else
runLength = 1;
while(runLength-- > 0)
pix[x++] = dataByte;
}
}
if ( raw - (byte *)pcx > len)
{
Com_Printf (“PCX file %s was malformed“ filename);
Z_Free (*pic);
*pic = NULL;
}
FS_FreeFile (pcx);
}
//=============================================================
/*
==================
SCR_StopCinematic
==================
*/
void SCR_StopCinematic (void)
{
cl.cinematictime = 0; // done
if (cin.p
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1284 2001-12-22 16:32 quake2
eadme.txt
文件 14969 2001-12-22 16:32 quake2gnu.txt
文件 5556 2001-12-22 19:54 quake2quake2-3.213.15_Changes.txt
文件 6727 2001-12-22 19:54 quake2quake2-3.213.16_Changes.txt
文件 8761 2001-12-22 19:54 quake2quake2-3.213.17_Changes.txt
文件 3358 2001-12-22 19:54 quake2quake2-3.213.18_changes.txt
文件 3660 2001-10-02 14:10 quake2quake2-3.213.19_Changes.txt
文件 4327 2001-10-02 14:10 quake2quake2-3.213.20_Changes.txt
文件 4810 2001-12-22 20:24 quake2quake2-3.213.21_Changes.txt
文件 8971 2001-12-22 20:07 quake2quake2-3.21changes.txt
文件 14969 2001-12-22 16:32 quake2quake2-3.21gnu.txt
文件 10950 2001-12-22 16:32 quake2quake2-3.21joystick.txt
文件 10452 2001-10-02 14:10 quake2quake2-3.21makefile
文件 41698 2001-12-22 19:36 quake2quake2-3.21quake2.dsp
文件 1558 2001-12-22 19:37 quake2quake2-3.21quake2.dsw
文件 1284 2001-12-22 16:32 quake2quake2-3.21
eadme.txt
文件 10852 2001-10-02 14:10 quake2quake2-3.21clientadivtab.h
文件 6476 2001-12-22 16:32 quake2quake2-3.21clientanorms.h
文件 1954 2001-10-02 14:10 quake2quake2-3.21clientasm_i386.h
文件 2233 2001-10-02 14:10 quake2quake2-3.21clientlock16.h
文件 2183 2001-10-02 14:10 quake2quake2-3.21clientlock8.h
文件 952 2001-12-22 16:32 quake2quake2-3.21clientcdaudio.h
文件 13473 2001-12-22 16:32 quake2quake2-3.21clientcl_cin.c
文件 39957 2001-12-22 16:32 quake2quake2-3.21clientcl_ents.c
文件 51749 2001-12-22 16:32 quake2quake2-3.21clientcl_fx.c
文件 13685 2001-12-22 16:32 quake2quake2-3.21clientcl_input.c
文件 2981 2001-12-22 16:32 quake2quake2-3.21clientcl_inv.c
文件 41849 2001-12-22 16:32 quake2quake2-3.21clientcl_main.c
文件 26384 2001-12-22 16:32 quake2quake2-3.21clientcl_newfx.c
文件 19316 2001-12-22 16:32 quake2quake2-3.21clientcl_parse.c
............此处省略346个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)