Hi, people. Welcome to my C3 thread. I actually have something vaguely interesting to show off this year, too. (Heck, I had it ready about two weeks in advance.) While I haven't been doing nearly as much ASM lately as I should be, I managed to turn out these two things, anyway. The coin came up heads, so I am fairly and squarely posting this on the first day.
This is a sprite I made; it displays a timer on the status bar. You can set in the .asm file where the timer shows up. If the extra bit is clear, the timer will tick down, but if the extra bit is set, it will start at zero and go up. In the former case, the X/Y position of the timer determines the starting time it will have. Its position can also be used for another thing: setting effects. Effects, in this case, are subroutines that run when the timer reaches 00:00:00. You can see some of them in the video; it can kill the player, teleport him, set the blue P-switch timer...there are lots of possibilities. You can even make your own effects!
Also, big thank-y's from McSpanky's thanks to Roy and Smallhacker for helping me debug this. Thanks to Smallhacker and his wise words about the data bank, I ironed out the last remining error in this sprite. By the way, yes, this sprite was inspired by Iceguy's timer, the one he released last C3. But "inspired by" and "based off of" are two different things; I actually pretty much coded this one from scratch. Still, credit to Iceguy anyway for giving me the idea.
This is a patch I call "Item Box Special". It does several things to the item box. I integrated the Item Box GFX Fix patch (credit to Kenny3900) and my Stunned Item Box Items patch into this, for starters. I also added a few small hacks that disable the item falling when you take damage (simple hex edit) and prevent the item from being overwritten by another if you get a powerup when the item box is not empty (not quite as simple). You can also, on the fly, disable the item from dropping. If, for example, you want the player to be unable to use the item box item for a specific sublevel, you can write a non-zero value to the specified RAM address, and the item will stay put no matter how many times you press Select or any other button. (Just make sure you reset it back to 00 afterward.)
The most IMPORTANT function of this patch, however, and the only one I really showed in the video (dang it, forgot to show the disabled item drop and the overwrite prevention), is that you can put custom sprites in the item box. You know how values 56-8C are normally unusable? Well, I hijacked the routine so that these values instead represent custom sprites. You can set the sprite number, extra bits, sprite status, everything. I had already hijacked the item box drop routine for Stunned Item Box Items, and when doing so, I noticed something interesting: the item box drop routine seemed to be just an ordinary sprite-spawning routine, nothing fancy. So it wasn't hard to tweak it to spawn a custom sprite. In fact, making this patch was freakishly easy...not that it was "easy", but that I didn't need any help from anyone else, unless you count my beta testers and Smallhacker's indirect help. Coincidentally enough, the problem I had with the data bank in the timer sprite came into play when making this patch as well.
I am impressed imamelia. With these two ASM hacks, there could be SO many different possible design choices you could do. My only suggestion on the Special Item Box is you should make the hammer and boomerang fall like a mushroom/fire flower/cape would, when you press select.
Also, one time when you got a chomp rock up in your box, it was a bunch of light blue dots instead.
Still, all this stuff is simply amazing. I love it.
Kristian: Actually, the reason the hammer and boomerang don't fall is because the sprites themselves never set any Y speed. If I use those in my hack, I'd add something like LDA #$10 STA $AA,x to those two powerups' init routines. As for the Chomp Rock, the blue dots, I'm sure, were because the Chomp Rock is a dynamic sprite. (They have a different, weird way of drawing graphics.) So dynamic sprites probably aren't the best choice for the item box.
Magikoopa24: Yeah, that would be possible, although checking the timer for a certain number would be a little more complex than just checking it for 00:00:00. What I'd do is make three tables, one for the frames, one for the seconds, and one for the minutes. (Or only two, if the frames don't matter.) Then I'd load the effect index, $1528,x, into Y, and check first the seconds and then the minutes to see if they are equal to the value in the table indexed with Y. (For example, LDA !Seconds CMP NeededSeconds,y BNE NoEffect.) Then...well, the rest would just be pretty much the same thing as the other effect subroutine.
The new item box gave me a great motivation to make a level with this stuff. But actually, awesome works imamelia! Since I absolutely have no idea, how to make these, they're fantastic for me, and can't wait to try it by myself! I'll do it in a few days, I'm sure.
So, very thanks for making this, and I hope, we'll get more awesome stuff from you.
crobat231985: Yeah, I just didn't bother to add graphics to the blocks.
Jimmy52905: Awww...how sweet...ahem. Well, I'm glad it will be useful to you.
Smallhacker: muffins (er, I mean, I am curious about that idea...)
Atma: As I said on IRC, setting the extra bit makes the timer go up, no matter what its XY position is. Too bad you had to turn traitor on me and use Iceguy's pause menu instead of the item box patch. That may be a heck of a lot cooler, but mine is easier to use! *shot* I'm glad you like them, anyway.
Hadron and Ultimaximus: Heh, thanks. I don't know, though...those the only things I had to show off for C3, and while they're both ASM-related, they are piddling compared to most of the other ASM stuff people have made. Well, in any case, I certainly hope people will get some good use out of these. I also definitely hope to make lots more ASM stuff in the future, and I imagine most of it will be for the public.