Language…
4 users online: Boosius, MaxtonChao, pixlrik, random_box - Guests: 107 - Bots: 113
Users: 70,134 (2,545 active)
Latest user: chillidogs

Magic Limit

UberASM Repository → Magic Limit

Submission Details

Name: Magic Limit
Author: spooonsss
Added:
Type: Level
Includes GFX: No
Includes Hijack: Yes
Featured: No
Description: Limits the number of spawned magikoopa magics (and sprites they turn into). If the limit is reached, the oldest sprite is despawned.

(Screenshot shows limit of 3)
Tags: filter lorom sa-1 sprite
Comments: 3 (jump to comments)
Rating:
0.0 (0 ratings)
No rating
Download 1.54 KiB | 144 downloads

Screenshots

Comments (3)

 MarioFanGamer Link
Moderated with:
  • Lunar Magic v3.33
  • SA-1 Pack v1.40
  • UberASM Tool v1.5
  • Asar v1.81 (for the unpatch)
  • BSNES v115
One thing to note is that this is somewhat unstable in the sense that you should always use the unpatch should you remove the code as the magic init code will point to garbage and crash the game (it's actually this reason why some — including me — don't like the inclusion of hijacks with UberASM).

Since there is an easy workaround for this (if you intend to not use it, just use the unpatcher), I decided to pass it since I haven't found any other issues.
spooonsss Author Link
Originally posted by Zoreo
Is there a way to get this to work with custom magic?


Sure, you can "JSL read3($01FFFC+1)+7" with the sprite index in x. e.g. you can put it in the magic init routine (and ensure that the sprite is being spawned with state=1 aka init).

magikoopa_magic_20.asm
Code
print "INIT ",pc
JSL read3($01FFFC+1)+7
RTL


Note that running UberASM may change where the code is, so be sure to always run Pixi again after running UberASM.

The magikoopa disassembly spawns magic in state 8. Change 08 to 01 here to spawn it in the init state:
Code
    LDA #$08                        ;\ set sprite status
    STA !14C8,y                     ;/ 
Zoreo Link
Is there a way to get this to work with custom magic?