给做整合同学的教程-全屏特效自适应分辨率的写法
mugenboss吧
全部回复
仅看楼主
level 10
最近玩到个LEGACY整合不错,考虑整理一个,有同好否?
目前涉及到的全屏背景,SC,DC,02UM等皆可用以下方法改为自适应,一次写完终生不用改!
本方法当人物localcoord = 320
在320:240,640:480,640,360,720:405,720:540,1280:720中测试通过
2018年12月04日 04点12分 1
level 10
[Statedef 40001];02UM大背景
anim = 9999
。。。
[State 40001, Tile #1-7]
type = Explod
triggerall = !numexplod(15600)
trigger1 = !time
anim = ifelse((root,var(58) = 0),15600,15610)
ID = 15600
pos = 0,0
postype = left ;p2,front,back,left,right
removetime = 10
pausemovetime = -1
supermovetime = -1
scale = 1,(4*gameheight) / (gamewidth*3)
;此处普屏 4:3时 scale为1:1
; 宽屏 16:9时 scale需调整为1:.75
;当人物localcoord = 320,180(或240也可)时
;由于mugen可读取mugen.cfg中gameheight,gamewidth数据(不写默认240:320)
;代入后比例即为自适应
sprpriority = -20
ownpal = 1
ignorehitpause = 1
bindtime = -1
persistent = 0
2018年12月04日 04点12分 2
level 10
;坐标pos和大小scale都应按比例补正
[State 40001, P2 BG];如红蓝长条
type = Explod
triggerall = !numexplod(15651)
;triggerall = palno = [1,6]
triggerall = teamside = 2
trigger1 = !time
anim = 10010
ID = 15651
pos = 0,abs((240*var(0))-81)*(4*gameheight) / (gamewidth*3)
postype = right ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,(4*gameheight) / (gamewidth*3) ;0.75
facing = -1
sprpriority = -20
ownpal = 1
ignorehitpause = 1
[State 40001, P1 PORTRAIT];UM头像
type = Explod
triggerall = !numexplod(15660)
triggerall = teamside = 1
trigger1 = !time
anim = ifelse((root,var(58) = 0),10015,10025)
ID = 15660
pos = 0,abs((240*var(0))-81)*(4*gameheight) / (gamewidth*3)
postype = left ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,(4*gameheight) / (gamewidth*3) ;0.75
sprpriority = -19
ownpal = 1
ignorehitpause = 1
[State 40003, ModifyExplod];变化中也应补正
type = ModifyExplod
trigger1 = time = 2
ID = 15650
scale = 1,0.3*(4*gameheight) / (gamewidth*3) ;0.225
2018年12月04日 04点12分 3
level 10
若当人物localcoord = 400时,所有全屏背景或技能都需按比例增大,比例为*400/320,如要自适应,必须想办法在cns中读取localcoord的数值
2018年12月04日 04点12分 4
level 10
PS:三神器疯麻子的mugen legacy全适配通用火花版和mugen match记分系统通用火花版已改好,年前放出
2018年12月04日 04点12分 5
level 10
以上内容版权所有,转载注明本人为作者,谢谢
2018年12月04日 05点12分 7
level 10
通用stage的改法最简单的是:16:9向4:3切换时只需调整zoomin、out比例即可,再不行就放大背景的yscale。
2018年12月05日 08点12分 8
level 10
实测1.1b及之前版本,stage.def中zoomin、out及各scale读取gameheight / gamewidth失败(即无效,stage下该代码不可用)
2018年12月05日 08点12分 9
level 1
你回坑了吗??那个我用下你的人物素材方便能留个联系方式吗,如果可以的话。
2018年12月18日 04点12分 11
可以,我在日万群里的,偶尔会上线
2018年12月18日 14点12分
@美女唯一xhq 我是新人,找不到他的群。我qq875107563请多指教
2018年12月18日 14点12分
level 1
这个代码粘在哪里啊[汗]
2021年10月07日 00点10分 12
1