void DoCaulkSelection( void ) { DEntity world; float fScale[2] = { 0.5f, 0.5f }; float fShift[2] = { 0.0f, 0.0f }; int bResetScale[2] = { false, false }; int bResetShift[2] = { false, false }; world.LoadSelectedBrushes(); world.LoadSelectedPatches(); world.ResetTextures( NULL, fScale, fShift, 0, "textures/common/caulk", true, bResetScale, bResetShift, false, true ); }
void DoResetTextures(){ static ResetTextureRS rs; const char* texName; if ( g_SelectedFaceTable.m_pfnGetSelectedFaceCount() != 1 ) { texName = NULL; } else { texName = GetCurrentTexture(); strcpy( rs.textureName, GetCurrentTexture() ); } int ret; if ( ( ret = DoResetTextureBox( &rs ) ) == IDCANCEL ) { return; } if ( rs.bResetTextureName ) { texName = rs.textureName; } if ( ret == IDOK ) { DEntity world; world.LoadSelectedBrushes(); world.ResetTextures( texName, rs.fScale, rs.fShift, rs.rotation, rs.newTextureName, rs.bResetTextureName, rs.bResetScale, rs.bResetShift, rs.bResetRotation, TRUE ); } else { DMap world; world.LoadAll( TRUE ); world.ResetTextures( texName, rs.fScale, rs.fShift, rs.rotation, rs.newTextureName, rs.bResetTextureName, rs.bResetScale, rs.bResetShift, rs.bResetRotation ); } }