Home
last modified time | relevance | path

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

12

/NW4C-1.2.23/sources/libraries/gfx/
Dgfx_FrameBuffer.cpp39 u8 red = static_cast<u8>( 0.5f + nw::ut::Clamp(color.r, 0.0f, 1.0f) * 255.f ); in ColorToRGBA8()
40 u8 green = static_cast<u8>( 0.5f + nw::ut::Clamp(color.g, 0.0f, 1.0f) * 255.f ); in ColorToRGBA8()
41 u8 blue = static_cast<u8>( 0.5f + nw::ut::Clamp(color.b, 0.0f, 1.0f) * 255.f ); in ColorToRGBA8()
42 u8 alpha = static_cast<u8>( 0.5f + nw::ut::Clamp(color.a, 0.0f, 1.0f) * 255.f ); in ColorToRGBA8()
58 u8 red = static_cast<u8>( 0.5f + nw::ut::Clamp(color.r, 0.0f, 1.0f) * 31.f ); in ColorToRGB5A1()
59 u8 green = static_cast<u8>( 0.5f + nw::ut::Clamp(color.g, 0.0f, 1.0f) * 31.f ); in ColorToRGB5A1()
60 u8 blue = static_cast<u8>( 0.5f + nw::ut::Clamp(color.b, 0.0f, 1.0f) * 31.f ); in ColorToRGB5A1()
61 u8 alpha = static_cast<u8>( 0.5f + nw::ut::Clamp(color.a, 0.0f, 1.0f) * 1.f ); in ColorToRGB5A1()
77 u8 red = static_cast<u8>( 0.5f + nw::ut::Clamp(color.r, 0.0f, 1.0f) * 31.f ); in ColorToRGB565()
78 u8 green = static_cast<u8>( 0.5f + nw::ut::Clamp(color.g, 0.0f, 1.0f) * 63.f ); in ColorToRGB565()
[all …]
/NW4C-1.2.23/sources/libraries/snd/
Dsnd_BiquadFilterPresets.cpp614 coefIndex = ut::Clamp( coefIndex, 0, COEFFICIENTS_TABLE_SIZE-1 ); in GetCoefficients()
639 coefIndex = ut::Clamp( coefIndex, 0, COEFFICIENTS_TABLE_SIZE-1 ); in GetCoefficients()
667 coefIndex = ut::Clamp( coefIndex, 0, COEFFICIENTS_TABLE_SIZE-1 ); in GetCoefficients()
695 coefIndex = ut::Clamp( coefIndex, 0, COEFFICIENTS_TABLE_SIZE-1 ); in GetCoefficients()
723 coefIndex = ut::Clamp( coefIndex, 0, COEFFICIENTS_TABLE_SIZE-1 ); in GetCoefficients()
Dsnd_Util.cpp638 scale = ut::Clamp( scale, 0.0f, 1.0f ); in CalcLpfFreq()
687 pan = ( ut::Clamp( pan, -1.0f, 1.0f ) + 1.0f ) / 2.0f; // 0.0 - 1.0 のスケールに in CalcPanRatio()
709 ratio = ut::Clamp( ratio, 0.0f, 1.0f ); in CalcPanRatio()
713 ratio = ut::Clamp( ratio, 0.0f, 2.0f ); in CalcPanRatio()
721 surroundPan = ut::Clamp( surroundPan, 0.0f, 2.0f ) / 2.0f; // 0.0 - 1.0 のスケールに in CalcSurroundPanRatio()
727 ratio = ut::Clamp( ratio, 0.0f, 2.0f ); in CalcSurroundPanRatio()
787 dB = ut::Clamp( dB, -90.4f, 6.0f ); in CalcVolumeRatio()
Dsnd_Voice.cpp301 channelCount = ut::Clamp( channelCount, 1, CHANNEL_MAX ); in Alloc()
371 channelCount = ut::Clamp( channelCount, 1, CHANNEL_MAX ); in Alloc()
376 u32 sdkVoicePriority = ut::Clamp( priority, 0, nn::snd::VOICE_PRIORITY_NODROP ); in Alloc()
803 value = ut::Clamp( value, BIQUAD_VALUE_MIN, BIQUAD_VALUE_MAX ); in SetBiquadFilter()
1237 f32 main = mainVolume * ut::Clamp( mainSend, 0.0f, 1.0f ); in CalcMixParam()
1241 fx[ i ] = mainVolume * ut::Clamp( fxSend[ i ], 0.0f, 1.0f ); in CalcMixParam()
1392 f32 main = ut::Clamp( m_MainSend, 0.0f, 1.0f ); in CalcMixParam()
1396 fx[ i ] = ut::Clamp( m_FxSend[i], 0.0f, 1.0f ); in CalcMixParam()
Dsnd_MidiSequencePlayer.cpp136 key = static_cast<u8>( ut::Clamp( key + trackParam.transpose, 0, 127 ) ); in NoteOn()
176 key = static_cast<u8>( ut::Clamp( key + param.transpose, 0, 127 ) ); in NoteOff()
Dsnd_SequenceTrack.cpp398 = ut::Clamp( static_cast<float>( m_ParserTrackParam.pan.GetValue() ) / 63.0f, -1.0f, 1.0f ) in UpdateChannelParam()
406 … = ut::Clamp( static_cast<float>( m_ParserTrackParam.surroundPan.GetValue() ) / 63.0f, 0.0f, 2.0f ) in UpdateChannelParam()
Dsnd_SoundPlayer.cpp371 count = ut::Clamp( count, 0, m_PlayableLimit ); in SetPlayableSoundCount()
Dsnd_MmlParser.cpp112 key = ut::Clamp( key, 0, 127 ); in Parse()
433 ut::Clamp( static_cast<int>( commandArg1 ), TEMPO_MIN, TEMPO_MAX ) in CommandProc()
/NW4C-1.2.23/include/nw/ut/
Dut_Color.h674 return Color8( static_cast<u8>( 0.5f + nw::ut::Clamp(r, 0.0f, 1.0f) * 255.f ), in Color8()
675 static_cast<u8>( 0.5f + nw::ut::Clamp(g, 0.0f, 1.0f) * 255.f ), in Color8()
676 static_cast<u8>( 0.5f + nw::ut::Clamp(b, 0.0f, 1.0f) * 255.f ), in Color8()
677 static_cast<u8>( 0.5f + nw::ut::Clamp(a, 0.0f, 1.0f) * 255.f )); in Color8()
1041 void Clamp() { this->Clamp( 0.0f, 1.0f ); } in Clamp() function
1048 void Clamp( f32 low, f32 high ) in Clamp() function
1050 r = nw::ut::Clamp( r, low, high ); in Clamp()
1051 g = nw::ut::Clamp( g, low, high ); in Clamp()
1052 b = nw::ut::Clamp( b, low, high ); in Clamp()
1053 a = nw::ut::Clamp( a, low, high ); in Clamp()
[all …]
/NW4C-1.2.23/include/nw/gfx/res/
Dgfx_ResProceduralTexture.h106 enum Clamp enum
124 NW_RES_FIELD_PRIMITIVE_DECL( Clamp, ClampU ) // GetClampU(), SetClampU()
125 NW_RES_FIELD_PRIMITIVE_DECL( Clamp, ClampV ) // GetClampV(), SetClampV()
/NW4C-1.2.23/include/nw/gfx/
Dgfx_SceneHelper.h123 return ut::Clamp(-z / w, 0.0f, 1.0f); in CalculateDepth()
146 return ut::Clamp(-z / w, 0.0f, 1.0f); in CalculateDepth()
Dgfx_ActivateCommand.h74 u8 r = ut::Clamp<u32>((((lhs & MASK) * (rhs & MASK)) >> 8) + (add & MASK), 0, 255); in MultAddU32Color()
75 …u8 g = ut::Clamp<u32>(((((lhs >> 8) & MASK) * ((rhs >> 8) & MASK)) >> 8) + ((add >> 8) & MASK), 0,… in MultAddU32Color()
76 …u8 b = ut::Clamp<u32>(((((lhs >> 16) & MASK) * ((rhs >> 16) & MASK)) >> 8) + ((add >> 16) & MASK),… in MultAddU32Color()
Dgfx_GraphicsDevice.h146 s_DepthRangeNear = nw::ut::Clamp(near, 0.0f, 1.0f); in SetDepthRange()
147 s_DepthRangeFar = nw::ut::Clamp(far, 0.0f, 1.0f); in SetDepthRange()
/NW4C-1.2.23/sources/libraries/snd/platform/
Dsnd_HardwareManagerDSP.cppi189 returnVolume *= ut::Clamp( m_AuxUserVolume[ i ].GetValue(), 0.0f, 1.0f );
190 returnVolume *= ut::Clamp( m_AuxFadeVolume[ i ].GetValue(), 0.0f, 1.0f );
212 volume = ut::Clamp( volume, 0.0f, 1.0f );
Dsnd_HardwareManagerAX.cppi156 returnVolumeFloat *= ut::Clamp( m_AuxUserVolume[ i ].GetValue(), 0.0f, 1.0f );
157 returnVolumeFloat *= ut::Clamp( m_AuxFadeVolume[ i ].GetValue(), 0.0f, 1.0f );
186 volume = ut::Clamp( volume, 0.0f, 1.0f );
Dsnd_HardwareChannelAX.cppi430 ratio = nw::ut::Clamp( ratio, 0.0f, 65535.0f );
490 vol = nw::ut::Clamp( vol, 0, 0xffff );
/NW4C-1.2.23/sources/libraries/io/
Dio_FileStream.cpp106 position = ut::Clamp( position, static_cast<s64>(0), static_cast<s64>(mFileSize) ); in Skip()
/NW4C-1.2.23/include/nw/snd/
Dsnd_SoundInstanceManager.h123 … allocPriority = ut::Clamp( allocPriority, BasicSound::PRIORITY_MIN, BasicSound::PRIORITY_MAX ); in Alloc()
Dsnd_SoundSystem.h1056 count = ut::Clamp( count, 1, NN_SND_VOICE_NUM ); in SetMaxVoiceCount()
Dsnd_BasicSound.h314 return ut::Clamp( in CalcCurrentPlayerPriority()
/NW4C-1.2.23/demos/gfx/AnimationBlendDemo/sources/
DAnimationBlendDemo.cpp440 s_SkeletalAnimWeight1 = nw::ut::Clamp(s_SkeletalAnimWeight1, 0.0f, 1.0f); in UpdateBlender()
467 s_MaterialAnimWeight1 = nw::ut::Clamp(s_MaterialAnimWeight1, 0.0f, 1.0f); in UpdateBlender()
/NW4C-1.2.23/sources/libraries/demo/
Ddemo_CameraController.cpp239 m_Rotate.x = nw::ut::Clamp(m_Rotate.x, -ROTATE_X_LIMIT, ROTATE_X_LIMIT); in Update()
/NW4C-1.2.23/demos/snd/withSdk/sources/
Dmain.cpp66 pan = nw::ut::Clamp( pan, 0, 100 ); in PanToMixParam()
/NW4C-1.2.23/demos/snd/createSoundThreadManually/sources/
Dmain.cpp66 pan = nw::ut::Clamp( pan, 0, 100 ); in PanToMixParam()
/NW4C-1.2.23/demos/gfx/AnimationDemo/sources/
DAnimationDemo.cpp306 s_StepFrame = nw::ut::Clamp(s_StepFrame, 0.0f, 50.0f); in ChangeSpeed()

12