Re: A89: Re: the put_sprite routine


[Prev][Next][Index][Thread]

Re: A89: Re: the put_sprite routine



here ya go... this file displays a 7 shade grayscale sprite w/ put_sprite




At 07:15 PM 8/20/99 -0700, you wrote:
>
>I wish I could help you but, I really don't know anything about it.  Sorry
>
>  Eric Greening
>-----Original Message-----
>From: TurboSoft@aol.com <TurboSoft@aol.com>
>To: assembly-89@lists.ticalc.org <assembly-89@lists.ticalc.org>;
>assembly-92@lists.ticalc.org <assembly-92@lists.ticalc.org>
>Date: Friday, August 20, 1999 3:13 PM
>Subject: A89: the put_sprite routine
>
>
>>
>>Can someone show me an example of the put_sprite routine in action?  l've
>>looked through the 89/92plus source code on ticalc.org, but l haven't been
>>able to find any programs that use this call.  Can someone help?  Thanks.
>>--TurboSoft
>>
>>Visit the TURBOSOFT HOMEPAGE:  The most current Basic programs created by
>>Turbosoft for the 89, and the most 89 links.
>><A HREF="http://turbosoft.ticalc.org/">http://turbosoft.ticalc.org/</A>
>>
>>
>
>
>
>
;By RayMan
;2/25/99
;
;Puts a grey sprite of the StarFox Arwing on the screen

	include		"doorsos.h"
	include		"graphlib.h"
	include		"userlib.h"
	xdef		_main
	xdef		_comment
	xdef		_ti89

_main:
	jsr		graphlib::gray7			;switches to 7 grayscale mode
	move.w		#1,graphlib::choosescreen	;set all graphlib functions to grayscale

	move.l		graphlib::plane0,a1		;address of the 1st bitplane (plane0)
	jsr		graphlib::clr_scr		;clears the first bitplane (main screen)
	move.l		graphlib::plane1,a1		;address of the 2nd bitplane (plane1)
	jsr		graphlib::clr_scr		;clears the second bitplane
	move.l		graphlib::plane2,a1		;address of the 3rd bitplane (plane2)
	jsr		graphlib::clr_scr		;clears the third bitplane

	;Place the data for the 1st plane on the 1st plane
	move.l		graphlib::plane0,a1		;set the address to draw
	move.w		#16,d0				;set the x-coordinate
	move.w		#16,d1				;set the y-coordinate
	lea		Arwing_plane0(PC),a0		;point to the address of the sprite
	jsr		graphlib::put_sprite

	;Place the data for the 2nd plane on the 2nd plane
	move.l		graphlib::plane1,a1		;set the address to draw
	move.w		#16,d0				;set the x-coordinate
	move.w		#16,d1				;set the y-coordinate
	lea		Arwing_plane1(PC),a0		;point to the address of the sprite
	jsr		graphlib::put_sprite

	;Place the data for the 3rd plane on the 3rd plane
	move.l		graphlib::plane2,a1		;set the address to draw
	move.w		#16,d0				;set the x-coordinate
	move.w		#16,d1				;set the y-coordinate
	lea		Arwing_plane2(PC),a0		;point to the address of the sprite
	jsr		graphlib::put_sprite

	clr.w		graphlib::choosescreen		;set all graphlib functions to Black and White mode
	jsr		userlib::idle_loop		;waits for a key
	jsr		graphlib::gray2			;restores Black and White mode
	rts

Arwing_plane0						;data for the 1st plane (plane0)
	dc.w		16				;sprite hight
	dc.w		2				;srite width (in bytes)
	dc.b		%00000000,%00000000		;1
	dc.b		%01000000,%00000000
	dc.b		%00100000,%00000000
	dc.b		%00010000,%00000000
	dc.b		%00111111,%11000000
	dc.b		%00011111,%10000000
	dc.b		%00000000,%00000000
	dc.b		%00000111,%00000000		;8
	dc.b		%00000000,%00000000
	dc.b		%00011111,%10000000
	dc.b		%00111111,%11000000
	dc.b		%00010000,%00000000
	dc.b		%00100000,%00000000
	dc.b		%01000000,%00000000
	dc.b		%00000000,%00000000
	dc.b		%00000000,%00000000		;16

Arwing_plane1						;data for the 2nd plane (plane1)
	dc.w		16				;sprite hight
	dc.w		2				;srite width (in bytes)
	dc.b		%00000000,%00000000		;1
	dc.b		%00100000,%00000000
	dc.b		%00111000,%00000000
	dc.b		%00001111,%00000000
	dc.b		%00111111,%11000000
	dc.b		%00000110,%00000000
	dc.b		%00100111,%11111000
	dc.b		%01000000,%00000111		;8
	dc.b		%00100111,%11111000
	dc.b		%00000110,%00000000
	dc.b		%00111111,%11000000
	dc.b		%00001111,%00000000
	dc.b		%00111000,%00000000
	dc.b		%00100000,%00000000
	dc.b		%00000000,%00000000
	dc.b		%00000000,%00000000		;16

Arwing_plane2						;data for the 3rd plane (plane2)
	dc.w		16				;sprite hight
	dc.w		2				;srite width (in bytes)
	dc.b		%10000000,%00000000		;1
	dc.b		%00000000,%00000000
	dc.b		%00000000,%00000000
	dc.b		%00010000,%00000000
	dc.b		%00111111,%11000000
	dc.b		%00000000,%00000000
	dc.b		%00011000,%00000000
	dc.b		%00111111,%11111000		;8
	dc.b		%00011000,%00000000
	dc.b		%00000000,%00000000
	dc.b		%00111111,%11000000
	dc.b		%00010000,%00000000
	dc.b		%00000000,%00000000
	dc.b		%00000000,%00000000
	dc.b		%10000000,%00000000
	dc.b		%00000000,%00000000		;16

_comment	dc.b	"GreySprite Example of StarFox Arwing",0

	end


Andrew Magness

AndrewM@ev1.net
TCPA

Follow-Ups: References: