import RogueEnvironment from "../../assets/fongoose/RogueEnvironment.png";
import RoguePlayer from "../../assets/fongoose/RoguePlayer.png";
import RogueSlime from "../../assets/fongoose/RogueSlime.png";
import RogueItems from "../../assets/fongoose/RogueItems.png";
import ProfessorFile from "../../assets/DoctorPlayerJulinaPlayer.png";

import Util from "../../assets/Util.png";

export default {
  environment: {
    name: "environment",
    width: 16,
    height: 16,
    file: RogueEnvironment,
    indices: {
      floor: {
        outer: [0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x5, 0x5, 0x07, 0x17, 0x6, 0x16]
      },
      block: 0x17,
      walls: {
        alone: 0x14,
        intersections: {
          e_s: 0x00,
          n_e_s_w: 0x01,
          e_w: 0x02,
          s_w: 0x03,
          n_e_s: 0x10,
          w: 0x11,
          e: 0x12,
          n_s_w: 0x13,
          n_s: 0x20,
          s: 0x21,
          e_s_w: 0x22,
          n_e: 0x30,
          n_e_w: 0x31,
          n: 0x32,
          n_w: 0x33
        }
      }
    }
  },

  player: {
    name: "player",
    width: 32,
    height: 32,
    file: RoguePlayer,
    animations: {
      idle: {
        name: "playerIdle",
        start: 0x01,
        end: 0x07,
        frameRate: 6,
        repeat: true
      },
      walk: {
        name: "playerWalk",
        start: 0x08,
        end: 0x0d,
        frameRate: 10,
        repeat: true
      },
      walkBack: {
        name: "playerWalkBack",
        start: 0x10,
        end: 0x15,
        frameRate: 10,
        repeat: true
      },
      // Ideally attacks should be five frames at 30fps to
      // align with the attack duration of 165ms
      slash: {
        name: "playerSlash",
        frames: [0x18, 0x19, 0x19, 0x1a, 0x1b],
        frameRate: 30,
        repeat: false
      },
      slashUp: {
        name: "playerSlashUp",
        frames: [0x21, 0x22, 0x22, 0x23, 0x24],
        frameRate: 30,
        repeat: false
      },
      slashDown: {
        name: "playerSlashDown",
        frames: [0x29, 0x2a, 0x2a, 0x2b, 0x2c],
        frameRate: 30,
        repeat: false
      },
	  attack: {
		name: "playerAttack",
        frames: [0x29, 0x2a, 0x19, 0x26, 0x1d, 0x1b],
        frameRate: 35,
        repeat: false
	  },
      hit: {
        name: "playerHit",
        start: 0x30,
        end: 0x34,
        frameRate: 24,
        repeat: false
      },
      death: {
        name: "playerDeath",
        start: 0x38,
        end: 0x3d,
        frameRate: 24,
        repeat: false
      }
    }
  },
  
  professor: {
    name: "professor",
    width: 32,
    height: 50,
    file: ProfessorFile,
    animations: {
      idleProf: {
        name: "professorIdle",
        frames: [0x0, 0x2, 0x4],
        frameRate: 1,
        repeat: true
      },
	  idleJulina: {
        name: "julinaIdle",
        frames: [0x8, 0xa, 0xc],
        frameRate: 1,
        repeat: true
      }
    }
  },

  slime: {
    name: "slime",
    width: 32,,
    height: 32,
    file: RogueSlime,
    animations: {
      idle: {
        name: "slimeIdle",
        start: 0x00,
        end: 0x03,
        frameRate: 6,
        repeat: true
      },
      hit: {
        name: "slimeHit",
        start: 0x10,
        end: 0x16,
        frameRate: 18,
        repeat: false
      },
      death: {
        name: "slimeDeath",
        frames: [0x23, 0x22, 0x21, 0x20, 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18],
        frameRate: 24,
        repeat: false
      },
	  alreadyDeath: {
        name: "slimeAlreadyDeath",
        frames: [0x18],
        frameRate: 24,
        repeat: false
      }
    }	
  },
  
  
  barrel: {
    name: "barrel",
    width: 32,,
    height: 32,
    file: RogueItems,
    animations: {
      idle: {
        name: "barrelIdle",
        start: 0x20,
        end: 0x20,
        frameRate: 6,
        repeat: true
      },
      death: {
        name: "barrelDeath",
        frames: [0x20, 0x21, 0x22, 0x23, 0x29, 0x2a],
        frameRate: 24,
        repeat: false
      },
	  alreadyDeath: {
        name: "barrelAlreadyDeath",
        frames: [0x2a],
        frameRate: 24,
        repeat: false
      }
    }	
  },
  
  crate: {
    name: "crate",
    width: 32,,
    height: 32,
    file: RogueItems,
    animations: {
      idle: {
        name: "crateIdle",
        start: 0x20,
        end: 0x20,
        frameRate: 6,
        repeat: true
      },
      death: {
        name: "crateDeath",
        frames: [0x30, 0x31],
        frameRate: 24,
        repeat: false
      },
	  alreadyDeath: {
        name: "crateAlreadyDeath",
        frames: [0x31],
        frameRate: 24,
        repeat: false
      }
    }	
  },

  zombie: {       // TODO: ICH BIN EIN ZOMBIE UND KEIN SCHLEIM
    name: "zombie",
    width: 32,,
    height: 32,
    file: RogueSlime,
    animations: {
      idle: {
        name: "slimeIdle",
        start: 0x00,
        end: 0x03,
        frameRate: 6,
        repeat: true
      },
      hit: {
        name: "slimeHit",
        start: 0x10,
        end: 0x16,
        frameRate: 18,
        repeat: false
      },
      death: {
        name: "slimeDeath",
        frames: [0x23, 0x22, 0x21, 0x20, 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18],
        frameRate: 24,
        repeat: false
      },
	  alreadyDeath: {
        name: "slimeAlreadyDeath",
        frames: [0x18],
        frameRate: 24,
        repeat: false
      }
    }	
  },

  items: {
    name: "items",
    width: 16, 
    height: 16,
    file: RogueItems,
	animations: {
      key: {
        name: "key",
        start: 0x00,
        end: 0x03,
        frameRate: 3,
        repeat: true
      },
      heart: {
        name: "heart",
        start: 0x10,
        end: 0x11,
        frameRate: 1,
        repeat: true
      },
	  lung: {
        name: "lung",
        start: 0x8,
        end: 0x9,
        frameRate: 1,
        repeat: true
      }
	  blood: {
        name: "blood",
        start: 0x18,
        end: 0x18,
        frameRate: 1,
        repeat: true
      },
	  veins: {
        name: "veins",
        start: 0x12,
        end: 0x13,
        frameRate: 1,
        repeat: true
      },
	  ateries: {
        name: "ateries",
        start: 0x14,
        end: 0x15,
        frameRate: 1,
        repeat: true
      },
	  bloodShrine: {
        name: "bloodShrine",
        start: 0x32,
        end: 0x32,
        frameRate: 1,
        repeat: true
      },
    }	
  },

  util: {
    name: "util",
    width: 16,
    height: 16,
    file: Util,
    indices: {
      black: 0x00
    }
  }
};
