-
Notifications
You must be signed in to change notification settings - Fork 0
/
version.hug
101 lines (93 loc) · 2.35 KB
/
version.hug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
!\-----------------------------------------------------------------
Version.hug release 1.5, based on version.hug from the Future Boy!
source code by Kent Tessman, adapted by Jon Blask
In your game source, you'll want to define the following constants:
constant GAME_TITLE "Annoyotron X: Annoyotron Takes Manhatten"
constant TITLECOLOR LIGHT_RED ! has to be a number value if defined before "hugolib.h" is included
constant AUTHOR "Some Guy"
constant RELEASE "1.0" ! Game release number
constant EMAIL "email@address.com"
constant WEBSITE "www.somewebsite.com"
Of course, if you want the player to be able to pull up version
info, you'll have to define a "version" verb like this:
xverb "version"
* DoVersion
-------------------------------------------------------------------\!
routine GameTitle
{
#if defined TITLECOLOR
color TITLECOLOR
#endif
#if undefined GAME_TITLE
#message error "You need to define the TITLE constant before version.hug is
included!"
#endif
#if defined GAME_TITLE
print GAME_TITLE;
#endif
color TEXTCOLOR
}
routine DoVersion
{
Font(BOLD_ON | ITALIC_OFF)
print GameTitle;
Font(BOLD_OFF | ITALIC_OFF)
#ifset DEMO_VERSION
"\B (demo version)\b"
#else
""
#endif
string(_temp_string, serial$, 8)
print "Copyright (c) 20";
StringPrint(_temp_string, 6, 8)
#if defined AUTHOR
" by ";
print AUTHOR;
#endif
""
#if defined RELEASE
print "Release "; RELEASE; " / ";
#endif
#if clear BETA
print "Serial Number ";
StringPrint(_temp_string, 0, 2)
StringPrint(_temp_string, 3, 5)
StringPrint(_temp_string, 6, 8)
#else
" \BBETA BUILD # 20";
StringPrint(_temp_string, 6, 8)
StringPrint(_temp_string, 0, 2)
StringPrint(_temp_string, 3, 5)
Font(BOLD_OFF)
#endif
print newline
#if defined IFID
print "IFID: "; IFID
#endif
print "Written in ";
print BANNER
#ifset BETA
#if defined TITLECOLOR
color TITLECOLOR
#endif
"\n\BDO NOT DISTRIBUTE!\b";
color TEXTCOLOR
" This beta release is intended for testing only, not for
distribution to the general public.";
#if defined EMAIL
" Please report any errors,
bugs, etc. to \I<";
print EMAIL;">\i."
#endif
"\nHI, TESTERS: Please type \B>SCRIPT ON\b and send in your transcripts."
#endif
#ifset DEMO_VERSION
#if defined WEBSITE
"\n(Like this demo? Visit \B";
print WEBSITE; "\b for the full version.)"
#endif
#endif
#ifset HUGOFIX
"\n\I(Compiled with the HugoFix Debugging Suite)\i"
#endif
}