|
@@ -87,9 +87,9 @@ func display_information(d *door.Door) {
|
|
|
}
|
|
|
|
|
|
func display_ansi(d *door.Door) {
|
|
|
- space := SPACE()
|
|
|
+ art := GROWL()
|
|
|
d.Write(door.Clrscr)
|
|
|
- for _, line := range space {
|
|
|
+ for _, line := range art {
|
|
|
if door.Unicode {
|
|
|
d.Write(door.CP437_to_Unicode(line) + door.CRNL)
|
|
|
} else {
|
|
@@ -106,132 +106,170 @@ func font_demo(d *door.Door) {
|
|
|
d.Write(door.Clrscr) // + door.CRNL + door.CRNL)
|
|
|
fac := FontAmazonCyan()
|
|
|
output, l = fac.Output("ABCDEFGHIJKL")
|
|
|
- centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+ if l > door.Width {
|
|
|
+ output, l = fac.Output("Cyan")
|
|
|
+ }
|
|
|
|
|
|
- for _, o := range output {
|
|
|
- if door.Unicode {
|
|
|
- d.Write(fmt.Sprintf("%s%s%s", centering, CP437Bytes_to_Unicode(o), door.Reset) + door.CRNL)
|
|
|
- } else {
|
|
|
- d.Write(fmt.Sprintf("%s%s%s", centering, string(o), door.Reset) + door.CRNL)
|
|
|
+ if l < door.Width {
|
|
|
+ centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+
|
|
|
+ for _, o := range output {
|
|
|
+ if door.Unicode {
|
|
|
+ d.Write(fmt.Sprintf("%s%s%s", centering, CP437Bytes_to_Unicode(o), door.Reset) + door.CRNL)
|
|
|
+ } else {
|
|
|
+ d.Write(fmt.Sprintf("%s%s%s", centering, string(o), door.Reset) + door.CRNL)
|
|
|
+ }
|
|
|
}
|
|
|
+ d.Write(door.CRNL)
|
|
|
}
|
|
|
- d.Write(door.CRNL)
|
|
|
|
|
|
fab := FontAnarchyBlue()
|
|
|
output, l = fab.Output("Bugz is Here!")
|
|
|
- centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+ if l > door.Width {
|
|
|
+ output, l = fab.Output("Hello")
|
|
|
+ }
|
|
|
|
|
|
- for _, o := range output {
|
|
|
- if door.Unicode {
|
|
|
- d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
- } else {
|
|
|
- d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ if l < door.Width {
|
|
|
+ centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+
|
|
|
+ for _, o := range output {
|
|
|
+ if door.Unicode {
|
|
|
+ d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
+ } else {
|
|
|
+ d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ }
|
|
|
}
|
|
|
+ d.Write(door.CRNL)
|
|
|
}
|
|
|
- d.Write(door.CRNL)
|
|
|
|
|
|
unchain := FontUnchained()
|
|
|
output, l = unchain.Output("Hi There!")
|
|
|
- centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+ if l > door.Width {
|
|
|
+ output, l = unchain.Output("Meow")
|
|
|
+ }
|
|
|
|
|
|
- for _, o := range output {
|
|
|
- if door.Unicode {
|
|
|
- d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
- } else {
|
|
|
- d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ if l < door.Width {
|
|
|
+ centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+
|
|
|
+ for _, o := range output {
|
|
|
+ if door.Unicode {
|
|
|
+ d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
+ } else {
|
|
|
+ d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ }
|
|
|
}
|
|
|
+ d.Write(door.CRNL)
|
|
|
}
|
|
|
- d.Write(door.CRNL)
|
|
|
press_a_key(d)
|
|
|
|
|
|
asylum := FontAsylum()
|
|
|
output, l = asylum.Output("Bugz ROCKS")
|
|
|
- centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
- // centering = ""
|
|
|
+ if l > door.Width {
|
|
|
+ output, l = asylum.Output("Aslym")
|
|
|
+ }
|
|
|
|
|
|
- for _, o := range output {
|
|
|
- if door.Unicode {
|
|
|
- d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
- } else {
|
|
|
- d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ if l < door.Width {
|
|
|
+ centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+
|
|
|
+ for _, o := range output {
|
|
|
+ if door.Unicode {
|
|
|
+ d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
+ } else {
|
|
|
+ d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ }
|
|
|
}
|
|
|
+ d.Write(door.CRNL)
|
|
|
}
|
|
|
- d.Write(door.CRNL)
|
|
|
|
|
|
brain := FontBrainDmgBlu()
|
|
|
output, l = brain.Output("I'm so BLUE")
|
|
|
- centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+ if l > door.Width {
|
|
|
+ output, l = brain.Output("Blue")
|
|
|
+ }
|
|
|
|
|
|
- for _, o := range output {
|
|
|
- if door.Unicode {
|
|
|
- d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
- } else {
|
|
|
- d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ if l < door.Width {
|
|
|
+ centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+
|
|
|
+ for _, o := range output {
|
|
|
+ if door.Unicode {
|
|
|
+ d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
+ } else {
|
|
|
+ d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ }
|
|
|
}
|
|
|
+ d.Write(door.CRNL)
|
|
|
}
|
|
|
- d.Write(door.CRNL)
|
|
|
|
|
|
boner := FontBoner()
|
|
|
output, l = boner.Output("Welcome!")
|
|
|
- centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
-
|
|
|
- for _, o := range output {
|
|
|
- if door.Unicode {
|
|
|
- d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
- } else {
|
|
|
- d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ if l < door.Width {
|
|
|
+ centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+
|
|
|
+ for _, o := range output {
|
|
|
+ if door.Unicode {
|
|
|
+ d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
+ } else {
|
|
|
+ d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ }
|
|
|
}
|
|
|
+ d.Write(door.CRNL)
|
|
|
}
|
|
|
- d.Write(door.CRNL)
|
|
|
press_a_key(d)
|
|
|
|
|
|
descent := FontDescent()
|
|
|
output, l = descent.Output("Meanwhile...")
|
|
|
if l > door.Width {
|
|
|
- output, l = descent.Output("BUGZ !?!")
|
|
|
+ output, l = descent.Output("BUGZ")
|
|
|
}
|
|
|
- centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
|
|
|
- for _, o := range output {
|
|
|
- if door.Unicode {
|
|
|
- d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
- } else {
|
|
|
- d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ if l < door.Width {
|
|
|
+ centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+
|
|
|
+ for _, o := range output {
|
|
|
+ if door.Unicode {
|
|
|
+ d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
+ } else {
|
|
|
+ d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ }
|
|
|
}
|
|
|
+ d.Write(door.CRNL)
|
|
|
}
|
|
|
- d.Write(door.CRNL)
|
|
|
|
|
|
remorse := FontRemorse()
|
|
|
output, l = remorse.Output("Enjoy the fonts")
|
|
|
if l > door.Width {
|
|
|
output, l = remorse.Output("Amazing")
|
|
|
}
|
|
|
- centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
-
|
|
|
- for _, o := range output {
|
|
|
- if door.Unicode {
|
|
|
- d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
- } else {
|
|
|
- d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ if l < door.Width {
|
|
|
+ centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+
|
|
|
+ for _, o := range output {
|
|
|
+ if door.Unicode {
|
|
|
+ d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
+ } else {
|
|
|
+ d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ }
|
|
|
}
|
|
|
+ d.Write(door.CRNL)
|
|
|
}
|
|
|
- d.Write(door.CRNL)
|
|
|
|
|
|
dungeon := FontDungeon()
|
|
|
output, l = dungeon.Output("Until NEXT time")
|
|
|
if l > door.Width {
|
|
|
output, l = dungeon.Output("Beware")
|
|
|
}
|
|
|
- centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
-
|
|
|
- for _, o := range output {
|
|
|
- if door.Unicode {
|
|
|
- d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
- } else {
|
|
|
- d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ if l < door.Width {
|
|
|
+ centering = strings.Repeat(" ", (door.Width-l)/2)
|
|
|
+
|
|
|
+ for _, o := range output {
|
|
|
+ if door.Unicode {
|
|
|
+ d.Write(centering + CP437Bytes_to_Unicode(o) + door.Reset + door.CRNL)
|
|
|
+ } else {
|
|
|
+ d.Write(centering + string(o) + door.Reset + door.CRNL)
|
|
|
+ }
|
|
|
}
|
|
|
+ d.Write(door.CRNL)
|
|
|
}
|
|
|
- d.Write(door.CRNL)
|
|
|
|
|
|
}
|
|
|
|