cch
Newbie
Joined: 25 Jun 2011 Posts: 4
|
Posted: 25 Jun 2011 10:16:20 pm Post subject: |
|
|
Before you go yelling at me that this already exists, please make sure you read in more detail.
I'm looking for a small ASM program I can use with my BASIC programs that will make a sprite. The closest things I've found do something close, but are lacking the exact feature I need.
Omnicalc has a nice sprite() function that plots the sprites exactly the way I want, except that it requires a Pic variable to take the sprite from. Other ASM programs like Qsprite are able to store the sprite data as Hex or Token strings and plot them, but it seems they're restricted to the X coordinate being a multiple of 8, which means it's really only good for plotting tiles and not really for moving sprites like a cursor or character in a game.
What I'm hoping for is a combination. Something I can feed a Hex or Tokenized string to and be able to plot the sprite anywhere on the screen. I'd like it to be able to use all the normal methods, AND, OR, XOR, and Overwrite.
Preferably, I'd like it to be a ASM program and not an App so that it can be easily bundled with my programs. Syntax being something like:
{Sprite_Width,Sprite_Height,X-Coord,Y-Coord,Plot_Method,Data_Type,Sprite_Data_as_String}:Asm(prgmSprite)
(Data_Type being if it's Hex or Tokenized, Plot_Method being: 1=AND + Screen Update, 2=AND + No Update, 3=OR + Screen Update, 4=OR + No Update, etc., No Update meaning it'll plot to the buffer, but not yet show it on the screen, such as if I want to plot multiple sprites and make it appear as if they all plotted at the same time.
My intent would look something like:
{8,8,18,12,4,1,"3C4281818181423C"}:Asm(prgmSprite)
which would draw a 8x8 shape at 18,12, using OR logic, but not update the screen, so that I might plot another sprite somewhere else using another method that does update the screen.
If a program like this already exists, please point me towards it, otherwise, maybe one of the pros around here might be able to write something up for me? (I'll give credit in my programs if desired)
I'm a major newbie to writing ASM since I've never done such low level programming before. All my experience is high level languages like TI-BASIC, Javascript, PHP, etc.
Edit:
I found a ASM tool called RAGE that nearly does what I want. It's limited to 8x8 sprites and only seems to use XOR logic and takes decimal numbers instead of Hex for each byte, but it at least allows me to place the sprite anywhere on the screen I want. I'm basically looking for this kind of program, only a bit bigger and using at least Hex instead of decimal.
At the moment at least, I am using Omnicalc's base conversion function to change binary versions of my sprites to decimal lists, and those lists seem to be working nicely, but it would be so much easier if I can do a Hex string instead of a list of binary. (At the moment, to draw a sprite, it takes the following input: {11, X-coord, Y-coord, Byte1, Byte2, Byte3, Byte4, Byte5, Byte6, Byte7, Byte8}:Asm(prgmRAGE), where of course each Byte is a decimal number equal to the binary form of that line of the sprite. Very limiting and annoying to write out...(The 11 at the beginning is to tell it to make a sprite, since RAGE does more than just sprites))
Last edited by Guest on 26 Jun 2011 01:15:56 am; edited 1 time in total |
|
cch
Newbie
Joined: 25 Jun 2011 Posts: 4
|
Posted: 11 Jul 2011 02:10:55 pm Post subject: |
|
|
Tried Codex, didn't have the routines I wanted. Tried xLIB too, and Batlib, being a App, does kinda mess up the ability to distribute my programs freely. I hate dependencies like that.
I'm actually working with the writer of EnPro/Batlib for a newer version that has more graphical functions, including the sprite routine I'm looking for. He's expecting to release it as a new version of EnPro, but I'm sure he'll add it into Batlib as well if it works well. |
|