Example #1
0
        public md2LOL(string fileName)
        {
            animlist = new List <anim_t>();
            anim_t a1 = new anim_t();

            a1.first_frame = 0; a1.last_frame = 30; a1.fps = 30;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 31; a1.last_frame = 60; a1.fps = 30;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 61; a1.last_frame = 90; a1.fps = 30;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 91; a1.last_frame = 120; a1.fps = 30;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 121; a1.last_frame = 150; a1.fps = 30;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 151; a1.last_frame = 178; a1.fps = 30;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 181; a1.last_frame = 210; a1.fps = 30;
            animlist.Add(a1);

            LOLMD2AnimationNames = new List <string>();
            LOLMD2AnimationNames.Add("Stand");
            LOLMD2AnimationNames.Add("Attack1");
            LOLMD2AnimationNames.Add("Attack2");
            LOLMD2AnimationNames.Add("Run");
            LOLMD2AnimationNames.Add("Death");
            LOLMD2AnimationNames.Add("Spell1");
            LOLMD2AnimationNames.Add("Spell2");

            TranslationMatrix = new mat4(1);
            rotationMatrix    = new mat4(1);
            scaleMatrix       = new mat4(1);

            LoadModel(fileName);
        }
Example #2
0
        public void LoadNewModel(string fileName)
        {
            animlist = new List <anim_t>();
            anim_t a1 = new anim_t();

            a1.first_frame = 16; a1.last_frame = 19; a1.fps = 9;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 3; a1.last_frame = 10; a1.fps = 9;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 11; a1.last_frame = 14; a1.fps = 11;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 0; a1.last_frame = 3; a1.fps = 9;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 58; a1.last_frame = 61; a1.fps = 7;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 62; a1.last_frame = 65; a1.fps = 7;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 66; a1.last_frame = 71; a1.fps = 7;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 72; a1.last_frame = 83; a1.fps = 7;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 84; a1.last_frame = 94; a1.fps = 7;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 95; a1.last_frame = 111; a1.fps = 10;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 112; a1.last_frame = 122; a1.fps = 7;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 123; a1.last_frame = 134; a1.fps = 6;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 135; a1.last_frame = 153; a1.fps = 10;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 154; a1.last_frame = 159; a1.fps = 7;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 160; a1.last_frame = 168; a1.fps = 10;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 169; a1.last_frame = 172; a1.fps = 7;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 173; a1.last_frame = 177; a1.fps = 5;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 178; a1.last_frame = 183; a1.fps = 7;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 184; a1.last_frame = 189; a1.fps = 7;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 190; a1.last_frame = 197; a1.fps = 7;
            animlist.Add(a1);
            a1             = new anim_t();
            a1.first_frame = 198; a1.last_frame = 198; a1.fps = 5;
            animlist.Add(a1);

            MD2AnimationNames = new List <string>();
            MD2AnimationNames.Add("Stand");
            MD2AnimationNames.Add("Run");
            MD2AnimationNames.Add("Attach");
            MD2AnimationNames.Add("Pain_A");
            MD2AnimationNames.Add("Pain_B");
            MD2AnimationNames.Add("Pain_C");
            MD2AnimationNames.Add("Jump");
            MD2AnimationNames.Add("Flip");
            MD2AnimationNames.Add("Salute");
            MD2AnimationNames.Add("Fallback");
            MD2AnimationNames.Add("Wave");
            MD2AnimationNames.Add("Pointing");
            MD2AnimationNames.Add("Crouch_stand");
            MD2AnimationNames.Add("Crouch_walk");
            MD2AnimationNames.Add("Crouch_attack");
            MD2AnimationNames.Add("Crouch_pain");
            MD2AnimationNames.Add("Crouch_death");
            MD2AnimationNames.Add("Death_fallback");
            MD2AnimationNames.Add("Death_fallforward");
            MD2AnimationNames.Add("Death_fallbackslow");
            MD2AnimationNames.Add("BOOM");

            TranslationMatrix = new mat4(1);
            rotationMatrix    = new mat4(1);
            scaleMatrix       = new mat4(1);

            LoadModel(fileName);
        }