clien (svga) compiles, but doesn't link yet (so clients are disabled for now)

This commit is contained in:
Bill Currie 2000-05-11 13:15:59 +00:00
parent 9611170a38
commit ee16312bb8
6 changed files with 119 additions and 24 deletions

View file

@ -1,7 +1,13 @@
# *Defines* # *Defines*
EXE_name=qw-server SV_name=qw-server
EXE_libs= SV_libs=
CL_SVGA_name=qw-client-svga
SV_libs=
CL_X11_name=qw-client-x11
SV_libs=
DIRECTORIES= DIRECTORIES=
vpath %.a $(patsubst @%,%,$(DIRECTORIES)) /usr/lib vpath %.a $(patsubst @%,%,$(DIRECTORIES)) /usr/lib
@ -22,7 +28,7 @@ CXXFLAGS+=-g -O2
# *List Macros* # *List Macros*
EXE_sources=\ SV_sources=\
pr_cmds.c \ pr_cmds.c \
pr_edict.c \ pr_edict.c \
pr_exec.c \ pr_exec.c \
@ -53,21 +59,111 @@ EXE_sources=\
pmovetst.c \ pmovetst.c \
net_chan.c \ net_chan.c \
net_com.c \ net_com.c \
net_udp.c net_udp.c
SV_dependencies = $(patsubst %,%.d,$(basename $(SV_sources)))
SV_objects = $(patsubst %.d,%.o,$(SV_dependencies))
EXE_dependencies = $(patsubst %,%.d,$(basename $(EXE_sources))) CL_sources=\
EXE_objects = $(patsubst %.d,%.o,$(EXE_dependencies)) cl_demo.c \
cl_ents.c \
cl_input.c \
cl_main.c \
cl_parse.c \
cl_pred.c \
cl_tent.c \
cl_cam.c \
cmd.c \
common.c \
console.c \
crc.c \
cvar.c \
d_edge.c \
d_fill.c \
d_init.c \
d_modech.c \
d_part.c \
d_polyse.c \
d_scan.c \
d_sky.c \
d_sprite.c \
d_surf.c \
d_vars.c \
d_zpoint.c \
draw.c \
keys.c \
mathlib.c \
mdfour.c \
menu.c \
model.c \
net_chan.c \
net_com.c \
net_udp.c \
nonintel.c \
pmove.c \
pmovetst.c \
r_aclip.c \
r_alias.c \
r_bsp.c \
r_draw.c \
r_edge.c \
r_efrag.c \
r_light.c \
r_main.c \
r_misc.c \
r_part.c \
r_sky.c \
r_sprite.c \
r_surf.c \
r_vars.c \
sbar.c \
screen.c \
skin.c \
snd_dma.c \
snd_mem.c \
snd_mix.c \
view.c \
wad.c \
zone.c \
cd_linux.c \
sys_linux.c \
snd_linux.c
CL_dependencies = $(patsubst %,%.d,$(basename $(CL_sources)))
CL_objects = $(patsubst %.d,%.o,$(CL_dependencies))
CL_SVGA_sources=\
vid_svgalib.c
CL_SVGA_dependencies = $(patsubst %,%.d,$(basename $(CL_SVGA_sources)))
CL_SVGA_objects = $(patsubst %.d,%.o,$(CL_SVGA_dependencies))
CL_X11_sources=\
vid_x.c
CL_X11_dependencies = $(patsubst %,%.d,$(basename $(CL_X11_sources)))
CL_X11_objects = $(patsubst %.d,%.o,$(CL_X11_dependencies))
# *Explicit Rules* # *Explicit Rules*
$(EXE_name): $(EXE_objects) $(EXE_libs) all: $(SV_name) #$(CL_SVGA_name) $(CL_X11_name)
$(CXX) $(LDFLAGS) -o $@ $^ -lm -ldl -lpthread
$(SV_name): $(SV_objects) $(SV_libs)
$(CC) $(LDFLAGS) -o $@ $^ -lm -ldl -lpthread
$(CL_SVGA_name): $(CL_objects) $(CL_SVGA_objects) $(CL_SVGA_libs)
$(CC) $(LDFLAGS) -o $@ $^ -lm -ldl -lpthread
$(CL_X11_name): $(CL_objects) $(CL_X11_objects) $(CL_X11_libs)
$(CC) $(LDFLAGS) -o $@ $^ -lm -ldl -lpthread
clean: clean:
-rm -f *.[od] $(EXE_name) -rm -f *.[od] $(SV_name)
# *Individual File Dependencies* # *Individual File Dependencies*
-include $(EXE_dependencies) -include $(SV_dependencies)
-include $(CL_dependencies)
-include $(CL_SVGA_dependencies)
-include $(CL_X11_dependencies)

View file

@ -177,27 +177,31 @@ float CL_KeyState (kbutton_t *key)
down = key->state & 1; down = key->state & 1;
val = 0; val = 0;
if (impulsedown && !impulseup) if (impulsedown && !impulseup) {
if (down) if (down)
val = 0.5; // pressed and held this frame val = 0.5; // pressed and held this frame
else else
val = 0; // I_Error (); val = 0; // I_Error ();
if (impulseup && !impulsedown) }
if (impulseup && !impulsedown) {
if (down) if (down)
val = 0; // I_Error (); val = 0; // I_Error ();
else else
val = 0; // released this frame val = 0; // released this frame
if (!impulsedown && !impulseup) }
if (!impulsedown && !impulseup) {
if (down) if (down)
val = 1.0; // held the entire frame val = 1.0; // held the entire frame
else else
val = 0; // up the entire frame val = 0; // up the entire frame
if (impulsedown && impulseup) }
if (impulsedown && impulseup) {
if (down) if (down)
val = 0.75; // released and re-pressed this frame val = 0.75; // released and re-pressed this frame
else else
val = 0.25; // pressed and released this frame val = 0.25; // pressed and released this frame
}
key->state &= 1; // clear impulses key->state &= 1; // clear impulses
return val; return val;

View file

@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#else #else
#include <netinet/in.h> #include <netinet/in.h>
#endif #endif
#include <ctype.h>
// we need to declare some mouse variables here, because the menu system // we need to declare some mouse variables here, because the menu system

View file

@ -116,7 +116,6 @@ int CL_CalcNet (void)
int a, i; int a, i;
frame_t *frame; frame_t *frame;
int lost; int lost;
char st[80];
for (i=cls.netchan.outgoing_sequence-UPDATE_BACKUP+1 for (i=cls.netchan.outgoing_sequence-UPDATE_BACKUP+1
; i <= cls.netchan.outgoing_sequence ; i <= cls.netchan.outgoing_sequence
@ -1008,8 +1007,6 @@ CL_ServerInfo
*/ */
void CL_ServerInfo (void) void CL_ServerInfo (void)
{ {
int slot;
player_info_t *player;
char key[MAX_MSGLEN]; char key[MAX_MSGLEN];
char value[MAX_MSGLEN]; char value[MAX_MSGLEN];

View file

@ -210,7 +210,6 @@ R_NetGraph
void R_NetGraph (void) void R_NetGraph (void)
{ {
int a, x, y, y2, w, i; int a, x, y, y2, w, i;
frame_t *frame;
int lost; int lost;
char st[80]; char st[80];

View file

@ -458,7 +458,7 @@ void SCR_DrawFPS (void)
static double lastframetime; static double lastframetime;
double t; double t;
extern int fps_count; extern int fps_count;
static lastfps; static int lastfps;
int x, y; int x, y;
char st[80]; char st[80];
@ -703,7 +703,7 @@ int MipColor(int r, int g, int b)
{ {
int i; int i;
float dist; float dist;
int best; int best=0;
float bestdist; float bestdist;
int r1, g1, b1; int r1, g1, b1;
static int lr = -1, lg = -1, lb = -1; static int lr = -1, lg = -1, lb = -1;
@ -780,12 +780,10 @@ SCR_RSShot_f
*/ */
void SCR_RSShot_f (void) void SCR_RSShot_f (void)
{ {
int i, x, y; int x, y;
unsigned char *src, *dest; unsigned char *src, *dest;
char pcxname[80]; char pcxname[80];
char checkname[MAX_OSPATH]; unsigned char *newbuf;
unsigned char *newbuf, *srcbuf;
int srcrowbytes;
int w, h; int w, h;
int dx, dy, dex, dey, nx; int dx, dy, dex, dey, nx;
int r, b, g; int r, b, g;