|
root / base / usr / src / boot / forth / brand-hammerhead.4th
brand-hammerhead.4th Plain Text 39 lines 1.2 KB
 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
\ Copyright 2026 Chris Tusa / Hammerhead project.
\
\ Permission is hereby granted, free of charge, to any person obtaining a
\ copy of this software and associated documentation files (the "Software"),
\ to deal in the Software without restriction.  Based on FreeBSD/illumos
\ brand-illumos.4th (CDDL), retained structure and brand+ helper.

2 brandX ! 1 brandY ! \ Initialize brand placement defaults

: brand+ ( x y c-addr/u -- x y' )
	2swap 2dup at-xy 2swap \ position the cursor
	type \ print to the screen
	1+ \ increase y for next time we're called
;

: brand ( x y -- ) \ "Zygaena" brand (PNG if framebuffer, ASCII fallback)

	framebuffer? if
		s" term-putimage" sfind if
			\ 0, 0 upper-left origin, 0, 7 lower-right
			\ preserves aspect ratio
			>r 0 0 0 0 7
			s" /boot/hammerhead-brand.png"
			r> execute if 2drop exit then
		else
			drop
		then
	then

	s"  _____                                    " brand+
	s" |__  /_   _  __ _  __ _  ___ _ __   __ _  " brand+
	s"   / /| | | |/ _` |/ _` |/ _ \ '_ \ / _` | " brand+
	s"  / /_| |_| | (_| | (_| |  __/ | | | (_| | " brand+
	s" /____|\__, |\__, |\__,_|\___|_| |_|\__,_| " brand+
	s"       |___/ |___/                         " brand+

	2drop
;