//
// Core Program for TETDM 
// CharacterData.java Version 1.00
// Copyright(C) 2015-2018 TETDM CORE MEMBER ALL RIGHTS RESERVED.
// This program is provided under the license.
//

package source.GameMode;

import source.*;
import source.TextData.*;
import source.Utility.*;

import java.io.File;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.text.*;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.GroupLayout.Alignment;

import java.awt.Graphics2D;


public class CharacterData{
	Control control;
	static String charaname[] = {"Kuroda","Sakura","Sutera","Shijima","Riko","Sugayama"};
	//static String charaname[] = {"Kuroda","Sakura","Sutera","Shijima","Riko","Sugayama","Goto"};
	
	static int nowcharacternumber = 0;
	
	//String charaname;
	
	static ImageIcon Icon[];
	static ImageIcon smallIcon[];
	
	static ImageIcon cosIcon[];
	static ImageIcon cossmallIcon[];
	
	static ImageIcon cosIconshop[];
	static ImageIcon cossmallIconshop[];
	static Image smallImg;
	
	static int CharacterNumber = 6;
	static int CostumeNumber = 18;
	static int OneCostumeNumber = 4;
	static int TotalCostumeNumber = CharacterNumber * OneCostumeNumber;
	static int buycharacternumber[] ={0,0,0,0,0,0};
	//static int buycharacternumber[];
	static int cosnumber[] ={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
	
	
	/*
	static int CharacterNumber = 7;
	static int CostumeNumber = 21;
	static int OneCostumeNumber = 4;
	static int TotalCostumeNumber = CharacterNumber * OneCostumeNumber;
	static int buycharacternumber[] = {0,0,0,0,0,0,0};
	static int cosnumber[] ={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
	*/
	

	CharacterData(){
	
		Icon = new ImageIcon[10];
		smallIcon = new ImageIcon[10];
		
		cosIcon = new ImageIcon[TotalCostumeNumber];
		cossmallIcon = new ImageIcon[TotalCostumeNumber];
		
		cosIconshop = new ImageIcon[CostumeNumber];
		cossmallIconshop = new ImageIcon[CostumeNumber];
	
	//buycharacternumber = new int[CharacterNumber];
	//for(int i=0;i<CharacterNumber;i++){
	//buycharacternumber[i] = 0;
	//}
	
		
	String imagePath = control.absolutePath+"source"+File.separator+"GameMode"+File.separator+"image"+File.separator;
	
		Icon[0] = new ImageIcon(imagePath + "mp.png");
		
		for(int i = 1 ; i< CharacterNumber + 1;i++){
		Icon[i] = new ImageIcon(imagePath + CharacterData.charaname[i-1] + "kage.png");
		}
		
		
		int number = 0;
		int number2 = 1;
		for(int i = 1; i<=CostumeNumber  ;i++){
		cosIconshop[i-1] = new ImageIcon(imagePath + charaname[number] + "Cos" + number2 + "shop.png");
		if(i%3 == 0) number++;
		
		number2++;
		if(i%3 == 0) number2 = 1;
		}
		
		for(int i = 0; i<CharacterNumber + 1;i++){
		smallImg = Icon[i].getImage().getScaledInstance(70, 70, Image.SCALE_SMOOTH);
		smallIcon[i] = new ImageIcon(smallImg);
		}
		
		for(int i = 0;i<CostumeNumber ;i++){
		smallImg = cosIconshop[i].getImage().getScaledInstance(70,70, Image.SCALE_SMOOTH);
		cossmallIconshop[i] = new ImageIcon(smallImg);
		}
		
		int number3 = 0;
		int number4 = 0;
		for(int i = 0; i< TotalCostumeNumber  ;i++){
		cosIcon[i] = new ImageIcon(imagePath + charaname[number] + "Cos" + number3 + ".png");
		if(i%4 == 3) number3++;
		number4++;
		if(i%4 == 3) number4 = 0;
		}
		
		for(int i = 0;i<TotalCostumeNumber ;i++){
		smallImg = cosIcon[i].getImage().getScaledInstance(70,70, Image.SCALE_SMOOTH);
		cossmallIcon[i] = new ImageIcon(smallImg);
		}
	//}
	
	}
	
}
