textgen: Generate CREDIT screen.

This is one of the screens of text shown between demos in the demo
loop. Generate this from the contents of a static text file. I
originally wanted to generate this programatically from the CREDITS
file but there are too many contributors to fit them all on the page.
This commit is contained in:
Simon Howard 2014-09-07 05:25:12 +00:00
parent 9968fe0ed1
commit 7a1b49e965
5 changed files with 43 additions and 2 deletions

1
graphics/credit.gif Symbolic link
View file

@ -0,0 +1 @@
text/credit.gif

View file

@ -13,7 +13,7 @@ TEXTGEN_GRAPHICS = \
m_mess.gif m_mouse.gif m_multi.gif m_player.gif m_serial.gif \ m_mess.gif m_mouse.gif m_multi.gif m_player.gif m_serial.gif \
m_setup.gif m_sound.gif m_stat.gif m_status.gif m_tcpip.gif \ m_setup.gif m_sound.gif m_stat.gif m_status.gif m_tcpip.gif \
m_versen.gif m_video.gif m_wad.gif m_wadopt.gif m_weap.gif \ m_versen.gif m_video.gif m_wad.gif m_wadopt.gif m_weap.gif \
prboom.gif helpttl.gif \ prboom.gif helpttl.gif freettl.gif \
m_ultra.gif wibp1.gif wibp2.gif wibp3.gif wibp4.gif \ m_ultra.gif wibp1.gif wibp2.gif wibp3.gif wibp4.gif \
wicolon.gif wienter.gif wif.gif wifrgs.gif wipcnt.gif \ wicolon.gif wienter.gif wif.gif wifrgs.gif wipcnt.gif \
wiminus.gif wimstar.gif wimstt.gif wiostf.gif wiosti.gif \ wiminus.gif wimstar.gif wimstt.gif wiostf.gif wiosti.gif \
@ -37,7 +37,7 @@ TEXTGEN_GRAPHICS = \
wilv33.gif wilv34.gif wilv35.gif wilv36.gif wilv37.gif \ wilv33.gif wilv34.gif wilv35.gif wilv36.gif wilv37.gif \
wilv38.gif wilv38.gif
all: $(TEXTGEN_GRAPHICS) help.gif all: $(TEXTGEN_GRAPHICS) help.gif credit.gif
# textgen creates multiple outputs, which is awkward to express in # textgen creates multiple outputs, which is awkward to express in
# make. Use a witness file (graphics.stamp) as suggested in the # make. Use a witness file (graphics.stamp) as suggested in the
@ -126,6 +126,19 @@ help.gif: helpbg.png helptext2.png
-draw 'image over 0,0 0,0 helptext2.png' \ -draw 'image over 0,0 0,0 helptext2.png' \
help.gif help.gif
credtext.png: freettl.gif credit.txt
python smtextgen credtext.png 320x200 \
120,5 "file:freettl.gif" \
10,30 "include:credit.txt"
credtext2.png: credtext.png
convert credtext.png -transparent '#00ffff' credtext2.png
credit.gif: helpbg.png credtext2.png
convert helpbg.png \
-draw 'image over 0,0 0,0 credtext2.png' \
credit.gif
clean: clean:
rm -f $(TEXTGEN_GRAPHICS) helpbg.png help.gif \ rm -f $(TEXTGEN_GRAPHICS) helpbg.png help.gif \
helptext.png helptext2.png graphics.stamp *.pyc helptext.png helptext2.png graphics.stamp *.pyc

View file

@ -109,6 +109,8 @@ blue_graphics = {
red_graphics = { red_graphics = {
# Title for the HELP/HELP1 screen: # Title for the HELP/HELP1 screen:
'helpttl': 'Help', 'helpttl': 'Help',
# Title for CREDIT
'freettl': 'Freedoom',
'm_ngame': 'New Game', 'm_ngame': 'New Game',
'm_option': 'Options', 'm_option': 'Options',

20
graphics/text/credit.txt Normal file
View file

@ -0,0 +1,20 @@
Freedoom is a collaborative effort to
create a complete free content game.
It is the combined work of many, many
different artists, musicians, level
designers and programmers, more than is
possible to list on this page alone.
Thanks go to everyone who has contributed
and helped to make Freedoom a reality.
Freedoom is distributed as free software
under the terms of the BSD license, and is
under continual development and
improvement. If you like the project and
want to help make it better, visit the
Freedoom website:
http://freedoom.github.io/
Thanks for playing.

View file

@ -154,6 +154,11 @@ command_line = [
] ]
for xy, string in args['strings']: for xy, string in args['strings']:
# Allow contents of a file to be included with special prefix:
if string.startswith('include:'):
with open(string[8:]) as f:
string = f.read()
# Allow special notation to indicate an image file to just draw # Allow special notation to indicate an image file to just draw
# rather than rendering a string. # rather than rendering a string.
if string.startswith('file:'): if string.startswith('file:'):