Re: A89: Re: C question... actually two C questions...


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

Re: A89: Re: C question... actually two C questions...




Boo yah!

Thanks for the help. Now I can do grayscale. :)

Game city, here I come.

Check out the prog:

#define USE_GRAY_PATCH
#define USE_INITS_PATCH

#include <doors.h>   // Make Doors Program
#include <all.h>     // Include All Header Files

int _ti89;           // Produce .89Z File

char _comment[] = "Grayscale Demo";

unsigned static long sprt[]={ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8000,
0x240000, 0x4804000, 0x1800, 0x9021400, 0xA00, 0x23FFFA08, 0x4000BF4,
0xFFFFAD4, 0x27FFFBF4, 0x3FFFA08, 0x8000A00, 0x821400, 0x2009800,
0x200000, 0x44000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
unsigned static long mask[]={ 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF7FFF, 0xFFDBFFFF,
0xFB7FBFFF, 0xFF801FFF, 0xF40017FF, 0xF8000BFF, 0xD3FFFBFF, 0xE7FFFBF7,
0xEFFFFA17, 0xC4000BF7, 0xF3FFFBFF, 0xF0000BFF, 0xFC0017FF, 0xFD001FFF,
0xFFDFFFFF, 0xFFFBBFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF};
extern unsigned char* plane1;
extern unsigned char* plane2;

// Main Function
int _main()
{
	if (!GrayMode(GRAY_ON)) {
      	return;
    	}
	SetPlane(0);
    	ClearScreen();
	SetPlane(1);
	ClearScreen();
	ClrScr();
	// Place your code here
	Sprite32(10,10,32,mask,GetPlane(0),SPRT_OR);
	Sprite32(10,10,32,sprt,GetPlane(1),SPRT_OR);
	ngetchx();
	GrayMode(GRAY_OFF);
	return 0;
}

One more note. If you happen to see my game Return To Jurassic Park on
TI-Calc, don't play it.
It sucks. I have made a much better version I will be releasing soon. The
new version was
completely rewritten seeing as how I've learned so much since then.

Thanks again,
S. Thompson



Follow-Ups: