Ejemplo n.º 1
0
void TextInit(const char *filename, int offset, int compile, int rle)
{
    int i, h;

    dxText = offset;
    memset(font, 0, sizeof(font));
    memset(compiledFont, 0, sizeof(compiledFont));
    memset(rleFont, 0, sizeof(rleFont));
    ReadPics(filename, font, CHARS_IN_FONT, NULL);

    for (i = 0; i < CHARS_IN_FONT; i++) {
        h = PicHeight(font[i]);
        if (h > hText)
            hText = h;
    }
}
Ejemplo n.º 2
0
static void DisplayPlayer(TActor * player)
{
	int x, y;
	struct CharacterDescription *c;
	int pic;

	if (player) {
		c = &characterDesc[player->character];
		pic = cHeadPic[c->facePic][DIRECTION_DOWN][STATE_IDLE];
		x = MAP_XOFFS +
		    MAP_FACTOR * player->tileItem.x / TILE_WIDTH;
		y = MAP_YOFFS +
		    MAP_FACTOR * player->tileItem.y / TILE_HEIGHT;
		x -= PicWidth(gPics[pic]) / 2;
		y -= PicHeight(gPics[pic]) / 2;
		DrawTTPic(x, y, gPics[pic], c->table, gRLEPics[pic]);
	}
}