- UID
- 9
- 积分
- 4251
- 帖子
- 293
- 主题
- 40
- 论坛币
- 8462
- 威望
- 29
- EP值
- 1646
- MP值
- 8
- 阅读权限
- 100
- 注册时间
- 2011-8-3
- 在线时间
- 151 小时
- 最后登录
- 2022-8-8
|
- from tcaxPy import *
- def tcaxPy_Init():
- global _FontFileName
- global _FaceID
- global _Fs
- global _TextWidth
- global _TextHeight
- global _TextLength
- global _TextAdvDiff
- global _ResolutionX
- global _OffsetX
- global _FD
- global _Font
- _FontFileName = GetVal(val_FontFileName)
- _FaceID = GetVal(val_FaceID)
- _Fs = GetVal(val_FontSize)
- _TextHeight = GetVal(val_TextHeight)
- _TextWidth = GetVal(val_TextWidth)
- _TextLength = GetVal(val_TextLength)
- _TextAdvDiff = GetVal(val_TextAdvanceDiff)
- _ResolutionX = GetVal(val_ResolutionX)
- _OffsetX = GetVal(val_OffsetX)
- _FD = 1000 / GetVal(val_FXFPS)
- _Font = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
- def Circle1(n, a, b, r): # 圆函数
- CIR = []
- for i in range(n):
- theta = (n - i - 1) * 2 * pi / n
- x = r * cos(theta) + a
- y = r * sin(theta) + b
- CIR.append((x, y))
- return CIR
-
- def Circle2(n, a, b, r): # 圆函数
- CIR = []
- for i in range(n):
- theta = (n - i - 25) * 2 * pi / n
- x = r * cos(theta) + a
- y = r * sin(theta) + b
- CIR.append((x, y))
- return CIR
-
- def Circle3(n, a, b, r): # 圆函数
- CIR = []
- for i in range(n):
- theta = (n - i - 45) * 2 * pi / n
- x = r * cos(theta) + a
- y = r * sin(theta) + b
- CIR.append((x, y))
- return CIR
-
- def Circle4(n, a, b, r): # 圆函数
- CIR = []
- for i in range(n):
- theta = (n - i - 65) * 2 * pi / n
- x = r * cos(theta) + a
- y = r * sin(theta) + b
- CIR.append((x, y))
- return CIR
- def tcaxPy_Fin():
- FinFont(_Font)
-
- time_gap = 1 # you can change this value to 0, or 2 or any other number
- time_fac = 1 # you can change this value to 0, or 2 or any other number
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _x, _y, _a, _txt):
- ASS_BUF = []
- dx = _x - int(_a / 2 + 0.5) # 一个固定操作, 将an5的坐标转换为an7
- dy = _y - int(_Fs / 2 + 0.5) # ASS特效默认采用an5坐标, TCAS特效则采用an7坐标
- TUX2 = '{\p3}m 30 23 b 24 23 24 33 30 33 b 36 33 37 23 30 23 m 35 27 l 61 28 l 35 29 m 26 27 l 0 28 l 26 29 m 29 23 l 30 0 l 31 23 m 29 33 l 30 57 l 31 33 '
- COLOR = ['0061FF','00CCFF','D5CFFE', '008100']
- COLOR1=color1(COLOR[randint(0,3)])
- COLOR3=color3(COLOR[randint(0,3)])
-
- if _j == 0:
- global CLR
- CLR = DivClr('0061FF', '00CCFF', _n//2)
- CLR.extend(DivClr('00CCFF', 'D5CFFE', _n - _n//2))
- if _i > -1 and _i < 5:
-
- ass_main(ASS_BUF, SubL(_BT-20+_j*5,_BT+(_j+1)*5),an(5)+mov(_x+50,_y,_x,_y)+org(_x,_y)+fad(200,0)+bord(1.5)+shad(1)+blur(0.5)+t(fr(-720)), _txt)
- ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_x, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
-
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+50),an(5)+pos(_x, _y)+bord(1.5)+shad(1)+blur(0.5)+color1('FFFFFF')+t(bord(0)+shad(0)+blur(0)+color1('FF8000')), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+50,_ET),an(5)+pos(_x, _y)+bord(0)+shad(0)+blur(0), _txt)
- ass_main(ASS_BUF, SubL(_ET,_ET+30+_j*5),an(5)+mov(_x,_y,_x-50,_y)+org(_x,_y)+bord(0)+shad(0)+blur(0)+t(fr(-720))+fad(0,200), _txt)
- PIX = TextPix(_Font, _txt) # 获取当前文字的PIX结构
- initPosX = _x - int(_a / 2 + 0.5) + PIX[0][0] # 第一个像素的X轴坐标
- initPosY = _y - int(_Fs / 2 + 0.5) + PIX[0][1] # 第一个像素的Y轴坐标
- for h in range (0,PIX[1][1],2): # 开始纵向扫描
- posY = initPosY + h # 当前像素Y轴坐标
- for w in range (0,PIX[1][0],2): # 开始横向扫描
- posX = initPosX + w # 当前像素X轴坐标
- idx = 4 * (h * PIX[1][0] + w) # 脚标
- pixR = PIX[2][idx + 0] # 当前像素的红色分量
- pixG = PIX[2][idx + 1] # 当前像素的绿色分量
- pixB = PIX[2][idx + 2] # 当前像素的蓝色分量
- pixA = PIX[2][idx + 3] # 当前像素的透明度
- if pixA != 0: # 如果当前像素不为透明则进行如下操作
- PIXR = randint(-1,+1)
- rnd = randint(-10,10)
-
- ass_main(ASS_BUF, SubL(int(_BT+_SK-40+w*(_KT/PIX[1][0])),int(_BT+_SK+30+rnd+w*(_KT/PIX[1][0]))-10,0, Pix_Style), an(5)+fad(200,0)+mov(posX-100+randint(-20,20),posY+randint(-30,30),posX+PIXR,posY+PIXR)+COLOR1+alpha1(255-pixA), '{\p3}m 30 23 b 24 23 24 33 30 33 b 36 33 37 23 30 23 m 35 27 l 61 28 l 35 29 m 26 27 l 0 28 l 26 29 m 29 23 l 30 0 l 31 23 m 29 33 l 30 57 l 31 33 ')
- ass_main(ASS_BUF, SubL(int(_BT+_SK+30+rnd+w*(_KT/PIX[1][0]))-10,_BT+_SK+_KT+50,0, Pix_Style), an(5)+pos(posX+PIXR,posY+PIXR)+COLOR1+alpha1(255-pixA), '{\p3}m 30 23 b 24 23 24 33 30 33 b 36 33 37 23 30 23 m 35 27 l 61 28 l 35 29 m 26 27 l 0 28 l 26 29 m 29 23 l 30 0 l 31 23 m 29 33 l 30 57 l 31 33 ')
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT+50,int(_BT+_SK+_KT+90+rnd+w*(_KT/PIX[1][0])),0, Pix_Style), an(5)+pos(posX+PIXR,posY+PIXR)+COLOR1+alpha1(255-pixA), '{\p3}m 30 23 b 24 23 24 33 30 33 b 36 33 37 23 30 23 m 35 27 l 61 28 l 35 29 m 26 27 l 0 28 l 26 29 m 29 23 l 30 0 l 31 23 m 29 33 l 30 57 l 31 33 ')
- ass_main(ASS_BUF, SubL(int(_BT+_SK+_KT+90+rnd+w*(_KT/PIX[1][0])),int(_BT+_SK+_KT+120+w*(_KT/PIX[1][0])),0, Pix_Style), an(5)+fad(0,200)+mov(posX+PIXR,posY+PIXR,posX+100+randint(-20,20),posY+randint(-30,30))+COLOR1+alpha1(255-pixA), '{\p3}m 30 23 b 24 23 24 33 30 33 b 36 33 37 23 30 23 m 35 27 l 61 28 l 35 29 m 26 27 l 0 28 l 26 29 m 29 23 l 30 0 l 31 23 m 29 33 l 30 57 l 31 33 ')
- if _i > 4 and _i < 9:
-
- ass_main(ASS_BUF, SubL(_BT-20+_j*5,_BT+(_j+1)*5),an(5)+mov(_x+50,_y,_x,_y)+org(_x,_y)+fad(200,0)+bord(1.5)+shad(1)+blur(0.5)+t(fr(-720)), _txt)
- ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_x, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
-
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+50),an(5)+pos(_x, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+50,_ET),an(5)+pos(_x, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
- ass_main(ASS_BUF, SubL(_ET,_ET+30+_j*5),an(5)+mov(_x,_y,_x-50,_y)+org(_x,_y)+bord(1.5)+shad(1)+blur(0.5)+t(fr(-720))+fad(0,200), _txt)
-
- ass_main(ASS_BUF, SubL(_BT+_SK-10,_BT+_SK+_KT),an(5)+pos(_x, _y)+shad(0)+bord(3)+blur(5)+fs(60)+t(fs(35))+color1('FFA500')+color3('FFA500')+fad(0,100), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK-10,_BT+_SK+_KT),an(5)+pos(_x, _y)+shad(0)+bord(1)+blur(2)+fs(60)+t(fs(35))+color1('FFFFFF')+fad(0,100), _txt)
-
-
- EFT1 = alpha1(0) + alpha3(180) + color1('FFFFFF') + \
- bord(1) + blur(2) + t(0, 100, bord(0.5) + blur(0.5)) + fad(0, 200)
- TUX = '{\p3}m 30 23 b 24 23 24 33 30 33 b 36 33 37 23 30 23 m 35 27 l 61 28 l 35 29 m 26 27 l 0 28 l 26 29 m 29 23 l 30 0 l 31 23 m 29 33 l 30 57 l 31 33 '
-
- ts = _BT + _SK - 20
- radius = int(0.8* _Fs)
- num = int(1 * 3.14 * radius / 1)
- CIR = Circle1(num, _x, _y, radius)
- for i in range(num):
- POS = pos(CIR[i][0], CIR[i][1])
- EFT = POS + EFT1 + color3('0061FF')+an(5)
- ass_main(ASS_BUF, SubL(ts+i,ts+i + 15, 15, Pix_Style), EFT, TUX)
-
-
- ts = _BT + _SK - 20
- radius = int(0.8* _Fs)
- num = int(1 * 3.14 * radius / 1)
- CIR = Circle2(num, _x, _y, radius)
- for i in range(num):
- POS = pos(CIR[i][0], CIR[i][1])
- EFT = POS + EFT1 + color3('00CCFF')+an(5)
- ass_main(ASS_BUF, SubL(ts+i,ts+i + 15, 15, Pix_Style), EFT, TUX)
-
-
- ts = _BT + _SK - 20
- radius = int(0.8* _Fs)
- num = int(1 * 3.14 * radius / 1)
- CIR = Circle3(num, _x, _y, radius)
- for i in range(num):
- POS = pos(CIR[i][0], CIR[i][1])
- EFT = POS + EFT1 + color3('D5CFFE')+an(5)
- ass_main(ASS_BUF, SubL(ts+i,ts+i + 15, 15, Pix_Style), EFT, TUX)
-
-
- ts = _BT + _SK - 20
- radius = int(0.8* _Fs)
- num = int(1 * 3.14 * radius / 1)
- CIR = Circle4(num, _x, _y, radius)
- for i in range(num):
- POS = pos(CIR[i][0], CIR[i][1])
- EFT = POS + EFT1 + color3('008100')+an(5)
- ass_main(ASS_BUF, SubL(ts+i,ts+i + 15, 15, Pix_Style), EFT, TUX)
-
-
-
- if _i == 9:
- ass_main(ASS_BUF, SubL(_BT-20+_j*5,_BT+(_j+1)*5),an(5)+mov(_x-470,_y,_x-520,_y)+org(_x-520,_y)+fad(200,0)+bord(1.5)+shad(1)+blur(0.5)+t(fr(-720)), _txt)
- ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_x-520, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
-
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+50),an(5)+pos(_x-520, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+50,_ET),an(5)+pos(_x-520, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
- ass_main(ASS_BUF, SubL(_ET,_ET+30+_j*5),an(5)+mov(_x-520,_y,_x-570,_y)+org(_x-520,_y)+bord(1.5)+shad(1)+blur(0.5)+t(fr(-720))+fad(0,200), _txt)
-
- for i in range(0,_a,10):
- for k in range(10):
- R = randint(-20,20)
- B = randint(-5,5)
- ass_main(ASS_BUF, SubL(_BT+_SK+int(i/_Fs*_KT)+R,_BT+_SK+int(i/_Fs*_KT)+R+80), bord(0.3)+blur(1)+mov(dx+i-520,dy+_Fs,dx+i+B-520+randint(-50,50),dy+_Fs+40+R)+color1('FFFFFF')+COLOR3+fad(0,200), TUX2)
- ass_main(ASS_BUF, SubL(_BT+_SK-10,_BT+_SK+_KT+30),an(5)+pos(_x-520, _y)+bord(4)+shad(0)+blur(5)+COLOR3+alpha3(0)+t(alpha3(255)+blur(0)+bord(0)), _txt)
-
- elif _i == 10:
- ass_main(ASS_BUF, SubL(_BT-20+_j*5,_BT+(_j+1)*5),an(5)+mov(_x+570,_y,_x+520,_y)+org(_x+520,_y)+fad(200,0)+bord(1.5)+shad(1)+blur(0.5)+t(fr(-720)), _txt)
- ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_x+520, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
-
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+50),an(5)+pos(_x+520, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+50,_ET),an(5)+pos(_x+520, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
- ass_main(ASS_BUF, SubL(_ET,_ET+30+_j*5),an(5)+mov(_x+520,_y,_x+470,_y)+org(_x+520,_y)+bord(1.5)+shad(1)+blur(0.5)+t(fr(-720))+fad(0,200), _txt)
-
- for i in range(0,_a,10):
- for k in range(10):
- R = randint(-20,20)
- B = randint(-5,5)
- ass_main(ASS_BUF, SubL(_BT+_SK+int(i/_Fs*_KT)+R,_BT+_SK+int(i/_Fs*_KT)+R+80), bord(0.3)+blur(1)+mov(dx+i+520,dy+_Fs,dx+i+B+520+randint(-50,50),dy+_Fs+40+R)+color1('FFFFFF')+COLOR3+fad(0,200), TUX2)
- ass_main(ASS_BUF, SubL(_BT+_SK-10,_BT+_SK+_KT+30),an(5)+pos(_x+520, _y)+bord(4)+shad(0)+blur(5)+COLOR3+alpha3(0)+t(alpha3(255)+blur(0)+bord(0)), _txt)
-
-
-
- if _i > 10 and _i < 14:
- ass_main(ASS_BUF, SubL(_BT-20+_j*5,_BT+(_j+1)*5),an(5)+mov(_x+50,_y,_x,_y)+org(_x,_y)+fad(200,0)+bord(1.5)+shad(1)+blur(0.5)+t(fr(-720)), _txt)
- ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_x, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
-
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+50),an(5)+pos(_x, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+50,_ET),an(5)+pos(_x, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
- ass_main(ASS_BUF, SubL(_ET,_ET+30+_j*5),an(5)+mov(_x,_y,_x-50,_y)+org(_x,_y)+bord(1.5)+shad(1)+blur(0.5)+t(fr(-720))+fad(0,200), _txt)
-
- for i in range(0,_a,10):
- for k in range(10):
- R = randint(-20,20)
- B = randint(-5,5)
- ass_main(ASS_BUF, SubL(_BT+_SK+int(i/_Fs*_KT)+R,_BT+_SK+int(i/_Fs*_KT)+R+80), bord(0.3)+blur(1)+mov(dx+i,dy+_Fs,dx+i+B+randint(-50,50),dy+_Fs+40+R)+color1('FFFFFF')+COLOR3+fad(0,200), TUX2)
- ass_main(ASS_BUF, SubL(_BT+_SK-10,_BT+_SK+_KT+30),an(5)+pos(_x, _y)+bord(4)+shad(0)+blur(5)+COLOR3+alpha3(0)+t(alpha3(255)+blur(0)+bord(0)), _txt)
-
-
- if _i > 13:
-
- ass_main(ASS_BUF, SubL(_BT-20+_j*5,_BT+(_j+1)*5),an(5)+mov(_x+50,_y,_x,_y)+org(_x,_y)+fad(200,0)+bord(1.5)+shad(1)+blur(0.5)+t(fr(-720)), _txt)
- ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_x, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
-
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+50),an(5)+pos(_x, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+50,_ET),an(5)+pos(_x, _y)+bord(1.5)+shad(1)+blur(0.5), _txt)
- ass_main(ASS_BUF, SubL(_ET,_ET+30+_j*5),an(5)+mov(_x,_y,_x-50,_y)+org(_x,_y)+bord(1.5)+shad(1)+blur(0.5)+t(fr(-720))+fad(0,200), _txt)
-
- ass_main(ASS_BUF, SubL(_BT+_SK-10,_BT+_SK+_KT),an(5)+pos(_x, _y)+shad(0)+bord(3)+blur(5)+fs(60)+t(fs(35))+color1('FFA500')+color3('FFA500')+fad(0,100), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK-10,_BT+_SK+_KT),an(5)+pos(_x, _y)+shad(0)+bord(1)+blur(2)+fs(60)+t(fs(35))+color1('FFFFFF')+fad(0,100), _txt)
-
-
- EFT1 = alpha1(0) + alpha3(180) + color1('FFFFFF') + \
- bord(1) + blur(2) + t(0, 100, bord(0.5) + blur(0.5)) + fad(0, 200)
- TUX = '{\p3}m 30 23 b 24 23 24 33 30 33 b 36 33 37 23 30 23 m 35 27 l 61 28 l 35 29 m 26 27 l 0 28 l 26 29 m 29 23 l 30 0 l 31 23 m 29 33 l 30 57 l 31 33 '
-
- ts = _BT + _SK - 20
- radius = int(0.8* _Fs)
- num = int(1 * 3.14 * radius / 1)
- CIR = Circle1(num, _x, _y, radius)
- for i in range(num):
- POS = pos(CIR[i][0], CIR[i][1])
- EFT = POS + EFT1 + color3('0061FF')+an(5)
- ass_main(ASS_BUF, SubL(ts+i,ts+i + 15, 15, Pix_Style), EFT, TUX)
-
-
- ts = _BT + _SK - 20
- radius = int(0.8* _Fs)
- num = int(1 * 3.14 * radius / 1)
- CIR = Circle2(num, _x, _y, radius)
- for i in range(num):
- POS = pos(CIR[i][0], CIR[i][1])
- EFT = POS + EFT1 + color3('00CCFF')+an(5)
- ass_main(ASS_BUF, SubL(ts+i,ts+i + 15, 15, Pix_Style), EFT, TUX)
-
-
- ts = _BT + _SK - 20
- radius = int(0.8* _Fs)
- num = int(1 * 3.14 * radius / 1)
- CIR = Circle3(num, _x, _y, radius)
- for i in range(num):
- POS = pos(CIR[i][0], CIR[i][1])
- EFT = POS + EFT1 + color3('D5CFFE')+an(5)
- ass_main(ASS_BUF, SubL(ts+i,ts+i + 15, 15, Pix_Style), EFT, TUX)
-
-
- ts = _BT + _SK - 20
- radius = int(0.8* _Fs)
- num = int(1 * 3.14 * radius / 1)
- CIR = Circle4(num, _x, _y, radius)
- for i in range(num):
- POS = pos(CIR[i][0], CIR[i][1])
- EFT = POS + EFT1 + color3('008100')+an(5)
- ass_main(ASS_BUF, SubL(ts+i,ts+i + 15, 15, Pix_Style), EFT, TUX)
-
-
- for i in range(0,_a,10):
- for k in range(10):
- R = randint(-20,20)
- B = randint(-5,5)
- ass_main(ASS_BUF, SubL(_BT+_SK+int(i/_Fs*_KT)+R,_BT+_SK+int(i/_Fs*_KT)+R+80), bord(0.3)+blur(1)+mov(dx+i,dy+_Fs,dx+i+B+randint(-50,50),dy+_Fs+40+R)+color1('FFFFFF')+COLOR3+fad(0,200), TUX2)
-
- return (ASS_BUF, None)
复制代码 没撸内置发发以前的东西 最近的也会丢出来(捂脸~~~~ |
-
1
查看全部评分
-
|