mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-04 04:25:46 -04:00
textgen: Add image include support for smtextgen.
Instead of generating text and image parts in separate stages, add the ability to include an image in the smtextgen command line. This makes the command line in the Makefile clearer.
This commit is contained in:
parent
5405104814
commit
9968fe0ed1
2 changed files with 72 additions and 65 deletions
|
@ -154,8 +154,17 @@ command_line = [
|
|||
]
|
||||
|
||||
for xy, string in args['strings']:
|
||||
command_line.extend(smallfont.draw_commands_for_text(
|
||||
string, xy[0], xy[1]))
|
||||
# Allow special notation to indicate an image file to just draw
|
||||
# rather than rendering a string.
|
||||
if string.startswith('file:'):
|
||||
command_line.extend((
|
||||
'-draw',
|
||||
'image over %i,%i 0,0 "%s"' % (
|
||||
xy[0], xy[1], string[5:]),
|
||||
))
|
||||
else:
|
||||
command_line.extend(smallfont.draw_commands_for_text(
|
||||
string, xy[0], xy[1]))
|
||||
|
||||
command_line.extend((
|
||||
'-background', BACKGROUND_COLOR,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue