The New xLIB - An APP
Moderator: tr1p1ea
- tr1p1ea
- Maxcoderz Staff
- Posts: 4141
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: I cant seem to get out of this cryogenic chamber!
- Contact:
The New xLIB - An APP
I thought i would just post some info about the new xLIB. I have decided to turn it into an APP so that i could change it so that it uses a parser hook to intercept real().
I only started it yesterday, so it only has a few functions ... but they have been imporved upon from the old version .
ClearsScreen - Errr .... clears the screen
DrawSprite - Draws an 8x8 aligned sprite from ANY pic (pic0-pic9)
DrawMap - Draws a tilemap from ANY matrice (A-J) using ANY pic (pic0-pic9) as input for tiles. Maps can be drawn at ANY position on the screen and can be windowed from 1x1 to 12x8. Maps can also be offset for easy tile scrolling.
UpdateLCD - Updates the LCD. DrawSprite and DrawMap also have an option which lets you update the LCD or not.
And thats about it so far ... the additon of any pic and any matrice should please a few people.
I only just relaised that this now allows you to draw up to 10 individual tilemaps with scrolling at any position on the screen at the same time!!! A nifty side effect .
Ill finish up some documentation and offer a release for testing purposes.
I only started it yesterday, so it only has a few functions ... but they have been imporved upon from the old version .
ClearsScreen - Errr .... clears the screen
DrawSprite - Draws an 8x8 aligned sprite from ANY pic (pic0-pic9)
DrawMap - Draws a tilemap from ANY matrice (A-J) using ANY pic (pic0-pic9) as input for tiles. Maps can be drawn at ANY position on the screen and can be windowed from 1x1 to 12x8. Maps can also be offset for easy tile scrolling.
UpdateLCD - Updates the LCD. DrawSprite and DrawMap also have an option which lets you update the LCD or not.
And thats about it so far ... the additon of any pic and any matrice should please a few people.
I only just relaised that this now allows you to draw up to 10 individual tilemaps with scrolling at any position on the screen at the same time!!! A nifty side effect .
Ill finish up some documentation and offer a release for testing purposes.
- tr1p1ea
- Maxcoderz Staff
- Posts: 4141
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: I cant seem to get out of this cryogenic chamber!
- Contact:
Well you could store all your frames in 1 matrice ... draw it windowed and use an offset to animate it ...
I have no idea how fast it is as i can only test it on an emulator ...
I was thinking about adding largesprite support ... but im not sure since it is possible to draw large sprites as tilemaps. If i add it, you will be restricted to having your sprite dimensions a multiple of 8.
I have no idea how fast it is as i can only test it on an emulator ...
I was thinking about adding largesprite support ... but im not sure since it is possible to draw large sprites as tilemaps. If i add it, you will be restricted to having your sprite dimensions a multiple of 8.
- Shadow Phoenix
- Calc Guru
- Posts: 835
- Joined: Mon 03 Jan, 2005 7:54 pm
- Location: out there. seriosly.
- Jim e
- Calc King
- Posts: 2457
- Joined: Sun 26 Dec, 2004 5:27 am
- Location: SXIOPO = Infinite lives for both players
- Contact:
Well if you only have two tiles it would waste 740 bytes, or you might need 97 tiles. And that reminds me pics dont use the last row, the data isn't there. So that could be a problem. But I just have a dislike for varibles you can't name, so you don't need to listen to me.
Oh but about it being faster, I was thinking of omnicalc.
You have to give the following for sprite(
Pic #
X pic
Y pic
X Screen
Y Screen
Height
width
Plus using real( you must define a number to do somethig(simp, sprite, play), Unless you want to replace alot more tokens.(bad Idea)
This is all waste. If pre-define or preload somethings then it could go alot faster. Really you would only need four vaules to use with sprite(.
Are there even that many possible tiles, *thinks* 2^(8*8) ...hmmm....that's alot.
Oh but about it being faster, I was thinking of omnicalc.
You have to give the following for sprite(
Pic #
X pic
Y pic
X Screen
Y Screen
Height
width
Plus using real( you must define a number to do somethig(simp, sprite, play), Unless you want to replace alot more tokens.(bad Idea)
This is all waste. If pre-define or preload somethings then it could go alot faster. Really you would only need four vaules to use with sprite(.
YOU"VE GONE MAD!!!!! 500 ......1000Kevin wrote:Jim e wrote:
It'd be faster, save memory, more than 96 tiles. But then again, who uses more than 96 tiles anyway.
Dysfunction use over 1000 tiles in Aura and reuben quest uses over 500
Are there even that many possible tiles, *thinks* 2^(8*8) ...hmmm....that's alot.
- kv83
- Maxcoderz Staff
- Posts: 2735
- Joined: Wed 15 Dec, 2004 7:26 pm
- Location: The Hague, Netherlands
- Contact:
With such a amount it would be wiser to just pre-draw every screenleofox wrote:500...1000?Kevin wrote:Dysfunction use over 1000 tiles in Aura and reuben quest uses over 500Jim e wrote:It'd be faster, save memory, more than 96 tiles. But then again, who uses more than 96 tiles anyway.
Why do you use that much tiles? How CAN you use that much tiles?