package textures.mobs.goblin;

import java.awt.image.BufferedImage;

import _texture.loader.Textures;
import utils.Utils;

/**  ------------- Nihilne ------------
    *** @author Mitch Weaver - 2016 ***
      ~~~~ All Rights Reserved ~~~~ */

public final class GoblinTextures {

	public static final void getTextures(final BufferedImage image){
		final int WIDTH = 33, HEIGHT = 42;
		
		// RUN? WALK? --- 8 directions, 4 frames per direction
		int count = 0;
		for(int i = 1; i < 8+1; i++)
			for(int j = 1; j < 4+1; j++, count++)
				Textures.goblinSheet[count] = Utils.grabSprite(image, j, i, WIDTH, HEIGHT);
		
		// idle1 --- 8 directions, 2 frames per directions
		for(int i = 1; i < 8+1; i++)
			for(int j = 5; j < 6+1; j++, count++)
				Textures.goblinSheet[count] = Utils.grabSprite(image, j, i, WIDTH, HEIGHT);
		
		// idle2 --- 8 directions, 2 frames per directions
		for(int i = 1; i < 8+1; i++)
			for(int j = 7; j < 8+1; j++, count++)
				Textures.goblinSheet[count] = Utils.grabSprite(image, j, i, WIDTH, HEIGHT);
		
		// attack --- 8 directions, 4 frames
		for(int i = 1; i < 8+1; i++)
			for(int j = 9; j < 12+1; j++, count++)
				Textures.goblinSheet[count] = Utils.grabSprite(image, j, i, WIDTH, HEIGHT);
		
		// GET HIT ANIMATINO--- 1 frame, 8 directions
		for(int i = 1; i < 8+1; i++) Textures.goblinSheet[count++] = Utils.grabSprite(image, 13, i, WIDTH, HEIGHT);
			
		// DEATH ANIMATIONS --- 4 frames - 8 directions
		for(int ROW = 1; ROW < 8+1; ROW++)
			for(int COL = 14; COL < 17+1; COL++)
				Textures.goblinSheet[count++] = Utils.grabSprite(image, COL, ROW, WIDTH, HEIGHT);
	}
}
