/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package transientlibs.objects.general;
import transientlibs.processors.misc.Detonator;
import transientlibs.tex.StoryList;
import transientlibs.bindedobjects.core.Binding;
import gnu.trove.map.hash.TObjectIntHashMap;
import java.io.*;
import transientlibs.slick2d.util.Log;
import org.apache.log4j.PropertyConfigurator;
import transientlibs.preui.agents.factories.ElementFactory;
/**
*
* @author kibertoad
*/
public class Initializer {
public static String logName = "game.log";
public static void start () {
//OutputStream output = null;
File logs = new File (logName);
logs.delete();
Log.setLogSystem(new Logs());
//BasicConfigurator.configure();
PropertyConfigurator.configure("log4j.properties");
for (int x = 0; x < Binding.bindedObjectTypes; x++) {
Binding.bindingCodes[x] = new TObjectIntHashMap();
} //for (x = 0; x < 100; x++) {
//
// }
Binding.bindingListCodes.add(new TObjectIntHashMap[10]);
for (int x = 0; x < 10; x++) {
Binding.bindingListCodes.get(0)[x] = new TObjectIntHashMap();
}
StoryList.lastStoryList = StoryList.globalStoryList;
Detonator.INSTANCE.zeroBranch = Binding.getBinding(Binding.branchBinding, "0");
ElementFactory.MarkerType = Binding.getBinding(Binding.interfaceTypeBinding, "marker");
ElementFactory.TextMarkerType = Binding.getBinding(Binding.interfaceTypeBinding, "textmarker");
ElementFactory.AnimationMarkerType = Binding.getBinding(Binding.interfaceTypeBinding, "animationmarker");
ElementFactory.InfoGroupType = Binding.getBinding(Binding.interfaceTypeBinding, "infogroup");
ElementFactory.ButtonGroupType = Binding.getBinding(Binding.interfaceTypeBinding, "buttongroup");
ElementFactory.TextBoxType = Binding.getBinding(Binding.interfaceTypeBinding, "textbox");
ElementFactory.TextInfoType = Binding.getBinding(Binding.interfaceTypeBinding, "textinfo");
}
}