1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Cosmetic: improve comments

This commit is contained in:
Mathieu Schroeter 2017-02-20 18:42:47 +01:00
parent db13ba1388
commit 32a485535d

View File

@ -7,8 +7,12 @@
#include "text.h" #include "text.h"
// Retourne l'offset pour un caractère donné. /**
* \brief Return the character offset for the sprite.
*
* \param[in] c - The character (incremented if 0xC3 UTF-8).
* \returns the offset.
*/
static Sint32 GetOffset (const char *&c) static Sint32 GetOffset (const char *&c)
{ {
static const unsigned char table_accents[15] = static const unsigned char table_accents[15] =
@ -35,8 +39,13 @@ static Sint32 GetOffset (const char *&c)
return *c; return *c;
} }
// Retourne la longueur d'un caractère. /**
* \brief Return the character length.
*
* \param[in] c - The character (can be incremented).
* \param[in] font - The font used (little or normal).
* \returns the length.
*/
Sint32 GetCharWidth (const char *&c, Sint32 font) Sint32 GetCharWidth (const char *&c, Sint32 font)
{ {
static const unsigned char table_width[] = static const unsigned char table_width[] =
@ -69,8 +78,14 @@ Sint32 GetCharWidth (const char *&c, Sint32 font)
return table_width[GetOffset (c)] - 1; return table_width[GetOffset (c)] - 1;
} }
// Affiche un texte. /**
* \brief Draw a text in a pixmap to a specific position.
*
* \param[in] pPixmap - The pixmap where it must be drawn.
* \param[in] pos - The coordinates for the text.
* \param[in] pText - The text.
* \param[in] font - The font style (little or normal).
*/
void DrawText (CPixmap *pPixmap, POINT pos, const char *pText, Sint32 font) void DrawText (CPixmap *pPixmap, POINT pos, const char *pText, Sint32 font)
{ {
Sint32 rank; Sint32 rank;