A89: Re: Grayscale program
[Prev][Next][Index][Thread]
A89: Re: Grayscale program
I don't know if this is what you are looking for, but I made this code
today. It is very primative, and therefore very commented. It uses the
put_sprite routine that comes in graphlib. Hope you all enjoy!
-Miles Raymond EML: m_rayman@bigfoot.com
ICQ: 13217756 IRC: Killer2 AIM: MRayMan
http://www.bigfoot.com/~m_rayman/
-----Original Message-----
From: Ben Rodgers <bentensai@yahoo.com>
To: assembly-89@lists.ticalc.org <assembly-89@lists.ticalc.org>
Date: Tuesday, March 02, 1999 7:26 PM
Subject: A89: Grayscale program
>Could someone make a small program that only shows a sprite in four or
>seven level grayscale. No movements or controls just a sprite. Thanks.
>
>Visit my website, Some Assembly Required, at
>http://meltingpot.fortunecity.com/gilford/908
>_________________________________________________________
>DO YOU YAHOO!?
>Get your free @yahoo.com address at http://mail.yahoo.com
;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