本文整理汇总了PHP中CLISetup::filesInPath方法的典型用法代码示例。如果您正苦于以下问题:PHP CLISetup::filesInPath方法的具体用法?PHP CLISetup::filesInPath怎么用?PHP CLISetup::filesInPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLISetup
的用法示例。
在下文中一共展示了CLISetup::filesInPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: complexImg
//.........这里部分代码省略.........
}
imagecopy($overlay, $img, $row['x'] + $x, $row['y'] + $y, 0, 0, imagesx($img), imagesy($img));
// prepare subzone image
if ($modeMask & 0x10) {
if (!isset($row['maskimage'])) {
$row['maskimage'] = $createAlphaImage($row['w'], $row['h']);
$row['maskcolor'] = imagecolorallocatealpha($row['maskimage'], 255, 64, 192, 64);
}
for ($my = 0; $my < imagesy($img); $my++) {
for ($mx = 0; $mx < imagesx($img); $mx++) {
if (imagecolorat($img, $mx, $my) >> 24 < $threshold) {
imagesetpixel($row['maskimage'], $x + $mx, $y + $my, $row['maskcolor']);
}
}
}
}
imagedestroy($img);
$x += 256;
$i++;
}
$y += 256;
}
}
// create spawn-maps if wanted
if ($modeMask & 0x4) {
$createSpawnMap($overlay, $zoneId);
}
}
// check, if the current zone is multiLeveled
// if there are also files present without layer-suffix assume them as layer: 0
$multiLeveled = false;
$multiLevel = 0;
do {
if (!CLISetup::filesInPath('/' . $textureStr . '\\/' . $textureStr . ($multiLevel + 1) . '_\\d\\.blp/i', true)) {
break;
}
$multiLevel++;
$multiLeveled = true;
} while ($multiLevel < 18);
// Karazhan has 17 frickin floors
// check if we can create base map anyway
$file = $path . '/' . $textureStr . '1.blp';
$hasBaseMap = CLISetup::fileExists($file);
CLISetup::log(' - area has ' . ($multiLeveled ? $multiLevel . ' levels' : 'only base level'));
$map = null;
for ($i = 0; $i <= $multiLevel; $i++) {
ini_set('max_execution_time', 120);
// max 120sec per image
$file = $path . '/' . $textureStr;
if (!$i && !$hasBaseMap) {
continue;
}
// if $multiLeveled also suffix -0 to baseMap if it exists
if ($i && $multiLeveled) {
$file .= $i . '_';
}
$doSkip = 0x0;
$outFile = [];
foreach ($mapDirs as $idx => $info) {
$outFile[$idx] = $destDir . sprintf($info[0], strtolower(Util::$localeStrings[$l]) . '/') . $zoneId;
$floor = $i;
if ($zoneId == 4100) {
// ToCStratholme: map order fix
$floor += 1;
}
if ($multiLeveled && !(isset($baseLevelFix[$zoneId]) && $i == $baseLevelFix[$zoneId])) {