public void firstPass() {
	Iterator i = opcodes.iterator();
	opCode oc;
	boolean vary = false;

	//Iterate through the op ArrayList
	while(i.hasNext()){
	    oc = (opCode)i.next();
   
	    if(oc instanceof opFrames)
		numFrames = ((opFrames)oc).getNum();
	
	    else if(oc instanceof opBasename)
		baseName = ((opBasename)oc).getName();

	    else if(vary != true && oc instanceof opVary)
		vary = true;
	}

	if(numFrames > 1 && baseName.length() == 0){
		baseName = "new_anim";
		System.out.println("Basename not found. Using 'new_anim'.");
	}
	
	if(numFrames == 1 && vary == true)
	    throw new RuntimeException("Vary command found with no frames.");
	

    }