Move the colormod lookup table into a new lib.

libQFclient is now here :) The first shared code is the lookup table.
This commit is contained in:
Bill Currie 2012-06-28 09:33:23 +09:00
parent 49f7d1ad6d
commit b65c41efcb
12 changed files with 355 additions and 274 deletions

View file

@ -9,6 +9,7 @@
libs/audio/renderer/Makefile
libs/audio/test/Makefile
libs/console/Makefile
libs/client/Makefile
libs/gamecode/Makefile
libs/gib/Makefile
libs/image/Makefile

View file

@ -16,6 +16,8 @@ EXTRA_DIST = \
sv_console.h varrays.h vgamodes.h vid_internal.h vregset.h winquake.h \
world.h \
\
client/entities.h \
\
qw/bothdefs.h qw/msg_backbuf.h qw/msg_ucmd.h qw/pmove.h qw/protocol.h \
\
win32/dirent.h win32/fnmatch.h win32/stdint.h \

38
include/client/entities.h Normal file
View file

@ -0,0 +1,38 @@
/*
entities.h
Entity management
Copyright (C) 2012 Bill Currie <bill@taniwha.org>
Author: Bill Currie <bill@taniwha.org>
Date: 2012/6/28
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:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
*/
#ifndef __client_entities_h
#define __client_entities_h
#include "QF/qtypes.h"
extern vec3_t ent_colormod[256];
#endif//__client_entities_h

View file

@ -8,4 +8,4 @@ AUTOMAKE_OPTIONS= foreign
# video depends on models(?), image(?) and ruamoko
# console depends on video, ruamoko and audio
SUBDIRS=util gamecode ruamoko gib audio image models video console \
net qw
net qw client

11
libs/client/Makefile.am Normal file
View file

@ -0,0 +1,11 @@
AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include
noinst_LTLIBRARIES= libQFclient.la
libQFclient_la_LDFLAGS= @STATIC@
libQFclient_la_LIBADD= $(top_builddir)/libs/gamecode/libQFgamecode.la $(top_builddir)/libs/util/libQFutil.la
libQFclient_la_SOURCES= \
cl_entities.c

293
libs/client/cl_entities.c Normal file
View file

@ -0,0 +1,293 @@
/*
cl_entities.c
Client side entity management
Copyright (C) 2012 Bill Currie <bill@taniwha.org>
Author: Bill Currie <bill@taniwha.org>
Date: 2012/6/28
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:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "client/entities.h"
vec3_t ent_colormod[256] = {
{0, 0, 0},
{0, 0, 0.333333},
{0, 0, 0.666667},
{0, 0, 1},
{0, 0.142857, 0},
{0, 0.142857, 0.333333},
{0, 0.142857, 0.666667},
{0, 0.142857, 1},
{0, 0.285714, 0},
{0, 0.285714, 0.333333},
{0, 0.285714, 0.666667},
{0, 0.285714, 1},
{0, 0.428571, 0},
{0, 0.428571, 0.333333},
{0, 0.428571, 0.666667},
{0, 0.428571, 1},
{0, 0.571429, 0},
{0, 0.571429, 0.333333},
{0, 0.571429, 0.666667},
{0, 0.571429, 1},
{0, 0.714286, 0},
{0, 0.714286, 0.333333},
{0, 0.714286, 0.666667},
{0, 0.714286, 1},
{0, 0.857143, 0},
{0, 0.857143, 0.333333},
{0, 0.857143, 0.666667},
{0, 0.857143, 1},
{0, 1, 0},
{0, 1, 0.333333},
{0, 1, 0.666667},
{0, 1, 1},
{0.142857, 0, 0},
{0.142857, 0, 0.333333},
{0.142857, 0, 0.666667},
{0.142857, 0, 1},
{0.142857, 0.142857, 0},
{0.142857, 0.142857, 0.333333},
{0.142857, 0.142857, 0.666667},
{0.142857, 0.142857, 1},
{0.142857, 0.285714, 0},
{0.142857, 0.285714, 0.333333},
{0.142857, 0.285714, 0.666667},
{0.142857, 0.285714, 1},
{0.142857, 0.428571, 0},
{0.142857, 0.428571, 0.333333},
{0.142857, 0.428571, 0.666667},
{0.142857, 0.428571, 1},
{0.142857, 0.571429, 0},
{0.142857, 0.571429, 0.333333},
{0.142857, 0.571429, 0.666667},
{0.142857, 0.571429, 1},
{0.142857, 0.714286, 0},
{0.142857, 0.714286, 0.333333},
{0.142857, 0.714286, 0.666667},
{0.142857, 0.714286, 1},
{0.142857, 0.857143, 0},
{0.142857, 0.857143, 0.333333},
{0.142857, 0.857143, 0.666667},
{0.142857, 0.857143, 1},
{0.142857, 1, 0},
{0.142857, 1, 0.333333},
{0.142857, 1, 0.666667},
{0.142857, 1, 1},
{0.285714, 0, 0},
{0.285714, 0, 0.333333},
{0.285714, 0, 0.666667},
{0.285714, 0, 1},
{0.285714, 0.142857, 0},
{0.285714, 0.142857, 0.333333},
{0.285714, 0.142857, 0.666667},
{0.285714, 0.142857, 1},
{0.285714, 0.285714, 0},
{0.285714, 0.285714, 0.333333},
{0.285714, 0.285714, 0.666667},
{0.285714, 0.285714, 1},
{0.285714, 0.428571, 0},
{0.285714, 0.428571, 0.333333},
{0.285714, 0.428571, 0.666667},
{0.285714, 0.428571, 1},
{0.285714, 0.571429, 0},
{0.285714, 0.571429, 0.333333},
{0.285714, 0.571429, 0.666667},
{0.285714, 0.571429, 1},
{0.285714, 0.714286, 0},
{0.285714, 0.714286, 0.333333},
{0.285714, 0.714286, 0.666667},
{0.285714, 0.714286, 1},
{0.285714, 0.857143, 0},
{0.285714, 0.857143, 0.333333},
{0.285714, 0.857143, 0.666667},
{0.285714, 0.857143, 1},
{0.285714, 1, 0},
{0.285714, 1, 0.333333},
{0.285714, 1, 0.666667},
{0.285714, 1, 1},
{0.428571, 0, 0},
{0.428571, 0, 0.333333},
{0.428571, 0, 0.666667},
{0.428571, 0, 1},
{0.428571, 0.142857, 0},
{0.428571, 0.142857, 0.333333},
{0.428571, 0.142857, 0.666667},
{0.428571, 0.142857, 1},
{0.428571, 0.285714, 0},
{0.428571, 0.285714, 0.333333},
{0.428571, 0.285714, 0.666667},
{0.428571, 0.285714, 1},
{0.428571, 0.428571, 0},
{0.428571, 0.428571, 0.333333},
{0.428571, 0.428571, 0.666667},
{0.428571, 0.428571, 1},
{0.428571, 0.571429, 0},
{0.428571, 0.571429, 0.333333},
{0.428571, 0.571429, 0.666667},
{0.428571, 0.571429, 1},
{0.428571, 0.714286, 0},
{0.428571, 0.714286, 0.333333},
{0.428571, 0.714286, 0.666667},
{0.428571, 0.714286, 1},
{0.428571, 0.857143, 0},
{0.428571, 0.857143, 0.333333},
{0.428571, 0.857143, 0.666667},
{0.428571, 0.857143, 1},
{0.428571, 1, 0},
{0.428571, 1, 0.333333},
{0.428571, 1, 0.666667},
{0.428571, 1, 1},
{0.571429, 0, 0},
{0.571429, 0, 0.333333},
{0.571429, 0, 0.666667},
{0.571429, 0, 1},
{0.571429, 0.142857, 0},
{0.571429, 0.142857, 0.333333},
{0.571429, 0.142857, 0.666667},
{0.571429, 0.142857, 1},
{0.571429, 0.285714, 0},
{0.571429, 0.285714, 0.333333},
{0.571429, 0.285714, 0.666667},
{0.571429, 0.285714, 1},
{0.571429, 0.428571, 0},
{0.571429, 0.428571, 0.333333},
{0.571429, 0.428571, 0.666667},
{0.571429, 0.428571, 1},
{0.571429, 0.571429, 0},
{0.571429, 0.571429, 0.333333},
{0.571429, 0.571429, 0.666667},
{0.571429, 0.571429, 1},
{0.571429, 0.714286, 0},
{0.571429, 0.714286, 0.333333},
{0.571429, 0.714286, 0.666667},
{0.571429, 0.714286, 1},
{0.571429, 0.857143, 0},
{0.571429, 0.857143, 0.333333},
{0.571429, 0.857143, 0.666667},
{0.571429, 0.857143, 1},
{0.571429, 1, 0},
{0.571429, 1, 0.333333},
{0.571429, 1, 0.666667},
{0.571429, 1, 1},
{0.714286, 0, 0},
{0.714286, 0, 0.333333},
{0.714286, 0, 0.666667},
{0.714286, 0, 1},
{0.714286, 0.142857, 0},
{0.714286, 0.142857, 0.333333},
{0.714286, 0.142857, 0.666667},
{0.714286, 0.142857, 1},
{0.714286, 0.285714, 0},
{0.714286, 0.285714, 0.333333},
{0.714286, 0.285714, 0.666667},
{0.714286, 0.285714, 1},
{0.714286, 0.428571, 0},
{0.714286, 0.428571, 0.333333},
{0.714286, 0.428571, 0.666667},
{0.714286, 0.428571, 1},
{0.714286, 0.571429, 0},
{0.714286, 0.571429, 0.333333},
{0.714286, 0.571429, 0.666667},
{0.714286, 0.571429, 1},
{0.714286, 0.714286, 0},
{0.714286, 0.714286, 0.333333},
{0.714286, 0.714286, 0.666667},
{0.714286, 0.714286, 1},
{0.714286, 0.857143, 0},
{0.714286, 0.857143, 0.333333},
{0.714286, 0.857143, 0.666667},
{0.714286, 0.857143, 1},
{0.714286, 1, 0},
{0.714286, 1, 0.333333},
{0.714286, 1, 0.666667},
{0.714286, 1, 1},
{0.857143, 0, 0},
{0.857143, 0, 0.333333},
{0.857143, 0, 0.666667},
{0.857143, 0, 1},
{0.857143, 0.142857, 0},
{0.857143, 0.142857, 0.333333},
{0.857143, 0.142857, 0.666667},
{0.857143, 0.142857, 1},
{0.857143, 0.285714, 0},
{0.857143, 0.285714, 0.333333},
{0.857143, 0.285714, 0.666667},
{0.857143, 0.285714, 1},
{0.857143, 0.428571, 0},
{0.857143, 0.428571, 0.333333},
{0.857143, 0.428571, 0.666667},
{0.857143, 0.428571, 1},
{0.857143, 0.571429, 0},
{0.857143, 0.571429, 0.333333},
{0.857143, 0.571429, 0.666667},
{0.857143, 0.571429, 1},
{0.857143, 0.714286, 0},
{0.857143, 0.714286, 0.333333},
{0.857143, 0.714286, 0.666667},
{0.857143, 0.714286, 1},
{0.857143, 0.857143, 0},
{0.857143, 0.857143, 0.333333},
{0.857143, 0.857143, 0.666667},
{0.857143, 0.857143, 1},
{0.857143, 1, 0},
{0.857143, 1, 0.333333},
{0.857143, 1, 0.666667},
{0.857143, 1, 1},
{1, 0, 0},
{1, 0, 0.333333},
{1, 0, 0.666667},
{1, 0, 1},
{1, 0.142857, 0},
{1, 0.142857, 0.333333},
{1, 0.142857, 0.666667},
{1, 0.142857, 1},
{1, 0.285714, 0},
{1, 0.285714, 0.333333},
{1, 0.285714, 0.666667},
{1, 0.285714, 1},
{1, 0.428571, 0},
{1, 0.428571, 0.333333},
{1, 0.428571, 0.666667},
{1, 0.428571, 1},
{1, 0.571429, 0},
{1, 0.571429, 0.333333},
{1, 0.571429, 0.666667},
{1, 0.571429, 1},
{1, 0.714286, 0},
{1, 0.714286, 0.333333},
{1, 0.714286, 0.666667},
{1, 0.714286, 1},
{1, 0.857143, 0},
{1, 0.857143, 0.333333},
{1, 0.857143, 0.666667},
{1, 0.857143, 1},
{1, 1, 0},
{1, 1, 0.333333},
{1, 1, 0.666667},
{1, 1, 1}
};

View file

@ -37,6 +37,8 @@
#include "QF/sound.h"
#include "QF/render.h"
#include "client/entities.h"
#include "game.h"
#include "netmain.h"
#include "protocol.h"
@ -276,7 +278,6 @@ extern entity_t cl_entities[MAX_EDICTS];
extern entity_state_t cl_entity_states[3][MAX_EDICTS];
extern double cl_msgtime[MAX_EDICTS];
extern byte cl_forcelink[MAX_EDICTS];
extern vec3_t ent_colormod[256];
extern int fps_count;

View file

@ -81,7 +81,8 @@ libnq_server_a_SOURCES= \
host.c host_cmd.c sv_cl_phys.c sv_cvar.c sv_main.c \
sv_move.c sv_phys.c sv_pr_cmds.c sv_progs.c sv_user.c
client_libs= libnq_server.a libnq_client.a libnq_common.a
client_libs= libnq_server.a libnq_client.a libnq_common.a \
$(top_builddir)/libs/client/libQFclient.la
server_libs = libnq_server.a libnq_common.a
# Software-rendering targets

View file

@ -56,265 +56,6 @@ entity_state_t cl_entity_states[3][MAX_EDICTS];
double cl_msgtime[MAX_EDICTS];
byte cl_forcelink[MAX_EDICTS];
vec3_t ent_colormod[256] = {
{0, 0, 0},
{0, 0, 0.333333},
{0, 0, 0.666667},
{0, 0, 1},
{0, 0.142857, 0},
{0, 0.142857, 0.333333},
{0, 0.142857, 0.666667},
{0, 0.142857, 1},
{0, 0.285714, 0},
{0, 0.285714, 0.333333},
{0, 0.285714, 0.666667},
{0, 0.285714, 1},
{0, 0.428571, 0},
{0, 0.428571, 0.333333},
{0, 0.428571, 0.666667},
{0, 0.428571, 1},
{0, 0.571429, 0},
{0, 0.571429, 0.333333},
{0, 0.571429, 0.666667},
{0, 0.571429, 1},
{0, 0.714286, 0},
{0, 0.714286, 0.333333},
{0, 0.714286, 0.666667},
{0, 0.714286, 1},
{0, 0.857143, 0},
{0, 0.857143, 0.333333},
{0, 0.857143, 0.666667},
{0, 0.857143, 1},
{0, 1, 0},
{0, 1, 0.333333},
{0, 1, 0.666667},
{0, 1, 1},
{0.142857, 0, 0},
{0.142857, 0, 0.333333},
{0.142857, 0, 0.666667},
{0.142857, 0, 1},
{0.142857, 0.142857, 0},
{0.142857, 0.142857, 0.333333},
{0.142857, 0.142857, 0.666667},
{0.142857, 0.142857, 1},
{0.142857, 0.285714, 0},
{0.142857, 0.285714, 0.333333},
{0.142857, 0.285714, 0.666667},
{0.142857, 0.285714, 1},
{0.142857, 0.428571, 0},
{0.142857, 0.428571, 0.333333},
{0.142857, 0.428571, 0.666667},
{0.142857, 0.428571, 1},
{0.142857, 0.571429, 0},
{0.142857, 0.571429, 0.333333},
{0.142857, 0.571429, 0.666667},
{0.142857, 0.571429, 1},
{0.142857, 0.714286, 0},
{0.142857, 0.714286, 0.333333},
{0.142857, 0.714286, 0.666667},
{0.142857, 0.714286, 1},
{0.142857, 0.857143, 0},
{0.142857, 0.857143, 0.333333},
{0.142857, 0.857143, 0.666667},
{0.142857, 0.857143, 1},
{0.142857, 1, 0},
{0.142857, 1, 0.333333},
{0.142857, 1, 0.666667},
{0.142857, 1, 1},
{0.285714, 0, 0},
{0.285714, 0, 0.333333},
{0.285714, 0, 0.666667},
{0.285714, 0, 1},
{0.285714, 0.142857, 0},
{0.285714, 0.142857, 0.333333},
{0.285714, 0.142857, 0.666667},
{0.285714, 0.142857, 1},
{0.285714, 0.285714, 0},
{0.285714, 0.285714, 0.333333},
{0.285714, 0.285714, 0.666667},
{0.285714, 0.285714, 1},
{0.285714, 0.428571, 0},
{0.285714, 0.428571, 0.333333},
{0.285714, 0.428571, 0.666667},
{0.285714, 0.428571, 1},
{0.285714, 0.571429, 0},
{0.285714, 0.571429, 0.333333},
{0.285714, 0.571429, 0.666667},
{0.285714, 0.571429, 1},
{0.285714, 0.714286, 0},
{0.285714, 0.714286, 0.333333},
{0.285714, 0.714286, 0.666667},
{0.285714, 0.714286, 1},
{0.285714, 0.857143, 0},
{0.285714, 0.857143, 0.333333},
{0.285714, 0.857143, 0.666667},
{0.285714, 0.857143, 1},
{0.285714, 1, 0},
{0.285714, 1, 0.333333},
{0.285714, 1, 0.666667},
{0.285714, 1, 1},
{0.428571, 0, 0},
{0.428571, 0, 0.333333},
{0.428571, 0, 0.666667},
{0.428571, 0, 1},
{0.428571, 0.142857, 0},
{0.428571, 0.142857, 0.333333},
{0.428571, 0.142857, 0.666667},
{0.428571, 0.142857, 1},
{0.428571, 0.285714, 0},
{0.428571, 0.285714, 0.333333},
{0.428571, 0.285714, 0.666667},
{0.428571, 0.285714, 1},
{0.428571, 0.428571, 0},
{0.428571, 0.428571, 0.333333},
{0.428571, 0.428571, 0.666667},
{0.428571, 0.428571, 1},
{0.428571, 0.571429, 0},
{0.428571, 0.571429, 0.333333},
{0.428571, 0.571429, 0.666667},
{0.428571, 0.571429, 1},
{0.428571, 0.714286, 0},
{0.428571, 0.714286, 0.333333},
{0.428571, 0.714286, 0.666667},
{0.428571, 0.714286, 1},
{0.428571, 0.857143, 0},
{0.428571, 0.857143, 0.333333},
{0.428571, 0.857143, 0.666667},
{0.428571, 0.857143, 1},
{0.428571, 1, 0},
{0.428571, 1, 0.333333},
{0.428571, 1, 0.666667},
{0.428571, 1, 1},
{0.571429, 0, 0},
{0.571429, 0, 0.333333},
{0.571429, 0, 0.666667},
{0.571429, 0, 1},
{0.571429, 0.142857, 0},
{0.571429, 0.142857, 0.333333},
{0.571429, 0.142857, 0.666667},
{0.571429, 0.142857, 1},
{0.571429, 0.285714, 0},
{0.571429, 0.285714, 0.333333},
{0.571429, 0.285714, 0.666667},
{0.571429, 0.285714, 1},
{0.571429, 0.428571, 0},
{0.571429, 0.428571, 0.333333},
{0.571429, 0.428571, 0.666667},
{0.571429, 0.428571, 1},
{0.571429, 0.571429, 0},
{0.571429, 0.571429, 0.333333},
{0.571429, 0.571429, 0.666667},
{0.571429, 0.571429, 1},
{0.571429, 0.714286, 0},
{0.571429, 0.714286, 0.333333},
{0.571429, 0.714286, 0.666667},
{0.571429, 0.714286, 1},
{0.571429, 0.857143, 0},
{0.571429, 0.857143, 0.333333},
{0.571429, 0.857143, 0.666667},
{0.571429, 0.857143, 1},
{0.571429, 1, 0},
{0.571429, 1, 0.333333},
{0.571429, 1, 0.666667},
{0.571429, 1, 1},
{0.714286, 0, 0},
{0.714286, 0, 0.333333},
{0.714286, 0, 0.666667},
{0.714286, 0, 1},
{0.714286, 0.142857, 0},
{0.714286, 0.142857, 0.333333},
{0.714286, 0.142857, 0.666667},
{0.714286, 0.142857, 1},
{0.714286, 0.285714, 0},
{0.714286, 0.285714, 0.333333},
{0.714286, 0.285714, 0.666667},
{0.714286, 0.285714, 1},
{0.714286, 0.428571, 0},
{0.714286, 0.428571, 0.333333},
{0.714286, 0.428571, 0.666667},
{0.714286, 0.428571, 1},
{0.714286, 0.571429, 0},
{0.714286, 0.571429, 0.333333},
{0.714286, 0.571429, 0.666667},
{0.714286, 0.571429, 1},
{0.714286, 0.714286, 0},
{0.714286, 0.714286, 0.333333},
{0.714286, 0.714286, 0.666667},
{0.714286, 0.714286, 1},
{0.714286, 0.857143, 0},
{0.714286, 0.857143, 0.333333},
{0.714286, 0.857143, 0.666667},
{0.714286, 0.857143, 1},
{0.714286, 1, 0},
{0.714286, 1, 0.333333},
{0.714286, 1, 0.666667},
{0.714286, 1, 1},
{0.857143, 0, 0},
{0.857143, 0, 0.333333},
{0.857143, 0, 0.666667},
{0.857143, 0, 1},
{0.857143, 0.142857, 0},
{0.857143, 0.142857, 0.333333},
{0.857143, 0.142857, 0.666667},
{0.857143, 0.142857, 1},
{0.857143, 0.285714, 0},
{0.857143, 0.285714, 0.333333},
{0.857143, 0.285714, 0.666667},
{0.857143, 0.285714, 1},
{0.857143, 0.428571, 0},
{0.857143, 0.428571, 0.333333},
{0.857143, 0.428571, 0.666667},
{0.857143, 0.428571, 1},
{0.857143, 0.571429, 0},
{0.857143, 0.571429, 0.333333},
{0.857143, 0.571429, 0.666667},
{0.857143, 0.571429, 1},
{0.857143, 0.714286, 0},
{0.857143, 0.714286, 0.333333},
{0.857143, 0.714286, 0.666667},
{0.857143, 0.714286, 1},
{0.857143, 0.857143, 0},
{0.857143, 0.857143, 0.333333},
{0.857143, 0.857143, 0.666667},
{0.857143, 0.857143, 1},
{0.857143, 1, 0},
{0.857143, 1, 0.333333},
{0.857143, 1, 0.666667},
{0.857143, 1, 1},
{1, 0, 0},
{1, 0, 0.333333},
{1, 0, 0.666667},
{1, 0, 1},
{1, 0.142857, 0},
{1, 0.142857, 0.333333},
{1, 0.142857, 0.666667},
{1, 0.142857, 1},
{1, 0.285714, 0},
{1, 0.285714, 0.333333},
{1, 0.285714, 0.666667},
{1, 0.285714, 1},
{1, 0.428571, 0},
{1, 0.428571, 0.333333},
{1, 0.428571, 0.666667},
{1, 0.428571, 1},
{1, 0.571429, 0},
{1, 0.571429, 0.333333},
{1, 0.571429, 0.666667},
{1, 0.571429, 1},
{1, 0.714286, 0},
{1, 0.714286, 0.333333},
{1, 0.714286, 0.666667},
{1, 0.714286, 1},
{1, 0.857143, 0},
{1, 0.857143, 0.333333},
{1, 0.857143, 0.666667},
{1, 0.857143, 1},
{1, 1, 0},
{1, 1, 0.333333},
{1, 1, 0.666667},
{1, 1, 1}
};
void
CL_ClearEnts (void)
{

View file

@ -35,6 +35,8 @@
#include "QF/plugin/vid_render.h"
#include "client/entities.h"
#include "netchan.h"
#include "qw/bothdefs.h"
#include "qw/protocol.h"

View file

@ -106,7 +106,8 @@ qw_client_LIBS= \
$(top_builddir)/libs/util/libQFutil.la
client_LIBS= $(qw_client_LIBS)
client_libs= libqw_client.a libqw_common.a
client_libs= libqw_client.a libqw_common.a \
$(top_builddir)/libs/client/libQFclient.la
libqw_client_a_SOURCES= \
cl_cam.c cl_chase.c cl_chat.c cl_cmd.c cl_cvar.c cl_demo.c \

View file

@ -273,17 +273,7 @@ CL_LinkPacketEntities (void)
// set colormap
ent->skin = s1->skin;
// LordHavoc: cleaned up Endy's coding style, and fixed Endy's bugs
// Ender: Extend (Colormod) [QSG - Begin]
// N.B: All messy code below is the sole fault of LordHavoc and
// his futile attempts to save bandwidth. :)
if (s1->colormod == 255) {
ent->colormod[0] = ent->colormod[1] = ent->colormod[2] = 1.0;
} else {
ent->colormod[0] = (float) ((s1->colormod >> 5) & 7) * (1.0 / 7.0);
ent->colormod[1] = (float) ((s1->colormod >> 2) & 7) * (1.0 / 7.0);
ent->colormod[2] = (float) (s1->colormod & 3) * (1.0 / 3.0);
}
VectorCopy (ent_colormod[s1->colormod], ent->colormod);
ent->colormod[3] = s1->alpha / 255.0;
ent->scale = s1->scale / 16.0;
// Ender: Extend (Colormod) [QSG - End]