public void Draw(Bitmap b, int x, int y, int frame, Direction dir) { Bmp.Draw(north[dir, frame].Image, b, x, y - (int)((PckImage.Width * PckImage.Scale) / 2)); Bmp.Draw(south[dir, frame].Image, b, x, y); Bmp.Draw(east[dir, frame].Image, b, x + (int)((PckImage.Width * PckImage.Scale) / 2), y - (int)((PckImage.Width * PckImage.Scale) / 4)); Bmp.Draw(west[dir, frame].Image, b, x - (int)((PckImage.Width * PckImage.Scale) / 2), y - (int)((PckImage.Width * PckImage.Scale) / 4)); }
public void Draw(Bitmap b, int x, int y, Direction dir, ItemDescriptor weapon) { if (weapon == null) { if ((int)dir < 4) { Bmp.Draw(leftArm.Stationary[dir].Image, b, x, y); Bmp.Draw(torso.Stationary[dir].Image, b, x, y); Bmp.Draw(legs.Stationary[dir].Image, b, x, y); Bmp.Draw(rightArm.Stationary[dir].Image, b, x, y); } else { Bmp.Draw(rightArm.Stationary[dir].Image, b, x, y); Bmp.Draw(torso.Stationary[dir].Image, b, x, y); Bmp.Draw(legs.Stationary[dir].Image, b, x, y); Bmp.Draw(leftArm.Stationary[dir].Image, b, x, y); } } else { if ((int)dir >= 6 || (int)dir == 0) { Bmp.Draw(handFile[weapon.HandIndex + (int)dir].Image, b, x, y + offset); } if (weapon.NumHands == 1) { if ((int)dir < 4) { Bmp.Draw(leftArm.Stationary[dir].Image, b, x, y); Bmp.Draw(torso.Stationary[dir].Image, b, x, y); Bmp.Draw(legs.Stationary[dir].Image, b, x, y); Bmp.Draw(rightArmed1.Stationary[dir].Image, b, x, y); } else { Bmp.Draw(rightArmed1.Stationary[dir].Image, b, x, y); Bmp.Draw(torso.Stationary[dir].Image, b, x, y); Bmp.Draw(legs.Stationary[dir].Image, b, x, y); Bmp.Draw(leftArm.Stationary[dir].Image, b, x, y); } } else { if ((int)dir < 4) { Bmp.Draw(leftArmed2.Stationary[dir].Image, b, x, y); Bmp.Draw(torso.Stationary[dir].Image, b, x, y); Bmp.Draw(legs.Stationary[dir].Image, b, x, y); Bmp.Draw(rightArmed2.Stationary[dir].Image, b, x, y); } else { Bmp.Draw(rightArmed2.Stationary[dir].Image, b, x, y); Bmp.Draw(torso.Stationary[dir].Image, b, x, y); Bmp.Draw(legs.Stationary[dir].Image, b, x, y); Bmp.Draw(leftArmed2.Stationary[dir].Image, b, x, y); } } if ((int)dir >= 1 && (int)dir < 6) { Bmp.Draw(handFile[weapon.HandIndex + (int)dir].Image, b, x, y + offset); } } }
public void Draw(Bitmap b, int x, int y, bool underwater, bool male, bool isZombie, bool crouch, bool flying, Direction dir, ItemDescriptor weapon) { BodyPart head = torso; BodyPart legs = this.legs; int offset = 0; if (flyable) { head = flyHead; if (flying) { legs = flyLegs; } } else if (underwater) { if (isZombie) { if (zombie) { head = zombieHead; } } else { head = torso; } } else { if (isZombie) { if (zombie) { head = zombieHead; } } else if (male) { head = maleHead; } else { head = femHead; } } if (crouch) { legs = crouchLegs; offset = (int)(5 * PckImage.Scale); } if (weapon == null) { BodyPart armLeft = rightArm; BodyPart armRight = leftArm; if ((int)dir < 4) { armLeft = leftArm; armRight = rightArm; } Bmp.Draw(armLeft.Stationary[dir].Image, b, x, y + offset); Bmp.Draw(legs.Stationary[dir].Image, b, x, y); Bmp.Draw(head.Stationary[dir].Image, b, x, y + offset); Bmp.Draw(armRight.Stationary[dir].Image, b, x, y + offset); } else { if ((int)dir >= 6 || (int)dir == 0) { Bmp.Draw(handFile[weapon.HandIndex + (int)dir].Image, b, x, y + offset); } BodyPart armLeft = leftArmed2; BodyPart armRight = rightArmed2; //switch arms if one handed if (weapon.NumHands == 1) { armLeft = leftArm; armRight = rightArmed1; } //switch arms if direction if ((int)dir < 4) { BodyPart tmp = armLeft; armLeft = armRight; armRight = tmp; } Bmp.Draw(armRight.Stationary[dir].Image, b, x, y + offset); Bmp.Draw(legs.Stationary[dir].Image, b, x, y); Bmp.Draw(head.Stationary[dir].Image, b, x, y + offset); Bmp.Draw(armLeft.Stationary[dir].Image, b, x, y + offset); if ((int)dir >= 1 && (int)dir < 6) { Bmp.Draw(handFile[weapon.HandIndex + (int)dir].Image, b, x, y + offset); } } }