示例#1
0
 public static HairdoInfo GetHairdoInfo(ItemCodex.ItemTypes enType)
 {
     if (enType == ItemCodex.ItemTypes.Null)
     {
         return null;
     }
     HairdoInfo xIt = new HairdoInfo(enType);
     xIt.enItemType = enType;
     ContentManager Content = Program.GetTheGame().Content;
     string sHatPath = "Sprites/Equipment/Hairdos/";
     if (enType == ItemCodex.ItemTypes._Hairdo_Gay)
     {
         sHatPath += "Male/Gay/";
         xIt.sResourceName = "Gay";
         xIt.av2RenderOffsets[0] = new Vector2(2f, 4f);
         xIt.av2RenderOffsets[1] = new Vector2(3f, 2f);
         xIt.av2RenderOffsets[2] = new Vector2(3f, 2f);
         xIt.av2RenderOffsets[3] = new Vector2(2f, 4f);
     }
     else if (enType == ItemCodex.ItemTypes._Hairdo_Ron)
     {
         sHatPath += "Male/Ron/";
         xIt.av2RenderOffsets[0] = new Vector2(2f, 4f);
         xIt.av2RenderOffsets[1] = new Vector2(3f, 2f);
         xIt.av2RenderOffsets[2] = new Vector2(3f, 2f);
         xIt.av2RenderOffsets[3] = new Vector2(3f, 4f);
     }
     else if (enType == ItemCodex.ItemTypes._Hairdo_Afro)
     {
         sHatPath += "Male/Afro-ish/";
         xIt.av2RenderOffsets[0] = new Vector2(3f, 6f);
         xIt.av2RenderOffsets[1] = new Vector2(5f, 4f);
         xIt.av2RenderOffsets[2] = new Vector2(4f, 4f);
         xIt.av2RenderOffsets[3] = new Vector2(2f, 6f);
     }
     else if (enType == ItemCodex.ItemTypes._Hairdo_Ful)
     {
         sHatPath += "Male/Ful/";
         xIt.av2RenderOffsets[0] = new Vector2(1f, 4f);
         xIt.av2RenderOffsets[1] = new Vector2(3f, 2f);
         xIt.av2RenderOffsets[2] = new Vector2(2f, 2f);
         xIt.av2RenderOffsets[3] = new Vector2(2f, 4f);
     }
     else if (enType == ItemCodex.ItemTypes._Hairdo_Random)
     {
         sHatPath += "Male/Random/";
         xIt.av2RenderOffsets[0] = new Vector2(2f, 4f);
         xIt.av2RenderOffsets[1] = new Vector2(3f, 3f);
         xIt.av2RenderOffsets[2] = new Vector2(3f, 2f);
         xIt.av2RenderOffsets[3] = new Vector2(2f, 5f);
     }
     else if (enType == ItemCodex.ItemTypes._Hairdo_Trist)
     {
         sHatPath += "Male/Trist/";
         xIt.av2RenderOffsets[0] = new Vector2(1f, 4f);
         xIt.av2RenderOffsets[1] = new Vector2(3f, 2f);
         xIt.av2RenderOffsets[2] = new Vector2(2f, 2f);
         xIt.av2RenderOffsets[3] = new Vector2(1f, 4f);
     }
     else if (enType == ItemCodex.ItemTypes._Hairdo_Struts)
     {
         sHatPath += "Male/Struts/";
         xIt.av2RenderOffsets[0] = new Vector2(2f, 5f);
         xIt.av2RenderOffsets[1] = new Vector2(3f, 4f);
         xIt.av2RenderOffsets[2] = new Vector2(2f, 3f);
         xIt.av2RenderOffsets[3] = new Vector2(2f, 6f);
         xIt.atxObstructedAlternatesTopSides[1] = Content.Load<Texture2D>(sHatPath + "Right02");
         xIt.atxObstructedAlternatesTopSides[2] = Content.Load<Texture2D>(sHatPath + "Down02");
         xIt.atxObstructedAlternatesTopSides[3] = Content.Load<Texture2D>(sHatPath + "Left02");
     }
     else if (enType == ItemCodex.ItemTypes._Hairdo_Saiya)
     {
         sHatPath += "Male/Saiya/";
         xIt.av2RenderOffsets[0] = new Vector2(5f, 8f);
         xIt.av2RenderOffsets[1] = new Vector2(6f, 6f);
         xIt.av2RenderOffsets[2] = new Vector2(6f, 6f);
         xIt.av2RenderOffsets[3] = new Vector2(2f, 8f);
         xIt.atxObstructedAlternatesTopSides[0] = Content.Load<Texture2D>(sHatPath + "Up02");
         xIt.atxObstructedAlternatesTopSides[1] = Content.Load<Texture2D>(sHatPath + "Right02");
         xIt.atxObstructedAlternatesTopSides[2] = Content.Load<Texture2D>(sHatPath + "Down02");
         xIt.atxObstructedAlternatesTopSides[3] = Content.Load<Texture2D>(sHatPath + "Left02");
     }
     else
     {
         if (enType == ItemCodex.ItemTypes._Hairdo_Baldie)
         {
             xIt.sResourceName = "Baldie";
             xIt.av2RenderOffsets[0] = new Vector2(2f, 3f);
             xIt.av2RenderOffsets[1] = new Vector2(3f, 2f);
             xIt.av2RenderOffsets[2] = new Vector2(3f, 2f);
             xIt.av2RenderOffsets[3] = new Vector2(2f, 3f);
             xIt.atxTextures[0] = RenderMaster.txNullTex;
             xIt.atxTextures[1] = RenderMaster.txNullTex;
             xIt.atxTextures[2] = RenderMaster.txNullTex;
             xIt.atxTextures[3] = RenderMaster.txNullTex;
             return xIt;
         }
         if (enType == ItemCodex.ItemTypes._Hairdo_Sephina)
         {
             sHatPath += "Female/Sephina/";
             xIt.av2RenderOffsets[0] = new Vector2(4f, 4f);
             xIt.av2RenderOffsets[1] = new Vector2(5f, 2f);
             xIt.av2RenderOffsets[2] = new Vector2(5f, 2f);
             xIt.av2RenderOffsets[3] = new Vector2(2f, 4f);
             xIt.atxObstructedAlternatesBot[1] = Content.Load<Texture2D>(sHatPath + "Right02");
             xIt.atxObstructedAlternatesBot[3] = Content.Load<Texture2D>(sHatPath + "Left02");
         }
         else if (enType == ItemCodex.ItemTypes._Hairdo_Ponytail)
         {
             sHatPath += "Female/Ponytail/";
             xIt.av2RenderOffsets[0] = new Vector2(2f, 5f);
             xIt.av2RenderOffsets[1] = new Vector2(7f, 4f);
             xIt.av2RenderOffsets[2] = new Vector2(3f, 4f);
             xIt.av2RenderOffsets[3] = new Vector2(2f, 6f);
             xIt.atxObstructedAlternatesTopSides[1] = Content.Load<Texture2D>(sHatPath + "Right02");
             xIt.atxObstructedAlternatesTopSides[3] = Content.Load<Texture2D>(sHatPath + "Left02");
         }
         else if (enType == ItemCodex.ItemTypes._Hairdo_Buns)
         {
             sHatPath += "Female/Buns/";
             xIt.av2RenderOffsets[0] = new Vector2(5f, 4f);
             xIt.av2RenderOffsets[1] = new Vector2(4f, 3f);
             xIt.av2RenderOffsets[2] = new Vector2(6f, 2f);
             xIt.av2RenderOffsets[3] = new Vector2(2f, 5f);
             xIt.bNoTop = true;
             xIt.atxObstructedAlternatesTopSides[0] = Content.Load<Texture2D>(sHatPath + "Up02");
             xIt.atxObstructedAlternatesTopSides[1] = Content.Load<Texture2D>(sHatPath + "Right02");
             xIt.atxObstructedAlternatesTopSides[2] = Content.Load<Texture2D>(sHatPath + "Down02");
             xIt.atxObstructedAlternatesTopSides[3] = Content.Load<Texture2D>(sHatPath + "Left02");
         }
         else if (enType == ItemCodex.ItemTypes._Hairdo_FemGay)
         {
             sHatPath += "Female/Female Gay/";
             xIt.av2RenderOffsets[0] = new Vector2(3f, 4f);
             xIt.av2RenderOffsets[1] = new Vector2(3f, 2f);
             xIt.av2RenderOffsets[2] = new Vector2(4f, 2f);
             xIt.av2RenderOffsets[3] = new Vector2(2f, 4f);
         }
         else if (enType == ItemCodex.ItemTypes._Hairdo_Quistis)
         {
             sHatPath += "Female/Quistis/";
             xIt.av2RenderOffsets[0] = new Vector2(2f, 5f);
             xIt.av2RenderOffsets[1] = new Vector2(5f, 3f);
             xIt.av2RenderOffsets[2] = new Vector2(3f, 4f);
             xIt.av2RenderOffsets[3] = new Vector2(2f, 5f);
             xIt.atxObstructedAlternatesTopSides[1] = Content.Load<Texture2D>(sHatPath + "Right02");
             xIt.atxObstructedAlternatesTopSides[3] = Content.Load<Texture2D>(sHatPath + "Left02");
         }
         else if (enType == ItemCodex.ItemTypes._Hairdo_Short01)
         {
             sHatPath += "Female/Short01/";
             xIt.av2RenderOffsets[0] = new Vector2(3f, 4f);
             xIt.av2RenderOffsets[1] = new Vector2(5f, 2f);
             xIt.av2RenderOffsets[2] = new Vector2(4f, 2f);
             xIt.av2RenderOffsets[3] = new Vector2(2f, 4f);
             xIt.atxObstructedAlternatesTopSides[2] = Content.Load<Texture2D>(sHatPath + "Down02");
             xIt.atxObstructedAlternatesBot[1] = Content.Load<Texture2D>(sHatPath + "Right02");
             xIt.atxObstructedAlternatesBot[3] = Content.Load<Texture2D>(sHatPath + "Left02");
         }
         else if (enType == ItemCodex.ItemTypes._Hairdo_Short02)
         {
             sHatPath += "Female/Short02/";
             xIt.av2RenderOffsets[0] = new Vector2(5f, 4f);
             xIt.av2RenderOffsets[1] = new Vector2(6f, 2f);
             xIt.av2RenderOffsets[2] = new Vector2(6f, 2f);
             xIt.av2RenderOffsets[3] = new Vector2(2f, 4f);
             xIt.atxObstructedAlternatesTopSides[0] = Content.Load<Texture2D>(sHatPath + "Up02");
             xIt.atxObstructedAlternatesTopSides[2] = Content.Load<Texture2D>(sHatPath + "Down02");
             xIt.atxObstructedAlternatesBot[1] = Content.Load<Texture2D>(sHatPath + "Right02");
             xIt.atxObstructedAlternatesBot[3] = Content.Load<Texture2D>(sHatPath + "Left02");
         }
         else
         {
             if (enType != ItemCodex.ItemTypes._Hairdo_Sidetails)
             {
                 xIt.sResourceName = "Baldie";
                 xIt.av2RenderOffsets[0] = new Vector2(2f, 3f);
                 xIt.av2RenderOffsets[1] = new Vector2(3f, 2f);
                 xIt.av2RenderOffsets[2] = new Vector2(3f, 2f);
                 xIt.av2RenderOffsets[3] = new Vector2(2f, 3f);
                 xIt.atxTextures[0] = RenderMaster.txNullTex;
                 xIt.atxTextures[1] = RenderMaster.txNullTex;
                 xIt.atxTextures[2] = RenderMaster.txNullTex;
                 xIt.atxTextures[3] = RenderMaster.txNullTex;
                 return xIt;
             }
             sHatPath += "Female/Sidetails/";
             xIt.av2RenderOffsets[0] = new Vector2(6f, 5f);
             xIt.av2RenderOffsets[1] = new Vector2(6f, 3f);
             xIt.av2RenderOffsets[2] = new Vector2(7f, 3f);
             xIt.av2RenderOffsets[3] = new Vector2(2f, 5f);
             xIt.bNoTop = true;
             xIt.atxObstructedAlternatesTopSides[0] = Content.Load<Texture2D>(sHatPath + "Up02");
             xIt.atxObstructedAlternatesTopSides[1] = Content.Load<Texture2D>(sHatPath + "Right02");
             xIt.atxObstructedAlternatesTopSides[2] = Content.Load<Texture2D>(sHatPath + "Down02");
             xIt.atxObstructedAlternatesTopSides[3] = Content.Load<Texture2D>(sHatPath + "Left02");
         }
     }
     if (xIt.atxTextures[0] == null)
     {
         xIt.atxTextures[0] = Content.Load<Texture2D>(sHatPath + "Up");
     }
     if (xIt.atxTextures[1] == null)
     {
         xIt.atxTextures[1] = Content.Load<Texture2D>(sHatPath + "Right");
     }
     if (xIt.atxTextures[2] == null)
     {
         xIt.atxTextures[2] = Content.Load<Texture2D>(sHatPath + "Down");
     }
     if (xIt.atxTextures[3] == null)
     {
         xIt.atxTextures[3] = Content.Load<Texture2D>(sHatPath + "Left");
     }
     return xIt;
 }
示例#2
0
 public void ChangeHair(ItemCodex.ItemTypes p_enHairdo)
 {
     this.xHairdo = HairdoCodex.GetHairdoInfo(p_enHairdo);
 }
示例#3
0
 public CharacterDisplay(char p_chBodyType, ItemCodex.ItemTypes p_enHat, ItemCodex.ItemTypes p_enFacegear, ItemCodex.ItemTypes p_enHairdo)
 {
     ContentManager Content = RenderMaster.contPlayerStuff;
     this.chBodyType = p_chBodyType;
     this.txBaseMaleTextures[0] = Content.Load<Texture2D>("Sprites/Heroes/Idle/Up");
     this.txBaseMaleTextures[1] = Content.Load<Texture2D>("Sprites/Heroes/Idle/Right");
     this.txBaseMaleTextures[2] = Content.Load<Texture2D>("Sprites/Heroes/Idle/Down");
     this.txBaseMaleTextures[3] = Content.Load<Texture2D>("Sprites/Heroes/Idle/Left");
     this.txBaseFemaleTextures[0] = Content.Load<Texture2D>("Sprites/Heroes/IdleFemale/Up");
     this.txBaseFemaleTextures[1] = Content.Load<Texture2D>("Sprites/Heroes/IdleFemale/Right");
     this.txBaseFemaleTextures[2] = Content.Load<Texture2D>("Sprites/Heroes/IdleFemale/Down");
     this.txBaseFemaleTextures[3] = Content.Load<Texture2D>("Sprites/Heroes/IdleFemale/Left");
     this.xHat = HatCodex.GetHatInfo(p_enHat);
     this.xFacegear = FacegearCodex.GetHatInfo(p_enFacegear);
     this.xHairdo = HairdoCodex.GetHairdoInfo(p_enHairdo);
     this.rt2dPreRender = new RenderTarget2D(Program.GetTheGame().GraphicsDevice, 150, 150, false, SurfaceFormat.Color, DepthFormat.None);
 }
示例#4
0
 public void ChangeGender()
 {
     this.bIsMale = !this.bIsMale;
     if (this.bIsMale)
     {
         this.xHairdo = HairdoCodex.GetHairdoInfo(ItemCodex.ItemTypes._Hairdo_Gay);
         return;
     }
     this.xHairdo = HairdoCodex.GetHairdoInfo(ItemCodex.ItemTypes._Hairdo_Sephina);
 }
示例#5
0
 public CharacterDisplay(PlayerView xView)
 {
     ContentManager Content = RenderMaster.contPlayerStuff;
     this.txBaseMaleTextures[0] = Content.Load<Texture2D>("Sprites/Heroes/Idle/Up");
     this.txBaseMaleTextures[1] = Content.Load<Texture2D>("Sprites/Heroes/Idle/Right");
     this.txBaseMaleTextures[2] = Content.Load<Texture2D>("Sprites/Heroes/Idle/Down");
     this.txBaseMaleTextures[3] = Content.Load<Texture2D>("Sprites/Heroes/Idle/Left");
     this.txBaseFemaleTextures[0] = Content.Load<Texture2D>("Sprites/Heroes/IdleFemale/Up");
     this.txBaseFemaleTextures[1] = Content.Load<Texture2D>("Sprites/Heroes/IdleFemale/Right");
     this.txBaseFemaleTextures[2] = Content.Load<Texture2D>("Sprites/Heroes/IdleFemale/Down");
     this.txBaseFemaleTextures[3] = Content.Load<Texture2D>("Sprites/Heroes/IdleFemale/Left");
     if (xView.xEquipment.xHairdo != null)
     {
         this.xHairdo = HairdoCodex.GetHairdoInfo(xView.xEquipment.xHairdo.enItemType);
     }
     if (xView.xEquipment.xHat != null)
     {
         this.xHat = HatCodex.GetHatInfo(xView.xEquipment.xHat.enItemType);
     }
     if (xView.xEquipment.xFacegear != null)
     {
         this.xFacegear = FacegearCodex.GetHatInfo(xView.xEquipment.xFacegear.enItemType);
     }
     this.bIsMale = xView.xViewStats.bIsMale;
     this.xClothingSet = new PlayerPalette.ClothingSet(xView.xEquipment.xClothingSet);
     this.rt2dPreRender = new RenderTarget2D(Program.GetTheGame().GraphicsDevice, 150, 150, false, SurfaceFormat.Color, DepthFormat.None);
     this.av4ShaderFeed = RenderMaster.CreateRecolorArray(this.xClothingSet);
     this.av4ShaderHairColorFeed = PlayerPalette.denHairPalettes[this.xClothingSet.enHairColor].av4Palette;
 }