diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cl_fx.c | 2 | ||||
-rw-r--r-- | src/cl_scrn.c | 2 | ||||
-rw-r--r-- | src/cl_tent.c | 10 | ||||
-rw-r--r-- | src/gl_tess.c | 2 | ||||
-rw-r--r-- | src/ui_confirm.c | 10 | ||||
-rw-r--r-- | src/ui_demos.c | 2 | ||||
-rw-r--r-- | src/ui_multiplayer.c | 2 | ||||
-rw-r--r-- | src/ui_playerconfig.c | 2 | ||||
-rw-r--r-- | src/ui_script.c | 2 |
9 files changed, 17 insertions, 17 deletions
diff --git a/src/cl_fx.c b/src/cl_fx.c index 429718b..2265474 100644 --- a/src/cl_fx.c +++ b/src/cl_fx.c @@ -1874,7 +1874,7 @@ void CL_AddParticles (void) part->origin[2] = p->org[2] + p->vel[2]*time + p->accel[2]*time2; if( color == 255 ) { - *( uint32_t * )part->rgb = *( uint32_t * )p->rgb; + FastColorCopy( p->rgb, part->rgb ); } part->color = color; diff --git a/src/cl_scrn.c b/src/cl_scrn.c index a14909c..c5eb2b0 100644 --- a/src/cl_scrn.c +++ b/src/cl_scrn.c @@ -664,7 +664,7 @@ static void SCR_Draw_f( void ) { obj->x = x; obj->y = y; obj->flags = flags; - *( uint32_t * )obj->color = *( uint32_t * )color; + FastColorCopy( color, obj->color ); macro = Cmd_FindMacro( s ); if( macro ) { diff --git a/src/cl_tent.c b/src/cl_tent.c index 859c04e..ad9dfe4 100644 --- a/src/cl_tent.c +++ b/src/cl_tent.c @@ -422,7 +422,7 @@ static void CL_AddLasers( void ) { ent.skinnum = *(int *)color; }*/ } /*else*/ { - ent.skinnum = *(int *)l->color; + ent.skinnum = *(uint32_t *)l->color; } ent.flags = RF_TRANSLUCENT|RF_BEAM; @@ -1030,14 +1030,14 @@ static cvar_t *cl_railspiral_radius; static void cl_railcore_color_changed( cvar_t *self ) { if( !SCR_ParseColor( self->string, railcore_color ) ) { Com_WPrintf( "Invalid value '%s' for '%s'\n", self->string, self->name ); - *( uint32_t *)railcore_color = *( uint32_t * )colorRed; + FastColorCopy( colorRed, railcore_color ); } } static void cl_railspiral_color_changed( cvar_t *self ) { if( !SCR_ParseColor( self->string, railspiral_color ) ) { Com_WPrintf( "Invalid value '%s' for '%s'\n", self->string, self->name ); - *( uint32_t *)railspiral_color = *( uint32_t * )colorBlue; + FastColorCopy( colorBlue, railspiral_color ); } } @@ -1054,7 +1054,7 @@ static void CL_RailCore( void ) { l->lifeTime = 1000 * cl_railtrail_time->value; l->indexed = qfalse; l->width = cl_railcore_width->value; - *( uint32_t * )l->color = *( uint32_t * )railcore_color; + FastColorCopy( railcore_color, l->color ); } static void CL_RailSpiral( void ) { @@ -1093,7 +1093,7 @@ static void CL_RailSpiral( void ) { p->alpha = railspiral_color[3] / 255.0f; p->alphavel = -1.0 / ( cl_railtrail_time->value + frand() * 0.2 ); p->color = 0xff; - *( uint32_t * )p->rgb = *( uint32_t * )railspiral_color; + FastColorCopy( railspiral_color, p->rgb ); for( j=0 ; j<3 ; j++ ) { p->org[j] = move[j] + dir[j] * cl_railspiral_radius->value; p->vel[j] = dir[j] * 6; diff --git a/src/gl_tess.c b/src/gl_tess.c index 6b80985..bc6ba38 100644 --- a/src/gl_tess.c +++ b/src/gl_tess.c @@ -109,7 +109,7 @@ void GL_DrawParticles( void ) { } if( p->color == 255 ) { - *( uint32_t * )color = *( uint32_t * )p->rgb; + FastColorCopy( p->rgb, color ); } else { *( uint32_t * )color = d_8to24table[p->color & 255]; } diff --git a/src/ui_confirm.c b/src/ui_confirm.c index 4a6b849..59ec978 100644 --- a/src/ui_confirm.c +++ b/src/ui_confirm.c @@ -59,7 +59,7 @@ void M_Menu_Confirm( const char *text, confirmAction_t action ) { m_confirm.menu.keydown = ConfirmKeydown; m_confirm.menu.image = uis.backgroundHandle; - *( uint32_t * )m_confirm.menu.color = *( uint32_t * )colorBlack; + FastColorCopy( colorBlack, m_confirm.menu.color ); m_confirm.text.generic.type = MTYPE_STATIC; m_confirm.text.generic.name = ( char * )text; @@ -103,10 +103,10 @@ void M_Menu_Error( error_type_t type, const char *text ) { case ERR_SILENT: return; case ERR_DROP: - *( uint32_t * )color = *( uint32_t * )colorRed; + FastColorCopy( colorRed, color ); break; default: - *( uint32_t * )color = *( uint32_t * )colorYellow; + FastColorCopy( colorYellow, color ); break; } @@ -114,13 +114,13 @@ void M_Menu_Error( error_type_t type, const char *text ) { m_error.menu.keydown = ErrorKeydown; m_error.menu.image = uis.backgroundHandle; - *( uint32_t * )m_error.menu.color = *( uint32_t * )colorBlack; + FastColorCopy( colorBlack, m_error.menu.color ); m_error.text.generic.type = MTYPE_STATIC; m_error.text.generic.flags = QMF_CUSTOM_COLOR; m_error.text.generic.name = ( char * )text; m_error.text.generic.uiFlags = UI_CENTER|UI_MULTILINE; - *( uint32_t * )m_error.text.generic.color = *( uint32_t * )color; + FastColorCopy( color, m_error.text.generic.color ); Menu_AddItem( &m_error.menu, ( void * )&m_error.text ); diff --git a/src/ui_demos.c b/src/ui_demos.c index 9e15a01..a79b742 100644 --- a/src/ui_demos.c +++ b/src/ui_demos.c @@ -431,7 +431,7 @@ void M_Menu_Demos( void ) { m_demos.menu.keydown = Keydown; m_demos.menu.free = Free; m_demos.menu.image = uis.backgroundHandle; - *( uint32_t * )m_demos.menu.color = *( uint32_t * )uis.color.background; + FastColorCopy( uis.color.background, m_demos.menu.color ); m_demos.list.generic.type = MTYPE_LIST; m_demos.list.generic.flags = QMF_HASFOCUS; diff --git a/src/ui_multiplayer.c b/src/ui_multiplayer.c index 15d1786..4404587 100644 --- a/src/ui_multiplayer.c +++ b/src/ui_multiplayer.c @@ -386,7 +386,7 @@ void M_Menu_Servers( void ) { m_join.menu.keydown = Keydown; m_join.menu.free = Free; m_join.menu.image = uis.backgroundHandle; - *( uint32_t * )m_join.menu.color = *( uint32_t * )uis.color.background; + FastColorCopy( uis.color.background, m_join.menu.color ); // // server list diff --git a/src/ui_playerconfig.c b/src/ui_playerconfig.c index 259f050..edf1419 100644 --- a/src/ui_playerconfig.c +++ b/src/ui_playerconfig.c @@ -254,7 +254,7 @@ void M_Menu_PlayerConfig( void ) { m_player.menu.draw = Draw; m_player.menu.free = Free; m_player.menu.image = uis.backgroundHandle; - *( uint32_t * )m_player.menu.color = *( uint32_t * )uis.color.background; + FastColorCopy( uis.color.background, m_player.menu.color ); m_player.entities[0].flags = RF_FULLBRIGHT; VectorCopy( angles, m_player.entities[0].angles ); diff --git a/src/ui_script.c b/src/ui_script.c index 70035b3..6b9a975 100644 --- a/src/ui_script.c +++ b/src/ui_script.c @@ -375,7 +375,7 @@ static qboolean Parse_File( const char *path, int depth ) { menu->pop = Menu_Pop; menu->free = Menu_Free; menu->image = uis.backgroundHandle; - *( uint32_t * )menu->color = *( uint32_t * )uis.color.background; + FastColorCopy( uis.color.background, menu->color ); } else if( !strcmp( cmd, "include" ) ) { char *s = Cmd_Argv( 1 ); if( !*s ) { |