aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/font.cpp
AgeCommit message (Collapse)Author
2009-08-04* Reverted change that subtracts 1 from font colour indexes for various ↵Denis Kasak
speaking characters; they are 0-based after all. * Fixed font blitting algorithm to allow for both white fonts and transparency. svn-id: r43044
2009-08-03* Fixed bug which made characters talk with the wrong colour; the colour ↵Denis Kasak
indexes are indexed from 1 in the data files so we need to subtract 1. * Turned on font transparency again. svn-id: r43022
2009-08-02* Fixed bug in Font::getStringWidth() which made it miscalculate string ↵Denis Kasak
widths (a temporary variable used for storing the width of the current line was not being reset). * Temporarily disabled font transparency because the dragon's text is rendered hollow (transparency inside glyph bodies). svn-id: r42993
2009-07-29Fixed text bugs related to the fact that some strings in the data files ↵Denis Kasak
don't end with '|' like they should. svn-id: r42897
2009-07-27* Removed unused variableDenis Kasak
* Fixed unsigned to signed comparison warning svn-id: r42834
2009-07-27* Added Font::getStringHeight()Denis Kasak
* Made Font::getStringWidth() calculate the width of the string properly now that handling of multi-row strings is in * Fixed bug which caused the last column of pixels in the last letter of a string to linger on the screen svn-id: r42832
2009-07-25Handled the '|' char correctly when drawing text (it serves as both a ↵Denis Kasak
newline and end-of-string marker). svn-id: r42788
2009-07-15Renamed Font::setFont() to loadFont(). Removed DraciEngine::_font and added ↵Denis Kasak
_smallFont and _bigFont so each font can be handled separately. svn-id: r42514
2009-07-06Cache the transparent colour instead of calling a function for every pixel.Denis Kasak
svn-id: r42192
2009-07-03Added bool parameter markDirty to Sprite::draw() and Text::draw() to specify ↵Denis Kasak
whether to mark a dirty rect for a particular draw (also added such support to the Font class since it's needed by Text). Made spacing parameters for Text instances mandatory. svn-id: r42066
2009-07-01Added Text as a subclass of Drawable. Fixed syntax error in font.cppDenis Kasak
svn-id: r41981
2009-07-01Added Font::drawString overload that takes in a pointer to a byte buffer and ↵Denis Kasak
a length instead of a Common::String. Changed the former drawString to be a wrapper for the new one. svn-id: r41980
2009-06-22Documentation fix for the Font class.Denis Kasak
svn-id: r41776
2009-06-19Added support for the new Surface class to Font (transparency, marking dirty ↵Denis Kasak
rectangles). svn-id: r41656
2009-06-15Changing font colour constants to an enum.Denis Kasak
svn-id: r41553
2009-06-15Added const to reference parameters of Font::drawString() and ↵Denis Kasak
Font::getStringWidth(). svn-id: r41530
2009-06-15Converted default font colours from static members of Font to constants. ↵Denis Kasak
Moved the initializer list of the Font constructor to the constructor body (for readability). svn-id: r41529
2009-06-14Added a Font _font variable to the engine instance. Fixed font colour ↵Denis Kasak
handling by replacing the appropriate colours before drawing. Added Font::setColour() method for changing the current font colour. Added include guards to draci/font.h. Moved kFontBig and kFontSmall constants to draci/font.cpp to prevent redefinition errors. svn-id: r41524
2009-06-14Renamed DraciFont class to Font to be more consistent with the rest of the ↵Denis Kasak
classes and other engines. svn-id: r41523
2009-06-14Changed DraciFont API to accept const Strings when loading fonts and added ↵Denis Kasak
constants for font types. svn-id: r41522
2009-06-14Reworded DraciFont docs (with regards to mentioning ASCII).Denis Kasak
svn-id: r41511
2009-06-14Removed superfluous checks for NULL in DraciFont::freeFont().Denis Kasak
svn-id: r41510
2009-06-12Made DraciFont::drawString() return early if the string is too long to fit ↵Denis Kasak
on the screen. svn-id: r41475
2009-06-12Made DraciFont::drawString() take a String reference instead of a copy.Denis Kasak
svn-id: r41472
2009-06-12Removed overflow/underflow checks from DraciFont::drawChar(). Instead, we ↵Denis Kasak
now calculate the number of pixels that can be drawn without overflowing beforehand. Also added asserts to catch any negative value passed for the coordinates. svn-id: r41471
2009-06-12Made the DraciFont::freeFont() method safe to call in any circumstance by ↵Denis Kasak
making it check for NULL pointers itself to prevent double free / corruption. This also fixes a potential bug in the destructor. svn-id: r41469
2009-06-12Properly documented everything (including the new DraciFont class). ↵Denis Kasak
Reshuffled some old comments. svn-id: r41467
2009-06-11Implemented font handling via the DraciFont class. Reprogrammed the test ↵Denis Kasak
animation to use the original game fonts. Removed the old drawString() hack. svn-id: r41454