summaryrefslogtreecommitdiff
path: root/source/cl_fx.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2008-05-05 21:18:52 +0000
committerAndrey Nazarov <skuller@skuller.net>2008-05-05 21:18:52 +0000
commit0bd55fbf794d11385bcc64b01b81e8e478295bad (patch)
treeab548c3ad37fc13c555a5cca9da4348f3e35d84c /source/cl_fx.c
parent49e6170b49fbb933eddec6d0e3f946320c68832f (diff)
Brought SDL window resizing policy in compliance to ICCCM.
Renamed `vid_placement' cvar to `vid_geometry'. Load *.pkz files by default. Do not allow backed-up quake paths at all. Apply `--enable-dsound' and `--enable-dinput' options to Unix too. Replaced `s_driver' and `in_driver' cvars with `s_direct' and `in_direct'. Renamed `s_initsound' cva to `s_enable'. Improved SDL input grabs handling in windowed mode. Allow `cl_noskins' to be dynamically changed. Run client at 10 fps if minimuzed, at 60 fps if not active (client is disconnected or in background). Fixed Sys_ExecDefault. Use absolute mouse positioning for UI. Hide custom UI cursor in windowed mode.
Diffstat (limited to 'source/cl_fx.c')
-rw-r--r--source/cl_fx.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/source/cl_fx.c b/source/cl_fx.c
index 5336ba2..7994055 100644
--- a/source/cl_fx.c
+++ b/source/cl_fx.c
@@ -80,24 +80,15 @@ void CL_RunLightStyles( void ) {
}
-void CL_SetLightstyle( int index ) {
- char *s;
- size_t length;
+void CL_SetLightstyle( int index, const char *string, size_t length ) {
int i;
clightstyle_t *dest;
- s = cl.configstrings[index + CS_LIGHTS];
-
- length = strlen( s );
- if( length >= MAX_QPATH )
- Com_Error( ERR_DROP, "CL_SetLightstyle: bad length" );
-
dest = &cl_lightstyles[index];
dest->length = length;
- dest->map[0] = 1.0f;
for( i = 0; i < length; i++ ) {
- dest->map[i] = ( float )( s[i] - 'a' ) / ( float )( 'm' - 'a' );
+ dest->map[i] = ( float )( string[i] - 'a' ) / ( float )( 'm' - 'a' );
}
if( dest->entry.prev ) {
@@ -109,8 +100,7 @@ void CL_SetLightstyle( int index ) {
return;
}
- dest->value[0] = dest->value[1] = dest->value[2] = dest->value[3] = dest->map[0];
-
+ dest->value[0] = dest->value[1] = dest->value[2] = dest->value[3] = dest->map[0] = 1;
}
/*