Hitman Tool ASM API
| English | Português | Español | 日本語 |
This reference covers Hitman Tool routines you can call from sprites or UberASM. If you are setting up the boxes themselves, start with Files and Formats.
Set up your code
Install Hitman Tool before assembling code that uses it. The public routines appear as !Hitman_Base_* in HitmanDefines.asm. Use the defines generated for your target ROM. See the Quick Start for PIXI and UberASMTool setup.
Call the ASM routines with JSL. They return with RTL. Unless an entry says otherwise, use 8-bit A and index registers. Collision checks share temporary memory, so read any box edges or callback results you need before starting another check.
Hitman defines
Use the HitmanDefines.asm generated for your ROM. Reassemble the resources that use it after changing properties, moving the RAM block, or reinstalling the patch.
| Name | What it represents |
|---|---|
!Hitman_Base_ + routine name |
Address of a base routine, such as !Hitman_Base_CheckNormalPair.
|
!Hitman_Callback_ + routine name |
Address of a callback included in the installation, such as !Hitman_Callback_SetBit3.
|
!Hitman_Prop_ + JSON Name |
Address of a property table with one byte per Normal sprite slot. |
!MiSpriteHitboxContext |
Base context generated from MiSprite.hitboxinfo. Add a pose number to select its boxes.
|
!HitmanNormal*, !HitmanCluster*, !HitmanExtended* |
Per-slot tables. These include ContextIDLow, ContextIDHigh, Flip, and the Low and High bytes of XOff, YOff, Width, and Height.
|
!HitmanSprite1X, !HitmanSprite1Y, !HitmanSprite1Flip |
Temporary position and flip for object 1. Use the corresponding Sprite2 defines for object 2.
|
!HitmanHB1Left, !HitmanHB1Top, !HitmanHB1Right, !HitmanHB1Bottom |
The 16-bit edges of HB1. Use the same suffixes with !HitmanHB2 for HB2.
|
!HitmanHBStatus, !HitmanDefault |
The position of the boxes relative to each other and the accumulated callback result, respectively. |
!HitmanEventShell, !HitmanEventRegular, !HitmanEventExplosion, !HitmanEventFireball, !HitmanEventYoshiFireball, !HitmanEventQuake, !HitmanEventCapeDive, !HitmanEventShellHit |
Vanilla event masks. Use them to set event bits or compare the event in A. |
!HitmanRAMBase, !HitmanRAMLimit, !HitmanRAMEnd |
Start and exclusive limit of the reservation, and exclusive end of the bytes used. See Move Hitman's RAM block. |
Read or change a property
A property with "Name": "IsLarge" generates !Hitman_Prop_IsLarge. Put the Normal sprite slot in X to read its own value.
; A and indices are 8-bit. X = Normal sprite slot to check. LDA !Hitman_Prop_IsLarge,x BEQ .Pequeno ; Handle the large sprite here.
To change that instance's value, use STA !Hitman_Prop_IsLarge,x with 8-bit A. The JSON sets the initial value when the slot is prepared.
Publish a Normal sprite's hitbox
When Hitman checks a Normal sprite in slot X, !Hitman_Prop_HitboxSystem,x tells it which boxes to use.
| Value | Geometry |
|---|---|
$00 |
Disabled for Hitman's vanilla interactions. |
$01 |
Original game clipping. This is the initial value. |
$02 |
One RAM box with signed 8-bit offsets and 8-bit dimensions. |
$03 |
The boxes for the active pose. |
$04 |
One RAM box with signed 16-bit offsets and 16-bit dimensions. |
In mode $03, store the base context plus the pose number in !HitmanNormalContextIDLow,x and !HitmanNormalContextIDHigh,x. Store the flip in !HitmanNormalFlip,x (0 none, 1 horizontal, 2 vertical, 3 both). Update these fields when the pose or flip changes so other sprites can check the right boxes.
Vanilla interactions
Use these routines when you want the game to handle an interaction, such as making a custom projectile behave like Mario's fireball.
| Routine | X on entry | What it does |
|---|---|---|
!Hitman_Base_RunVanillaSpriteInteraction |
Current Normal sprite slot, also in !SpriteIndex. |
Runs the standard interaction between Normal sprites. |
!Hitman_Base_RunVanillaFireballInteraction |
Extended sprite slot. | Runs Mario or Yoshi fireball logic according to the configured event. |
!Hitman_Base_RunVanillaQuakeInteraction |
Quake sprite slot, 0 through 3. | Advances the timer and checks targets when appropriate. |
Event flags and callbacks
VanillaEventMask enables notifications. ActionFlag accumulates the enabled bits. The code that reads them decides when to clear them. VanillaResponseMask controls the game's responses. Their initial masks are $00 for notifications and $7F for responses.
| Bit | Event | JSON field | Y on entry |
|---|---|---|---|
$01 |
Shell or item impact | SpriteSprite |
Other Normal sprite slot |
$02 |
Ordinary sprite collision | SpriteSprite |
Other Normal sprite slot |
$04 |
Explosion | VanillaInteractionCallback (fallback field) |
Explosion slot |
$08 |
Mario's fireball | Fireball |
Extended sprite slot |
$10 |
Yoshi's fireball | YoshiFireball |
Extended sprite slot |
$20 |
Quake | Quake |
Quake sprite slot |
$40 |
Cape dive | CapeDive |
$FF
|
$80 |
Follow-up notification for an item still in status $09 or $0A |
SpriteSprite |
Other Normal sprite slot |
The callback runs after the game's response. A holds the event bit, X holds the receiving sprite slot, and Y holds the source shown above. A and the index registers are 8-bit. DBR points to the callback's bank. Return with RTL, balance the stack, and preserve D and the register widths. The dispatcher restores X, Y, and DBR. It ignores Carry. Bit $80 is notification only.
Filter collisions between Normal sprites
SetSpritePairCollision
Call JSL !Hitman_Base_SetSpritePairCollision with the two Normal sprite slots in X and Y. Use A = $00 to block their vanilla collision or $01 to allow it. One call sets both directions. Invalid slots and self-pairs are ignored. The routine preserves X, Y, DBR, and D and uses $00–$01 as scratch.
For example, temporarily block the collision between a carrier and its passenger.
; X = carrier, Y = passenger. LDA #$00 JSL !Hitman_Base_SetSpritePairCollision
When the passenger is released, verify that Y still identifies it and call again with $01. Hitman resets a slot's pairs during initialization.
SetSpriteSlotCollision
Call JSL !Hitman_Base_SetSpriteSlotCollision to change all pairs for the Normal sprite in X. Use A = $00 to block them or $01 to allow them. The routine uses $00–$02 as scratch.
Configure Extended sprites
Edit ASM/ExtendedSpriteTablesConfig.asm in the Hitman Tool folder. The macros run during installation and take an Extended sprite type number. In the game, checks take the slot of an active projectile.
Mode in %SetExtendedHitboxSystem |
Geometry |
|---|---|
$00 |
Disabled. |
$01 |
A fixed box set with %SetExtendedHitbox(id, xOffset, yOffset, width, height).
|
$02 |
One 8-bit RAM box. Write !HitmanExtendedXOffLow, !HitmanExtendedYOffLow, !HitmanExtendedWidthLow, and !HitmanExtendedHeightLow for the slot.
|
$03 |
One or more boxes for the current pose. Store the context plus pose in !HitmanExtendedContextIDLow and !HitmanExtendedContextIDHigh and the flip in !HitmanExtendedFlip, indexed by slot.
|
$04 |
One 16-bit RAM box. Write the Low and High bytes of each offset and dimension.
|
The context and some offsets share RAM. Write the new fields when changing modes.
%SetExtendedFireballEvent(id, event) sets the response separately. Use !HitmanEventFireball for Mario's fireball, !HitmanEventYoshiFireball for Yoshi's, or $00 to handle the response yourself. Mario ($05) and Yoshi ($11) have fixed boxes by default.
This sets Mario's fireball box to 12 × 19 pixels, starting 32 pixels right and 4 pixels above the origin.
%SetExtendedHitbox($05, $0020, $FFFC, $000C, $0013)
Use RunVanillaFireballInteraction to run the vanilla response. Use CheckExtendedNormalPair to detect a collision and read the result in Carry.
Included callbacks
In a .hitboxinfo file, write the routine name, for example .OnPlayerCollision CheckBounce. Hitman includes the selected routines from Routines/ and exports them as !Hitman_Callback_*. See Files and Formats for the syntax.
On entry, HB1 and HB2 contain the box edges and !HitmanHBStatus describes their relative positions. A and the index registers are 8-bit. Y holds the historical box ID. Return with RTL and balance the stack. A callback can set bits in !HitmanDefault so the caller can decide how to respond.
| Callback | Use |
|---|---|
Nothing |
Returns without changing the result. |
SetBit3 |
Adds mask $04 to !HitmanDefault.
|
CheckBounce |
Selects a Normal sprite bounce surface, records its edges, and handles the protection used when Mario is inside it. |
CheckBounceBit2, CheckBounceBit3 |
Run CheckBounce and add $02 or $04 if the high bit of $65 is clear.
|
CheckPlayerIsAbove |
Checks Mario's position for the bounce system and respects the inside-box protection. |
ItemCheckBounce, ItemCheckPlayerIsAbove |
Adjust those checks for the item's status. |
CheckBounceCluster, CheckBounceClusterNoYSpeed |
Bounce variants for Cluster sprites. |
CheckBounceSurface |
Records a bounce surface. |
PlayerFloor, PlayerLeftWall, PlayerRightWall |
Check the box as a floor, left wall, or right wall for Mario. |
DefaultBottomFloorAndDirectionWall |
Tries the floor first, then chooses a wall based on the sprite's direction. |
SolidForPlayer, SolidForPlayerWithSkip |
Variants that treat the box as solid for Mario. |
If your sprite uses Dyzen's bounce routines, run %DyzenPrepareBounce() before checking the boxes. %DyzenBounce() uses the result to apply a bounce. %DyzenDetectPlayerIsAbove() updates the protection timer. Keep the scratch values intact between those calls. The callback stores the top in $6A, left in $6C, right in $6E, and bottom in $1487|!addr.
Call a callback from ASM
Use JSL !Hitman_Callback_Name if the installer included the callback. Prepare the registers and scratch it needs. For example, a wall callback needs both boxes already loaded.
; A is 8-bit. Initialize !HitmanDefault before this check. JSL !Hitman_Callback_SetBit3
SetBit3 adds $04 to !HitmanDefault. The call itself does not check for a collision. To include a callback, declare it in the configuration that uses it or under Dependencies: in a legacy HitboxInfo file. See Include helper routines.
Create a callback
Create Routines/RegistrarContacto.asm in the Hitman Tool folder. The label must match the filename without .asm. This callback sets bit $01 in !HitmanDefault so the sprite can react to Mario.
RegistrarContacto:
LDA #$01
TSB.b !HitmanDefault
RTL
Put this line in the box that should run the callback.
.OnPlayerCollision RegistrarContacto
Reinstall Hitman Tool to include the routine and generate !Hitman_Callback_RegistrarContacto. After reinserting the sprite with PIXI, Hitman can call it when the box collides with Mario. To call it directly, use JSL !Hitman_Callback_RegistrarContacto with 8-bit A and the result byte already prepared.
Create a base routine
Use a base routine to share code between sprites and UberASM resources. This example returns in Carry whether IsLarge is set for the Normal sprite in X.
Create Patch/BaseRoutines/EsSpriteGrande.asm with a matching label. Define IsLarge in CustomProperties/ first.
; Input: 8-bit A and indices. X = Normal sprite slot.
; Output: C = 1 if IsLarge is nonzero. X and Y are preserved.
EsSpriteGrande:
LDA !Hitman_Prop_IsLarge,x
CMP #$01
RTL
Hitman includes ASM files directly inside Patch/BaseRoutines/. Reinstall it to generate !Hitman_Base_EsSpriteGrande and reassemble your resources with PIXI or UberASMTool on the output ROM.
JSL !Hitman_Base_EsSpriteGrande
BCC .Pequeno
; Handle the large sprite here.
.Pequeno
Use unique entry labels and document what each routine expects and changes. The installer regenerates Patch/Files/Includes.asm and HitmanDefines.asm from the files in their respective source folders.
Move Hitman's RAM block
Hitman keeps its sprite tables, properties, and collision masks in a block of RAM. If another patch uses that space, move the entire block. The limit is the first address outside the reservation.
| ROM | Base | Exclusive limit |
|---|---|---|
| LoROM | $7FAC40 |
$7FAF00
|
| LoROM with Free7E2000 detected | $7E7000 |
$7E7D00
|
| SA-1 | $408000 |
$409400
|
- Check the installation log for the range and bytes in use. Each custom property takes one byte per Normal sprite slot.
- Pick a free range large enough for all the tables, within one bank, and compatible with the other patches in your ROM.
- In
ASM/HitmanDefines.asm, set!HitmanRAMBaseand!HitmanRAMLimittogether. The source template isHitmanBackend/ASM/HitmanDefines.asm. - Reinstall and check that
!HitmanRAMEnd, the exclusive end of the bytes used, stays within the limit. Reassemble your PIXI and UberASM resources with the new defines.
HB1, HB2, !HitmanHBStatus, and !HitmanDefault remain temporary collision memory.
Manual interaction routines
For any routine that takes a pose in A, add the current pose index to the base context before the call. Use your sprite's current animation index. The ContextIDLow and ContextIDHigh tables hold the published context so other resources can check the box.
CheckNormalPair
Call JSL !Hitman_Base_CheckNormalPair with two Normal sprite slots in X and Y. Carry is set if their configured hitboxes collide. X, Y, DBR, and D are preserved. The routine uses collision scratch. The pair mask applies to the vanilla interaction, so use that path if you need the mask to take effect.
CheckExtendedNormalPair
Call JSL !Hitman_Base_CheckExtendedNormalPair with the Normal sprite in X and the Extended sprite in Y. Carry is set on collision. X, Y, DBR, and D are preserved. The routine uses collision scratch. Your code decides how to respond to the impact.
ProcessHitBoxesWithoutCallback
Use this to check the boxes of a pose against one rectangle in HB2. It can be used in UberASM to check a level area without a sprite slot.
- Pass the base context plus pose in 16-bit A. Set the index registers to 8-bit and use the game's direct page.
- Store the pose origin and flip in
!HitmanSprite1X,!HitmanSprite1Y, and!HitmanSprite1Flip. Store the rectangle in!HitmanHB2Left,!HitmanHB2Top,!HitmanHB2Right, and!HitmanHB2Bottom. - Add
$0100to each coordinate of the origin and to each edge before storing them. - On contact, Carry is set and HB1 contains the first box that collided. Otherwise Carry is clear. A and the index registers are 8-bit on return. Treat A, Y, HB1, and the temporary hitbox pointers as scratch.
With the coordinates and flip ready, this checks pose 0 from Zone.hitboxinfo.
REP #$20 LDA.w #!ZoneHitboxContext JSL !Hitman_Base_ProcessHitBoxesWithoutCallback BCC .SinContacto ; HB1 contains the box that collided with the area. .SinContacto
PlayerNormalSpriteInteraction
Checks the boxes of a Normal sprite's pose against Mario and runs the matching callbacks. Set X to the slot, !HitmanSprite1Flip to the flip, and 16-bit A to the base context plus pose. Use 8-bit indices. Hitman can skip the check based on distance, frame, Mario's state, or the side of the scenery he is on.
Carry tells you whether the callbacks left a nonzero value in !HitmanDefault. A collision can leave Carry clear when no callback writes a result. A returns to 8-bit mode.
PlayerSpriteInteraction
Call. Use JSL !Hitman_Base_PlayerNormalSpriteInteraction, JSL !Hitman_Base_PlayerClusterSpriteInteraction, or JSL !Hitman_Base_PlayerExtendedSpriteInteraction. Pass the slot in X, the base context plus pose in 16-bit A, and the flip in !HitmanSprite1Flip. Keep the index registers in 8-bit mode.
Result. The callback variants set Carry when !HitmanDefault is nonzero. InteractionWithoutCallback takes the same inputs and sets Carry on the first collision. OneHitboxInteraction and OneLongHitboxInteraction take 8-bit A and read one RAM box with 8-bit or 16-bit fields, respectively. They set Carry on contact. A returns to 8-bit mode.
For any sprite family, REP #$21 sets A to 16-bit mode and clears Carry for the addition. AND.w #$00FF keeps only the pose byte.
Example. This checks the current pose of an unflipped Extended sprite. !PoseIndex is a one-byte-per-slot table you can define. With Dynamic Xtreme, use !LastPoseIndex,x if it contains a valid pose and both resources use matching indices.
; Start with 8-bit A and indices. X = Extended sprite slot. STZ.b !HitmanSprite1Flip LDA !PoseIndex,x REP #$21 AND.w #$00FF ADC.w #!MiProyectilHitboxContext JSL !Hitman_Base_PlayerExtendedSpriteInteractionWithoutCallback BCC .SinContacto ; Handle the collision here. .SinContacto
CapeSpriteInteraction
Call !Hitman_Base_CapeNormalSpriteInteraction, !Hitman_Base_CapeClusterSpriteInteraction, or !Hitman_Base_CapeExtendedSpriteInteraction with JSL. X is the slot, 16-bit A holds the base context plus pose, and !HitmanSprite1Flip holds the flip. Use 8-bit index registers.
The routine checks the spinning cape against the pose and returns A to 8-bit mode. Carry indicates a nonzero !HitmanDefault for the callback versions, or contact for WithoutCallback. If the cape is not spinning, Carry is clear. To adapt the preceding example, call !Hitman_Base_CapeExtendedSpriteInteractionWithoutCallback.
FireballNormalSpriteInteraction and YoshiFireballNormalSpriteInteraction
Use JSL !Hitman_Base_FireballNormalSpriteInteraction for Mario's fireball check, or JSL !Hitman_Base_YoshiFireballNormalSpriteInteraction for the historical manual path. Put the Normal sprite in X and the context plus pose in 16-bit A. Set !HitmanSprite1Flip and use 8-bit index registers.
These routines scan Extended sprite slots and compare boxes. The four current YoshiFireballNormalSprite* variants skip ID $11. To check a known Yoshi fireball slot, use CheckExtendedNormalPair. The callback versions report an action result in Carry. InteractionWithoutCallback reports contact. OneHitboxInteraction and OneLongHitboxInteraction take X with 8-bit A and indices and check a RAM box with 8-bit or 16-bit fields.
Scan Normal sprites
Call one of these entries with JSL and the !Hitman_Base_ prefix.
| Entry | Source and targets |
|---|---|
NormalNormalSpriteInteractionLoop |
Normal sprite against other Normal sprites. |
NormalItemSpriteInteractionLoop |
Normal sprite against items in accepted statuses. |
ClusterNormalSpriteInteractionLoop |
Cluster sprite against Normal sprites. |
ExtendedNormalSpriteInteractionLoop |
Extended sprite against Normal sprites. |
Put the source slot in X and !SpriteIndex. Use 16-bit A for the base context plus pose, 8-bit indices, and !HitmanSprite1Flip for the flip.
On success, Carry is set, Y is the target slot, and X is restored to the source. Callback variants stop when the actions produce a result. Add WithoutCallback to stop on contact. Each loop applies its own filters.
This searches for the first Normal sprite that collides with the current pose of an Extended sprite.
; X and !SpriteIndex hold the Extended sprite slot. Set the flip first. LDA !PoseIndex,x REP #$21 AND.w #$00FF ADC.w #!MiProyectilHitboxContext JSL !Hitman_Base_ExtendedNormalSpriteInteractionLoopWithoutCallback BCC .SinContacto ; Y holds the Normal sprite slot. .SinContacto
AnyNormalSpriteInteraction
Call JSL !Hitman_Base_AnyNormalSpriteInteraction with the Normal sprite to check in X and the source slot in !SpriteIndex. Prepare the source position, context, and flip in !HitmanSprite1*. Enter with 8-bit registers. WithoutCallback takes the same inputs.
Hitman loads the target's configured boxes. Carry reports an action result for the callback version and geometric contact for WithoutCallback. JSL !Hitman_Base_AnyNormalSpriteInteractionOneHitbox instead takes a prepared HB1 and the target slot in X, and reports contact in Carry.
Prepare and compare boxes
Use JSL with the !Hitman_Base_ prefix. Use 8-bit registers unless specified otherwise.
| Routine | Input | Result |
|---|---|---|
NormalSpritePositionSetup, ClusterPositionSetup, ExtendedPositionSetup |
X = slot of the matching family. | Stores the position in !HitmanSprite1X/Y in Hitman's coordinate system.
|
NormalSpritePositionSetup2 |
X = Normal sprite slot. | Prepares !HitmanSprite2X/Y.
|
NormalSpriteOneHitbox1, ClusterSpriteOneHitbox1, ExtendedSpriteOneHitbox1 |
X = slot with a RAM box. | Loads HB1 using 8-bit fields. Use the suffix 2 to load HB2.
|
NormalSpriteLongOneHitbox1, ClusterSpriteLongOneHitbox1, ExtendedSpriteLongOneHitbox1 |
X = slot with a RAM box. | Loads HB1 using 16-bit fields. Use the suffix 2 to load HB2.
|
PlayerClippingRoutine, NormalSpriteClippingRoutine |
Mario, or the Normal sprite in X, respectively. | Loads the original game's clipping into HB2. |
CapeClipping, CapeClippingHB1 |
Current cape position. | Loads HB2 or HB1, respectively. |
FireballClipping, FireballClippingHB1, YoshiFireballClipping |
Y = Extended sprite slot. | Loads HB2, HB1, or HB2, respectively, with the routine's fixed box. |
FixClippingForInteraction |
Original game clipping already in scratch. | Converts it into the four edges of HB2. |
CheckContact |
Prepared HB1 and HB2. | Sets Carry if the boxes collide, including equal edges. A returns to 8-bit mode. |
LoadNormalHitbox |
X = Normal sprite slot, Y = box ordinal. | Sets Carry when HB1 holds a valid box. Single-box modes use ordinal 0. Preserves X, Y, DBR, and D. Changes A, $04–$07, HB1, object 2's temporary position, and $98–$9B.
|
GetHitbox2 |
16-bit A = object 2's context plus pose, 8-bit indices, Y = ordinal. Prepare !HitmanSprite2X/Y and !HitmanSprite2Flip. |
Sets Carry when HB2 was loaded and clears it at the end of the list. Returns with 8-bit registers. |
ProcessHitBoxes |
Same inputs as ProcessHitBoxesWithoutCallback. | Checks the entire pose and runs its actions. Carry indicates whether !HitmanDefault is nonzero.
|
; X = Normal sprite slot. A and indices are 8-bit. LDY #$00 JSL !Hitman_Base_LoadNormalHitbox BCC .SinCaja JSL !Hitman_Base_PlayerClippingRoutine JSL !Hitman_Base_CheckContact BCC .SinContacto ; Mario collided with the first box. .SinContacto .SinCaja
Status routines, points, and effects
RunVanillaStatus
Call JSL !Hitman_Base_RunVanillaStatus followed by the suffix below. Put the Normal sprite slot in X and use 8-bit registers. Each entry runs the original handler for that status. It may move the sprite, draw it, or change its status. Handle $08 in MAIN.
| Status | Suffix | Status | Suffix |
|---|---|---|---|
$00 |
Erase | $07 |
Unused |
$01 |
Init | $09 |
Stunned |
$02 |
Killed | $0A |
Kicked |
$03 |
Smushed | $0B |
Carried |
$04 |
SpinJumped | $0C |
GoalPowerup |
$05 |
Sinking | $06 |
LevelEndCoin |
For a slot already in status $0B, JSL !Hitman_Base_RunVanillaStatusCarried runs the game's carried logic.
Status response vectors
NormalSpriteExecuteCollissionResultVector reads the status of the other sprite in Y. NormalSpriteExecuteFullCollissionResultVector also reads the current sprite's status in X. Call with JSL and 8-bit registers. Put your routine's return instruction immediately after the call, then the table of same-bank, 16-bit handler addresses. The selected handler uses RTL to return to the instruction after the call. If the status check fails, the routine returns to that same instruction directly.
Use the order normal, stationary, kicked, and carried in each group. The full version uses four groups in that order for the current sprite's own status.
Responder:
JSL !Hitman_Base_NormalSpriteExecuteCollissionResultVector
RTS
dw .Normal, .Estacionario, .Pateado, .Cargado
.Normal
RTL
.Estacionario
RTL
.Pateado
RTL
.Cargado
RTL
Utilities
Call with JSL and the !Hitman_Base_ prefix. Use 8-bit registers.
| Routine | Input | Result or effect |
|---|---|---|
SubHorzPos |
X = Normal sprite slot. | Y is 0 for Mario at or to the right of the sprite and 1 for Mario to the left. $0E–$0F hold Mario X minus sprite X.
|
SubVertPos |
X = Normal sprite slot. | Y is 1 if Mario is above the sprite and 0 otherwise. $0F holds the low byte of the vertical difference.
|
CapeStomping, YoshiStomping |
X = Normal sprite slot. | Set Carry if the cape or Yoshi stomp checks pass. |
GivePointsConsecutiveJump, GivePointsConsecutiveShell |
X = Normal sprite slot. | Update the consecutive-hit counter, sound, and score. |
DisplayContactEffectAtSpritePosition |
X = Normal sprite slot. | Plays the contact effect at the sprite's position and uses scratch starting at $00.
|
StunKickedSprite |
X = Normal sprite slot, A = initial vertical speed, such as $C0. |
Stuns the sprite and applies that speed. Use DisplayContactEffectAtSpritePosition for the visual effect.
|
DispatchVanillaCallback |
A = event, X = Normal sprite being hit, Y = source. | Checks whether to run the callback and calls it. Preserves X, Y, DBR, D, and $0E. See Event flags and callbacks.
|
Spawn sprites with PIXI
Call %Spawn_Sprite() or %Spawn_SpriteSafe() with the sprite number in A. Set Carry for a custom sprite or clear it for vanilla. Supply X and Y offsets in $00–$01 and the initial speeds in $02–$03. SpriteSafe also takes the first slot to search in $04. If a sprite is created, Carry is clear and Y contains the new slot. Otherwise Carry is set and Y contains $FF.