Refactor draw-beastie function.

Discussed on:	-hackers
This commit is contained in:
dteske 2013-11-17 18:07:10 +00:00
parent 4db5557688
commit 1cf036f702

View File

@ -202,56 +202,26 @@ variable logoY
drop
then
s" loader_logo" getenv dup -1 = if
logoX @ logoY @
s" loader_logo" getenv dup -1 <> if
dup 5 + allocate if ENOMEM throw then
0 2swap strcat s" -logo" strcat
over -rot ( a-addr/u -- a-addr a-addr/u )
sfind ( a-addr a-addr/u -- a-addr xt bool )
rot ( a-addr xt bool -- xt bool a-addr )
free ( xt bool a-addr -- xt bool ior )
if EFREE throw then
else
0 ( cruft -- cruft bool ) \ load the default below
then
0= if
drop ( cruft -- )
loader_color? if
orb-logo
['] orb-logo
else
orbbw-logo
['] orbbw-logo
then
drop exit
then
2dup s" beastie" compare-insensitive 0= if
logoX @ logoY @ beastie-logo
2drop exit
then
2dup s" beastiebw" compare-insensitive 0= if
logoX @ logoY @ beastiebw-logo
2drop exit
then
2dup s" fbsdbw" compare-insensitive 0= if
logoX @ logoY @ fbsdbw-logo
2drop exit
then
2dup s" orb" compare-insensitive 0= if
logoX @ logoY @ orb-logo
2drop exit
then
2dup s" orbbw" compare-insensitive 0= if
logoX @ logoY @ orbbw-logo
2drop exit
then
2dup s" tribute" compare-insensitive 0= if
logoX @ logoY @
s" tribute-logo" sfind if
execute
else
drop orb-logo
then
2drop exit
then
2dup s" tributebw" compare-insensitive 0= if
logoX @ logoY @
s" tributebw-logo" sfind if
execute
else
drop orbbw-logo
then
2drop exit
then
2drop
logoX @ logoY @ rot execute
;
: clear-beastie ( -- ) \ clears beastie from the screen