* swap shift+pgup/pgdn to match SI behavior (up = +value, down = -value) & to improve ergonomics
* invert BP fake angle to synchronise shift+pgup/pgdn behavior with rotation by SI
This commit is contained in:
parent
2adf7f8a4f
commit
9c415afaae
|
|
@ -707,7 +707,7 @@ void TexMatToFakeTexCoords( const brushprimit_texdef_t& bp_texdef, texdef_t& tex
|
||||||
}
|
}
|
||||||
#if 1
|
#if 1
|
||||||
texdef.rotate = static_cast<float>( radians_to_degrees( acos( vector2_normalised( Vector2( bp_texdef.coords[0][0], bp_texdef.coords[0][1] ) )[0] ) ) );
|
texdef.rotate = static_cast<float>( radians_to_degrees( acos( vector2_normalised( Vector2( bp_texdef.coords[0][0], bp_texdef.coords[0][1] ) )[0] ) ) );
|
||||||
if( bp_texdef.coords[0][1] < 0 ){
|
if( bp_texdef.coords[0][1] > 0 ){
|
||||||
texdef.rotate = -texdef.rotate;
|
texdef.rotate = -texdef.rotate;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
@ -1139,8 +1139,8 @@ void BPTexdef_Rotate( brushprimit_texdef_t& bp_td, float angle ){
|
||||||
const float y = bp_td.coords[0][1];
|
const float y = bp_td.coords[0][1];
|
||||||
const float x1 = bp_td.coords[1][0];
|
const float x1 = bp_td.coords[1][0];
|
||||||
const float y1 = bp_td.coords[1][1];
|
const float y1 = bp_td.coords[1][1];
|
||||||
const float s = sin( degrees_to_radians( angle ) );
|
const float s = sin( degrees_to_radians( -angle ) );
|
||||||
const float c = cos( degrees_to_radians( angle ) );
|
const float c = cos( degrees_to_radians( -angle ) );
|
||||||
bp_td.coords[0][0] = x * c - y * s ;
|
bp_td.coords[0][0] = x * c - y * s ;
|
||||||
bp_td.coords[0][1] = x * s + y * c;
|
bp_td.coords[0][1] = x * s + y * c;
|
||||||
bp_td.coords[1][0] = x1 * c - y1 * s;
|
bp_td.coords[1][0] = x1 * c - y1 * s;
|
||||||
|
|
@ -1993,7 +1993,6 @@ void Texdef_Convert( TexdefTypeId in, TexdefTypeId out, const Plane3& plane, Tex
|
||||||
projection.m_brushprimit_texdef.removeScale( width, height );
|
projection.m_brushprimit_texdef.removeScale( width, height );
|
||||||
TexMatToFakeTexCoords( projection.m_brushprimit_texdef, projection.m_texdef );
|
TexMatToFakeTexCoords( projection.m_brushprimit_texdef, projection.m_texdef );
|
||||||
projection.m_texdef.shift[0] *= -1.f;
|
projection.m_texdef.shift[0] *= -1.f;
|
||||||
projection.m_texdef.rotate *= -1.f;
|
|
||||||
if( projection.m_brushprimit_texdef.coords[0][0] < 0 )
|
if( projection.m_brushprimit_texdef.coords[0][0] < 0 )
|
||||||
projection.m_basis_s *= -1.f;
|
projection.m_basis_s *= -1.f;
|
||||||
if( projection.m_brushprimit_texdef.coords[1][1] < 0 )
|
if( projection.m_brushprimit_texdef.coords[1][1] < 0 )
|
||||||
|
|
|
||||||
|
|
@ -1566,13 +1566,14 @@ void Texdef_Rotate( float angle ){
|
||||||
UndoableCommand undo( command.c_str() );
|
UndoableCommand undo( command.c_str() );
|
||||||
Select_RotateTexture( angle );
|
Select_RotateTexture( angle );
|
||||||
}
|
}
|
||||||
|
// these are actually {Anti,}Clockwise in BP mode only (AP/220 - 50/50)
|
||||||
|
// TODO is possible to make really {Anti,}Clockwise
|
||||||
void Texdef_RotateClockwise(){
|
void Texdef_RotateClockwise(){
|
||||||
Texdef_Rotate( static_cast<float>( fabs( g_si_globals.rotate ) ) );
|
Texdef_Rotate( static_cast<float>( -fabs( g_si_globals.rotate ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Texdef_RotateAntiClockwise(){
|
void Texdef_RotateAntiClockwise(){
|
||||||
Texdef_Rotate( static_cast<float>( -fabs( g_si_globals.rotate ) ) );
|
Texdef_Rotate( static_cast<float>( fabs( g_si_globals.rotate ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Texdef_Scale( float x, float y ){
|
void Texdef_Scale( float x, float y ){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user