Home
last modified time | relevance | path

Searched refs:Clamp (Results 1 – 25 of 29) sorted by relevance

12

/NW4C-2.0.3/sources/libraries/gfx/
Dgfx_FrameBuffer.cpp41 u8 red = static_cast<u8>( 0.5f + nw::ut::Clamp(color.r, 0.0f, 1.0f) * 255.f ); in ColorToRGBA8()
42 u8 green = static_cast<u8>( 0.5f + nw::ut::Clamp(color.g, 0.0f, 1.0f) * 255.f ); in ColorToRGBA8()
43 u8 blue = static_cast<u8>( 0.5f + nw::ut::Clamp(color.b, 0.0f, 1.0f) * 255.f ); in ColorToRGBA8()
44 u8 alpha = static_cast<u8>( 0.5f + nw::ut::Clamp(color.a, 0.0f, 1.0f) * 255.f ); in ColorToRGBA8()
60 u8 red = static_cast<u8>( 0.5f + nw::ut::Clamp(color.r, 0.0f, 1.0f) * 31.f ); in ColorToRGB5A1()
61 u8 green = static_cast<u8>( 0.5f + nw::ut::Clamp(color.g, 0.0f, 1.0f) * 31.f ); in ColorToRGB5A1()
62 u8 blue = static_cast<u8>( 0.5f + nw::ut::Clamp(color.b, 0.0f, 1.0f) * 31.f ); in ColorToRGB5A1()
63 u8 alpha = static_cast<u8>( 0.5f + nw::ut::Clamp(color.a, 0.0f, 1.0f) * 1.f ); in ColorToRGB5A1()
79 u8 red = static_cast<u8>( 0.5f + nw::ut::Clamp(color.r, 0.0f, 1.0f) * 31.f ); in ColorToRGB565()
80 u8 green = static_cast<u8>( 0.5f + nw::ut::Clamp(color.g, 0.0f, 1.0f) * 63.f ); in ColorToRGB565()
[all …]
/NW4C-2.0.3/sources/libraries/snd/
Dsnd_BiquadFilterPresets.cpp616 coefIndex = ut::Clamp( coefIndex, 0, COEFFICIENTS_TABLE_SIZE-1 ); in GetCoefficients()
641 coefIndex = ut::Clamp( coefIndex, 0, COEFFICIENTS_TABLE_SIZE-1 ); in GetCoefficients()
669 coefIndex = ut::Clamp( coefIndex, 0, COEFFICIENTS_TABLE_SIZE-1 ); in GetCoefficients()
697 coefIndex = ut::Clamp( coefIndex, 0, COEFFICIENTS_TABLE_SIZE-1 ); in GetCoefficients()
725 coefIndex = ut::Clamp( coefIndex, 0, COEFFICIENTS_TABLE_SIZE-1 ); in GetCoefficients()
Dsnd_Util.cpp642 scale = ut::Clamp( scale, 0.0f, 1.0f ); in CalcLpfFreq()
691 pan = ( ut::Clamp( pan, -1.0f, 1.0f ) + 1.0f ) / 2.0f; // 0.0 - 1.0 のスケールに in CalcPanRatio()
713 ratio = ut::Clamp( ratio, 0.0f, 1.0f ); in CalcPanRatio()
717 ratio = ut::Clamp( ratio, 0.0f, 2.0f ); in CalcPanRatio()
725 surroundPan = ut::Clamp( surroundPan, 0.0f, 2.0f ) / 2.0f; // 0.0 - 1.0 のスケールに in CalcSurroundPanRatio()
731 ratio = ut::Clamp( ratio, 0.0f, 2.0f ); in CalcSurroundPanRatio()
791 dB = ut::Clamp( dB, -90.4f, 6.0f ); in CalcVolumeRatio()
Dsnd_Voice.cpp303 channelCount = ut::Clamp( channelCount, 1, CHANNEL_MAX ); in Alloc()
373 channelCount = ut::Clamp( channelCount, 1, CHANNEL_MAX ); in Alloc()
378 u32 sdkVoicePriority = ut::Clamp( priority, 0, nn::snd::VOICE_PRIORITY_NODROP ); in Alloc()
805 value = ut::Clamp( value, BIQUAD_VALUE_MIN, BIQUAD_VALUE_MAX ); in SetBiquadFilter()
1238 f32 main = mainVolume * ut::Clamp( mainSend, 0.0f, 1.0f ); in CalcMixParam()
1242 fx[ i ] = mainVolume * ut::Clamp( fxSend[ i ], 0.0f, 1.0f ); in CalcMixParam()
1393 f32 main = ut::Clamp( m_MainSend, 0.0f, 1.0f ); in CalcMixParam()
1397 fx[ i ] = ut::Clamp( m_FxSend[i], 0.0f, 1.0f ); in CalcMixParam()
Dsnd_AnimEventPlayer.cpp36 s16 s16Speed = static_cast<s16>( ut::Clamp( s32Speed, S16_SPEED_MIN, S16_SPEED_MAX ) ); in ConvertSpeedF32ToS16()
Dsnd_MidiSequencePlayer.cpp138 key = static_cast<u8>( ut::Clamp( key + trackParam.transpose, 0, 127 ) ); in NoteOn()
178 key = static_cast<u8>( ut::Clamp( key + param.transpose, 0, 127 ) ); in NoteOff()
Dsnd_SequenceTrack.cpp400 = ut::Clamp( static_cast<float>( m_ParserTrackParam.pan.GetValue() ) / 63.0f, -1.0f, 1.0f ) in UpdateChannelParam()
408 … = ut::Clamp( static_cast<float>( m_ParserTrackParam.surroundPan.GetValue() ) / 63.0f, 0.0f, 2.0f ) in UpdateChannelParam()
Dsnd_SoundPlayer.cpp373 count = ut::Clamp( count, 0, m_PlayableLimit ); in SetPlayableSoundCount()
Dsnd_MmlParser.cpp114 key = ut::Clamp( key, 0, 127 ); in Parse()
435 ut::Clamp( static_cast<int>( commandArg1 ), TEMPO_MIN, TEMPO_MAX ) in CommandProc()
/NW4C-2.0.3/include/nw/ut/
Dut_Color.h676 return Color8( static_cast<u8>( 0.5f + nw::ut::Clamp(r, 0.0f, 1.0f) * 255.f ), in Color8()
677 static_cast<u8>( 0.5f + nw::ut::Clamp(g, 0.0f, 1.0f) * 255.f ), in Color8()
678 static_cast<u8>( 0.5f + nw::ut::Clamp(b, 0.0f, 1.0f) * 255.f ), in Color8()
679 static_cast<u8>( 0.5f + nw::ut::Clamp(a, 0.0f, 1.0f) * 255.f )); in Color8()
1043 void Clamp() { this->Clamp( 0.0f, 1.0f ); } in Clamp() function
1050 void Clamp( f32 low, f32 high ) in Clamp() function
1052 r = nw::ut::Clamp( r, low, high ); in Clamp()
1053 g = nw::ut::Clamp( g, low, high ); in Clamp()
1054 b = nw::ut::Clamp( b, low, high ); in Clamp()
1055 a = nw::ut::Clamp( a, low, high ); in Clamp()
[all …]
/NW4C-2.0.3/include/nw/gfx/res/
Dgfx_ResProceduralTexture.h108 enum Clamp enum
126 NW_RES_FIELD_PRIMITIVE_DECL( Clamp, ClampU ) // GetClampU(), SetClampU()
127 NW_RES_FIELD_PRIMITIVE_DECL( Clamp, ClampV ) // GetClampV(), SetClampV()
/NW4C-2.0.3/include/nw/gfx/
Dgfx_SceneHelper.h125 return ut::Clamp(-z / w, 0.0f, 1.0f); in CalculateDepth()
148 return ut::Clamp(-z / w, 0.0f, 1.0f); in CalculateDepth()
Dgfx_ActivateCommand.h82 …return (ut::Clamp<u32>(r, 0, 255) << 20) | (ut::Clamp<u32>(g, 0, 255) << 10) | ut::Clamp<u32>(b, 0… in MultAddU32Color()
Dgfx_GraphicsDevice.h148 s_DepthRangeNear = nw::ut::Clamp(near, 0.0f, 1.0f); in SetDepthRange()
149 s_DepthRangeFar = nw::ut::Clamp(far, 0.0f, 1.0f); in SetDepthRange()
/NW4C-2.0.3/sources/libraries/snd/platform/
Dsnd_HardwareManagerDSP.cppi191 returnVolume *= ut::Clamp( m_AuxUserVolume[ i ].GetValue(), 0.0f, 1.0f );
192 returnVolume *= ut::Clamp( m_AuxFadeVolume[ i ].GetValue(), 0.0f, 1.0f );
214 volume = ut::Clamp( volume, 0.0f, 1.0f );
Dsnd_HardwareManagerAX.cppi158 returnVolumeFloat *= ut::Clamp( m_AuxUserVolume[ i ].GetValue(), 0.0f, 1.0f );
159 returnVolumeFloat *= ut::Clamp( m_AuxFadeVolume[ i ].GetValue(), 0.0f, 1.0f );
188 volume = ut::Clamp( volume, 0.0f, 1.0f );
Dsnd_HardwareChannelAX.cppi432 ratio = nw::ut::Clamp( ratio, 0.0f, 65535.0f );
492 vol = nw::ut::Clamp( vol, 0, 0xffff );
/NW4C-2.0.3/sources/libraries/io/
Dio_FileStream.cpp108 position = ut::Clamp( position, static_cast<s64>(0), static_cast<s64>(mFileSize) ); in Skip()
/NW4C-2.0.3/include/nw/snd/
Dsnd_SoundInstanceManager.h125 … allocPriority = ut::Clamp( allocPriority, BasicSound::PRIORITY_MIN, BasicSound::PRIORITY_MAX ); in Alloc()
Dsnd_SoundSystem.h1107 count = ut::Clamp( count, 1, NN_SND_VOICE_NUM ); in SetMaxVoiceCount()
Dsnd_BasicSound.h337 return ut::Clamp( in CalcCurrentPlayerPriority()
/NW4C-2.0.3/demos/gfx/AnimationBlendDemo/sources/
DAnimationBlendDemo.cpp434 s_SkeletalAnimWeight1 = nw::ut::Clamp(s_SkeletalAnimWeight1, 0.0f, 1.0f); in UpdateBlender()
461 s_MaterialAnimWeight1 = nw::ut::Clamp(s_MaterialAnimWeight1, 0.0f, 1.0f); in UpdateBlender()
/NW4C-2.0.3/sources/libraries/demo/
Ddemo_CameraController.cpp241 m_Rotate.x = nw::ut::Clamp(m_Rotate.x, -ROTATE_X_LIMIT, ROTATE_X_LIMIT); in Update()
/NW4C-2.0.3/demos/snd/withSdk/sources/
Dmain.cpp68 pan = nw::ut::Clamp( pan, 0, 100 ); in PanToMixParam()
/NW4C-2.0.3/demos/snd/createSoundThreadManually/sources/
Dmain.cpp68 pan = nw::ut::Clamp( pan, 0, 100 ); in PanToMixParam()

12