A block that behaves like a chest! If Mario presses up, the chest will be opened and an item will be deposited in your Item Box.
Attention: Only ONE chest can be placed per level, if you want to place more chests in a single level, change the Free Memory in the .asm file, it is simple and practical.
• Lunar Magic 3.11
• GPS V1.4.1
• Snes9x v1.60
The block itself works as intended. However, there are a few issues that I'd like to see addressed before the block is accepted.
The main issue is the way it's implemented - specifically, the use of freeRAM. Making it so that a different freeRAM address is required for every different chest block in a level is very restricting, and there's an easy workaround which doesn't require freeRAM at all. Simply making the map16 tile the chest changes to, act like a 25 (air) tile, will stop the player from opening the chest again, since the block's code won't be running after it changes tile. This will change it so that the chest can be re-opened if you enter a sublevel then return to the original level with the chest, but if preventing that is important then making use of item memory would also achieve the same effect without freeRAM.
Other minor issues, which aren't reasons for rejection but I'd like to see addressed:
• Lack of SA-1 compatibility: While this isn't a requirement for submitted blocks, the addition of SA-1 functionality is preferred, especially considering it would be easy to implement in this block (you just need to add "|!addr" without quotation marks on to the end of $1DFC and $0DC2).
• When checking if a value is 0 or not, you do not need to do CMP #$00. Just loading the address sets the flag to indicate if it's 0 or not, so you can immediately do the BEQ label without checking the specific value first.
• The description included with the block isn't very specific - as per block submission guideline 7, an appropriate description should be included with the block. Something along the lines of "This block is a chest that will put an item in Mario's item box when opened." would be a more suitable description.
Once these adjustments are made, the block can be accepted.