1006 lines
26 KiB
JavaScript
1006 lines
26 KiB
JavaScript
var AvJacketList = /** @class */ (function () {
|
|
function AvJacketList() {
|
|
this._screenShotList = [];
|
|
}
|
|
AvJacketList.prototype.pushScreenShot = function (screenShot) {
|
|
this._screenShotList.push(screenShot);
|
|
};
|
|
AvJacketList.prototype.createName = function (index) {
|
|
return "ジャケット" + index;
|
|
};
|
|
AvJacketList.prototype.jacketList = function () {
|
|
var result = [];
|
|
for (var i = 0; i < 7; i++) {
|
|
var av = this._screenShotList[this._screenShotList.length - 1 - i];
|
|
if (!av) {
|
|
break;
|
|
}
|
|
var no = i + 1;
|
|
av.setName(this.createName(no));
|
|
result.push(av);
|
|
}
|
|
return result;
|
|
};
|
|
AvJacketList.prototype.lastScreenShot = function () {
|
|
return this._screenShotList[this._screenShotList.length - 1];
|
|
};
|
|
AvJacketList.prototype.isEmpty = function () {
|
|
return this._screenShotList.length == 0;
|
|
};
|
|
AvJacketList.prototype.clear = function () {
|
|
this._screenShotList = [];
|
|
};
|
|
return AvJacketList;
|
|
})();
|
|
var AvJacketSwaper = /** @class */ (function () {
|
|
function AvJacketSwaper(eroId, animeId) {
|
|
this._eroId = eroId;
|
|
this._animeId = animeId;
|
|
}
|
|
AvJacketSwaper.prototype.swap = function (animeId, index) {
|
|
if (animeId % 100 < 10) {
|
|
return this._eroId + "_" + animeId + "_" + index.padZero(2) + ".png";
|
|
}
|
|
var a = 18 - (animeId % 100) + Math.floor(animeId / 100) * 100;
|
|
return this._eroId + "_" + a.padZero(2) + "_" + index.padZero(2) + ".png";
|
|
};
|
|
return AvJacketSwaper;
|
|
})();
|
|
var AvJacketMaker = /** @class */ (function () {
|
|
function AvJacketMaker() {
|
|
this._eroImageList = [];
|
|
this._swapMap = {};
|
|
this.addSwapImage("04_03", 100);
|
|
this.addSwapImage("09_02", 100);
|
|
}
|
|
AvJacketMaker.prototype.addSwapImage = function (eroId, animeId) {
|
|
this._swapMap[eroId] = new AvJacketSwaper(eroId, animeId);
|
|
};
|
|
AvJacketMaker.prototype.clear = function () {
|
|
this._eroImageList = [];
|
|
};
|
|
AvJacketMaker.prototype.addEro = function (file) {
|
|
/*if (this._eroImageList.length == 0) {
|
|
if (file.contains('02.png')) {
|
|
console.error(22);
|
|
}
|
|
}*/
|
|
this._eroImageList.push(file);
|
|
//p(this._eroImageList)
|
|
};
|
|
AvJacketMaker.prototype.makeScreenShot = function () {
|
|
return new AvScreenShot(this._eroImageList);
|
|
};
|
|
AvJacketMaker.prototype.makeDebugJacket = function () {
|
|
this._eroImageList = ["09_03_01_01.png", "09_03_01_02.png"];
|
|
return this.makeScreenShot();
|
|
};
|
|
AvJacketMaker.prototype.eroImageList = function () {
|
|
return this._eroImageList;
|
|
};
|
|
AvJacketMaker.prototype.makeDebugJacket2 = function () {
|
|
this._eroImageList = ["09_01_01_01.png"];
|
|
return this.makeScreenShot();
|
|
};
|
|
AvJacketMaker.prototype.swapEroImageList = function (list) {
|
|
var result = [];
|
|
for (var _i = 0, list_1 = list; _i < list_1.length; _i++) {
|
|
var file = list_1[_i];
|
|
try {
|
|
result.push(this.swapEroImage(file));
|
|
} catch (e) {
|
|
console.error(e);
|
|
result.push(file);
|
|
}
|
|
}
|
|
return result;
|
|
};
|
|
AvJacketMaker.prototype.swapEroImage = function (file) {
|
|
if (!$gameSwitches.value(11)) {
|
|
return file;
|
|
}
|
|
var list = file.split("_");
|
|
var eroId = list[0] + "_" + list[1];
|
|
if (!this._swapMap[eroId]) {
|
|
return file;
|
|
}
|
|
var swaper = this._swapMap[eroId];
|
|
var animeId = parseInt(list[2]);
|
|
if (isNaN(animeId)) {
|
|
return file;
|
|
}
|
|
var index = parseInt(list[3]);
|
|
if (isNaN(index)) {
|
|
return file;
|
|
}
|
|
return swaper.swap(animeId, index);
|
|
};
|
|
return AvJacketMaker;
|
|
})();
|
|
var AvOriginalText = /** @class */ (function () {
|
|
function AvOriginalText() {
|
|
this._text = "";
|
|
}
|
|
AvOriginalText.prototype.isEnabled = function () {
|
|
return this._enabled;
|
|
};
|
|
AvOriginalText.prototype.text = function () {
|
|
return this._text;
|
|
};
|
|
AvOriginalText.prototype.setText = function (text) {
|
|
this._text = text;
|
|
};
|
|
AvOriginalText.prototype.setEnabled = function (b) {
|
|
this._enabled = b;
|
|
};
|
|
AvOriginalText.prototype.isEmpty = function () {
|
|
if (!this._text) {
|
|
return true;
|
|
}
|
|
return this._text.length == 0;
|
|
};
|
|
return AvOriginalText;
|
|
})();
|
|
var AvText = /** @class */ (function () {
|
|
function AvText() {
|
|
this._text1 = 502;
|
|
this._text2 = 503;
|
|
this._gothic1 = false;
|
|
this._gothic2 = false;
|
|
this._bold = true;
|
|
this._conbination = true;
|
|
this._textColorId1 = 1;
|
|
this._textColorId2 = 1;
|
|
this._outlineThickness1 = Thickness.normal;
|
|
this._outlineThickness2 = Thickness.normal;
|
|
}
|
|
AvText.prototype.text1 = function () {
|
|
if (this._original1 && this._original1.isEnabled()) {
|
|
return this._original1.text();
|
|
}
|
|
return $dataWeapons[this._text1].name;
|
|
};
|
|
AvText.prototype.text2 = function () {
|
|
if (this._original2 && this._original2.isEnabled()) {
|
|
return this._original2.text();
|
|
}
|
|
return $dataWeapons[this._text2].name;
|
|
};
|
|
AvText.prototype.originalText1 = function () {
|
|
this._original1 = this._original1 || new AvOriginalText();
|
|
return this._original1;
|
|
};
|
|
AvText.prototype.originalText2 = function () {
|
|
this._original2 = this._original2 || new AvOriginalText();
|
|
return this._original2;
|
|
};
|
|
AvText.prototype.setOriginalText1 = function (text) {
|
|
this._original1 = this._original1 || new AvOriginalText();
|
|
this._original1.setText(text);
|
|
};
|
|
AvText.prototype.setOriginalText2 = function (text) {
|
|
this._original2 = this._original2 || new AvOriginalText();
|
|
this._original2.setText(text);
|
|
};
|
|
AvText.prototype.setTextItem1 = function (t) {
|
|
this._text1 = t;
|
|
};
|
|
AvText.prototype.setTextItem2 = function (t) {
|
|
this._text2 = t;
|
|
};
|
|
AvText.prototype.setOutlineThickness1 = function (t) {
|
|
if (this._outlineThickness1 == t) {
|
|
return;
|
|
}
|
|
this._outlineThickness1 = t;
|
|
this.setDirty();
|
|
};
|
|
AvText.prototype.setOutlineThickness2 = function (t) {
|
|
if (this._outlineThickness2 == t) {
|
|
return;
|
|
}
|
|
this._outlineThickness2 = t;
|
|
this.setDirty();
|
|
};
|
|
AvText.prototype.outlineThickness = function (index) {
|
|
if (index == 1) {
|
|
return this.outlineThickness1();
|
|
} else {
|
|
return this.outlineThickness2();
|
|
}
|
|
};
|
|
AvText.prototype.outlineThickness1 = function () {
|
|
return this._outlineThickness1 || Thickness.normal;
|
|
};
|
|
AvText.prototype.outlineThickness2 = function () {
|
|
return this._outlineThickness2 || Thickness.normal;
|
|
};
|
|
AvText.prototype.textItem1 = function () {
|
|
return this._text1 || 1;
|
|
};
|
|
AvText.prototype.textItem2 = function () {
|
|
return this._text2 || 1;
|
|
};
|
|
AvText.prototype.title = function () {
|
|
return this.text1();
|
|
};
|
|
AvText.prototype.subTitle = function () {
|
|
return this.text2();
|
|
};
|
|
AvText.prototype.name = function () {
|
|
return $gameActors.actor(8).name();
|
|
};
|
|
AvText.prototype.isBold = function () {
|
|
return this._bold;
|
|
};
|
|
AvText.prototype.setBold = function (b) {
|
|
if (this._bold == b) {
|
|
return;
|
|
}
|
|
this._bold = b;
|
|
this.setDirty();
|
|
};
|
|
AvText.prototype.isGothic = function (index) {
|
|
if (index == 1) {
|
|
return this.isGothic1();
|
|
} else {
|
|
return this.isGothic2();
|
|
}
|
|
};
|
|
AvText.prototype.isGothic1 = function () {
|
|
return this._gothic1;
|
|
};
|
|
AvText.prototype.isGothic2 = function () {
|
|
return this._gothic2;
|
|
};
|
|
AvText.prototype.setGothic1 = function (b) {
|
|
if (this._gothic1 == b) {
|
|
return;
|
|
}
|
|
this._gothic1 = b;
|
|
this.setDirty();
|
|
};
|
|
AvText.prototype.setGothic2 = function (b) {
|
|
if (this._gothic2 == b) {
|
|
return;
|
|
}
|
|
this._gothic2 = b;
|
|
this.setDirty();
|
|
};
|
|
AvText.prototype.textColorId = function (index) {
|
|
if (index == 1) {
|
|
return this.textColorId1();
|
|
} else {
|
|
return this.textColorId2();
|
|
}
|
|
};
|
|
AvText.prototype.textColorId1 = function () {
|
|
return this._textColorId1 || 1;
|
|
};
|
|
AvText.prototype.textColor1 = function () {
|
|
return new TextColor(this.textColorId1());
|
|
};
|
|
AvText.prototype.setTextColorId1 = function (l) {
|
|
if (this._textColorId1 == l) {
|
|
return;
|
|
}
|
|
this._textColorId1 = l;
|
|
this.setDirty();
|
|
};
|
|
AvText.prototype.textColorId2 = function () {
|
|
return this._textColorId2 || 1;
|
|
};
|
|
AvText.prototype.textColor2 = function () {
|
|
return new TextColor(this.textColorId2());
|
|
};
|
|
AvText.prototype.setTextColorId2 = function (l) {
|
|
if (this._textColorId2 == l) {
|
|
return;
|
|
}
|
|
this._textColorId2 = l;
|
|
this.setDirty();
|
|
};
|
|
AvText.prototype.setDirty = function () {
|
|
this._dirty = true;
|
|
};
|
|
AvText.prototype.isDirty = function () {
|
|
return this._dirty;
|
|
};
|
|
AvText.prototype.clearDirty = function () {
|
|
this._dirty = false;
|
|
};
|
|
AvText.prototype.fontFace = function (index) {
|
|
if (index == 1) {
|
|
return this.fontFace1();
|
|
} else {
|
|
return this.fontFace2();
|
|
}
|
|
};
|
|
AvText.prototype.fontFace1 = function () {
|
|
if (this._gothic1) {
|
|
return "sans";
|
|
} else {
|
|
return "gokuhutomincho";
|
|
}
|
|
};
|
|
AvText.prototype.fontFace2 = function () {
|
|
if (this._gothic2) {
|
|
return "sans";
|
|
} else {
|
|
return "gokuhutomincho";
|
|
}
|
|
};
|
|
AvText.prototype.auto = function () {
|
|
this._gothic1 = Math.randomInt(2) == 0;
|
|
this._gothic2 = Math.randomInt(2) == 0;
|
|
this._outlineThickness1 = Math.randomInt(4) + 1;
|
|
this._outlineThickness2 = Math.randomInt(4) + 1;
|
|
this.setDirty();
|
|
};
|
|
AvText.prototype.isConbination = function () {
|
|
return this._conbination;
|
|
};
|
|
AvText.prototype.setConbination = function (b) {
|
|
if (this._conbination == b) {
|
|
return;
|
|
}
|
|
this._conbination = b;
|
|
this.setDirty();
|
|
};
|
|
return AvText;
|
|
})();
|
|
var AvActor = /** @class */ (function () {
|
|
function AvActor(actor, itemId) {
|
|
this._x = 0;
|
|
this._y = 0;
|
|
this._itemId = itemId;
|
|
var faceId = this.avFaceId(actor);
|
|
this._cos = new CostumeSaver(actor.actorId(), faceId);
|
|
this._cos._boteId = actor.boteId;
|
|
this._cos._hoppeId = this.avHoppeId(actor);
|
|
}
|
|
AvActor.prototype.avFaceId = function (actor) {
|
|
var item = $dataItems[this._itemId];
|
|
if (item.meta["faceId"]) {
|
|
return parseInt(item.meta["faceId"]);
|
|
}
|
|
return actor.getDefaultFaceId();
|
|
};
|
|
AvActor.prototype.avHoppeId = function (actor) {
|
|
var item = $dataItems[this._itemId];
|
|
if (item.meta["hoppeId"]) {
|
|
return parseInt(item.meta["hoppeId"]);
|
|
}
|
|
return actor.hoppeId;
|
|
};
|
|
AvActor.prototype.setCos = function (cos) {
|
|
this._cos = cos;
|
|
};
|
|
AvActor.prototype.cos = function () {
|
|
return this._cos;
|
|
};
|
|
AvActor.prototype.x = function () {
|
|
return this._x;
|
|
};
|
|
AvActor.prototype.y = function () {
|
|
return this._y;
|
|
};
|
|
AvActor.prototype.actorId = function () {
|
|
return this._cos.actorId();
|
|
};
|
|
AvActor.prototype.setDirty = function () {
|
|
this._dirty = true;
|
|
};
|
|
AvActor.prototype.isDirty = function () {
|
|
return this._dirty;
|
|
};
|
|
AvActor.prototype.clearDirty = function () {
|
|
this._dirty = false;
|
|
};
|
|
return AvActor;
|
|
})();
|
|
var AvScreenShot = /** @class */ (function () {
|
|
function AvScreenShot(eroImageList) {
|
|
this._eroImageList = [];
|
|
this._manColor = 0;
|
|
this._eroImageList = eroImageList;
|
|
this._manColor = $gameVariables.value(49);
|
|
}
|
|
AvScreenShot.prototype.eroImageList = function () {
|
|
return this._eroImageList;
|
|
};
|
|
AvScreenShot.prototype.name = function () {
|
|
return this._name;
|
|
};
|
|
AvScreenShot.prototype.setName = function (n) {
|
|
this._name = n;
|
|
};
|
|
AvScreenShot.prototype.isEmpty = function () {
|
|
return this._eroImageList.length == 0;
|
|
};
|
|
AvScreenShot.prototype.manColor = function () {
|
|
return this._manColor || 0;
|
|
};
|
|
AvScreenShot.prototype.imageId = function () {
|
|
var top = this._eroImageList[0];
|
|
var list = top.split("_");
|
|
return parseInt(list[0]).padZero(2) + "_" + list[1];
|
|
};
|
|
return AvScreenShot;
|
|
})();
|
|
var FixType;
|
|
(function (FixType) {
|
|
FixType[(FixType["font"] = 1)] = "font";
|
|
FixType[(FixType["parts"] = 2)] = "parts";
|
|
FixType[(FixType["text1"] = 3)] = "text1";
|
|
FixType[(FixType["text2"] = 4)] = "text2";
|
|
FixType[(FixType["actor"] = 5)] = "actor";
|
|
FixType[(FixType["back"] = 6)] = "back";
|
|
FixType[(FixType["layout"] = 7)] = "layout";
|
|
FixType[(FixType["image"] = 8)] = "image";
|
|
FixType[(FixType["man"] = 9)] = "man";
|
|
})(FixType || (FixType = {}));
|
|
var ManZIndex;
|
|
(function (ManZIndex) {
|
|
ManZIndex[(ManZIndex["back"] = 1)] = "back";
|
|
ManZIndex[(ManZIndex["front"] = 2)] = "front";
|
|
})(ManZIndex || (ManZIndex = {}));
|
|
var ManLayout;
|
|
(function (ManLayout) {
|
|
ManLayout[(ManLayout["none"] = 0)] = "none";
|
|
ManLayout[(ManLayout["left"] = 1)] = "left";
|
|
ManLayout[(ManLayout["right"] = 2)] = "right";
|
|
})(ManLayout || (ManLayout = {}));
|
|
var Thumbnail = /** @class */ (function () {
|
|
function Thumbnail() {
|
|
this._enabled = true;
|
|
this._x = 130;
|
|
this._y = 400;
|
|
this._scale = 44;
|
|
this._leftMargin = 0;
|
|
this._rightMargin = 0;
|
|
this._angle = 0;
|
|
}
|
|
Thumbnail.prototype.isEnabled = function () {
|
|
return this._enabled;
|
|
};
|
|
Thumbnail.prototype.setEnabled = function (b) {
|
|
this._enabled = b;
|
|
};
|
|
Thumbnail.prototype.scale = function () {
|
|
return this._scale / 100;
|
|
};
|
|
Thumbnail.prototype.leftMargin = function () {
|
|
return this._leftMargin;
|
|
};
|
|
Thumbnail.prototype.x = function () {
|
|
return this._x;
|
|
};
|
|
Thumbnail.prototype.y = function () {
|
|
return this._y;
|
|
};
|
|
Thumbnail.prototype.right = function (n) {
|
|
this._x += n;
|
|
if (this._x >= this.maxX()) {
|
|
this._x = this.maxX();
|
|
}
|
|
};
|
|
Thumbnail.prototype.left = function (n) {
|
|
this._x -= n;
|
|
if (this._x <= this.minX()) {
|
|
this._x = this.minX();
|
|
}
|
|
};
|
|
Thumbnail.prototype.down = function (n) {
|
|
this._y += n;
|
|
if (this._y >= this.maxY()) {
|
|
this._y = this.maxY();
|
|
}
|
|
};
|
|
Thumbnail.prototype.up = function (n) {
|
|
this._y -= n;
|
|
if (this._y <= this.minY()) {
|
|
this._y = this.minY();
|
|
}
|
|
};
|
|
Thumbnail.prototype.scaleUp = function (value) {
|
|
this._scale += value;
|
|
if (this._scale <= 10) {
|
|
this._scale = 10;
|
|
}
|
|
if (this._scale >= 150) {
|
|
this._scale = 150;
|
|
}
|
|
};
|
|
Thumbnail.prototype.maxX = function () {
|
|
return 700;
|
|
};
|
|
Thumbnail.prototype.minX = function () {
|
|
return -200;
|
|
};
|
|
Thumbnail.prototype.maxY = function () {
|
|
return 600;
|
|
};
|
|
Thumbnail.prototype.minY = function () {
|
|
return -100;
|
|
};
|
|
Thumbnail.prototype.angle = function () {
|
|
return this._angle;
|
|
};
|
|
Thumbnail.prototype.angleUp = function (n) {
|
|
this._angle += n;
|
|
if (this._angle > 360) {
|
|
this._angle -= 360;
|
|
}
|
|
if (this._angle < -360) {
|
|
this._angle += 360;
|
|
}
|
|
};
|
|
return Thumbnail;
|
|
})();
|
|
var AvJacket = /** @class */ (function () {
|
|
function AvJacket(actor, itemId, manId) {
|
|
this._backItemId = 211;
|
|
this._manLayout = 0;
|
|
this._manZIndex = ManZIndex.back;
|
|
this._partsMap = {};
|
|
this._fixMap = {};
|
|
this._thumbnail = new Thumbnail();
|
|
this._avActor = new AvActor(actor, itemId);
|
|
this._avText = new AvText();
|
|
this._manId = manId;
|
|
this._manCos = new CostumeSaver(this._manId, 1);
|
|
if (ConfigManager.language == "en") {
|
|
this._layout = 12;
|
|
} else {
|
|
this._layout = 11;
|
|
}
|
|
if (this.isManCosEnabled()) {
|
|
this._manCos.setInnerBottomId("a");
|
|
}
|
|
}
|
|
AvJacket.prototype.avActor = function () {
|
|
return this._avActor;
|
|
};
|
|
AvJacket.prototype.isDirty = function () {
|
|
return this._dirty;
|
|
};
|
|
AvJacket.prototype.clearDirty = function () {
|
|
this._dirty = false;
|
|
this._avActor.clearDirty();
|
|
this._avText.clearDirty();
|
|
};
|
|
AvJacket.prototype.setDirty = function () {
|
|
this._dirty = true;
|
|
};
|
|
AvJacket.prototype.setScreenShot = function (shot) {
|
|
this._screenShot = shot;
|
|
this._dirty = true;
|
|
};
|
|
AvJacket.prototype.screenShot = function () {
|
|
return this._screenShot;
|
|
};
|
|
AvJacket.prototype.cos = function () {
|
|
return this._avActor._cos;
|
|
};
|
|
AvJacket.prototype.actorId = function () {
|
|
return this.avActor().actorId();
|
|
};
|
|
AvJacket.prototype.avText = function () {
|
|
return this._avText;
|
|
};
|
|
AvJacket.prototype.backItemId = function () {
|
|
return this._backItemId;
|
|
};
|
|
AvJacket.prototype.setBackItemId = function (n) {
|
|
this._backItemId = n;
|
|
this._dirty = true;
|
|
};
|
|
AvJacket.prototype.auto = function () {
|
|
this._avText.auto();
|
|
this._dirty = true;
|
|
};
|
|
AvJacket.prototype.setLayout = function (n) {
|
|
this._layout = n;
|
|
};
|
|
AvJacket.prototype.layout = function () {
|
|
return this._layout;
|
|
};
|
|
AvJacket.prototype.isBottom = function () {
|
|
return this._layout == 2;
|
|
};
|
|
AvJacket.prototype.isCenter = function () {
|
|
return this._layout == 21 || this._layout == 22;
|
|
};
|
|
AvJacket.prototype.isVertical = function () {
|
|
switch (this._layout) {
|
|
case 1:
|
|
case 11:
|
|
case 13:
|
|
return true;
|
|
}
|
|
return false;
|
|
};
|
|
AvJacket.prototype.isTopBottom = function () {
|
|
switch (this._layout) {
|
|
case 21:
|
|
case 22:
|
|
return true;
|
|
}
|
|
return false;
|
|
};
|
|
AvJacket.prototype.isNoScreenShot = function () {
|
|
switch (this._layout) {
|
|
case 1:
|
|
case 2:
|
|
return true;
|
|
}
|
|
return false;
|
|
};
|
|
AvJacket.prototype.scale = function () {
|
|
switch (this._layout) {
|
|
case 13:
|
|
case 14:
|
|
return 0.45;
|
|
}
|
|
return 0.3;
|
|
};
|
|
AvJacket.prototype.actorOffsetX = function () {
|
|
return this.baseActorOffsetX() + this.manLayoutActorOffsetX();
|
|
};
|
|
AvJacket.prototype.baseActorOffsetX = function () {
|
|
return 0;
|
|
};
|
|
AvJacket.prototype.manLayoutActorOffsetX = function () {
|
|
switch (this._manLayout) {
|
|
case ManLayout.none:
|
|
return 0;
|
|
case ManLayout.left:
|
|
return 25;
|
|
case ManLayout.right:
|
|
return -25;
|
|
}
|
|
return 0;
|
|
};
|
|
AvJacket.prototype.manLayoutActorOffsetY = function (actorId) {
|
|
if (this._layout > 2) {
|
|
return 0;
|
|
}
|
|
switch (actorId) {
|
|
case 3:
|
|
return 23;
|
|
case 5:
|
|
return 23;
|
|
case 8:
|
|
return 23;
|
|
case 9:
|
|
return 10;
|
|
case 10:
|
|
return 23;
|
|
case 11:
|
|
return 20;
|
|
case 13:
|
|
return 13;
|
|
case 17:
|
|
return 23;
|
|
case 18:
|
|
return -10;
|
|
case 21:
|
|
return -10;
|
|
case 22:
|
|
return 0;
|
|
}
|
|
return 0;
|
|
};
|
|
AvJacket.prototype.manX = function () {
|
|
switch (this._manLayout) {
|
|
case ManLayout.none:
|
|
return 0;
|
|
case ManLayout.left:
|
|
return -20;
|
|
case ManLayout.right:
|
|
return 40;
|
|
}
|
|
return 0;
|
|
};
|
|
AvJacket.prototype.manY = function () {
|
|
switch (this._manId) {
|
|
case 20:
|
|
return -10;
|
|
case 22:
|
|
return -30;
|
|
case 1:
|
|
return -20;
|
|
case 2:
|
|
return 40;
|
|
}
|
|
return 0;
|
|
};
|
|
AvJacket.prototype.actorOffsetY = function (actorId) {
|
|
return this.manLayoutActorOffsetY(actorId);
|
|
};
|
|
AvJacket.prototype.title = function () {
|
|
if (this._avText) {
|
|
return this._avText.title();
|
|
}
|
|
return "";
|
|
};
|
|
AvJacket.prototype.subTitle = function () {
|
|
if (this._avText) {
|
|
return this._avText.subTitle();
|
|
}
|
|
return "";
|
|
};
|
|
AvJacket.prototype.hasParts = function (armorId) {
|
|
return this._partsMap[armorId] == true;
|
|
};
|
|
AvJacket.prototype.setParts = function (armorId, b) {
|
|
this._partsMap[armorId] = b;
|
|
};
|
|
AvJacket.prototype.changeParts = function (armorId) {
|
|
this._partsMap[armorId] = !this._partsMap[armorId];
|
|
if (this._partsMap[armorId]) {
|
|
var armor = $dataArmors[armorId];
|
|
var groupId = parseInt(armor.meta["group"]);
|
|
this.removePartsGroup(groupId, armor.id);
|
|
}
|
|
};
|
|
AvJacket.prototype.partsList = function () {
|
|
var result = [];
|
|
for (var key in this._partsMap) {
|
|
if (!this._partsMap[key]) {
|
|
continue;
|
|
}
|
|
var armorId = parseInt(key);
|
|
var parts = parseInt($dataArmors[armorId].meta["parts"]);
|
|
result.push(parts);
|
|
}
|
|
return result;
|
|
};
|
|
AvJacket.prototype.removePartsGroup = function (groupId, armorId) {
|
|
for (var key in this._partsMap) {
|
|
var armorId2 = parseInt(key);
|
|
if (armorId2 == armorId) {
|
|
continue;
|
|
}
|
|
var armor = $dataArmors[armorId2];
|
|
var groupId2 = parseInt(armor.meta["group"]);
|
|
if (groupId2 != groupId) {
|
|
continue;
|
|
}
|
|
if (this._partsMap[armorId2]) {
|
|
this._partsMap[armorId2] = false;
|
|
}
|
|
}
|
|
};
|
|
AvJacket.prototype.isDividedLayout = function () {
|
|
switch (this._layout) {
|
|
case 11:
|
|
case 13:
|
|
return true;
|
|
}
|
|
return false;
|
|
};
|
|
AvJacket.prototype.isActorLayout = function () {
|
|
switch (this._layout) {
|
|
case 1:
|
|
case 2:
|
|
case 11:
|
|
case 12:
|
|
case 13:
|
|
case 14:
|
|
return true;
|
|
}
|
|
return false;
|
|
};
|
|
AvJacket.prototype.isActorOnlyLayout = function () {
|
|
switch (this._layout) {
|
|
case 1:
|
|
case 2:
|
|
return true;
|
|
}
|
|
return false;
|
|
};
|
|
AvJacket.prototype.hasNoImage = function () {
|
|
return this.isActorOnlyLayout() && !this.isThumbnail();
|
|
};
|
|
AvJacket.prototype.isBigActorLayout = function () {
|
|
switch (this._layout) {
|
|
case 13:
|
|
case 14:
|
|
return true;
|
|
}
|
|
return false;
|
|
};
|
|
AvJacket.prototype.clearParts = function (groupId) {
|
|
for (var key in this._partsMap) {
|
|
var armorId2 = parseInt(key);
|
|
var armor = $dataArmors[armorId2];
|
|
var groupId2 = parseInt(armor.meta["group"]);
|
|
if (groupId2 != groupId) {
|
|
continue;
|
|
}
|
|
if (this._partsMap[armorId2]) {
|
|
this._partsMap[armorId2] = false;
|
|
}
|
|
}
|
|
};
|
|
AvJacket.prototype.isFixed = function (type) {
|
|
return this._fixMap[type];
|
|
};
|
|
AvJacket.prototype.changeFix = function (type) {
|
|
this._fixMap[type] = !this._fixMap[type];
|
|
};
|
|
AvJacket.prototype.setManZIndex = function (n) {
|
|
this._manZIndex = n;
|
|
};
|
|
AvJacket.prototype.manZIndex = function () {
|
|
return this._manZIndex;
|
|
};
|
|
AvJacket.prototype.setManLayout = function (n) {
|
|
this._manLayout = n;
|
|
};
|
|
AvJacket.prototype.manLayout = function () {
|
|
return this._manLayout;
|
|
};
|
|
AvJacket.prototype.manId = function () {
|
|
if (!this._manLayout) {
|
|
return -1;
|
|
}
|
|
if (!this._manId) {
|
|
return -1;
|
|
}
|
|
return this._manId;
|
|
};
|
|
AvJacket.prototype.isManCosEnabled = function () {
|
|
switch (this._manId) {
|
|
case 1:
|
|
case 3:
|
|
case 5:
|
|
return true;
|
|
}
|
|
return false;
|
|
};
|
|
AvJacket.prototype.manActor = function () {
|
|
return $gameActors.actor(this._manId);
|
|
};
|
|
AvJacket.prototype.manCos = function () {
|
|
return this._manCos;
|
|
};
|
|
AvJacket.prototype.isManTachieEnabled = function () {
|
|
switch (this._manId) {
|
|
case 1:
|
|
return true;
|
|
case 2:
|
|
return true;
|
|
case 3:
|
|
return true;
|
|
case 5:
|
|
return true;
|
|
case 16:
|
|
return true;
|
|
case 18:
|
|
return true;
|
|
case 19:
|
|
return true;
|
|
case 20:
|
|
return true;
|
|
case 21:
|
|
return true;
|
|
case 22:
|
|
return true;
|
|
}
|
|
return false;
|
|
};
|
|
AvJacket.prototype.isThumbnail = function () {
|
|
if (!this._thumbnail) {
|
|
return false;
|
|
}
|
|
return this._thumbnail.isEnabled();
|
|
};
|
|
AvJacket.prototype.setThumbnailEnabled = function (b) {
|
|
if (!this._thumbnail) {
|
|
return;
|
|
}
|
|
this._thumbnail.setEnabled(b);
|
|
};
|
|
AvJacket.prototype.thumbnail = function () {
|
|
return this._thumbnail;
|
|
};
|
|
AvJacket.prototype.setThumbnail = function (t) {
|
|
this._thumbnail = t;
|
|
};
|
|
return AvJacket;
|
|
})();
|
|
var ColorType;
|
|
(function (ColorType) {
|
|
ColorType["water"] = "#1693a5";
|
|
ColorType["red"] = "#a51615";
|
|
ColorType["black"] = "#000000";
|
|
ColorType["white"] = "#EFEFEF";
|
|
ColorType["red2"] = "#221715";
|
|
ColorType["yellow"] = "#FAF11A";
|
|
ColorType["pink"] = "#990099";
|
|
})(ColorType || (ColorType = {}));
|
|
var AvLayout = /** @class */ (function () {
|
|
function AvLayout(color1, color2, outColor1, outColor2, bgColor) {
|
|
this._textColor1 = color1;
|
|
this._textColor2 = color2;
|
|
this._outlineColor1 = outColor1;
|
|
this._outlineColor2 = outColor2;
|
|
this._bgColor = bgColor;
|
|
}
|
|
AvLayout.prototype.textColor1 = function () {
|
|
return this._textColor1;
|
|
};
|
|
AvLayout.prototype.textColor2 = function () {
|
|
return this._textColor2;
|
|
};
|
|
AvLayout.prototype.outlineColor1 = function () {
|
|
return this._outlineColor1;
|
|
};
|
|
AvLayout.prototype.outlineColor2 = function () {
|
|
return this._outlineColor2;
|
|
};
|
|
AvLayout.prototype.bgColor = function () {
|
|
return this._bgColor;
|
|
};
|
|
return AvLayout;
|
|
})();
|
|
var AvLayoutManager = /** @class */ (function () {
|
|
function AvLayoutManager() {
|
|
this._map = {};
|
|
this.create1();
|
|
}
|
|
AvLayoutManager.prototype.create1 = function () {
|
|
this._map[1] = new AvLayout(
|
|
ColorType.white,
|
|
ColorType.white,
|
|
ColorType.water,
|
|
ColorType.red,
|
|
ColorType.white
|
|
);
|
|
this._map[2] = new AvLayout(
|
|
ColorType.white,
|
|
ColorType.white,
|
|
ColorType.water,
|
|
ColorType.water,
|
|
ColorType.white
|
|
);
|
|
this._map[3] = new AvLayout(
|
|
ColorType.white,
|
|
ColorType.white,
|
|
ColorType.black,
|
|
ColorType.black,
|
|
ColorType.red2
|
|
);
|
|
this._map[4] = new AvLayout(
|
|
ColorType.yellow,
|
|
ColorType.yellow,
|
|
ColorType.black,
|
|
ColorType.black,
|
|
ColorType.red2
|
|
);
|
|
this._map[5] = new AvLayout(
|
|
ColorType.white,
|
|
ColorType.white,
|
|
ColorType.pink,
|
|
ColorType.pink,
|
|
ColorType.red2
|
|
);
|
|
};
|
|
AvLayoutManager.prototype.colorScheme = function (id) {
|
|
return this._map[id];
|
|
};
|
|
return AvLayoutManager;
|
|
})();
|
|
var Thickness;
|
|
(function (Thickness) {
|
|
Thickness[(Thickness["bold"] = 1)] = "bold";
|
|
Thickness[(Thickness["normal"] = 2)] = "normal";
|
|
Thickness[(Thickness["slim"] = 3)] = "slim";
|
|
Thickness[(Thickness["thin"] = 4)] = "thin";
|
|
})(Thickness || (Thickness = {}));
|
|
var $gameAvJacketMaker = new AvJacketMaker();
|
|
var $gameAvJacketList = new AvJacketList();
|
|
var $gameAvLayoutManager = new AvLayoutManager();
|