Example #1
0
        public static MessageTextLayouter Default(int msgInit1, int mgsInit2, ShinFontExtractor.LayoutInfo layoutInfo)
        {
            var mtlParam = new MtlParam
            {
                LayoutWidth       = 1500,
                MsgInitValue2     = mgsInit2,
                f_8               = 0,
                f_c               = 0,
                f_10              = 4,
                SmallTextSize     = 20,
                BigTextSize       = 50,
                f_1c              = 1,
                SomeTableModifier = true,
                b_21              = true,
                b_22              = true,
            };

            var mtlParam2 = new MtlParam2
            {
                ColorDec      = 999,
                TextDrawSpeed = 100,
                Fade          = 200
            };

            return(new MessageTextLayouter(msgInit1, mtlParam, mtlParam2, layoutInfo));
        }
Example #2
0
        public MessageTextLayouter(int msgInit1, MtlParam mtlParam, MtlParam2 mtlParam2, ShinFontExtractor.LayoutInfo layoutInfo)
        {
            _mtlParam = mtlParam;
            if (_mtlParam.SmallTextSize == 0)
            {
                _mtlParam.SmallTextSize = _mtlParam.BigTextSize * .4;
            }

            _defaultFontSize  = 1;
            _defaultTextColor = DecodeColor(mtlParam2.ColorDec);

            mtlParam2.TextDrawSpeed = Math.Min(mtlParam2.TextDrawSpeed, 100);
            _defaultTextDrawSpeed   = .0025;
            if (mtlParam2.TextDrawSpeed >= 0)
            {
                _defaultTextDrawSpeed = (100 - mtlParam2.TextDrawSpeed) * .0001 * .25;
            }

            _defaultFade = Math.Max(0, mtlParam2.Fade);

            _msgInitValue1 = msgInit1;
            _i110          = 0;
            _i114          = 0;
            _i118          = 0;
            _i11c          = 0;
            _lineNumber    = 0;

            _fontInfo = layoutInfo;

            _commands  = new List <Command>();
            _linesVect = new List <LineInfo>();
        }