1
0
Fork 0
forked from fte/fteqw

Enable D3D renderer in windows merged clients, some other small fixes to help MinGW get closer to compiling the D3D renderer (things are undefined)

git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3722 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2011-01-28 05:06:20 +00:00
parent f2ea7731e8
commit 8b74b55034
3 changed files with 1058 additions and 1043 deletions

View file

@ -419,10 +419,8 @@ GLQUAKE_OBJS = \
gl_hlmdl.o gl_hlmdl.o
D3DQUAKE_OBJS = \ D3DQUAKE_OBJS = \
d3d_draw.o \ d3d_backend.o \
d3d_mesh.o \ d3d_image.o \
d3d_rmain.o \
d3d_rsurf.o \
vid_d3d.o \ vid_d3d.o \
d3d9_draw.o \ d3d9_draw.o \
d3d9_mesh.o \ d3d9_mesh.o \
@ -590,7 +588,7 @@ ifeq ($(FTE_TARGET),win32_SDL)
MB_DIR=m_mgw_sdl$(BITS) MB_DIR=m_mgw_sdl$(BITS)
M_EXE_NAME=../fteqw_sdl.exe M_EXE_NAME=../fteqw_sdl.exe
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o resources.o MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) $(D3DQUAKE_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o resources.o
M_CFLAGS=-D_MINGW_VFPRINTF -D_SDL -I./libs/ -I./libs/mingw-libs/ -I./libs/dxsdk7/include/ -I./libs/mingw-libs $(GLCFLAGS) `sdl-config --cflags` -D_MERGED_SDL M_CFLAGS=-D_MINGW_VFPRINTF -D_SDL -I./libs/ -I./libs/mingw-libs/ -I./libs/dxsdk7/include/ -I./libs/mingw-libs $(GLCFLAGS) `sdl-config --cflags` -D_MERGED_SDL
M_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS) M_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS)
@ -627,7 +625,7 @@ ifeq ($(FTE_TARGET),win64_SDL)
MB_DIR=m_mgw_sdl$(BITS) MB_DIR=m_mgw_sdl$(BITS)
M_EXE_NAME=../fteqw_sdl64.exe M_EXE_NAME=../fteqw_sdl64.exe
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o resources.o MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) $(D3DQUAKE_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o resources.o
M_CFLAGS=-D_MINGW_VFPRINTF -D_SDL -I./libs/ -I./libs/mingw64-libs/ -I./libs/dxsdk7/include/ -I./libs/mingw64-libs $(GLCFLAGS) `sdl-config --cflags` -D_MERGED_SDL M_CFLAGS=-D_MINGW_VFPRINTF -D_SDL -I./libs/ -I./libs/mingw64-libs/ -I./libs/dxsdk7/include/ -I./libs/mingw64-libs $(GLCFLAGS) `sdl-config --cflags` -D_MERGED_SDL
M_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS) M_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS)
@ -711,9 +709,9 @@ endif
NPQTVCL_DIR=npqtvcl_mgw NPQTVCL_DIR=npqtvcl_mgw
ifeq ($(USEASM),true) ifeq ($(USEASM),true)
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) fs_win32.o gl_vidnt.o vid_ddraw.o vid_dib.o vid_win2.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o sys_dosa.o resources.o MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) $(D3DQUAKE_OBJS) fs_win32.o gl_vidnt.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o sys_dosa.o resources.o
else else
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) fs_win32.o gl_vidnt.o vid_ddraw.o vid_dib.o vid_win2.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o resources.o MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) $(D3DQUAKE_OBJS) fs_win32.o gl_vidnt.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o resources.o
endif endif
M_EXE_NAME=../fteqw.exe M_EXE_NAME=../fteqw.exe
MCL_EXE_NAME=../fteqwcl.exe MCL_EXE_NAME=../fteqwcl.exe
@ -777,9 +775,9 @@ endif
NPQTVCL_DIR=npqtvcl_mgw64 NPQTVCL_DIR=npqtvcl_mgw64
ifeq ($(USEASM),true) ifeq ($(USEASM),true)
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) fs_win32.o gl_vidnt.o vid_ddraw.o vid_dib.o vid_win2.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o sys_dosa.o resources.o MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) $(D3DQUAKE_OBJS) fs_win32.o gl_vidnt.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o sys_dosa.o resources.o
else else
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) fs_win32.o gl_vidnt.o vid_ddraw.o vid_dib.o vid_win2.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o resources.o MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) $(D3DQUAKE_OBJS) fs_win32.o gl_vidnt.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o resources.o
endif endif
M_EXE_NAME=../fteqw64.exe M_EXE_NAME=../fteqw64.exe
MCL_EXE_NAME=../fteqwcl64.exe MCL_EXE_NAME=../fteqwcl64.exe
@ -968,10 +966,10 @@ SV_DIR?=sv_sdl
.default: help .default: help
all: rel all: rel
rel: sv-rel gl-rel mingl-rel rel: sv-rel gl-rel mingl-rel m-rel
dbg: sv-dbg gl-dbg mingl-dbg dbg: sv-dbg gl-dbg mingl-dbg m-dbg
relcl: glcl-rel mcl-rel relcl: glcl-rel mcl-rel
profile: sv-profile gl-profile mingl-profile profile: sv-profile gl-profile mingl-profile m-profile
releases: releases:
#this is for releasing things from a linux box #this is for releasing things from a linux box

View file

@ -24,6 +24,21 @@ typedef struct d3dcachepic_s
d3dcachepic_t d3dmenu_cachepics[MAX_CACHED_PICS]; d3dcachepic_t d3dmenu_cachepics[MAX_CACHED_PICS];
int d3dmenu_numcachepics; int d3dmenu_numcachepics;
#ifdef MINGW // these are undefined in MinGW
const unsigned int TF_COLOR = 1;
const unsigned int TF_ALPHA = 2;
const unsigned int TF_MASKED = 4;
const unsigned int TF_MIPMAP = 8;
const unsigned int TF_CLAMP = 16;
const unsigned int TF_ANISOTROPIC = 32;
const unsigned int TF_SPHEREMAP = 64;
const unsigned int TF_CUBEMAP = 128;
const unsigned int TF_NORMALCUBE = 512;
const unsigned int TF_NOTBUMPMAP = 0; //made this up
const unsigned int TF_NOMIPMAP = 0; //made this up
const unsigned int TF_NOALPHA = 0; //made this up
#endif
typedef struct { typedef struct {

View file

@ -1,4 +1,6 @@
//#include "ddraw.h" #ifdef MINGW
#include "ddraw.h" // resolve DDLOCK_NOSYSLOCK
#endif
#ifndef D3D9QUAKE_H #ifndef D3D9QUAKE_H
#define D3D9QUAKE_H #define D3D9QUAKE_H