|
@@ -182,16 +182,29 @@ void Kam3D::removeStyle( __int64 style )
|
|
// return: true, wenn sich das Bild neu gezeichnet werden muss, false sonnst.
|
|
// return: true, wenn sich das Bild neu gezeichnet werden muss, false sonnst.
|
|
bool Kam3D::tick( double tv )
|
|
bool Kam3D::tick( double tv )
|
|
{
|
|
{
|
|
|
|
+ bool ret = 0;
|
|
if( hatStyle( Style::Rotatable ) )
|
|
if( hatStyle( Style::Rotatable ) )
|
|
{
|
|
{
|
|
if( getTastenStand( T_Oben ) )
|
|
if( getTastenStand( T_Oben ) )
|
|
|
|
+ {
|
|
rotX -= (float)tv;
|
|
rotX -= (float)tv;
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
if( getTastenStand( T_Unten ) )
|
|
if( getTastenStand( T_Unten ) )
|
|
|
|
+ {
|
|
rotX += (float)tv;
|
|
rotX += (float)tv;
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
if( getTastenStand( T_Links ) )
|
|
if( getTastenStand( T_Links ) )
|
|
|
|
+ {
|
|
rotY -= (float)tv;
|
|
rotY -= (float)tv;
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
if( getTastenStand( T_Rechts ) )
|
|
if( getTastenStand( T_Rechts ) )
|
|
|
|
+ {
|
|
rotY += (float)tv;
|
|
rotY += (float)tv;
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if( hatStyle( Style::Movable ) )
|
|
if( hatStyle( Style::Movable ) )
|
|
{
|
|
{
|
|
@@ -206,22 +219,40 @@ bool Kam3D::tick( double tv )
|
|
n3 = tmp * n3;
|
|
n3 = tmp * n3;
|
|
n3 = n3 * (float)tv * 60;
|
|
n3 = n3 * (float)tv * 60;
|
|
if( getTastenStand( 'w' ) )
|
|
if( getTastenStand( 'w' ) )
|
|
|
|
+ {
|
|
pos += n;
|
|
pos += n;
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
if( getTastenStand( 's' ) )
|
|
if( getTastenStand( 's' ) )
|
|
|
|
+ {
|
|
pos -= n;
|
|
pos -= n;
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
if( getTastenStand( 'd' ) )
|
|
if( getTastenStand( 'd' ) )
|
|
|
|
+ {
|
|
pos += n2;
|
|
pos += n2;
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
if( getTastenStand( 'a' ) )
|
|
if( getTastenStand( 'a' ) )
|
|
|
|
+ {
|
|
pos -= n2;
|
|
pos -= n2;
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
if( getTastenStand( ' ' ) )
|
|
if( getTastenStand( ' ' ) )
|
|
|
|
+ {
|
|
pos += n3;
|
|
pos += n3;
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
if( getTastenStand( T_Shift ) )
|
|
if( getTastenStand( T_Shift ) )
|
|
|
|
+ {
|
|
pos -= n3;
|
|
pos -= n3;
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
updateMatrix();
|
|
updateMatrix();
|
|
if( welt && hatStyle( Style::Tick ) )
|
|
if( welt && hatStyle( Style::Tick ) )
|
|
- return welt->tick( tv );
|
|
|
|
- return 0;
|
|
|
|
|
|
+ return welt->tick( tv ) || ret;
|
|
|
|
+ return ret;
|
|
}
|
|
}
|
|
|
|
|
|
// Verarbeitet ein Mausereignis
|
|
// Verarbeitet ein Mausereignis
|