Since Bio's original post was quite messy and the code snippets were unorganized, I've rewritten the first post. In this thread you will find commonly used code snippets and routines which you can use in your blocks, sprites and patches.
I could make a subroutine section, but I didn't get the coder position (nobody did)
That wouldn't be a good idea, even if you were a coder. When newbies see all those sections, they probably think "Oh, I want to add subroutines in my hack, they'd look cool!" and stuff.
Also, I don't see why it has to be a downloadable .zip when it's just a text file. You could make an article in the wiki or upload a text file to someone's webspace, and write all the codes in it.
Anyway, this is great for ASM beginners like me. Thanks!
Wouldn't the Wiki be the perfect place for things like this?
I kinda forgot the wiki existed while making this... It do seem like a much better idea than filling the custom sprite and block section. a subroutine section would probably the best but the wiki is fine enough
I will leave this thread open for a while to allow others to voice their opinion
My opinion is that it may be good to leave this thread here as a locked sticky and have a link to the wiki page. That way more people will know it exists when they come looking for information (I mean, after all, Bio said it all when he stated "I forgot the wiki even existed".
One thing I would suggest with things like this:
This is pretty detailed stuff for a beginner. I can make blocks, but I am new to sprite ASM. I just started learning it a few days ago, and most of it is well documented in the information that came with Sprite Tool, so it is easy to pick up since I know some basic ASM. With more advanced codes like this cape thing, there needs to be documentation and comments in the code so we know what to do with it, and how it works. Maybe include some basic examples of how the code would look in a real situation for those of us who are visual learners.
-------------------- I've removed my NoFades patch until I can find the brightness code for Star Road warps.
VERY useful. Thank you, Bio, Smallhacker, edit1754, et al. I have two things to ask, though:
1) If I want a block to change to the PREVIOUS Map16 block instead of the next one...
clc ; |Set map16 number to change to current's +1
adc #$0001 ;/
...should I just replace CLC and ADC with SEC and SBC in this part of the code? (And, now that I think of it...does this routine only change the block's graphics, or does it change its properties to those of the next Map16 tile as well?)
2) What are all the block numbers for the Map16 tile-generating routine at $00BEB0? It appears that #$02 is a blank block (tile 25) and #$0D is a brown used block, but I don't see any pattern there. What about all the other possible values? Is there a list of these anywhere?