Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: tifreak on February 28, 2006, 05:25:00 pm

Title: hex to sprite converter!
Post by: tifreak on February 28, 2006, 05:25:00 pm
I am proud of myself, after 4 failed attempts, I finally got the bloody thing to work!!

http://tifreakware.calcgames.org/downloads/bspritedemo.zip

What do you think? Run prgmE to make it work... It will display 2 preloaded 16x16 sprites. :)smile.gif

Now this motivates me to get back onto Pokemon... Also, this program is just to give an idea on what the NPCs and what not will look like, and will hopefully be replaced by Kerm's asm routine...
Title: hex to sprite converter!
Post by: kalan_vod on February 28, 2006, 05:48:00 pm
I tried it, but seems rather slow. Check with DA or Javaman about the way they draw their sprites. Other than that it is great!
Title: hex to sprite converter!
Post by: tifreak on March 01, 2006, 02:07:00 am
Weregoose optimized it. I will post it later...
Title: hex to sprite converter!
Post by: kalan_vod on March 01, 2006, 05:20:00 am
Great I saw that and your code had seemed a little bloated. Glad he could help, he is the best IMO on basic optimizations :Pblah.gif.
Title: hex to sprite converter!
Post by: tifreak on March 01, 2006, 05:42:00 am
Well, I had some ideas, but I didn't get them posted, because it was really late at night. What I had was the first version, and I had planned on improving upon it. No need now though... :)smile.gif
Title: hex to sprite converter!
Post by: kalan_vod on March 15, 2006, 05:32:00 pm
i thought I would be helpful and optimize your sprite routine. I am not sure if you wanted any help or if you wanted to know any optimizations, but I still did it. There are several optimizations that can be done in the entire program, but since last time I helped you optimize AOD you didn't use it I hope you use this at least....

QUOTE
:I→C:J→U
:For(θ,1,length(Str4
:inString("123456789ABCDEF",sub(Str4,θ,1
:If 7:Pxl-On(U,C
:If 3<8fPart(Ans/8
:Pxl-On(U,C+1
:If 1<4fPart(Ans/4
:Pxl-On(U,C+2
:If fPart(Ans/2
:Pxl-On(U,C+3
:C+4→C
:U+(Ans=I+16→U
:If C=I+16:I→C:End
Title: hex to sprite converter!
Post by: tifreak on March 16, 2006, 01:59:00 am
That is because I was busy with Pokemon, I have yet to get AOD83+ back out to do anything with. I might do that tonight though... And thanks, I will see what the differences are and might add them...
Title: hex to sprite converter!
Post by: kalan_vod on March 16, 2006, 08:45:00 am
Well I noticed a little difference in speed and along with saveing a few bytes.