package shadersmod.transform;

import static shadersmod.transform.Names.*;

import java.util.ArrayList;

import shadersmod.transform.Names.Clas;
import shadersmod.transform.Names.Fiel;
import shadersmod.transform.Names.Meth;

public class Namer {

	ArrayList<Clas> ac = new ArrayList();
	ArrayList<Fiel> af = new ArrayList();
	ArrayList<Meth> am = new ArrayList();

	Clas c(String name) {
		Clas x = new Clas(name);
		if (ac!=null) ac.add(x);
		return x;
	}
	Fiel f(Clas clas, String name, String desc) {
		Fiel x = new Fiel(clas, name, desc);
		if (af!=null) af.add(x);
		return x;
	}
	Fiel fd(Clas clas, Fiel fiel) {
		Fiel x = new Fiel(clas, fiel.name, fiel.desc);
		return x;
	}
	Meth m(Clas clas, String name, String desc) {
		Meth x = new Meth(clas, name, desc);
		if (am!=null) am.add(x);
		return x;
	}
	Meth md(Clas clas, Meth meth) {
		Meth x = new Meth(clas, meth.name, meth.desc);
		return x;
	}
	
	public void setNames() {
		setNames1();
		setNames2();
	}
	
	public void setNames1() {
	}
	
	public void setNames2() {
		// derived
		guiOptions_buttonList = fd(guiOptions_,guiScreen_buttonList);
		guiOptions_width      = fd(guiOptions_,guiScreen_width);
		guiOptions_height     = fd(guiOptions_,guiScreen_height);
		guiOptions_mc         = fd(guiOptions_,guiScreen_mc);
		// derived
		frustrum_setPosition  = md(frustum_,iCamera_setPosition);
		worldClient_getCelestialAngle = md(worldClient_,world_getCelestialAngle);
		worldClient_getRainStrength   = md(worldClient_,world_getRainStrength);
		// non-obfuscated
		worldRenderer_sVertexBuilder = new Fiel(worldRenderer_, "sVertexBuilder", sVertexBuilder_.desc);
		abstractTexture_multiTex     = new Fiel(abstractTexture_, "multiTex", multiTexID_.desc);
		textureMap_atlasWidth        = new Fiel(textureMap_, "atlasWidth", "I");
		textureMap_atlasHeight       = new Fiel(textureMap_, "atlasWidth", "I");
		modelRenderer_resetDisplayList = new Meth(modelRenderer_, "resetDisplayList", "()V");
		iTextureObject_getMultiTexID = new Meth(iTextureObject_, "getMultiTexID", "()"+multiTexID_.desc);
	}
}
