| Official Hex/ASM/Etc. Help Thread |
|
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Official Hex/ASM/Etc. Help Thread |
|
|
|
|
| Posted on 2011-08-09 05:03:54 PM |
Link | Quote |
|
|
Quick question, how can I check if Mario is above a sprite?
|
|
| Posted on 2011-08-09 05:30:57 PM |
Link | Quote |
|
Thanks all for the help. I managed to get the tide to look alright visually, but I can't remove that acceleration it gives Mario. So, how would I go about doing that? I tried checking to see if $75 is set, then applying negative x speed to hopefully cancel it out, but that just makes him control pretty wonky in the water. So what, is there a RAM address for it or something that I can alter?
Thanks.
|
|
| Posted on 2011-08-09 11:50:50 PM |
Link | Quote |
|
I decided to try and take a different approach to my Stone sprite dilemma. Instead of using the Pushable Crate as a base, I mixed 'n matched some code from both imamelia and HFD. So far everything is working much smoother and more along the lines of what I initially wanted, however I still can't get Mario to "stick" to the top of the sprite while its in movement. While Mario's no longer being pushed to the forefront, he's not exactly recognizing sprite movement period and is just sliding right off.
As I made the new sprite, I began to suspect there's more to it than making a simple Contact to Ride check. I'm beginning to imagine that I need to account for the blocks as well since the sprite is never in a state of movement under its own power?
Here is the updated Sprite/Block package. I swapped the movement code in the blocks from imamelia's method to Ice Man's method since imamelia's method started doing some really strange stuff with this new sprite.
Again, I'd be so grateful for any help that can come my way.
|
|
| Posted on 2011-08-10 12:10:06 AM |
Link | Quote |
|
|
Hm...I'm not sure about this, but maybe having both the JSL $01B44F and the JSL $01A7DC is causing problems? Also, I made a newer and probably better version of that platform, if you'd like to see it. (I don't know if the interaction routine is any better, though...)
|
|
| Posted on 2011-08-10 01:59:03 PM |
Link | Quote |
|
Originally posted by wiiqwertyuiopQuick question, how can I check if Mario is above a sprite?
I'm sure there's a subroutine for sprite codes in the library file of the mikeyk's tutorial, it's just like SUB_OFF_SCREEN or GET_DRAW_INFO, but it's called "SUB_VERT_POS", and it returns with Y register set to #$00 or #$01 depending on if Mario is above or below the sprite.
|
|
| Posted on 2011-08-10 02:01:06 PM |
Link | Quote |
|
|
Thanks, but I already figured it out.
|
|
| Posted on 2011-08-13 04:05:11 PM |
Link | Quote |
|
I'm trying to make a block that acts like a triangle only if the on/off block is in the 'off' state, but it doesn't work properly.
I made a block that should act like the triangle when the switch is 'off', otherwise it acts like nothing. I also made another one that should act like tile 1EB if the switch is 'off', otherwise acts like a cement block. (Did that because in order to the triangle work properly, tile 1EB has to be below the triangle).
Here's the code of the 'off' triangle itself (Acts like tile 25):
CodeJMP Action
JMP Action
JMP Action
JMP NoAction
JMP NoAction
JMP NoAction
JMP NoAction
Action:
LDA $14AF
BEQ NoAction
LDY #$01
LDA #$B4
STA $1693
NoAction:
RTL
And here's the code of the 'support block' that has to be below the triangle (Acts like tile 25 too):
CodeJMP Action
JMP Action
JMP Action
JMP NoAction
JMP NoAction
JMP NoAction
JMP NoAction
Action:
LDA $14AF
BEQ NoAction
LDY #$01
LDA #$EB
STA $1693
RTL
NoAction:
LDY #$01
LDA #$30
STA $1693
RTL
The problem is, the block doesn't act like it should be. When I run into the triangle, I fall through it and the support block below it. Any ideas how to make this one work? Thanks in advance.
|
|
| Posted on 2011-08-13 04:07:33 PM |
Link | Quote |
|
I belive using the three extra offsets will make stuff work better.
Codedb $42
JMP MarioBelow : JMP MarioAbove : JMP MarioSide
JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireball
JMP TopCorner : JMP HeadInside : JMP BodyInside
MarioBelow:
MarioAbove:
MarioSide:
TopCorner:
HeadInside:
BodyInside:
LDA $14AF
BEQ NoAction
LDY #$01
LDA #$AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
STA $1693
SpriteV:
SpriteH:
MarioCape:
MarioFireball:
RTL
|
|
| Posted on 2011-08-13 04:28:39 PM |
Link | Quote |
|
Uh, it's still showing the same problem. When I run into the triangle normally I still fall through the two blocks.
I've made two small tests using my two blocks, Tile 1EB and the standard triangle.. not sure if that will help in any way, but here it is anyway:
- 'Off' triangle + Tile 1EB = Doesn't work.
- Normal triangle + 'Off' tile 1EB = Work.
That is weird, because it looks like the problem is on my 'off' triangle... but not on the support block, and they are similarly coded.
Any help?
|
|
| Posted on 2011-08-13 04:41:42 PM |
Link | Quote |
|
And now I noticed this.
Originally posted by RAM map--$7E13E3--
Mario is wall-running flag.
0=not wall-running
2=on bottom left (45° angle)
3=on bottom right (45° angle)
4=on top left (45° angle, on top of the wall)
5=on top right (45° angle, on top of the wall)
6=on the left wall
7=on the right wall
Note that custom blocks doesn't work while wall-running!
Length: 1 byte.
I had plenty of trouble with this a while ago. Try making the tiles act like the triangles and support tiles, with the block code making it act like 100/25/etc.
|
|
| Posted on 2011-08-13 09:32:29 PM |
Link | Quote |
|
|
Oh, never thought reversing these things would work! Now the blocks are working perfectly. Thank you.
|
|
| Posted on 2011-08-14 09:31:39 AM |
Link | Quote |
|
Also, Alcaro, you should fix that address.
the "doesn't" is wrong, and should actually be "don't" <.<
|
|
| Posted on 2011-08-17 07:11:42 PM |
Link | Quote |
|
|
Hello, I'm starting a new hack today and I want the hack to have an opening cutscene. However, I want it to be animated instead of the VWF cutscene. Where would be a good place to start?
|
|
| Posted on 2011-08-17 09:05:43 PM |
Link | Quote |
|
My MSU1 Patch is still in development, There is a problem with the World Map where the Bowser Revealed song does not appear,
But that is the not only reason why I am here...
I am also trying to make or find a block that puts a new Map16 block (SMB3 P-Switch) on top, then it turns into an Empty Block (Map16 $0025),
What I need is some help on the ''Put Block Above Block'' method.
|
|
| Posted on 2011-08-19 06:40:55 AM |
Link | Quote |
|
Quick Question: Can I do something like this?
Code!Speed = $0A
!Thing = !Speed
!Value = !Speed-1
LDA #!Value
STA $AA,x
LDA #!Value-2
STA $B6,x
LDA #!Thing
STA.w $AA,y
LDA #!Thing-2
STA.w $B6,y
In this code, I ask about the:
Code!Thing = !Speed
!Value = !Speed-1
Can I specify definition as a definition? Will xkas accept something like this?
|
|
| Posted on 2011-08-19 06:57:27 AM |
Link | Quote |
|
|
Yes, yes you can.
|
|
| Posted on 2011-08-19 07:22:19 PM |
Link | Quote |
|
|
Now this come as a irritation to you, but it's necessary. Could someone post the regular "INIT" routine and the "MAIN" routine for a Regular custom sprite. (Meaning no additional features except it flies in a oval) thank you.
|
|
| Posted on 2011-08-19 08:08:41 PM |
Link | Quote |
|
Originally posted by JacobacoNow this come as a irritation to you, but it's necessary. Could someone post the regular "INIT" routine and the "MAIN" routine for a Regular custom sprite. (Meaning no additional features except it flies in a oval) thank you.
For xkas or trasm? Each formats their init and main routines differently.
|
|
| Posted on 2011-08-19 09:36:57 PM |
Link | Quote |
|
|
Wait, are you wanting actual sprite code (not just the init and main specifiers)?
|
|
| Posted on 2011-08-19 11:48:56 PM |
Link | Quote |
|
@Kaijyuu: I'm using xkas.
P.S. How do you close the "quote" tag and yes mamelia I'd like actual sprite code used in custom sprites, I'd like the "INIT" routine and "MAIN" routine
|
|
|
|
|
|
|
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Official Hex/ASM/Etc. Help Thread |