Jump to content

Photo

IntyBASIC Pack MOB into DoubleY?


4 replies to this topic

#1 First Spear OFFLINE  

First Spear

    Stargunner

  • 1,313 posts
  • Location:Somewhere in Uptown

Posted Tue May 15, 2018 5:41 AM



	REM Command: intycolor -b -s0000 -o36 -m px16.bmp px16.bas px16
	REM Created: Tue May 15 07:32:20 2018

	REM stub for showing image
	INCLUDE "constants.bas"
	MODE 0,0,0,0,0
	Wait
	CLS
	Wait
	For fillGo = 0 to 239 : Print At fillGo Color 1 , "X" : Next fillGo
	Wait
	DEFINE 36,4,px16_bitmaps_0
	SPRITE 0,57 + VISIBLE , ZOOMY2 + 50 , SPR_RED + SPR36
	SPRITE 1,57 + VISIBLE , ZOOMY2 + 59 , SPR_TAN + SPR37
	SPRITE 2,55 + VISIBLE , ZOOMY2 + 47 , SPR_BROWN + SPR38
	SPRITE 3,55 + VISIBLE , ZOOMY2 + 55 , SPR_GREY + SPR39



loop:
	GOTO loop

	' 4 bitmaps
px16_bitmaps_0:
	DATA $EAF4,$00FF,$0000,$0000
	DATA $DE6E,$00FA,$0000,$0000
	DATA $5D77,$00E7,$0000,$0000
	DATA $0000,$0000,$DF00,$DB3E

	REM 1x2 cards
px16_cards:
	DATA $0932
	DATA $1938

Attached File  px16.bmp   438bytes   20 downloads    px16.jpg

 

px16shw.JPG

 

 

Hi. The first image is a 16x8 image I want to display, with a red shape, tan shape, brown shape, grey shape, app represented as a single sprite in a single 8x8 tile. I want to show it on my Intellivision display "packed" so the entire image fits into a single 8x8 area on the screen. The BASIC program makes what you see, kind of jumbled. Can anyone show me the right combination of constants and/or "magic numbers" to make the sprite stay in the middle of the screen within a single tile?

 

Thanks.

 

 

 

 

 

 

 

 



#2 Kiwi OFFLINE  

Kiwi

    Stargunner

  • 1,596 posts

Posted Tue May 15, 2018 7:07 AM

Remove ZOOMY2 to fit that entire image to 8x8 card.  Each sprites is an 8x8 image as I can see the DATA. 
 

  •     SPRITE 0,0+ x + VISIBLE , 0+y, SPR_RED + SPR36
  •     SPRITE 1,0+ x + VISIBLE , 0+y, SPR_TAN + SPR37
  •     SPRITE 2,0+ x + VISIBLE , 4+y, SPR_BROWN + SPR38
  •     SPRITE 3,0+ x + VISIBLE , 4+y , SPR_GREY + SPR39

Remove the constant number with a variable.  From that bitmap, it should look like the bitmap provided.  Using x and y variable with the number before or after will make the sprite as a group.  Change the number before the x or y to change the offset of the meta sprite you're trying to put together. 

x would be the screen width/2, so 80-4 to center it.  So variable x=76.
And variable y would be the screen height, I think 144/2,  72-4. So y=68. This may center the sprites in the center of the screen.   So if you're using this sprite as your main character, I would rename the variable x and y to herox and heroy. 



#3 First Spear OFFLINE  

First Spear

    Stargunner

  • Topic Starter
  • 1,313 posts
  • Location:Somewhere in Uptown

Posted Tue May 15, 2018 3:36 PM

Thanks! I played with that a bit and got it. 

 

Follow-up: is there a way to make the background of the MOB black, or should I make the foreground color of the BACKTAB black? I don't want any color except for black to show through on the tile where this is displaying.

 

Thanks again.

 

Remove ZOO[snip]

 



#4 Kiwi OFFLINE  

Kiwi

    Stargunner

  • 1,596 posts

Posted Tue May 15, 2018 10:38 PM

Make a fifth MOB with all the bits on and have it be black color, DATA $FFFF,$FFFF,$FFFF,$FFFF  



#5 DZ-Jay ONLINE  

DZ-Jay

    Quadrunner

  • 11,494 posts
  • The P-Machinery AGE is almost here!
  • Location:NC, USA

Posted Fri May 18, 2018 6:46 AM

Thanks! I played with that a bit and got it. 

 

Follow-up: is there a way to make the background of the MOB black, or should I make the foreground color of the BACKTAB black? I don't want any color except for black to show through on the tile where this is displaying.

 

Thanks again.

 

 

 

MOBs get a single color:  Foreground.  Their background color is "transparent" (i.e., whatever is behind them in BACKTAB or other MOBs) always.

 

   -dZ.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users