Jump to content

Photo

IntyBASIC Print Cards to Screen?

intybasic mob sprite print graphics

2 replies to this topic

#1 First Spear OFFLINE  

First Spear

    Stargunner

  • 1,305 posts
  • Location:Somewhere in Uptown

Posted Fri Aug 7, 2015 1:32 PM

Hey all.

 

With the below program, can someone help me understand some stuff:

 

1. How to use the SPRITE command to overlay bitmap "yes" on top of bitmap "no", setting both in Double-Y MOB mode, so they look like a high resolution, two-color item, fitting into a single tile 8x8 space.

 

2. How to use the PRINT command to place bitmap "maybe" on any card on the screen? showing and placing ROM text is cleanly explained in the IntyBASIC manual, but I am not making the mental leap on how to do the same with an 8x8 graphic unit. The line "PRINT AT 200,$19D9" puts the bitmap in tile #200 but I don't understand how that relates to "DATA $007E,$007E,$003C,$0018".

 

 

Thanks!

 

 

yesnomaybe.jpg

	REM Command: intycolor -b -o60 -s0000 -p yes.bmp yes.bas yes 
	REM Command: intycolor -b -o62 -s0000 -p no.bmp no.bas no 
	REM Command: intycolor -b -o59 -s0000 -p maybe.bmp maybe.bas maybe 
	REM Command: intycolor -b -s0000 -p myback.bmp myback.bas myback 
	
	
	REM stub for showing image
	MODE 0,0,0,0,0
	WAIT
	DEFINE 0,16,myback_bitmaps_0
	WAIT
	DEFINE 16,16,myback_bitmaps_1
	WAIT
	DEFINE 32,3,myback_bitmaps_2
	WAIT
	DEFINE 59,1,maybe_bitmaps_0
	WAIT
	DEFINE 60,2,yes_bitmaps_0
	WAIT
	DEFINE 62,2,no_bitmaps_0
	WAIT
	PRINT AT 0,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	PRINT AT 20,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	PRINT AT 40,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	PRINT AT 60,$0000,$0000,$0000,$0802,$080A,$0000,$0000,$0000,$0812,$081A,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	PRINT AT 80,$0000,$0000,$0822,$082A,$0832,$0000,$0000,$083A,$0842,$084A,$0852,$0000,$0000,$0000,$0000,$085A,$0862,$0000,$0000,$0000
	PRINT AT 100,$0000,$0000,$086A,$0000,$0872,$0000,$0000,$087A,$0000,$0000,$0882,$0000,$0000,$0000,$0000,$088A,$0892,$089A,$0000,$0000
	PRINT AT 120,$0000,$0000,$08A2,$0000,$08AA,$08B2,$08BA,$08C2,$0000,$0000,$08CA,$0000,$0000,$0000,$08D2,$08DA,$0000,$08E2,$0000,$0000
	PRINT AT 140,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$08EA,$08F2,$067A,$08FA,$0902,$0000,$0000,$090A,$0000,$0000
	PRINT AT 160,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$084A,$0912,$0000
	PRINT AT 180,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	PRINT AT 200,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	PRINT AT 220,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	WAIT
	PRINT AT 0,$19E6
	PRINT AT 20,$19EE
	PRINT AT 2,$19F7
	PRINT AT 22,$19FF
	PRINT AT 200,$19D9
loop:
	GOTO loop

	' 35 bitmaps
myback_bitmaps_0:
	DATA $0100,$0C07,$1008,$4020
	DATA $8000,$4040,$4040,$4040
	DATA $0100,$0C06,$1010,$4020
	DATA $18F0,$0808,$0404,$0202
	DATA $0000,$0000,$0000,$0100
	DATA $4040,$8040,$8080,$0080
	DATA $4040,$4040,$2040,$2020
	DATA $0000,$0000,$0100,$0201
	DATA $4040,$8040,$0080,$0000
	DATA $0101,$0101,$0000,$0000
	DATA $0000,$0000,$8080,$4040
	DATA $0000,$0000,$0000,$0300
	DATA $0000,$0000,$0000,$C000
	DATA $0101,$0201,$0402,$0404
	DATA $2020,$1010,$1010,$1010
	DATA $0404,$0808,$1010,$4030
myback_bitmaps_1:
	DATA $4040,$2020,$1020,$0810
	DATA $0C04,$1010,$2020,$4040
	DATA $1820,$0404,$0102,$0001
	DATA $0000,$0000,$0000,$8000
	DATA $0804,$0808,$1010,$0000
	DATA $0408,$0202,$0101,$0000
	DATA $0000,$0000,$0000,$3FC0
	DATA $0000,$0301,$0C04,$E010
	DATA $8040,$0000,$0000,$0000
	DATA $0408,$0404,$0202,$0202
	DATA $0000,$0101,$0201,$0402
	DATA $8080,$0000,$0000,$0000
	DATA $6040,$2020,$1010,$1010
	DATA $0101,$0000,$0000,$0000
	DATA $0000,$4080,$2040,$0718
	DATA $0000,$0300,$300C,$00C0
myback_bitmaps_2:
	DATA $3008,$00C0,$0000,$0000
	DATA $0808,$0404,$0202,$0302
	DATA $0000,$8000,$4080,$0000

yes_bitmaps_0:
	DATA $FFFF,$0101,$7D7D,$4545
	DATA $5D5D,$4141,$7F7F,$0000
no_bitmaps_0:
	DATA $0000,$FEFE,$8282,$BABA
	DATA $A2A2,$BEBE,$8080,$FFFF
maybe_bitmaps_0:
	DATA $007E,$007E,$003C,$0018


#2 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 9,821 posts
  • Busy bee!
  • Location:England

Posted Fri Aug 7, 2015 1:46 PM

Have a look in constants.bas and the updated examples in the IntyBASIC SDK.

#3 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 9,821 posts
  • Busy bee!
  • Location:England

Posted Fri Aug 7, 2015 2:37 PM

Here ya go :- Attached File  FirstSpear.bas   1.41KB   131 downloads

You will need to use constants.bas in the IntyBASIC SDK for it to compile. My example is commented so if you have any problems, just shout out.





Also tagged with one or more of these keywords: intybasic, mob, sprite, print, graphics

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users