Merge branch 'master' into jgrpp

# Conflicts:
#	src/os/windows/font_win32.cpp
#	src/script/api/script_object.hpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/viewport.cpp
#	src/viewport_func.h
This commit is contained in:
Jonathan G Rennison
2022-12-26 22:29:51 +00:00
32 changed files with 349 additions and 169 deletions

View File

@@ -215,6 +215,13 @@ enum FontSize {
};
DECLARE_POSTFIX_INCREMENT(FontSize)
static inline const char *FontSizeToName(FontSize fs)
{
static const char *SIZE_TO_NAME[] = { "medium", "small", "large", "mono" };
assert(fs < FS_END);
return SIZE_TO_NAME[fs];
}
/**
* Used to only draw a part of the sprite.
* Draw the subsprite in the rect (sprite_x_offset + left, sprite_y_offset + top) to (sprite_x_offset + right, sprite_y_offset + bottom).