src/players.cpp
changeset 6475 f80c51a83069
parent 6470 a868173ae25b
child 6516 ee6d057b9850
equal deleted inserted replaced
6474:24e7ceeb25f5 6475:f80c51a83069
    79 /**
    79 /**
    80  * Draws the face of a player.
    80  * Draws the face of a player.
    81  *
    81  *
    82  * Meaning of the bits in face (some bits are used in several times):
    82  * Meaning of the bits in face (some bits are used in several times):
    83  * - 4 and 5: chin
    83  * - 4 and 5: chin
    84  * - 6 to 9: eye colour
    84  * - 6 to 9: eyebrows
    85  * - 10 to 13: nose
    85  * - 10 to 13: nose
    86  * - 13 to 15: lips (also moustache for males)
    86  * - 13 to 15: lips (also moustache for males)
    87  * - 16 to 19: hair
    87  * - 16 to 19: hair
    88  * - 20 to 22: eyebrows
    88  * - 20 to 22: eye color
    89  * - 20 to 27: tie, ear rings etc.
    89  * - 20 to 27: tie, ear rings etc.
    90  * - 28 to 30: glasses
    90  * - 28 to 30: glasses
    91  * - 19, 26 and 27: race (bit 27 set and bit 19 equal to bit 26 = black, otherwise white)
    91  * - 19, 26 and 27: race (bit 27 set and bit 19 equal to bit 26 = black, otherwise white)
    92  * - 31: gender (0 = male, 1 = female)
    92  * - 31: gender (0 = male, 1 = female)
    93  *
    93  *
   120 	} else {
   120 	} else {
   121 		DrawSprite(0x327 + (HASBIT(gen_race, GENDER_FEMALE) ? 0 : chin), PAL_NONE, x, y);
   121 		DrawSprite(0x327 + (HASBIT(gen_race, GENDER_FEMALE) ? 0 : chin), PAL_NONE, x, y);
   122 	}
   122 	}
   123 
   123 
   124 	/* Draw the eyes */
   124 	/* Draw the eyes */
   125 	uint eye_colour = GB(face,  6, 4);
   125 	uint eye_colour = GB(face, 20, 3);
   126 	uint eyebrows   = GB(face, 20, 3);
   126 	uint eyebrows   = GB(face,  6, 4);
   127 	SpriteID pal;
   127 	SpriteID pal;
   128 
   128 
   129 	if (eye_colour < 6) {
   129 	if (eye_colour < 6) {
   130 		pal = PALETTE_TO_BROWN;
   130 		pal = PALETTE_TO_BROWN;
   131 	} else if (eye_colour == 6) {
   131 	} else if (eye_colour == 6) {