DC6 to PNG item conversion. Read in order from docpath,d2modder img path

This commit is contained in:
Hash Borgir
2022-06-24 22:36:35 -06:00
parent 40fcc4fdfb
commit b7fdaa585e
1708 changed files with 89 additions and 12 deletions

View File

@@ -107,12 +107,33 @@ if (file_exists(APP_DB)) {
processFilesManuallyInSqlite();
processFilesManuallyInSqliteLinux();
function toPngAll() {
$q = realpath("bin\qdc6.exe");
$iPath = $_SESSION['modpath']."\data\global\items";
$oPath = realpath("docs\\{$_SESSION['modname']}\img\\items");
exec("$q --first-frame-only \"$iPath\" -o \"$oPath\"");
}
if (!is_dir("docs\\{$_SESSION['modname']}")) {
mkdir("docs\\{$_SESSION['modname']}");
mkdir("docs\\{$_SESSION['modname']}\\fonts", 0777, TRUE);
mkdir("docs\\{$_SESSION['modname']}\\img\items", 0777, TRUE);
mkdir("docs\\{$_SESSION['modname']}\\res", 0777, TRUE);
}
rcopy(realpath('docs/template/fonts'), realpath("docs\\{$_SESSION['modname']}\\fonts"));
rcopy(realpath('docs/template/img'), realpath("docs\\{$_SESSION['modname']}\\img"));
rcopy(realpath('docs/template/res'), realpath("docs\\{$_SESSION['modname']}\\res"));
toPngAll();
/*
Process tbl files
*
*
*/
$tbl = $_SESSION['tbl'];
// ddump($tbl);