Jump to content



0

Drawing an EARTH


3 replies to this topic

#1 orion1052003 OFFLINE  

orion1052003

    Chopper Commander

  • 140 posts

Posted Thu Oct 6, 2011 11:00 PM

I snagged this piece of code from the XB game Devastator. On the cover of Compute!'s First Book
Of TI Games, the program is on page 186. Or page 197 of the .PDF version at http://pergrem.com/tibooks/

Is there a way to make this nice earth graphic in XB without using up 3 character sets?



460 CALL COLOR(2,6,1,3,6,1,4,3,6,5,15,2)
465 RESTORE 500
470 FOR I=6 TO 14 :: CALL COLOR(I,16,2) :: NEXT I
480 FOR I=0 TO 13 :: READ E$(I) :: CALL CHAR(40+I,E$(I)) :: NEXT I
490 FOR I=0 TO 7 :: READ E$(I) :: CALL CHAR(I+56,E$(I)) :: NEXT I
500 DATA 0000000000000F7F,000000000000F0FE,01030F1F3F7FFFFF
510 DATA 80C0F0F8FCFEFFFF,0001010103030303,FFFFFFFFFFFFFFFF
520 DATA 00808080C0C0C0C0,0303030301010100,C0C0C0C080808000
530 DATA FF7F3F3F1F0F0703,FFFEFCFCF8F0E0C0,7F0F000000000000
540 DATA FEF0000000000000,0800667C18666810
550 DATA E0F07F7F7FFFFFFF,0818F8F8F0F8F0F0,7F7F7F3D1C0E0201
560 DATA F0F0908800180000,03070F0F0F070703,F0FFFFFEFCFCF8F0
570 DATA 0303010101010101,E0C0C0C080808000
580 DISPLAY AT(2,24):CHR$(40)&CHR$(41) :: DISPLAY AT(3,23):CHR$(42)&CHR$(56)&CHR$(57)&CHR$(43)
590 DISPLAY AT(4,22):CHR$(44)&CHR$(45)&CHR$(58)&CHR$(59)&CHR$(45)&CHR$(46)
600 DISPLAY AT(5,22):CHR$(47)&CHR$(45)&CHR$(60)&CHR$(61)&CHR$(45)&CHR$(48)
610 DISPLAY AT(6,23):CHR$(49)&CHR$(62)&CHR$(63)&CHR$(50)
620 DISPLAY AT(7,24):CHR$(51)&CHR$(52)

Attached Files



#2 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,096 posts
  • Location:Germany

Posted Fri Oct 7, 2011 1:27 AM

Guess that the different charsets are used for getting multiple colors. Try using some overlapping sprites.
Thats the way I would do it in assembly language. Use charset for the blue part of the earth and then use perhaps 2 4x4 sprites for the continents.

I am no extended basic expert, I think the sprite pattern table is shared with the charset table. So there might be some constraints here you do not have in assembly language.

#3 Willsy OFFLINE  

Willsy

    Dragonstomper

  • 765 posts
  • Location:Uzbekistan (no, really!)

Posted Fri Oct 7, 2011 2:11 AM

Unfortunately, sprites in XB use the same characters as the character set, so you don't really gain anything.

Use assembly.

Or Forth ;)

#4 RXB OFFLINE  

RXB

    Dragonstomper

  • 539 posts
  • Location:Vancouver, Washington, USA

Posted Fri Oct 7, 2011 4:21 AM

Guys the Tigercub disks have multicolored Sprites and the subroutines on how to use them.

And using PEEK and LOAD from Tigercub the routines are using some Assembly but very little. Take a look it will answer your problem.

All the answers are on the CYC CD. Or if someone has them posted somewhere. Just look for the Tigercub Archive they are there.

It has hundreds of routines to use. Where I got a lot of ideas for RXB additions.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users