A89: Chun-Li: a Chinese Ninja Warrior


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

A89: Chun-Li: a Chinese Ninja Warrior




Hey hey hey, could someone please tell me an optimized way to do this code. It
displays an awesome grayscale pic of Chun-Li, and I was wondering if it could
be done easier and better?
code goes here:
;By 47Ronin manjilump michael meadors
;3/15/99
;
;Puts a gray sprite of Chun-Li on the screen

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

_main:
	jsr		graphlib::gray4			;switches to 4 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

	;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		Chunli_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		Chunli_plane1(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

Chunli_plane0						;data for the 1st plane (plane0)
	dc.w	82				;sprite height
	dc.w	6				;sprite width (in bytes)
	dc.b	%00000000,%00000000,%00001100,%11110000,%00000000,%00000000	;1
	dc.b	%00000000,%00000000,%00010111,%11111000,%00000000,%00000000
	dc.b	%00000000,%00000000,%00111111,%10001100,%00000000,%00000000
	dc.b	%00000000,%00000000,%00111011,%00000100,%00000000,%00000000
	dc.b	%00000000,%00000000,%11101001,%00000100,%00000000,%00000000
	dc.b	%00000000,%00000001,%01010111,%01001100,%00000000,%00000000
	dc.b	%00000000,%00000000,%11111001,%10111000,%00000000,%00000000
	dc.b	%00000000,%00000001,%11101000,%01110000,%00000000,%00000000	;8
	dc.b	%00000000,%00000001,%10110010,%11111000,%00000000,%00000000
	dc.b	%00000000,%00000000,%11110111,%01011000,%00000000,%00000000
	dc.b	%00000000,%00000000,%01110101,%00110000,%11110000,%00000000
	dc.b	%00000000,%00000000,%00011110,%01111111,%11111000,%00000000
	dc.b	%00000000,%00000000,%00010001,%01011001,%10001100,%00000000
	dc.b	%00000000,%00000000,%00101100,%11010001,%00010100,%00000000
	dc.b	%00000000,%00000000,%00101110,%11111111,%00010100,%00000000
	dc.b	%00000000,%00000000,%00011110,%10100110,%11110100,%00000000	;16
	dc.b	%00000000,%00000000,%00010101,%10100011,%11110100,%00000000
	dc.b	%00000000,%00000000,%00011111,%11011011,%00110100,%00000000
	dc.b	%00000000,%00000000,%00011110,%10000110,%00011000,%00000000
	dc.b	%00000000,%00000000,%00111010,%10000001,%00111000,%00000000
	dc.b	%00000000,%00000000,%00111001,%01100000,%00111000,%00000000
	dc.b	%00000000,%00000000,%00111100,%11110000,%01111000,%00000000
	dc.b	%00000000,%00000000,%01101111,%11111000,%01110000,%00000000
	dc.b	%00000000,%00000000,%01100111,%10001100,%11010000,%00000000	;24
	dc.b	%00000000,%00000000,%01000111,%00000111,%10100000,%00000000
	dc.b	%00000000,%00000000,%11001101,%11111111,%11000000,%00000000
	dc.b	%00000000,%00000000,%11011101,%10000001,%00000000,%00000000
	dc.b	%00000000,%00000001,%10001001,%00000001,%00000000,%00000000
	dc.b	%00000000,%00000001,%10011011,%11110001,%00000000,%00000000
	dc.b	%00000000,%00000011,%00010111,%00011111,%10000000,%00000000
	dc.b	%00000000,%00000011,%01111110,%10000011,%10000000,%00000000
	dc.b	%00000000,%11100111,%11111110,%01001111,%11000000,%00000000	;32
	dc.b	%00000001,%00111111,%11111111,%01111111,%11000000,%00000000
	dc.b	%00000000,%11111111,%11111111,%10111011,%01100000,%00000000
	dc.b	%00000000,%11111111,%11101111,%11111010,%11100000,%00000000
	dc.b	%00000001,%11111111,%10011110,%11111011,%11110000,%00000000
	dc.b	%00000001,%11111100,%00111110,%11111011,%11001000,%00000000
	dc.b	%00000111,%11100000,%01111110,%11111011,%01101000,%00000000
	dc.b	%00001111,%10000000,%11111110,%01111011,%10100100,%00000000
	dc.b	%00001100,%00000011,%11111110,%00111001,%01100100,%00000000	;40
	dc.b	%00001100,%00001111,%11111111,%00011001,%11110110,%00000000
	dc.b	%00001110,%01111111,%11111111,%00001100,%11110010,%00000000
	dc.b	%00001111,%11111111,%11111111,%00000110,%01110011,%00000000
	dc.b	%00001111,%11111111,%10011111,%10000011,%00110011,%00000000
	dc.b	%00011111,%11101000,%00011111,%11000011,%10011001,%10000000
	dc.b	%00110111,%11010000,%00011111,%11000100,%11011001,%10000000
	dc.b	%01000000,%00100000,%00011111,%11101011,%00111000,%11000000
	dc.b	%11000000,%11000000,%00001111,%11110111,%11111100,%11000000	;48
	dc.b	%11000111,%00000000,%00000111,%11111110,%01111100,%11100000
	dc.b	%01111000,%00000000,%00000011,%11111110,%11111100,%00100000
	dc.b	%00000000,%00000000,%00000001,%11111110,%11111111,%11100000
	dc.b	%00000000,%00000000,%00000000,%11111101,%11111110,%00000000
	dc.b	%00000000,%00000000,%00000000,%00111000,%11111100,%00000000
	dc.b	%00000000,%00000000,%00000000,%00111000,%11110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00111000,%11100000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011000,%11100000,%00000000	;56
	dc.b	%00000000,%00000000,%00000000,%00011110,%11100000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011100,%11100000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001100,%11110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001100,%10110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011110,%00110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011010,%10110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011010,%11110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011110,%11110000,%00000000	;64
	dc.b	%00000000,%00000000,%00000000,%00011110,%11110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001110,%11110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00010110,%11100000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001001,%10100000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001000,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001100,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001100,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00000100,%01000000,%00000000	;72
	dc.b	%00000000,%00000000,%00000000,%00000100,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00000100,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001100,%11000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001000,%11000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011000,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00010000,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00010000,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00110000,%01000000,%00000000	;80
	dc.b	%00000000,%00000000,%00000000,%00100001,%10000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00111110,%00000000,%00000000

Chunli_plane1						;data for the 2nd plane (plane1)
	dc.w	82				;sprite height
	dc.w	6				;sprite width (in bytes)
	dc.b	%00000000,%00000000,%00001100,%11110000,%00000000,%00000000	;1
	dc.b	%00000000,%00000000,%00011111,%10011000,%00000000,%00000000
	dc.b	%00000000,%00000000,%00111111,%01000100,%00000000,%00000000
	dc.b	%00000000,%00000000,%00111011,%11001100,%00000000,%00000000
	dc.b	%00000000,%00000000,%11101111,%01001100,%00000000,%00000000
	dc.b	%00000000,%00000001,%11111101,%10111100,%00000000,%00000000
	dc.b	%00000000,%00000001,%10101010,%10011100,%00000000,%00000000
	dc.b	%00000000,%00000001,%10111111,%01011000,%00000000,%00000000	;8
	dc.b	%00000000,%00000001,%11100101,%01111100,%00000000,%00000000
	dc.b	%00000000,%00000000,%11100110,%11111100,%00000000,%00000000
	dc.b	%00000000,%00000000,%01101110,%10011000,%11110000,%00000000
	dc.b	%00000000,%00000000,%00011011,%00111111,%00001000,%00000000
	dc.b	%00000000,%00000000,%00011111,%01010111,%01010100,%00000000
	dc.b	%00000000,%00000000,%00110011,%11111110,%11010100,%00000000
	dc.b	%00000000,%00000000,%00111101,%11111000,%00010100,%00000000
	dc.b	%00000000,%00000000,%00010001,%10111100,%11110100,%00000000	;16
	dc.b	%00000000,%00000000,%00011011,%10100101,%00110100,%00000000
	dc.b	%00000000,%00000000,%00011111,%11111010,%10010100,%00000000
	dc.b	%00000000,%00000000,%00011011,%11101111,%10111000,%00000000
	dc.b	%00000000,%00000000,%00111110,%11110011,%10001000,%00000000
	dc.b	%00000000,%00000000,%00100001,%11011001,%01101000,%00000000
	dc.b	%00000000,%00000000,%00101011,%00101101,%00101000,%00000000
	dc.b	%00000000,%00000000,%01011101,%10010111,%10010000,%00000000
	dc.b	%00000000,%00000000,%01011111,%01111011,%01110000,%00000000	;24
	dc.b	%00000000,%00000000,%01111110,%11001100,%11100000,%00000000
	dc.b	%00000000,%00000000,%10110101,%11111111,%11000000,%00000000
	dc.b	%00000000,%00000000,%10100101,%00000011,%00000000,%00000000
	dc.b	%00000000,%00000001,%01111001,%10000001,%00000000,%00000000
	dc.b	%00000000,%00000001,%01101011,%11101011,%00000000,%00000000
	dc.b	%00000000,%00000010,%11110110,%10101111,%10000000,%00000000
	dc.b	%00000000,%00000010,%11111111,%01000101,%10000000,%00000000
	dc.b	%00000000,%11100101,%11111011,%10111011,%10000000,%00000000	;32
	dc.b	%00000001,%11111111,%11110010,%10001010,%10000000,%00000000
	dc.b	%00000000,%11111110,%00000010,%01011110,%11000000,%00000000
	dc.b	%00000000,%11111000,%00010010,%00110111,%01000000,%00000000
	dc.b	%00000001,%11100000,%01100011,%00000110,%01000000,%00000000
	dc.b	%00000001,%10000011,%11000111,%00000111,%01101000,%00000000
	dc.b	%00000111,%00011111,%10000111,%01000101,%11100000,%00000000
	dc.b	%00001100,%01101111,%00001111,%10100101,%01101100,%00000000
	dc.b	%00001011,%00011100,%00011011,%11010111,%10110100,%00000000	;40
	dc.b	%00001010,%01110000,%00110010,%10101100,%10101010,%00000000
	dc.b	%00001001,%10000000,%11111110,%11010111,%10101110,%00000000
	dc.b	%00001100,%00000111,%11111110,%11001010,%11111101,%00000000
	dc.b	%00001110,%01111111,%10011111,%01100111,%01111101,%00000000
	dc.b	%00010111,%11101000,%00011111,%00100011,%10110110,%10000000
	dc.b	%00100011,%10110000,%00010111,%10100011,%10111010,%10000000
	dc.b	%01101000,%01100000,%00010111,%11000111,%11111101,%11000000
	dc.b	%10000101,%11000000,%00000011,%11101111,%11111001,%01000000	;48
	dc.b	%10111011,%00000000,%00000101,%11111101,%10111101,%00100000
	dc.b	%01111000,%00000000,%00000010,%11111001,%00111101,%11100000
	dc.b	%00000000,%00000000,%00000000,%00110001,%00111111,%11100000
	dc.b	%00000000,%00000000,%00000000,%11110010,%10111110,%00000000
	dc.b	%00000000,%00000000,%00000000,%00110101,%11111100,%00000000
	dc.b	%00000000,%00000000,%00000000,%00110100,%01110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00110111,%01100000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011111,%01100000,%00000000	;56
	dc.b	%00000000,%00000000,%00000000,%00011001,%01100000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011011,%00100000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001010,%00110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001010,%01110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011000,%11110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011101,%01110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00010101,%00110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011001,%00110000,%00000000	;64
	dc.b	%00000000,%00000000,%00000000,%00011001,%00110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001101,%01110000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011101,%01100000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001010,%10100000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001100,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001011,%11000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001000,%11000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00000000,%11000000,%00000000	;72
	dc.b	%00000000,%00000000,%00000000,%00000011,%11000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00000100,%11000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001000,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00001101,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00010000,%11000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011000,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00011110,%01000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00100001,%01000000,%00000000	;80
	dc.b	%00000000,%00000000,%00000000,%00110010,%10000000,%00000000
	dc.b	%00000000,%00000000,%00000000,%00111110,%00000000,%00000000


_comment	dc.b	"GreySprite Example of Chun-Li from Street Fighter II",0

	end
thanks a lot!
-roninmanji