赞 | 58 |
VIP | 37 |
好人卡 | 59 |
积分 | 12 |
经验 | 66255 |
最后登录 | 2023-5-29 |
在线时间 | 1017 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 1232
- 在线时间
- 1017 小时
- 注册时间
- 2011-4-30
- 帖子
- 1516
|
Window_Base.prototype.drawFace = function(faceName, faceIndex, x, y, width, height) {
width = width || Window_Base._faceWidth;
height = height || Window_Base._faceHeight;
var bitmap = ImageManager.loadFace(faceName);
var pw = Window_Base._faceWidth;
var ph = Window_Base._faceHeight;
var sw = Math.min(width, pw);
var sh = Math.min(height, ph);
var dx = Math.floor(x + Math.max(width - pw, 0) / 2);
var dy = Math.floor(y + Math.max(height - ph, 0) / 2);
var sx = faceIndex % 4 * pw + (pw - sw) / 2;
var sy = Math.floor(faceIndex / 4) * ph + (ph - sh) / 2;
this.contents.blt(bitmap, sx, sy, sw, sh, dx, dy);
};
我的方法是改成bug未知
Window_Base.prototype.drawFace = function(faceName, faceIndex, x, y, width, height) {
width = width || Window_Base._faceWidth;
height = height || Window_Base._faceHeight;
var bitmap = ImageManager.loadFace(faceName);
var pw = Window_Base._faceWidth;
var ph = Window_Base._faceHeight;
var sw = Math.min(width, pw);
var sh = Math.min(height, ph);
var dx = Math.floor(x + Math.max(width - pw, 0) / 2);
var dy = Math.floor(y + Math.max(height - ph, 0) / 2);
var sx = faceIndex % 4 * pw + (pw - sw) / 2;
var sy = Math.floor(faceIndex / 4) * ph + (ph - sh) / 2;
// this.contents.blt(bitmap, sx, sy, sw, sh, dx, dy)
bitmap.addLoadListener(
this.contents.blt.bind(this.contents ,bitmap, sx, sy, sw, sh, dx, dy)
);
}; |
评分
-
查看全部评分
|