Post by Carl on Jan 22, 2014 8:58:15 GMT
I have made a sprite editor for the FIGnition, the listing and the files are below.
Notes.
you can put blocks in the screen with down and move the cursor back and forward with left and right.
press space to see the decimal value of the sprite.
pressing 1 2 3 or 4 will load your sprite and display it on the screen so you can see what it looks like.
There are four set out in a 2x2 this allows you to draw many types of icon.
The info of the most recent sprite is displayed in hex and decimal, but keep a pen handy if you are making sprites as only the last one loaded is recorded, however you can peek the values without loading with space.
q quits.
load these hex files into you fignition as you like but the last one '99' is to be saved at 99 or where dokey can get it, and it is to be loaded last as you compile it or it will not work.
'go' to run it.
if you have any issues please let me know. It could be a typo.
you can get the .hex files here groups.google.com/d/msg/fignition/EKD118WBBoU/ykElQhi-QoMJ
Notes.
you can put blocks in the screen with down and move the cursor back and forward with left and right.
press space to see the decimal value of the sprite.
pressing 1 2 3 or 4 will load your sprite and display it on the screen so you can see what it looks like.
There are four set out in a 2x2 this allows you to draw many types of icon.
The info of the most recent sprite is displayed in hex and decimal, but keep a pen handy if you are making sprites as only the last one loaded is recorded, however you can peek the values without loading with space.
q quits.
load these hex files into you fignition as you like but the last one '99' is to be saved at 99 or where dokey can get it, and it is to be loaded last as you compile it or it will not work.
'go' to run it.
if you have any issues please let me know. It could be a typo.
you can get the .hex files here groups.google.com/d/msg/fignition/EKD118WBBoU/ykElQhi-QoMJ
( sprite'd)
0 var &1 0 var &2
0 var &3 0 var &4
0 var &5 0 var &6
0 var &7 0 var &8
0 var loc 0 var dec
0 var end 0 var ct
128 var tot
608 var #1
: %hex
hex
&1 @ . &2 @ . cr
&3 @ . &4 @ . cr
&5 @ . &6 @ . cr
&7 @ . &8 @ .
decimal ;
: %dec
&1 @ . &2 @ . cr
&3 @ . &4 @ . cr
&5 @ . &6 @ . cr
&7 @ . &8 @ . ;
: opt
9 0 at ." Sprite'd"
3 2 at 1 emit 2 emit
3 3 at 3 emit 4 emit
0 18 at ." rt=fwd dn=bit lft=del"
0 20 at ." q=uit sp=add 1,2,3,4=load" ;
: ?on
loc @ vram + ic@ 160 = if
tot @ ct ! then ;
: %n
tot @ 2 / tot !
loc @ 1 + loc !
0 ct ! ;
: %calc
128 tot ! 0 dec !
8 0 do 1 ?on
ct @ dec @ + dec !
%n
drop loop ;
: %1
59 loc !
%calc
0 ct !
dec @ &1 !
18 2 at dec @ . ;
: %2
loc @ 17 + loc !
%calc
0 ct !
dec @ &2 !
18 3 at dec @ . ;
: %3
loc @ 17 + loc !
%calc
0 ct !
dec @ &3 !
18 4 at dec @ . ;
: %4
loc @ 17 + loc !
%calc
0 ct !
dec @ &4 !
18 5 at dec @ . ;
: %5
loc @ 17 + loc !
%calc
0 ct !
dec @ &5 !
18 6 at dec @ . ;
: %6
loc @ 17 + loc !
%calc
0 ct !
dec @ &6 !
18 7 at dec @ . ;
: %7
loc @ 17 + loc !
%calc
0 ct !
dec @ &7 !
18 8 at dec @ . ;
: %8
loc @ 17 + loc !
%calc
0 ct !
dec @ &8 !
18 9 at dec @ . ;
: %add
%1 %2 %3 %4
%5 %6 %7 %8 ;
59 var pos
: set
0 end ! cls
11 1 do 8 i at 12 emit
17 i at 11 emit loop
17 9 do i 1 at 19 emit
i 10 at 147 emit loop ;
: cursor 27 vram pos @
+ ic! ;
: solid 160 vram pos @ +
ic! pos @ 1 + pos ! ;
: blank
32 vram pos @ + ic!
pos @ 1 + pos ! ;
: limit
pos @ vram + ic@
dup
11 = if pos @ 17 + pos !
then
12 = if pos @ 17 - pos !
then ;
: blimit dup
pos @
242 > if 242 pos !
then
59 < if 59 pos !
then ;
: back 32 vram pos @
+ ic! pos @ 1 -
pos ! ;
: dokey inkey dup
10 = if solid then
dup
9 = if blank then
dup
8 = if back then
dup
113 = if 1 end ! then
dup
32 = if %add then
dup
49 = if 608 #1 ! %add 99 load then
dup
50 = if 616 #1 ! %add 99 load then
dup
51 = if 624 #1 ! %add 99 load then
52 = if 632 #1 ! %add 99 load then ;
: #totals
0 5 at %dec
0 11 at %hex ;
: go 59 pos !
set opt #totals begin
dokey limit blimit
cursor end @
1 = until ;
( end)
( udg save as block 99 or
change dokey)
create udgs
&1 @ c, &2 @ c, &3 @ c,
&4 @ c, &5 @ c, &6 @ c,
&7 @ c, &8 @ c,
udgs vram #1 @ + 8 cmove
$4FB $5D i!
go
( end)