Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BiFrost Multicolour engine.
#41
small problem:
When I change the position of the tiles to my UDG block the program says OK at the bottom like its finished and then when I press a button I am typing in basic commands,

Code:
#include "bifrost.bas"

INK 5: PAPER 0: BORDER 0: CLS
PRINT INK 6;AT 4,22;"slenkars";AT 5,23;"ENGINE";AT 6,24;"DEMO"; INK 4; AT 10,24;"WITH";AT 11,23;"BORIEL";AT 12,22;"ZX-BASIC"
   BIFROSTstart()
   BIFROSTresetTileImages(@MyUdgBlock)


While 1
LET a$=INKEY$
IF a<>"" THEN
Dim iter as UInteger
for x=0 to 8
for y=0 to 8
BIFROSTsetTile(x, y, iter)
iter=iter+1
next
next

PRINT INK 6;AT 4,22;"slenkars";AT 5,23;"you";AT 6,24;"pressed"; INK 4; AT 10,24;"a";AT 11,23;"Button";
END IF
Wend

MyUdgBlock: REM a simple Label; @Label returns it's memory address
ASM
defb 255,129,129,129,129,129,129,255
defb 231,231,165,231,189,231,165,255
defb 0,248,190,255,127,255,213,255
END ASM

this doesnt happen when I do the POKE commands to make sprites




Trying to poke some values for a static sprite:
Code:
#include "bifrost.bas"

INK 5: PAPER 0: BORDER 0: CLS
PRINT INK 6;AT 4,22;"slenkars";AT 5,23;"ENGINE";AT 6,24;"DEMO"; INK 4; AT 10,24;"WITH";AT 11,23;"BORIEL";AT 12,22;"ZX-BASIC"
   BIFROSTstart()
Dim pokepos as Uinteger
pokepos=48500+(BIFROSTSTATIC*64)
POKE pokepos,0
POKE pokepos+1,16
POKE pokepos+2,0
POKE pokepos+3,56
POKE pokepos+4,0
POKE pokepos+5,124
POKE pokepos+6,0
POKE pokepos+7,124
POKE pokepos+8,0
POKE pokepos+9,124
POKE pokepos+10,0
POKE pokepos+11,56
POKE pokepos+12,0
POKE pokepos+13,16
POKE pokepos+14,0
POKE pokepos+15,0
POKE pokepos+16,0
POKE pokepos+17,0
POKE pokepos+18,0
POKE pokepos+19,0
POKE pokepos+20,0
POKE pokepos+21,0
POKE pokepos+22,0
POKE pokepos+23,0
POKE pokepos+24,0
POKE pokepos+25,0
POKE pokepos+26,0
POKE pokepos+27,0
POKE pokepos+28,0
POKE pokepos+29,0
POKE pokepos+30,0
POKE pokepos+31,0

While 1
LET a$=INKEY$
IF a<>"" THEN
Dim iter as UInteger
iter=0
for x=0 to 8
for y=0 to 8
BIFROSTsetTile(x, y,BIFROSTSTATIC+ iter)
iter=iter+1
next
next

PRINT INK 6;AT 4,22;"slenkars";AT 5,23;"you";AT 6,24;STR(pokepos); INK 4; AT 10,24;"a";AT 11,23;"Button";
END IF
Wend

but none of the sprites look different

also how do you convert ink,paper,bright,flash into a byte?

so far im doing this...
ink value e.g. 011
plus paper value e.g.111
plus bright 1 or 0
plus flash 1 or 0

it doesnt seem to work

by binary to int function must be right because it works for the bitmaps
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)