comparison src/fontcache.cpp @ 6852:31184effcea5 draft

(svn r10092) -Codechange: code-seperated the spriteloader and blitter from the rest of the code -Add: make it possible to pick your own blitter (-b <blitter>, -h for overview) -Add: added a new optimized 8bpp blitter (default, caches sprites of all zoom-levels) -Add: added a debug 8bpp blitter and a very slow normal 8bpp blitter
author truelight <truelight@openttd.org>
date Mon, 11 Jun 2007 11:50:49 +0000
parents cb3cab32710f
children 7d2e01558528
comparison
equal deleted inserted replaced
6851:c0bf39a8dc40 6852:31184effcea5
397 width = max(1, slot->bitmap.width + (size == FS_NORMAL)); 397 width = max(1, slot->bitmap.width + (size == FS_NORMAL));
398 height = max(1, slot->bitmap.rows + (size == FS_NORMAL)); 398 height = max(1, slot->bitmap.rows + (size == FS_NORMAL));
399 399
400 /* FreeType has rendered the glyph, now we allocate a sprite and copy the image into it */ 400 /* FreeType has rendered the glyph, now we allocate a sprite and copy the image into it */
401 sprite = (Sprite*)calloc(width * height + 8, 1); 401 sprite = (Sprite*)calloc(width * height + 8, 1);
402 sprite->info = 1;
403 sprite->width = width; 402 sprite->width = width;
404 sprite->height = height; 403 sprite->height = height;
405 sprite->x_offs = slot->bitmap_left; 404 sprite->x_offs = slot->bitmap_left;
406 // XXX 2 should be determined somehow... it's right for the normal face 405 // XXX 2 should be determined somehow... it's right for the normal face
407 y_adj = (size == FS_NORMAL) ? 2 : 0; 406 y_adj = (size == FS_NORMAL) ? 2 : 0;