You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
731 B
32 lines
731 B
/** |
|
* @file common.h |
|
* |
|
* Common functions for QoL features |
|
*/ |
|
#pragma once |
|
|
|
#include <SDL.h> |
|
|
|
namespace devilution { |
|
|
|
struct CelOutputBuffer; |
|
|
|
/** |
|
* @brief Return width (in pixels) of the passed in string, when printed with smaltext.cel. Does not consider line breaks. |
|
* @param s String for which to compute width |
|
* @return Pixel width of the string |
|
*/ |
|
int GetTextWidth(const char *s); |
|
|
|
/** |
|
* @brief Prints integer into buffer, using ',' as thousands separator. |
|
* @param out Destination buffer |
|
* @param n Number to print |
|
* @return Address of first character after printed number |
|
*/ |
|
char *PrintWithSeparator(char *out, long long n); |
|
|
|
void FreeQol(); |
|
void InitQol(); |
|
|
|
} // namespace devilution
|
|
|