Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,512,795
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 05-02-24 02:06 PM
Guest: Register | Login

0 users currently in SMW Hacking | 2 guests

Main - SMW Hacking - Display 1-up text? New thread | New reply


pieguy1732
Posted on 01-04-08 11:24 PM Link | Quote | ID: 72742


Ptooie
Note: I wasn't here because I wasn't here, not because someone switched the 7 and the 3.
Level: 84

Posts: 24/1711
EXP: 5465365
Next: 196587

Since: 01-04-08

Last post: 5023 days
Last view: 4953 days
I'm working on a block that can sometimes give an extra life. How would I make it so that when it does, it displays the red 1-up text that displays when you get five Yoshi Coins?

____________________
"There are 3 types of people in this world: Those who can count and those who can't."
Neritic Net

blackhole89
Posted on 01-04-08 11:44 PM Link | Quote | ID: 72745


The Guardian
Moloch whose eyes are a thousand blind windows!
Level: 124

Posts: 1199/4196
EXP: 21543460
Next: 293141

Since: 02-19-07
From: Ithaca, NY, US

Last post: 477 days
Last view: 90 days



You might be able to exploit the routine that gives you a 1UP for stomping 8 enemies consecutively.

LDA $18D2
PHA ;save old contents of consecutive stomp counter...
LDA #$08
STA $18D2 ;...max it out...
JSL $02ACE5 ;...call the gain points routine...
PLA
STA $18D2 ;...and restore the counter again.

The problem with this is that, I'd assume, it positions the effect based on the position of the current sprite as determined by the X accumulator. Of course, you might work around that as well by saving the X (high: $14E0, low: $E4) and Y (high: $14D4, low: $D8) locations of sprite 0, replacing them with the X/Y of your block, setting X to 0, triggering the above code and then restoring them, but that would be very hackish... there's probably a more dedicated routine (or even a block-based one) for that somewhere, but I am too lazy to look it up.


____________________



Main - SMW Hacking - Display 1-up text? New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.049 seconds. (341KB of memory used)
MySQL - queries: 37, rows: 58/59, time: 0.042 seconds.