Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/libvisual0.2-plugins Disambiguate sqrt and pow c...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1bedcf74cea9
branches:  trunk
changeset: 432857:1bedcf74cea9
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue May 26 11:25:34 2020 +0000

description:
Disambiguate sqrt and pow calls.

diffstat:

 audio/libvisual0.2-plugins/distinfo                                                       |   5 +-
 audio/libvisual0.2-plugins/patches/patch-plugins_actor_G-Force_Common_UI_LineXX.cpp       |  29 ++++++++++
 audio/libvisual0.2-plugins/patches/patch-plugins_actor_G-Force_GForceCommon_G-Force.cpp   |  22 +++++++
 audio/libvisual0.2-plugins/patches/patch-plugins_actor_G-Force_GForceCommon_WaveShape.cpp |  22 +++++++
 4 files changed, 77 insertions(+), 1 deletions(-)

diffs (102 lines):

diff -r 91ab71e4808c -r 1bedcf74cea9 audio/libvisual0.2-plugins/distinfo
--- a/audio/libvisual0.2-plugins/distinfo       Tue May 26 11:25:02 2020 +0000
+++ b/audio/libvisual0.2-plugins/distinfo       Tue May 26 11:25:34 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2015/11/03 01:12:39 agc Exp $
+$NetBSD: distinfo,v 1.5 2020/05/26 11:25:34 joerg Exp $
 
 SHA1 (libvisual-plugins-0.2.0.tar.gz) = bc001f66b1c81b747bc06e3e09aaf71882c47370
 RMD160 (libvisual-plugins-0.2.0.tar.gz) = 3f4835843e3719e6342a3b8f1478f89388423b37
@@ -7,4 +7,7 @@
 SHA1 (patch-aa) = 68ffdb6261aafa219df0e5c4d313fc7f865ae734
 SHA1 (patch-ab) = 31a380ed59ed9eed1e5516c44fec54c1e7dcf25c
 SHA1 (patch-ac) = 2bb5757b041cd3161a77fa71f14628c9013c1298
+SHA1 (patch-plugins_actor_G-Force_Common_UI_LineXX.cpp) = 97cd58ba4320cb14e1890a86a829726ff088b128
+SHA1 (patch-plugins_actor_G-Force_GForceCommon_G-Force.cpp) = 514a9f2c0ef7785d4795554436cb2368990b9608
+SHA1 (patch-plugins_actor_G-Force_GForceCommon_WaveShape.cpp) = 5658627e165bc7dbf9469ac0c26f70c69a85f128
 SHA1 (patch-plugins_morph_flash_morph__flash_c) = fc1cb75a68d98327d072182447aa8183940d5f61
diff -r 91ab71e4808c -r 1bedcf74cea9 audio/libvisual0.2-plugins/patches/patch-plugins_actor_G-Force_Common_UI_LineXX.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libvisual0.2-plugins/patches/patch-plugins_actor_G-Force_Common_UI_LineXX.cpp       Tue May 26 11:25:34 2020 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-plugins_actor_G-Force_Common_UI_LineXX.cpp,v 1.1 2020/05/26 11:25:34 joerg Exp $
+
+--- plugins/actor/G-Force/Common/UI/LineXX.cpp.orig    2020-05-26 00:26:16.970444766 +0000
++++ plugins/actor/G-Force/Common/UI/LineXX.cpp
+@@ -74,13 +74,13 @@
+ 
+               
+       #if CLR_INTERP && P_SZ != 1
+-      long len = sqrt( dx * dx + dy * dy ) + 1;
++      long len = sqrt( double(dx * dx + dy * dy) ) + 1;
+       dR /= len;
+       dG /= len;
+       dB /= len;
+       color = __Clr( R, G, B );
+       #elif CLR_INTERP && P_SZ == 1
+-      long len = sqrt( dx * dx + dy * dy ) + 1;
++      long len = sqrt( double(dx * dx + dy * dy) ) + 1;
+       dR /= len;
+       color = __Clr( R, G, B );
+       #endif
+@@ -154,7 +154,7 @@
+               
+                       for ( j = 0; j < tw; j++ ) {
+                               long tmp = j - halfW;
+-                              c_x = halfW - ( ( long ) sqrt( halfW * halfW - tmp * tmp ) );
++                              c_x = halfW - ( ( long ) sqrt(double( halfW * halfW - tmp * tmp )) );
+                               center = basePtr + (j-halfW) * mBytesPerRow;
+                               for ( int k = c_x; k < tw - c_x; k++ ){
+                                       ((PIXTYPE*) center)[k-halfW] = color;
diff -r 91ab71e4808c -r 1bedcf74cea9 audio/libvisual0.2-plugins/patches/patch-plugins_actor_G-Force_GForceCommon_G-Force.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libvisual0.2-plugins/patches/patch-plugins_actor_G-Force_GForceCommon_G-Force.cpp   Tue May 26 11:25:34 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-plugins_actor_G-Force_GForceCommon_G-Force.cpp,v 1.1 2020/05/26 11:25:34 joerg Exp $
+
+--- plugins/actor/G-Force/GForceCommon/G-Force.cpp.orig        2005-01-19 16:23:57.000000000 +0000
++++ plugins/actor/G-Force/GForceCommon/G-Force.cpp
+@@ -840,7 +840,7 @@ void GForce::ManageColorChanges() {
+               // If in a ColorMap transition/morph then we must set mColorTrans, for it's linked into mGF_Palette
+               if ( mColorTransTime > 0 ) {
+                       float t = (float) ( mColorTransEnd - mT_MS ) / ( (float) mColorTransTime );
+-                      mColorTrans = pow( t, TRANSITION_ALPHA );
++                      mColorTrans = pow( t, float(TRANSITION_ALPHA) );
+               } 
+               
+               // Evaluate the palette at this time    
+@@ -1215,7 +1215,7 @@ void GForce::RecordSample( long inCurTim
+               // Is the text is about to expire? if not, continue drawing.
+               if ( t <= 1 ) {
+               
+-                      intensity = 255.5 * pow( t, 1.5 );  
++                      intensity = 255.5 * pow( t, 1.5f );  
+                       mCurPort -> SetTextColor( mPalette[ intensity ] );
+                       mCurPort -> SetTrackTextFont();
+                       mCurPort -> DrawText( mTrackTextPos.h, mTrackTextPos.v, mTrackText ); }
diff -r 91ab71e4808c -r 1bedcf74cea9 audio/libvisual0.2-plugins/patches/patch-plugins_actor_G-Force_GForceCommon_WaveShape.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libvisual0.2-plugins/patches/patch-plugins_actor_G-Force_GForceCommon_WaveShape.cpp Tue May 26 11:25:34 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-plugins_actor_G-Force_GForceCommon_WaveShape.cpp,v 1.1 2020/05/26 11:25:34 joerg Exp $
+
+--- plugins/actor/G-Force/GForceCommon/WaveShape.cpp.orig      2005-01-17 18:45:25.000000000 +0000
++++ plugins/actor/G-Force/GForceCommon/WaveShape.cpp
+@@ -204,7 +204,7 @@ void WaveShape::Draw( long inNumSteps, P
+       else {
+               w2Waves = inWave2 -> mNumWaves;
+               dialate = inMorphPct;
+-              mShapeTrans = pow( dialate, SHAPE_MORPH_ALPHA );
++              mShapeTrans = pow( dialate, float(SHAPE_MORPH_ALPHA) );
+               SetupFrame( inWave2, mShapeTrans );
+               
+               if ( mNumWaves > w2Waves ) {
+@@ -214,7 +214,7 @@ void WaveShape::Draw( long inNumSteps, P
+                       maxWaves = w2Waves;
+               
+               // Set the wave scale factor to the wave leaving/arriving
+-              dialate = 20.0 * pow( dialate, 4.0 ) + 1.0;
++              dialate = 20.0 * pow( dialate, 4.0f ) + 1.0;
+ 
+               // Calc the x and y scale factors for wave 2
+               xscaleW2 = xoff;



Home | Main Index | Thread Index | Old Index