mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-30 15:41:49 +00:00
dce284811e
Q3 clients can connect to q1 gamecode (sv_listen_q3). hacked support for SendFlags. It'll work compatibly, just not efficiently. Unified shared qc builtins. fteqcc supports int |= float, more params in macros, &~= operator. Additional recent DP QC extensions. Particle system abstraction. 'r_particlesystem classic' (vs null or script) will revert to truly classic particles. Nexuiz might run again. Network address revamp (sv_port and sv_port_ipv6 can both be used to specify an ipv4 address:port and both corrently accept clients). localhost now properly favours ipv4 (use ::1 for ipv6 localhost). Download system revamp. Numerous other changes. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3051 fc73d0e0-1445-4013-8a0c-d673dee63da5
84 lines
4 KiB
C
84 lines
4 KiB
C
#ifndef __D3DQUAKE_H__
|
|
#define __D3DQUAKE_H__
|
|
|
|
#ifdef __GNUC__
|
|
#define _inline static inline
|
|
#endif
|
|
|
|
#include "ddraw.h"
|
|
#include "d3d.h"
|
|
#include "d3dx.h"
|
|
#include "glquake.h"
|
|
|
|
void *D3D7_LoadTexture_32(char *name, unsigned int *data, int width, int height, int flags);
|
|
void *D3D7_LoadTexture_8_Pal24(char *name, unsigned char *data, int width, int height, int flags, unsigned char *palette, int transparentpix);
|
|
void *D3D7_LoadTexture_8_Pal32(char *name, unsigned char *data, int width, int height, int flags, unsigned char *palette);
|
|
/*
|
|
#define D3D9_LoadTexture8Pal32(skinname,width,height,data,palette,usemips,alpha) (int)D3D9_LoadTexture_8_Pal32(skinname, data, width, height, (usemips?TF_MIPMAP:TF_NOMIPMAP) | (alpha?TF_ALPHA:TF_NOALPHA) | TF_NOTBUMPMAP, host_basepal)
|
|
#define D3D9_LoadTexture(skinname,width,height,data,usemips,alpha) (int)D3D9_LoadTexture_8_Pal24(skinname, data, width, height, (usemips?TF_MIPMAP:TF_NOMIPMAP) | (alpha?TF_ALPHA:TF_NOALPHA) | TF_NOTBUMPMAP, host_basepal, 255)
|
|
#define D3D9_LoadTexture32(skinname,width,height,data,usemips,alpha) (int)D3D9_LoadTexture_32(skinname, data, width, height, (usemips?TF_MIPMAP:TF_NOMIPMAP) | (alpha?TF_ALPHA:TF_NOALPHA) | TF_NOTBUMPMAP)
|
|
#define D3D9_LoadTextureFB(skinname,width,height,data,usemips,alpha) 0
|
|
#define D3D9_LoadTexture8Bump(skinname,width,height,data,usemips,alpha) 0
|
|
|
|
#define D3D9_FindTexture(name) -1
|
|
#define D3D9_LoadCompressed(name) 0
|
|
*/
|
|
|
|
|
|
void *D3D9_LoadTexture_32(char *name, unsigned int *data, int width, int height, int flags);
|
|
void *D3D9_LoadTexture_8_Pal24(char *name, unsigned char *data, int width, int height, int flags, unsigned char *palette, int transparentpix);
|
|
void *D3D9_LoadTexture_8_Pal32(char *name, unsigned char *data, int width, int height, int flags, unsigned char *palette);
|
|
|
|
|
|
#define D3D_LoadTexture8Pal32(skinname,width,height,data,palette,usemips,alpha) (int)(pD3DDev?D3D7_LoadTexture_8_Pal32:D3D9_LoadTexture_8_Pal32)(skinname, data, width, height, (usemips?TF_MIPMAP:TF_NOMIPMAP) | (alpha?TF_ALPHA:TF_NOALPHA) | TF_NOTBUMPMAP, palette)
|
|
#define D3D_LoadTexture8Pal24(skinname,width,height,data,palette,usemips,alpha) (int)(pD3DDev?D3D7_LoadTexture_8_Pal24:D3D9_LoadTexture_8_Pal24)(skinname, data, width, height, (usemips?TF_MIPMAP:TF_NOMIPMAP) | (alpha?TF_ALPHA:TF_NOALPHA) | TF_NOTBUMPMAP, palette, 255)
|
|
#define D3D_LoadTexture(skinname,width,height,data,usemips,alpha) (int)(pD3DDev?D3D7_LoadTexture_8_Pal24:D3D9_LoadTexture_8_Pal24)(skinname, data, width, height, (usemips?TF_MIPMAP:TF_NOMIPMAP) | (alpha?TF_ALPHA:TF_NOALPHA) | TF_NOTBUMPMAP, host_basepal, 255)
|
|
#define D3D_LoadTexture32(skinname,width,height,data,usemips,alpha) (int)(pD3DDev?D3D7_LoadTexture_32:D3D9_LoadTexture_32)(skinname, data, width, height, (usemips?TF_MIPMAP:TF_NOMIPMAP) | (alpha?TF_ALPHA:TF_NOALPHA) | TF_NOTBUMPMAP)
|
|
#define D3D_LoadTextureFB(skinname,width,height,data,usemips,alpha) 0
|
|
#define D3D_LoadTexture8Bump(skinname,width,height,data,usemips,alpha) 0
|
|
|
|
#define D3D_FindTexture(name) -1
|
|
#define D3D_LoadCompressed(name) 0
|
|
|
|
|
|
|
|
extern LPDIRECT3DDEVICE7 pD3DDev;
|
|
|
|
extern int d_lightstylevalue[256]; // 8.8 fraction of base light value
|
|
|
|
#define lightmap_bytes 4
|
|
|
|
|
|
extern int numlightmaps;
|
|
|
|
extern mvertex_t *r_pcurrentvertbase;
|
|
|
|
#ifndef LMBLOCK_WIDTH
|
|
#define LMBLOCK_WIDTH 128
|
|
#define LMBLOCK_HEIGHT LMBLOCK_WIDTH
|
|
typedef struct glRect_s {
|
|
unsigned char l,t,w,h;
|
|
} glRect_t;
|
|
typedef unsigned char stmap;
|
|
|
|
typedef struct {
|
|
qboolean modified;
|
|
qboolean deluxmodified;
|
|
glRect_t rectchange;
|
|
glRect_t deluxrectchange;
|
|
int allocated[LMBLOCK_WIDTH];
|
|
qbyte lightmaps[4*LMBLOCK_WIDTH*LMBLOCK_HEIGHT];
|
|
qbyte deluxmaps[4*LMBLOCK_WIDTH*LMBLOCK_HEIGHT]; //fixme: make seperate structure for easy disabling with less memory usage.
|
|
stmap stainmaps[3*LMBLOCK_WIDTH*LMBLOCK_HEIGHT]; //rgb no a. added to lightmap for added (hopefully) speed.
|
|
} lightmapinfo_t;
|
|
#endif
|
|
|
|
extern LPDIRECTDRAWSURFACE7 *lightmap_d3dtextures;
|
|
extern LPDIRECTDRAWSURFACE7 *deluxmap_d3dtextures;
|
|
extern lightmapinfo_t **lightmap;
|
|
|
|
extern void *d3dexplosiontexture;
|
|
extern void *d3dballtexture;
|
|
|
|
#endif
|
|
|