Skip to content

Commit e8f5ed1

Browse files
authored
November stuff
* - s_interrupt - allows sounds to be interrupted by the same sound or entity channel - new dynamic light calculation for vertex lighting, affecting vertex color (no projected dlight textures) - rgbGen material for allowing calculation for diffuse, specular, emmissive vertex colors by hex values - rgbMod shader command allowing new vertex color effects - removed deprecated R_ParseStageSimple, it never worked as intended * - r_slowness gone. Use llvmpipe, PCem, or a slow computer instead. * Spring cleaning of old deprecated/broken post-process GLSL experiments - r_anime broke in 2015 - r_tvMode - well, shaderglass exists now - r_motionblur - Bad technique, too much memory - t_pslettize - slow, relies on shader's lookup of a vector table - r_film - bad on well-lit maps - r_retroAA - this broke early too. also looked bad. would rather implement FSAA 4x * test * Cool console things - cl_consoleScale : makes the console more 640x480 sized on any higher res. Also affects notify messages, so you can read chat easier - cl_consoleColor also affects the line at the bottom. Also new default colors - If consoleShader can't load (which will happen with some mods), it will fallback to a flat-colored console. - Generic'd the red/blue team names. We will not be having missionpack clans. * SDL2: Clicking the red X now does something: you can leave!!! If it sucks.... hit da bricks!! real winners quit * s_xmp_startPattern - makes the tracker song play a different pattern (for use with sub-songs) * - fixed xmp playback as xmp explicitly requires a length of the module now. Fixes issue #96 - suppress the warning about non-22khz music, as mods are playing at the mixer's rate always, and this warning regards a much earlier (1999) unstable sound mixer. * - deprecating r_modelshader because the shader got stale, old, buggy, and amd hates it now - r_shadeMethod will be something else (and not shader-based) * - r_lightmapColorNorm : Make normalization of bright luxels an option, default is 1 (q3 behavior). - r_lightmapColorNorm 0 = no normalization, straight clamp, like Nightdive's vision of Quake2 - r_lightmapColorNorm 2 = experiment: normalize, but add some luminance on while maintaining the hue by normalizing again. This tries to restore more range on fully saturated colors - dropped SHADER_MAX_VERTEXES back to 1000 because raising it causes various unexpected issues, so dialing it down for now - raise MAX_IMAGE_ANIMATIONS to 16 because I've got a cool water shader using it and 8 is too choppy * - Crash fix for older (<=2001) mods by trimming the string shared with ui module, so no overflow for them - jettisoning old proposed mme particle system that was never ever hooked up properly. - other small warning cleanup * Some renderer refactor and cleanup - r_shadeMethod : 0/1 = q3 behavior, 2 = ue1-ish behavior, 3 = mix of 1 and 2, -1 = one uniform color, 150-666 = a lod range to change between the 3 - r_monolightmaps : refactor - goes to the light data instead of the calculations and images - removed r_greyscale because this is a data-modifying novelty that would complicate support for loading compressed texture formats. This is better off as a post-process shader - environment mapping refactor, rewrite and cleanup - removed a lot of deprecated rgbGens - removed r_texdump (it never worked) - remove a few leftover broken postprocess things * - Internal GLSL brightness shader, so gamma control can work without the glsl/brightness_fp.glsl file when r_ext_vertex_shader is 1 and r_alternateBrightness is 2. - r_skyTess - an attempt to make the complexity of skydomes an option so it could use less polygons. Has no effect on skyboxes * - More r_dynamiclight options: r_dynamiclight 2 = Slightly additive dynamic light projections, modeled after the PS2 port r_dynamiclight 3 = disables dynamic light projections but substitutes them with flashblends (ala GLQuake). If r_monolightmaps are enabled, the flashblends are orange. Viewblends are left out as the sudden duration of the dynamic lights when firing would be harmful. - Because of these changes, Riva 128 and Permedia 2 owners should be allowed to enjoy dynamic lights - option to use ReactOS's wspiapi.h header (file not included) - some makefile changes to allow an option for more Win 4 (95/NT4) compatiblity easier. Compiling with WINFOUR disables curl, uses SDL1, and has some additional workarounds to get it working on Windows 95 (winsock2 still required though) * - fixed a fog modulation regression stemming from a rgbMod case returning and not breaking. whoops - little warning cleanup wrt flashblend * Sun stuff - r_drawSun is now default 1 (was 0), because... - sunShader key - allows sky shaders to explicitly define a shader to use for the sun. In addition to that, a flare type number and a size multiplier number can follow for a little more customization. Partially inspired by RTCW's sunshader key, which only dealt with the image (and never finished their lens flare reflections) - Suns with a portal on screen won't cancel out the sun or its flare - If no sun flare is specified, don't draw a sun flare at all. should be one less unnecessary depth read - r_drawSun 2 is the old 'always show sun' behavior - sun shader now correctly orientated - drawing the sun uses a quadstamp - some 'low end video' alternative shader loading that current does not work. May revert - ifdefing out shademethod LOD for fixing later * - GetViewPosition builtin for cgame to allow stuff like text drawn over entities - MDR physics: allows MDR bones to move independently of model by a defined file on bone numbers, their type, etc. (like hair and flags), but broken (currently ifdef'd out) - ifdef'd out IQM support as that's broken, we aren't using it, and only other whole games are using it - Removed attempt at r_lowEndVideo * - Model fog fix - Suppressing redundant sound warnings to developer print - Preliminary DDS texture loading - Dropping renderergl1 and renderergl2 as they're unsupported, redundant, stale code with none of the new improvements, and we don't use modularized renderers. Still having these files in the tree implies we use them and that can bring confusion. * - Cgame entity glow renderer hookup - R_ShowImages: Adjust for overbright - a tribute to Rebecca Heineman and Jennell Jaquays * RB_UVcolor: casting as gcc 14 hates this line makefile - because gcc 14 is fussier, i'll do this wrt VMA for now.
1 parent 513c538 commit e8f5ed1

File tree

119 files changed

+1917
-64734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1917
-64734
lines changed

Makefile

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,14 @@ ifndef USE_LOCAL_HEADERS
228228
USE_LOCAL_HEADERS=1
229229
endif
230230

231+
ifndef WINFOUR
232+
WINFOUR=0
233+
endif
234+
235+
ifndef USE_REACTOS_WINSOCK_HEADER
236+
USE_REACTOS_WINSOCK_HEADER=0
237+
endif
238+
231239
ifndef USE_RENDERER_DLOPEN
232240
USE_RENDERER_DLOPEN=1
233241
endif
@@ -244,6 +252,15 @@ ifndef SDL_VERSION
244252
SDL_VERSION=2
245253
endif
246254

255+
ifeq ($(WINFOUR),1)
256+
BASE_CFLAGS += -DWINFOUR
257+
BASE_CFLAGS += -DUSE_REACTOS_WINSOCK_HEADER
258+
BASE_CFLAGS += -DUSE_INTERNAL_JPEG
259+
SDL_VERSION=1
260+
USE_CURL=0
261+
# CLIENTBIN=oa95
262+
endif
263+
247264
#############################################################################
248265

249266
BD=$(BUILD_DIR)/debug-$(PLATFORM)-$(ARCH)
@@ -1141,6 +1158,10 @@ ifeq ($(USE_LOCAL_HEADERS),1)
11411158
BASE_CFLAGS += -DUSE_LOCAL_HEADERS
11421159
endif
11431160

1161+
ifeq ($(USE_REACTOS_WINSOCK_HEADER),1)
1162+
BASE_CFLAGS += -DUSE_REACTOS_WINSOCK_HEADER
1163+
endif
1164+
11441165
ifeq ($(BUILD_STANDALONE),1)
11451166
BASE_CFLAGS += -DSTANDALONE
11461167
endif
@@ -1154,14 +1175,15 @@ endif
11541175
ifeq ($(NO_STRIP),1)
11551176
STRIP_FLAG =
11561177
else
1157-
STRIP_FLAG = -s
1178+
STRIP_FLAG = -s
11581179
endif
11591180

11601181
BASE_CFLAGS += -DPRODUCT_VERSION=\\\"$(VERSION)\\\"
11611182
BASE_CFLAGS += -Wformat=2 -Wno-format-zero-length -Wformat-security -Wno-format-nonliteral
11621183
BASE_CFLAGS += -Wstrict-aliasing=2 -Wmissing-format-attribute
11631184
BASE_CFLAGS += -Wdisabled-optimization
11641185
BASE_CFLAGS += -Werror-implicit-function-declaration
1186+
BASE_CFLAGS += -Wno-int-conversion
11651187

11661188
ifeq ($(V),1)
11671189
echo_cmd=@:
@@ -1267,7 +1289,7 @@ endef
12671289
#############################################################################
12681290

12691291
default: release
1270-
all: debug release
1292+
all: debug release
12711293

12721294
debug:
12731295
@$(MAKE) targets B=$(BD) CFLAGS="$(CFLAGS) $(BASE_CFLAGS) $(DEPEND_CFLAGS)" \
@@ -1757,6 +1779,7 @@ Q3ROAOBJ = \
17571779
$(B)/renderer_oa/tr_image_jpg.o \
17581780
$(B)/renderer_oa/tr_image_bmp.o \
17591781
$(B)/renderer_oa/tr_image_tga.o \
1782+
$(B)/renderer_oa/tr_image_dds.o \
17601783
$(B)/renderer_oa/tr_image_pcx.o \
17611784
$(B)/renderer_oa/tr_init.o \
17621785
$(B)/renderer_oa/tr_light.o \
@@ -1831,6 +1854,7 @@ Q3RSOFTOBJ = \
18311854
$(B)/renderer_oa/tr_image_jpg.o \
18321855
$(B)/renderer_oa/tr_image_bmp.o \
18331856
$(B)/renderer_oa/tr_image_tga.o \
1857+
$(B)/renderer_oa/tr_image_dds.o \
18341858
$(B)/renderer_oa/tr_image_pcx.o \
18351859
$(B)/renderer_oa/tr_init.o \
18361860
$(B)/renderer_oa/tr_light.o \
@@ -3020,8 +3044,8 @@ else
30203044
@$(MAKE) VERSION=$(VERSION) -C $(LOKISETUPDIR) V=$(V)
30213045
endif
30223046

3023-
dist:
3024-
git archive --format zip --output $(CLIENTBIN)-$(VERSION).zip HEAD
3047+
# dist:
3048+
# git archive --format zip --output $(CLIENTBIN)-$(VERSION).zip HEAD
30253049

30263050
#############################################################################
30273051
# DEPENDENCIES

Makefile.OpenArena

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ BUILD_CLIENT=1
1010
BUILD_SERVER=1
1111
BUILD_GAME_SO=0
1212
BUILD_GAME_QVM=0
13+
USE_GIT=0
1314
BUILD_BASEGAME=0
1415
BUILD_MISSIONPACK=0
1516
BASEGAME=baseoa
1617
# VERSION=1.36+0.8.8
17-
VERSION=3.0.0a
18+
VERSION=TEST
19+
1820

1921
# OpenArena doesn't use opus yet
2022
USE_CODEC_VORBIS=1
@@ -24,13 +26,17 @@ ifndef USE_CODEC_XMP
2426
USE_CODEC_XMP=1
2527
endif
2628

29+
USE_CURL=1
30+
2731
# FLTO Test
2832

2933
OPTIMIZE += -flto
3034

31-
# This doesn't work with OpenArena yet
35+
# Not supported
3236
BUILD_RENDERER_OPENGL2=0
3337
# You can disable the renderer libraries and build in the OA renderer by default
38+
# This is disabled because we have some client builtins used (trace etc) and
39+
# we are scaling back some modularization for security and support reasons.
3440
USE_RENDERER_DLOPEN=0
3541

3642
# Choose version 1 or 2
@@ -58,6 +64,12 @@ CLIENTBIN=openarena
5864
SERVERBIN=oa_ded
5965
COPYDIR=/usr/local/games/openarena
6066

67+
# Use the Winsock2 headers from ReactOS, which doesn't give errors in Win9x
68+
# USE_REACTOS_WINSOCK_HEADER=1
69+
70+
# Enable changes to allow Windows 95 and NT4 to work
71+
# (Overrides enabling libraries above that don't work well, and outputs to oa95.exe)
72+
WINFOUR=0
6173

6274
# DEBUG_CFLAGS=-ggdb -O0
6375

code/cgame/cg_public.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ typedef enum {
183183
CG_TESTPRINTINT,
184184
CG_TESTPRINTFLOAT,
185185
CG_ACOS,
186-
CG_R_LFX_PARTICLEEFFECT // leilei - particle effects
186+
CG_R_LFX_PARTICLEEFFECT, // leilei - particle effects
187+
CG_R_VIEWPOSITION // leilei - view position
187188
} cgameImport_t;
188189

189190

code/cgame/cg_syscalls.asm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,4 @@ equ testPrintInt -110
104104
equ testPrintFloat -111
105105
equ acos -112
106106
equ trap_R_LFX_ParticleEffect -113
107+
equ trap_R_GetViewPosition -114

code/client/cl_cgame.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,9 @@ intptr_t CL_CgameSystemCalls( intptr_t *args ) {
637637
case CG_R_LFX_PARTICLEEFFECT:
638638
re.LFX_ParticleEffect( args[1], VMA(2), VMA(3));
639639
return 0;
640-
640+
case CG_R_VIEWPOSITION:
641+
re.GetViewPosition( VMA(1) );
642+
return VMA(1);
641643
case CG_PC_ADD_GLOBAL_DEFINE:
642644
return botlib_export->PC_AddGlobalDefine( VMA(1) );
643645
case CG_PC_LOAD_SOURCE:

code/client/snd_dma.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,17 +267,17 @@ static sfx_t *S_FindName( const char *name ) {
267267
}
268268

269269
if (!name[0]) {
270-
Com_Printf( S_COLOR_YELLOW "WARNING: Sound name is empty\n" );
270+
Com_DPrintf( S_COLOR_YELLOW "WARNING: Sound name is empty\n" );
271271
return NULL;
272272
}
273273

274274
if (strlen(name) >= MAX_QPATH) {
275-
Com_Printf( S_COLOR_YELLOW "WARNING: Sound name is too long: %s\n", name );
275+
Com_DPrintf( S_COLOR_YELLOW "WARNING: Sound name is too long: %s\n", name );
276276
return NULL;
277277
}
278278

279279
if (name[0] == '*') {
280-
Com_Printf( S_COLOR_YELLOW "WARNING: Tried to load player sound directly: %s\n", name );
280+
Com_DPrintf( S_COLOR_YELLOW "WARNING: Tried to load player sound directly: %s\n", name );
281281
return NULL;
282282
}
283283

@@ -371,7 +371,7 @@ sfxHandle_t S_Base_RegisterSound( const char *name, qboolean compressed ) {
371371

372372
if ( sfx->soundData ) {
373373
if ( sfx->defaultSound ) {
374-
Com_Printf( S_COLOR_YELLOW "WARNING: could not find %s - using default\n", sfx->soundName );
374+
Com_DPrintf( S_COLOR_YELLOW "WARNING: could not find %s - using default\n", sfx->soundName );
375375
return 0;
376376
}
377377
return sfx - s_knownSfx;
@@ -383,7 +383,7 @@ sfxHandle_t S_Base_RegisterSound( const char *name, qboolean compressed ) {
383383
S_memoryLoad(sfx);
384384

385385
if ( sfx->defaultSound ) {
386-
Com_Printf( S_COLOR_YELLOW "WARNING: could not find %s - using default\n", sfx->soundName );
386+
Com_DPrintf( S_COLOR_YELLOW "WARNING: could not find %s - using default\n", sfx->soundName );
387387
return 0;
388388
}
389389

@@ -1428,7 +1428,7 @@ static void S_OpenBackgroundStream( const char *filename ) {
14281428
// Open stream
14291429
s_backgroundStream = S_CodecOpenStream(filename);
14301430
if(!s_backgroundStream) {
1431-
Com_Printf( S_COLOR_YELLOW "WARNING: couldn't open music file %s\n", filename );
1431+
Com_DPrintf( S_COLOR_YELLOW "WARNING: couldn't open music file %s\n", filename );
14321432
return;
14331433
}
14341434

code/qcommon/net_ip.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2727
# include <winsock2.h>
2828
# include <ws2tcpip.h>
2929
# if WINVER < 0x501
30+
3031
# ifdef __MINGW32__
3132
// wspiapi.h isn't available on MinGW, so if it's
3233
// present it's because the end user has added it
@@ -37,6 +38,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
3738
# endif
3839
# else
3940
# include <ws2spi.h>
41+
# endif
42+
43+
// leilei - addition to fix win9x
44+
# ifdef USE_REACTOS_WINSOCK_HEADER
45+
# include "../reactos/wspiapi.h"
4046
# endif
4147

4248
typedef int socklen_t;

code/qcommon/qcommon.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
3434

3535
//#define PRE_RELEASE_DEMO
3636

37+
// leilei - broken things
38+
39+
//#define BROKEN_MDRPHYS // MDR physics are not serialized!
40+
//#define BROKEN_IQM // crashes (and we don't plan to use the format anyway. IQM users are other games)
41+
3742
//============================================================================
3843

3944
//

code/qcommon/qfiles.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,22 @@ typedef struct {
300300
int ofsEnd; // end of file
301301
} mdrHeader_t;
302302

303+
#ifdef BROKEN_MDRPHYS
304+
// leilei - bone deformery
305+
// MDR loading also checks for a text file that can set these properties so the "MDP" code can get to work with them.
306+
// and working from the cliententity.
307+
typedef struct {
308+
309+
vec3_t ofs[MDR_MAX_BONES];
310+
vec3_t wgt[MDR_MAX_BONES];
311+
float jiggle[MDR_MAX_BONES];
312+
313+
} mdrClBoneDeformSet_t;
314+
315+
typedef struct {
316+
mdrClBoneDeformSet_t def[4]; // up to 4 can alter bones
317+
} mdrDeformity_t;
318+
#endif
303319

304320
/*
305321
==============================================================================

code/reactos/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Place ReactOS' wspiapi.h file here.
2+

0 commit comments

Comments
 (0)