リビジョン | ef242972dd057d64c28c03f3b29bc4310adc7285 (tree) |
---|---|
日時 | 2017-02-19 07:47:28 |
作者 | SUEHIRO <supersuehiro@user...> |
コミッター | SUEHIRO |
アニメのアルファ値の読み込みを修正
@@ -857,13 +857,24 @@ public &FrameMethods<_t> | ||
857 | 857 | `salpha = 0d1; |
858 | 858 | `dalpha = 0d255; |
859 | 859 | cond @s.equ(a[0..2], "as"): |
860 | - { | |
861 | - index di = @s.find("d", a); | |
862 | - if(di < 0) break; | |
863 | - ushort tmp = .com.aton!ushort?(a[2..di]); | |
864 | - `salpha = (tmp > 0d255 ? 0d255 : tmp); | |
865 | - tmp = .com.aton!ushort?(a[di+1..-1]); | |
866 | - `dalpha = (tmp > 0d255 ? 0d255 : tmp); | |
860 | + if(a[2] >= '0' && a[2] <= '9'){ | |
861 | + index i = 2; | |
862 | + uint alp = 0x0; | |
863 | + loop{do: | |
864 | + alp = alp * 0d10 + (uint)(a[i] - '0'); | |
865 | + i++; | |
866 | + while a[i] >= '0' && a[i] <= '9' && i < #a: | |
867 | + alp &= 0x3fff; | |
868 | + `salpha = (alp > 0d255 ? 0d255 : alp); | |
869 | + } | |
870 | + alp = 0x0; | |
871 | + if(a[i++] == 'd' && a[i] >= '0' && a[i] <= '9') loop{do: | |
872 | + alp = alp * 0d10 + (uint)(a[i] - '0'); | |
873 | + i++; | |
874 | + while a[i] >= '0' && a[i] <= '9' && i < #a: | |
875 | + alp &= 0x3fff; | |
876 | + `dalpha = (alp > 0d255 ? 0d255 : alp); | |
877 | + } | |
867 | 878 | branch{ |
868 | 879 | cond `salpha == 0d1 && `dalpha == 0d255: `salpha = 0d0; |
869 | 880 | cond `salpha == 0d255 && `dalpha == 0d1: `dalpha = 0d0; |