Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Keoni29 on May 30, 2011, 01:20:27 pm

Title: 96*64 image
Post by: Keoni29 on May 30, 2011, 01:20:27 pm
I made my first game using axe. It's called TI-jump. It's based on the popular papijump.
I need a titlescreen for it. I can sprite it myself, but I wanna know how to draw a 96*64 image since sprites are 8*8
Do I have to make tons of little sprites or is there a code for it?
Title: Re: 96*64 image
Post by: aeTIos on May 30, 2011, 01:24:09 pm
You have to have a 768-byte code in a var like "pic1" then do pic1 (or anything) -> dispgraph
Code: [Select]
[hex code here]->pic1
pic1->dispgraph
Hope this helps!
Title: Re: 96*64 image
Post by: Aichi on May 30, 2011, 01:24:27 pm
Store the title screen as an OS Pic (Pic0 for example) and use [Pic0] -> Pic0 in your source. Axe Parser copies the OS Pic in your code and links the Pic0 Pointer to the first byte.
Title: Re: 96*64 image
Post by: ztrumpet on May 30, 2011, 01:25:42 pm
You can absorb the pic into the Axe source and then display it, like this:
Code: [Select]
[Pic#]->GDB1
GDB1->DispGraph
Or, if you wanted to change what the titlescreen looks like by drawing text/lines/anything else on it, you can use this code:
Code: [Select]
[Pic#]->GDB1
Copy(GDB1,L6,768) // Note that this should be 756 if the picture has only 63 rows, like most pics on the calc.
...
DispGraph

Good luck!
Title: Re: 96*64 image
Post by: Keoni29 on May 30, 2011, 01:28:20 pm
Are there editors for images this size?
Title: Re: 96*64 image
Post by: Aichi on May 30, 2011, 01:29:18 pm
You can use MS Paint. TI Connect is able to convert these files to pic variables.
Title: Re: 96*64 image
Post by: Keoni29 on May 30, 2011, 01:31:49 pm
Is bmp okay?
Title: Re: 96*64 image
Post by: Aichi on May 30, 2011, 01:33:01 pm
Bmp is fine, you should only use black and white of course.
Title: Re: 96*64 image
Post by: Darl181 on May 30, 2011, 01:38:11 pm
Something you can also do if you want to put a bit more work into it but have it directly part of the source (rather than needing the picvar every compile)...
Make a new Axe Source program, name it whatever
then do something like this:
Code: (Axe) [Select]
[Pic#]→Q
GetCalc("prgmZPICRCL",768)→P ;doesn't really matter what the name is
Copy(Q,P,768)
After running that, you should now have a program which you could
1) call as a sub-program
2) 2nd + Rcl --paste directly into the source

Hope this helps ;D

EDIT: if you want to convert a PC image to a TI image, sourcecoder (http://sc.cemetech.net) can do it if you don't have ti-connect, from bmp, gif or png
You'll have to manually put in the brackets tho
Title: Re: 96*64 image
Post by: Builderboy on May 30, 2011, 01:42:37 pm
Something you can also do if you want to put a bit more work into it but have it directly part of the source (rather than needing the picvar every compile)...
Make a new Axe Source program, name it whatever
then do something like this:
Code: (Axe) [Select]
[Pic#]→Q
GetCalc(ZPICRCL,768)→P ;doesn't really matter what the name is
Copy(Q,P,768)
After running that, you should now have a program which you could
1) call as a sub-program
2) 2nd + Rcl --paste directly into the source

Hope this helps ;D

That won't work for 2 reasons.  1) GetCalc takes a string of the form "prgmNAME" in order to work, and 2) copying the data directly into the program will *not* give you Hex strings, it will most likely give you gibberish, you would need a special converting program that takes data and converts it into Hex strings.
Title: Re: 96*64 image
Post by: Darl181 on May 30, 2011, 01:44:38 pm
Odd, I've gotten it to work before...don't exactly remember how I did it tho (it was in december or something)
Title: Re: 96*64 image
Post by: Keoni29 on May 30, 2011, 01:54:17 pm
This is what I made. When the hi-scores are done I'll upload the final version of the game!
(http://updo.nl/file/072e8383.png)
Edit:Ti connect said that my calc wasnt compatible with bmp. Why aint it converted by ti connect?
Title: Re: 96*64 image
Post by: aeTIos on May 30, 2011, 01:54:45 pm
looks cool! well done!
Title: Re: 96*64 image
Post by: Aichi on May 30, 2011, 01:56:07 pm
(http://updo.nl/file/072e8383.png)
Yeah, this looks great. :D
Title: Re: 96*64 image
Post by: JosJuice on May 30, 2011, 02:01:04 pm
This is what I made. When the hi-scores are done I'll upload the final version of the game!
(http://updo.nl/file/072e8383.png)
Edit:Ti connect said that my calc wasnt compatible with bmp. Why aint it converted by ti connect?
You need to load it into TI Connect's image converter thingy first.
Title: Re: 96*64 image
Post by: Keoni29 on May 30, 2011, 02:03:17 pm
I figured it out already before you posted, but thanks anyway :)
Title: Re: 96*64 image
Post by: Munchor on May 30, 2011, 02:03:39 pm
You can also use TokenIDE, but that implies redrawing it.
Title: Re: 96*64 image
Post by: Keoni29 on May 30, 2011, 02:10:06 pm
Well... The image is on my calc now, but GBD0->DispGraph doesn't work :P Is this the 83 syntax?
Title: Re: 96*64 image
Post by: Aichi on May 30, 2011, 02:13:30 pm
Another way would be Copying the image data into the main buffer through
Copy(GBD0, L6, 768)
Title: Re: 96*64 image
Post by: Keoni29 on May 30, 2011, 02:15:12 pm
That works fine. Ty. Awesome community here :)
Title: Re: 96*64 image
Post by: Keoni29 on May 31, 2011, 10:08:22 am
Is there a programme that converts an os-image into hex code?
Title: Re: 96*64 image
Post by: JosJuice on May 31, 2011, 01:19:24 pm
You can use SourceCoder (on your computer) to convert the .bmp to hex:

http://www.cemetech.net/projects/basicelite/sourcecoder2.php (http://www.cemetech.net/projects/basicelite/sourcecoder2.php)
Title: Re: 96*64 image
Post by: Keoni29 on May 31, 2011, 01:55:15 pm
I got this
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
03FFCF800000000000000000
0000000007E0000000000000
07FFCF800000000000000000
0FFFFF8007E0000000000000
1FFFFF8007E7CF8FFFF8FFE0
1FFFE70007E0000000040010
1FFDEF8007E7CF9FFFF0FFC0
1EFCEF8707E7CF9FFFF8FFE0
18FC0F8087E7CF9FFFFCFFF0
00FC0F8F07E7CF9FFFFCFBF0
00FC0F9F87E7CF9F3F7CF9F0
00FC0F9F87E7CF9F3E7CF8F0
00FC0F9F87E7CF9F3E7CF9F0
00FC0F9F87E7CF9F3E7CF9F0
00FC0F9F87E7CF9F3E7CFBF0
00FC0F9F87E7CF9F3E7CFFE0
00FC0F9FBFE7CF9F3E7CFFE0
00FC0F8F3FE7CF9F3E7CFFC0
00FC0F807FE7FF9F3E7CFF80
00FC0F807FC7FF9F3E7CF800
00FC0F807FC3FF9F3E7CF800
00FC0F803F83FF9F3E7CF800
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
001F00000000000000000000
00FFE000006226C000000000
01F1F0000055548000000000
03C078000064624000000000
07001C00004476C000000000
0E60CE000000000000000000
0E408E000022444000000000
0C60C60000556AA000000000
1C60C70000654C8000000000
1800030000756E8000000000
18C063000000000000000000
1CFBE7000000000000000000
0C71C6000000000000000000
0E318E000000000000000000
0E0E0E000000000000000000
07001C000000000000000000
03C078000000000000000000
01F1F0000000000000000000
00FFE0000000000000000000
FFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFF
AAAAAAAAAAAAAAAAAAAAAAAA
555555555555555555555555
000000000000000000000000
000000000000000000000000
000000000000000000000000
AAAAAAAAAAAAAAAAAAAAAAAA
555555555555555555555555

Do I have to type this by hand?????
Title: Re: 96*64 image
Post by: JosJuice on May 31, 2011, 01:57:44 pm
Ah, that's assembly format. You can make SourceCoder display it in a better format, or you could simply remove the unneccesary stuff and then enter it into your program.
Title: Re: 96*64 image
Post by: Keoni29 on May 31, 2011, 01:58:54 pm
I edited my post. This is a converted bmp file