package gameplay.Characters.Blue;

import engine.Engine;
import engine.math.Vector3f;
import engine.object.Hitbox;
import engine.object.ObjectGl;
import gameplay.frames.Frame;
import gameplay.hitboxes.*;

import java.lang.reflect.Array;
import java.util.ArrayList;

public class BlueBaseFrames {

        /*
        TO COPY PASTE FOR EASY frame function generation :

        private static Frame ExampleFrame(){
                //movement data
                double moveX = 0.0;
                double moveY = 0.0;

                //cancelData
                boolean normalC = false;
                boolean specialC = false;
                boolean jumpC = false;
                boolean moveC = false;
                boolean dashC = false;

                //hitbox lists
                ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
                ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();

                //generate hitboxes here and then use ArrayList add method to add them to the correct list
                Push_HitBox pB1 = new Push_HitBox(200,-150,160,400);

                Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);

                //set sprite data on sheet
                f.setSpriteWrap(0,0,138,138);
                return f;
        }
         */
        private static Frame generateStandFrame1(){
                Passive_HitBox bStandPHB1 = new Passive_HitBox(250,-250,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,75*1.25f,150*1.25f);
                Passive_HitBox bStandPHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB4 = new Passive_HitBox(250*1.25f,-150*1.25f,50*1.25f,50*1.25f);
                Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(200*1.25f,-500*1.25f,200*1.25f,70*1.25f);
                Push_HitBox bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
                phb.add(bStandPHB1);
                phb.add(bStandPHB2);
                phb.add(bStandPHB3);
                phb.add(bStandPHB4);
                pthb.add(bStandPTHB1);
                Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
                        bStandPB1,true,true,true,true,true);
                blueStandframe1.setSpriteWrap(0,0,138,138);
                return blueStandframe1;
        }

        private static Frame generateStandFrame2(){
                Passive_HitBox bStandPHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,75*1.25f,150*1.25f);
                Passive_HitBox bStandPHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB4 = new Passive_HitBox(250*1.25f,-150*1.25f,50*1.25f,50*1.25f);
                Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(200*1.25f,-500*1.25f,200*1.25f,70*1.25f);
                Push_HitBox bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
                phb.add(bStandPHB1);
                phb.add(bStandPHB2);
                phb.add(bStandPHB3);
                phb.add(bStandPHB4);
                pthb.add(bStandPTHB1);
                Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
                        bStandPB1,true,true,true,true,true);
                blueStandframe1.setSpriteWrap(138,0,138,138);
                return blueStandframe1;
        }

        protected static Frame[] blueStandFrames() {
                Frame[] sf = new Frame[24];
                for (int i = 0; i < 12; i++){
                        sf[i] = generateStandFrame1();
                }
                for (int i = 12; i < sf.length; i++){
                        sf[i] = generateStandFrame2();
                }
                return sf;
        }

        private static Frame generateCrouchFrame1(){
                //movement data
                double moveX = 0.0;
                double moveY = 0.0;

                //cancelData
                boolean normalC = true;
                boolean specialC = true;
                boolean jumpC = true;
                boolean moveC = true;
                boolean dashC = true;

                //hitbox lists
                ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
                ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();

                //generate hitboxes here and then use ArrayList add method to add them to the correct list
                Push_HitBox pB = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f);
                Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-250*1.25f,200*1.25f,300*1.25f);
                Passive_HitBox phb2 = new Passive_HitBox(260*1.25f,-200*1.25f,80*1.25f,50*1.25f);
                Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,300*1.25f,70*1.25f);
                pthb.add(pthb1);
                phb.add(phb1);
                phb.add(phb2);

                Frame f = new Frame(moveX,moveY,phb,ahb,pthb,athb,pB,normalC,specialC,jumpC,moveC,dashC);

                f.setSpriteWrap(0,138*2,138,138);
                return f;
        }

        protected static Frame[] blueCrouchFrames() {
                Frame[] cF = {generateCrouchFrame1()};
                return cF;
        }

        private static Frame generateNeutralJumpFrame1(){
                //movement data
                double moveX = 0.0;
                double moveY = 18.0;

                //cancelData
                boolean normalC = true;
                boolean specialC = false;
                boolean jumpC = false;
                boolean moveC = false;
                boolean dashC = false;

                //hitbox lists
                ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
                ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();

                //generate hitboxes here and then use ArrayList add method to add them to the correct list
                Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
                Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
                Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
                Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
                Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
                Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-20*1.25f,70*1.25f,100*1.25f);
                phb.add(phb1);
                phb.add(phb2);
                phb.add(phb3);
                phb.add(phb4);
                phb.add(phb5);

                Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);

                //set sprite data on sheet
                f.setSpriteWrap(138*7,0,138,138);
                return f;
        }

        private static Frame generateNeutralJumpFrame2(){
                //movement data
                double moveX = 0.0;
                double moveY = -18.0;

                //cancelData
                boolean normalC = true;
                boolean specialC = false;
                boolean jumpC = false;
                boolean moveC = false;
                boolean dashC = false;

                //hitbox lists
                ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
                ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();

                //generate hitboxes here and then use ArrayList add method to add them to the correct list
                Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
                Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
                Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
                Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
                Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
                Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-20*1.25f,70*1.25f,100*1.25f);
                phb.add(phb1);
                phb.add(phb2);
                phb.add(phb3);
                phb.add(phb4);
                phb.add(phb5);

                Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);

                //set sprite data on sheet
                f.setSpriteWrap(138*7,0,138,138);
                return f;
        }

        protected static Frame[] blueNeutralJump() {
                Frame[] jF = new Frame[39];
                for(int i = 0; i < 20; i++) {
                        jF[i] = generateNeutralJumpFrame1();
                }
                for(int i = 20; i < jF.length; i++) {
                        jF[i] = generateNeutralJumpFrame2();
                }
                return jF;
        }

        private static Frame GenerateForwardJumpFrame1(){
                //movement data
                double moveX = 10.0;
                double moveY = 18.0;

                //cancelData
                boolean normalC = true;
                boolean specialC = false;
                boolean jumpC = false;
                boolean moveC = false;
                boolean dashC = false;

                //hitbox lists
                ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
                ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();

                //generate hitboxes here and then use ArrayList add method to add them to the correct list
                Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
                Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
                Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,150*1.25f,80*1.25f);
                Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
                Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
                Passive_HitBox phb5 = new Passive_HitBox(210*1.25f,-430*1.25f,70*1.25f,70*1.25f);
                phb.add(phb1);
                phb.add(phb2);
                phb.add(phb3);
                phb.add(phb4);
                phb.add(phb5);

                Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);

                //set sprite data on sheet
                f.setSpriteWrap(138*6,0,138,138);
                return f;
        }

        private static Frame GenerateForwardJumpFrame2(){
                //movement data
                double moveX = 10.0;
                double moveY = 9.0;

                //cancelData
                boolean normalC = true;
                boolean specialC = false;
                boolean jumpC = false;
                boolean moveC = false;
                boolean dashC = false;

                //hitbox lists
                ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
                ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();

                //generate hitboxes here and then use ArrayList add method to add them to the correct list
                Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
                Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
                Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
                Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
                Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
                Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-20*1.25f,70*1.25f,100*1.25f);
                phb.add(phb1);
                phb.add(phb2);
                phb.add(phb3);
                phb.add(phb4);
                phb.add(phb5);

                Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);

                //set sprite data on sheet
                f.setSpriteWrap(138*7,0,138,138);
                return f;
        }

        private static Frame GenerateForwardJumpFrame3(){
                //movement data
                double moveX = 10.0;
                double moveY = -9.0;

                //cancelData
                boolean normalC = true;
                boolean specialC = false;
                boolean jumpC = false;
                boolean moveC = false;
                boolean dashC = false;

                //hitbox lists
                ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
                ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();

                //generate hitboxes here and then use ArrayList add method to add them to the correct list
                Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
                Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
                Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
                Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
                Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
                Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-20*1.25f,70*1.25f,100*1.25f);
                phb.add(phb1);
                phb.add(phb2);
                phb.add(phb3);
                phb.add(phb4);
                phb.add(phb5);

                Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);

                //set sprite data on sheet
                f.setSpriteWrap(138*7,0,138,138);
                return f;
        }

        private static Frame GenerateForwardJumpFrame4(){
                //movement data
                double moveX = 10.0;
                double moveY = -18.0;

                //cancelData
                boolean normalC = true;
                boolean specialC = false;
                boolean jumpC = false;
                boolean moveC = false;
                boolean dashC = false;

                //hitbox lists
                ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
                ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();

                //generate hitboxes here and then use ArrayList add method to add them to the correct list
                Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
                Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
                Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,150*1.25f,80*1.25f);
                Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
                Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
                Passive_HitBox phb5 = new Passive_HitBox(210*1.25f,-430*1.25f,70*1.25f,70*1.25f);
                phb.add(phb1);
                phb.add(phb2);
                phb.add(phb3);
                phb.add(phb4);
                phb.add(phb5);

                Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);

                //set sprite data on sheet
                f.setSpriteWrap(138*6,0,138,138);
                return f;
        }

        protected static Frame[] blueForwardJump() {
                Frame[] jF = new Frame[39];
                for(int i = 0; i < 10; i++) {
                        jF[i] = GenerateForwardJumpFrame1();
                }
                for(int i = 10; i < 20; i++) {
                        jF[i] = GenerateForwardJumpFrame2();
                }
                for(int i = 20; i < 30; i++) {
                        jF[i] = GenerateForwardJumpFrame3();
                }
                for(int i = 30; i < jF.length; i++) {
                        jF[i] = GenerateForwardJumpFrame4();
                }
                return jF;
        }

        private static Frame BackJumpFrame1(){
                //movement data
                double moveX = -10.0;
                double moveY = 18.0;

                //cancelData
                boolean normalC = true;
                boolean specialC = false;
                boolean jumpC = false;
                boolean moveC = false;
                boolean dashC = false;

                //hitbox lists
                ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
                ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();

                //generate hitboxes here and then use ArrayList add method to add them to the correct list
                Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
                Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
                Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,150*1.25f,80*1.25f);
                Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
                Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
                Passive_HitBox phb5 = new Passive_HitBox(210*1.25f,-430*1.25f,70*1.25f,70*1.25f);
                phb.add(phb1);
                phb.add(phb2);
                phb.add(phb3);
                phb.add(phb4);
                phb.add(phb5);

                Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);

                //set sprite data on sheet
                f.setSpriteWrap(138*6,0,138,138);
                return f;
        }

        private static Frame BackJumpFrame2(){
                //movement data
                double moveX = -10.0;
                double moveY = 9.0;

                //cancelData
                boolean normalC = true;
                boolean specialC = false;
                boolean jumpC = false;
                boolean moveC = false;
                boolean dashC = false;

                //hitbox lists
                ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
                ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();

                //generate hitboxes here and then use ArrayList add method to add them to the correct list
                Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
                Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
                Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
                Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
                Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
                Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-20*1.25f,70*1.25f,100*1.25f);
                phb.add(phb1);
                phb.add(phb2);
                phb.add(phb3);
                phb.add(phb4);
                phb.add(phb5);

                Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);

                //set sprite data on sheet
                f.setSpriteWrap(138*7,0,138,138);
                return f;
        }

        private static Frame BackJumpFrame3(){
                //movement data
                double moveX = -10.0;
                double moveY = -9.0;

                //cancelData
                boolean normalC = true;
                boolean specialC = false;
                boolean jumpC = false;
                boolean moveC = false;
                boolean dashC = false;

                //hitbox lists
                ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
                ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();

                //generate hitboxes here and then use ArrayList add method to add them to the correct list
                Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
                Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
                Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
                Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
                Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
                Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-20*1.25f,70*1.25f,100*1.25f);
                phb.add(phb1);
                phb.add(phb2);
                phb.add(phb3);
                phb.add(phb4);
                phb.add(phb5);

                Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);

                //set sprite data on sheet
                f.setSpriteWrap(138*7,0,138,138);
                return f;
        }

        private static Frame BackJumpFrame4(){
                //movement data
                double moveX = -10.0;
                double moveY = -18.0;

                //cancelData
                boolean normalC = true;
                boolean specialC = false;
                boolean jumpC = false;
                boolean moveC = false;
                boolean dashC = false;

                //hitbox lists
                ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
                ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();

                //generate hitboxes here and then use ArrayList add method to add them to the correct list
                Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
                Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
                Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,150*1.25f,80*1.25f);
                Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
                Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
                Passive_HitBox phb5 = new Passive_HitBox(210*1.25f,-430*1.25f,70*1.25f,70*1.25f);
                phb.add(phb1);
                phb.add(phb2);
                phb.add(phb3);
                phb.add(phb4);
                phb.add(phb5);

                Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);

                //set sprite data on sheet
                f.setSpriteWrap(138*6,0,138,138);
                return f;
        }

        protected static Frame[] blueBackJump() {
                Frame[] jF = new Frame[39];
                for(int i = 0; i < 10; i++) {
                        jF[i] = BackJumpFrame1();
                }
                for(int i = 10; i < 20; i++) {
                        jF[i] = BackJumpFrame2();
                }
                for(int i = 20; i < 30; i++) {
                        jF[i] = BackJumpFrame3();
                }
                for(int i = 30; i < jF.length; i++) {
                        jF[i] = BackJumpFrame4();
                }
                return jF;
        }


        private static Frame walkForwardFrame1(){
                Passive_HitBox bStandPHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
                Passive_HitBox bStandPHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f);
                Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
                Push_HitBox bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
                phb.add(bStandPHB1);
                phb.add(bStandPHB2);
                phb.add(bStandPHB3);
                phb.add(bStandPHB4);
                pthb.add(bStandPTHB1);
                Frame blueStandframe1 = new Frame(0.0,8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
                        bStandPB1,true,true,true,true,true);
                blueStandframe1.setSpriteWrap(138*2,0,138,138);
                return blueStandframe1;
        }

        private static Frame walkForwardFrame2(){
                Passive_HitBox bStandPHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
                Passive_HitBox bStandPHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f);
                Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
                Push_HitBox bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
                phb.add(bStandPHB1);
                phb.add(bStandPHB2);
                phb.add(bStandPHB3);
                phb.add(bStandPHB4);
                pthb.add(bStandPTHB1);
                Frame blueStandframe1 = new Frame(0.0,8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
                        bStandPB1,true,true,true,true,true);
                blueStandframe1.setSpriteWrap(138*3,0,138,138);
                return blueStandframe1;
        }

        private static Frame walkForwardFrame3(){
                Passive_HitBox bStandPHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
                Passive_HitBox bStandPHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f);
                Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
                Push_HitBox bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
                phb.add(bStandPHB1);
                phb.add(bStandPHB2);
                phb.add(bStandPHB3);
                phb.add(bStandPHB4);
                pthb.add(bStandPTHB1);
                Frame blueStandframe1 = new Frame(0.0,8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
                        bStandPB1,true,true,true,true,true);
                blueStandframe1.setSpriteWrap(138*4,0,138,138);
                return blueStandframe1;
        }

        private static Frame walkForwardFrame4(){
                Passive_HitBox bStandPHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
                Passive_HitBox bStandPHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f);
                Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
                Push_HitBox bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
                phb.add(bStandPHB1);
                phb.add(bStandPHB2);
                phb.add(bStandPHB3);
                phb.add(bStandPHB4);
                pthb.add(bStandPTHB1);
                Frame blueStandframe1 = new Frame(0.0,8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
                        bStandPB1,true,true,true,true,true);
                blueStandframe1.setSpriteWrap(138*5,0,138,138);
                return blueStandframe1;
        }

        // TODO avoir plusieurs sprite pour crée un cycle de marche
        protected static Frame[] blueFWalk() {
                Frame[] f = new Frame[12];
                f[0] = walkForwardFrame1();
                f[1] = walkForwardFrame1();
                f[2] = walkForwardFrame1();
                f[3] = walkForwardFrame2();
                f[4] = walkForwardFrame2();
                f[5] = walkForwardFrame2();
                f[6] = walkForwardFrame3();
                f[7] = walkForwardFrame3();
                f[8] = walkForwardFrame3();
                f[9] = walkForwardFrame4();
                f[10] = walkForwardFrame4();
                f[11] = walkForwardFrame4();
                return f;
        }


        private static Frame walkBackFrame4(){
                Passive_HitBox bStandPHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
                Passive_HitBox bStandPHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f);
                Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
                Push_HitBox bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
                phb.add(bStandPHB1);
                phb.add(bStandPHB2);
                phb.add(bStandPHB3);
                phb.add(bStandPHB4);
                pthb.add(bStandPTHB1);
                Frame blueStandframe1 = new Frame(0.0,-8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
                        bStandPB1,true,true,true,true,true);
                blueStandframe1.setSpriteWrap(138*2,0,138,138);
                return blueStandframe1;
        }

        private static Frame walkBackFrame3(){
                Passive_HitBox bStandPHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
                Passive_HitBox bStandPHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f);
                Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
                Push_HitBox bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
                phb.add(bStandPHB1);
                phb.add(bStandPHB2);
                phb.add(bStandPHB3);
                phb.add(bStandPHB4);
                pthb.add(bStandPTHB1);
                Frame blueStandframe1 = new Frame(0.0,-8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
                        bStandPB1,true,true,true,true,true);
                blueStandframe1.setSpriteWrap(138*3,0,138,138);
                return blueStandframe1;
        }

        private static Frame walkBackFrame2(){
                Passive_HitBox bStandPHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
                Passive_HitBox bStandPHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f);
                Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
                Push_HitBox bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
                phb.add(bStandPHB1);
                phb.add(bStandPHB2);
                phb.add(bStandPHB3);
                phb.add(bStandPHB4);
                pthb.add(bStandPTHB1);
                Frame blueStandframe1 = new Frame(0.0,-8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
                        bStandPB1,true,true,true,true,true);
                blueStandframe1.setSpriteWrap(138*4,0,138,138);
                return blueStandframe1;
        }

        private static Frame walkBackFrame1(){
                Passive_HitBox bStandPHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
                Passive_HitBox bStandPHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
                Passive_HitBox bStandPHB4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f);
                Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
                Push_HitBox bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
                ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
                ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
                phb.add(bStandPHB1);
                phb.add(bStandPHB2);
                phb.add(bStandPHB3);
                phb.add(bStandPHB4);
                pthb.add(bStandPTHB1);
                Frame blueStandframe1 = new Frame(0.0,-8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
                        bStandPB1,true,true,true,true,true);
                blueStandframe1.setSpriteWrap(138*5,0,138,138);
                return blueStandframe1;
        }

        protected static Frame[] blueBWalk() {
                Frame[] f = new Frame[4];
                f[0] = walkBackFrame1();
                f[1] = walkBackFrame2();
                f[2] = walkBackFrame3();
                f[3] = walkBackFrame4();
                return f;
        }


        public static void main(String[] args) {
                Engine engine = new Engine(640, 480, false, new Vector3f(4.0f, 3.0f));
                engine.init();

                Vector3f BLUE = new Vector3f(0f,0f,1f); //passive_hit
                Vector3f RED = new Vector3f(1f,0f,0f); //active_hit
                Vector3f GREEN = new Vector3f(0f,1f,0f); //passive_throw
                Vector3f YELLOW = new Vector3f(1f,1f,0f); //Active throw
                Vector3f PURPLE = new Vector3f(1f,0f,1f); //pushbox


                String path = "textures/Sprite_sans_grille_9comp.png";
                String pathToBG = "textures/arena1.png";

                Frame f = BlueNormals.ForwardDFrame0();


                ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null);
                blue.setTextureWrap(f.getSprite()[0], f.getSprite()[1], f.getSprite()[2], f.getSprite()[3]);

                int posX = -750;
                int posY = 200;

                blue.translate(new Vector3f(posX,posY,0));

                engine.add_objectGl(blue);
                float posZ = 11f;

                for(Passive_HitBox h: f.getPassHitBox()){
                        Hitbox hh = new Hitbox(posZ,h.getSize_x(),h.getSize_y(),1f,BLUE);
                        engine.add_objectGl(hh);
                        hh.translate(new Vector3f(posX+h.getPosX(),posY+h.getPosY()));
                        posZ++;
                }
                for(Active_HitBox h: f.getActHitBox()){
                        Hitbox hh = new Hitbox(posZ,h.getSize_x(),h.getSize_y(),1f,RED);
                        engine.add_objectGl(hh);
                        hh.translate(new Vector3f(posX+h.getPosX(),posY+h.getPosY()));
                        posZ++;
                }
                for(Passive_throw_HitBox h: f.getPassThrowHitBox()){
                        Hitbox hh = new Hitbox(posZ,h.getSize_x(),h.getSize_y(),1f,GREEN);
                        engine.add_objectGl(hh);
                        hh.translate(new Vector3f(posX+h.getPosX(),posY+h.getPosY()));
                        posZ++;
                }
                for(Active_throw_Hitbox h: f.getActThrowHitBox()){
                        Hitbox hh = new Hitbox(posZ,h.getSize_x(),h.getSize_y(),1f,YELLOW);
                        engine.add_objectGl(hh);
                        hh.translate(new Vector3f(posX+h.getPosX(),posY+h.getPosY()));
                        posZ++;
                }

                Push_HitBox phb = f.getPushHitBox();
                Hitbox hh = new Hitbox(posZ,phb.getSize_x(),phb.getSize_y(),1f,PURPLE);
                engine.add_objectGl(hh);
                hh.translate(new Vector3f(posX+phb.getPosX(),posY+phb.getPosY()));

                engine.update();
                engine.render();

                double ts1 = System.currentTimeMillis();
                double ts2 = System.currentTimeMillis();
                while(ts2 - ts1 < 60000) {
                        ts2 = System.currentTimeMillis();
                }

        }

}