Posts by Israelcv12cv
Pages: 1 2
Hola aun tines en paquede de Tessera Pack 1 donde viene el pidgit me lo puedes pasar
Yo los puedo comvertir a pixi como hize con este sprite
Una vez comveetidos te los paso
https://youtu.be/g5BpBiMDorc
Originally posted by NintendoMarioBros4 Originally posted by Ragey Code ;draw wrench tile
LDA $157C,x ;direction into X
TAX
LDA $00
CLC
ADC #!WRENCHYDISP
STA $0300,y
LDA $01
CLC
ADC #!WRENCHYDISP
STA $0301,y
LDA #!WRENCHTILE
STA $0302,y
LDA #!WRENCHPROP
STA $0303,y
Prepend these strings with #! to fix the issue.
i add into the asm still giving me same error.
(restricted)
Hola a todos hoy les traigo 3 fantasticos sprites codificados y recreados por mi espero les gusten.
Thwomp gigante
Tambien biene con graficos estilo SMB3
https://youtu.be/jZOFQ0yctF8
Link de descarga
https://www.dropbox.com/s/88kjm1wdv1zr5dk/gian%20thwomp.rar?dl=0
Blooper gigante
https://youtu.be/3iVTCsj8I1w
Link de descarga
https://www.dropbox.com/s/f80em20lo936d84/big_blooper.rar?dl=0
Cañon de bob-ombs tirador
Es una version mejorada.
https://youtu.be/QfietYR2Q7I
Link de descarga
https://www.dropbox.com/s/oy5ditoq245oxuf/bob_omb_shooter.rar?dl=0
if they are for PIXI I hope you enjoy them
Originally posted by Rykon-V73 It's the one from
this thread . 2 things:
One is that the sprite doesn't work, because of:
Macro SubOffScreen not found
If I uncomment %SubOffscreen(), it works, but Mario can't jump on it.
Two is that I wished the sprite had the BOMB GFX, instead of the vanilla explosion. Perhaps a bit of code must be edited to add that.
Bueno yo lo hice fubcionar con un parche para interactuar con Mario
Y funciono a la perfecion corregi algunos herrores minimos y su comvercion a SA1 y funciona a la perfeccio.
Aca esta el video de muestra y funcionamiento.
https://youtu.be/ZSj0EQP7JbU
Name:
SMB2 mount and grab
Type:
patch
Description:
That the patch changes the physics of smw and custom sprites.
1. That it can be ridden.
- As an example the goomba instead of jumping on it and stun it that can be mounted.
2. Also that when grabbing a sprite and block change Mario's pose.
3. Also that when grabbing sprite there is a time delay.
4. Also that when grabbing a sprite it rises in front of Mario.
5. Also that when grabbing a sprite it generates a sfx.
As seen in Super Mario Bros 2.
References:
Hi I am using a custom esprite that uses mode game 10.
Is there any way to change the color palettes of a sprite that uses mode 10.
But mode game 10 does not recognize other types of palette from the custom sprite, only bowser who carries his own unique palette.
Originally posted by WhiteYoshiEgg What do you mean by mode 10? It's not a term that's commonly used. Could you show a picture of the window you're talking about?
If you're talking about PIXI's CFG editor, and you want to change the palette a sprite uses, sometimes it can't be done in the CFG editor because the palette settings are hardcoded in the ASM file. You can try looking there and see if there are defines you can edit.
If it's game mode 10, I'm sorry, the one that bowser uses in the final battle.
Is there some kind of patch or something to change the colors of the palette of my custom sprite that uses game mode 10.
hello
How can I change Mario's pose, when he is in a frozen state?
STA $18BD = freeze
-pose = 0F (small) frozen
-pose = 4F (big) frozen
I would like to change to another pose when frozen, there will be some code to execute it
they help me
Originally posted by TheJank I'm unsure of what you need help with.
Do you want to change how Mario looks when he is stunned? That being, do you want to change the graphics?
Or, and I assume that's the case, do you have a piece of code that stuns mario, and you want to change the pose for when that happens?
Exactly I want to change the pose when Mario is stunned, and if I want to change the pose whenever I want.
Is there any code to do it.
Originally posted by TheJank Now, this would need some changes depending on how you want to implement it.
For example, if you're either using a Sprite that stuns the player, or maybe a UberASM that stuns the player, or if you're using an Asar Patch.
Because of that, a more clear explanation would be helpful.
if I'm using it for a sprite, but when it gets stunned I want to change Mario's pose to others.
There will be a way to force the pose change.
Originally posted by TheJank Could you please tell me which sprite you're using?
That way I can tell you exactly how to change the code
This is the freezer sprite code
Collapsed text: Show/Hide Code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Uses first extra bit: NO
;;
;; Extra Property Byte 1
;; bit 0 - enable spin killing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!StunTime = $40
!EXTRA_PROP_1 = $7FAB28
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite init JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PRINT "INIT ",pc
%SubHorzPos()
TYA
STA $157C,x
LDA #$C0
STA $AA,x
LDA $157C,x ; \ set x speed based on direction
BEQ RIGHT
LEFT:
LDA #$E0 ; |
BRA SET
RIGHT:
LDA #$20
SET:
STA $B6,x ; /
JSL $01802A
RTL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite code JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PRINT "MAIN ",pc
PHB ; \
PHK ; | main sprite function, just calls local subroutine
PLB ; |
JSR SPRITE_CODE_START ; |
PLB ; |
RTL ; /
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite main code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
X_SPEED: db $20,$E0
Y_SPEED: db $C0,$C0,$C0,$C0
KILLED_X_SPEED: db $F0,$10
RETURN: RTS
SPRITE_CODE_START: JSR SUB_GFX ; graphics routine
LDA $14C8,x ; \
CMP #$08 ; | if status != 8, RETURN
BNE RETURN ; /
LDA $9D ; \ if sprites locked, RETURN
BNE RETURN ;
%SubOffScreen() ; handle off screen situation
LDA $1588,x ; \ if sprite is in contact with an object...
AND #$07 ; |
BEQ NO_OBJ_CONTACT ; |
LDA $157C,x ; | flip the direction status
EOR #$01 ; |
STA $157C,x ; /
LDA #$1C ; \ sound effect
STA $1DFC ; /
JSR SUB_SMOKE
LDA $B6,x
EOR #$FF
INC A
STA $B6,x
STZ $14C8,x
NO_OBJ_CONTACT:
LDA $1588,x ; if on the ground, reset the turn counter
AND #$04
BEQ IN_AIR
LDA $1528,x
INC A
AND #$03
STA $1528,x
TAY
LDA Y_SPEED,y
STA $AA,x
LDY $157C,x ; \ set x speed based on direction
LDA X_SPEED,y ; |
STA $B6,x ; /
IN_AIR: JSL $01802A ; update position based on speed values
DONE_WITH_SPEED: JSL $018032 ; interact with sprites
JSL $01A7DC ; check for mario/sprite contact (carry set = contact)
BCC RETURN_24 ; RETURN if no contact
LDA $1490 ; \ if mario star timer > 0, goto HAS_STAR
BNE HAS_STAR ; / NOTE: branch to RETURN_24 to disable star killing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
LDA.b #!StunTime ; \ Freeze Mario
STA $18BD ; /
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
LDA #$1C ; \ sound effect
STA $1DFC ; /
STZ $14C8,x ; Kill iceball
JSR SUB_SMOKE
LDA $187A ; \ if not riding Yoshi
BNE LOSEYOSHI ; / skip over routine
JSL $00F5B7 ; Hurt Mario. Delete this line if you want the iceball to just freeze him.
RETURN_24: RTS ; final RETURN
LOSEYOSHI: PHX ; back up X (sprite index)
PHY ; back up Y
LDX $18E2 ; Yoshi sprite index +1, would be zero if no Yoshi
LDA #$10 ;
STA $163D,x ;
LDA #$03 ; \ turn off
STA $1DFA ; / Yoshi drums
LDA #$13 ; \ play lose-Yoshi
STA $1DFC ; / sound effect
LDA #$02 ; \ set Yoshi to
STA $C1,x ; / running-away state
STZ $187A ; reset riding Yoshi flag
STZ $0DC1 ;
LDA #$C0 ; \ make Mario
STA $7D ; / jump upwards
STZ $7B ; no X movement
LDY $157B,x ; \
PHX ; | set Yoshi's
TYX ; | running-away
LDA $02A4B3,x ; | X speed
PLX ; |
STA $B5,x ; /
STZ $1593,x ;
STZ $151B,x ;
STZ $18AE ;
LDA #$30 ; \ Mario invincible
STA $1497 ; / timer
PLY ; restore Y
PLX ; restore X (sprite index)
RTS
HAS_STAR: LDA #$02 ; \ status = 2 (being killed by star)
STA $14C8,x ; /
LDA #$D0 ; \ set y speed
STA $AA,x ; /
%SubHorzPos() ; get new direction
LDA KILLED_X_SPEED,y ; \ set x speed based on direction
STA $B6,x ; /
;INC $18D2 ; increment number consecutive enemies killed
LDA $18D2 ; \
CMP #$07
BCC NO_RESET2 ; |
LDA #$07 ; |
STA $18D2 ; /
NO_RESET2: TAY
LDA STAR_SOUNDS,y ; | ... play sound effect
STA $1DF9 ; /
NO_SOUND2: RTS ; final RETURN
STAR_SOUNDS: db $13,$13,$14,$15,$16,$17,$18,$19
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite graphics routine
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
TILEMAP: db $42,$43,$52,$53
SUB_GFX: %GetDrawInfo() ; sets y = OAM offset
LDA $157C,x ; \ $02 = direction
STA $02 ; /
LDA $14 ; \
LSR A ; |
LSR A ; |
LSR A ; |
CLC ; |
ADC $15E9 ; |
AND #$03 ; |
STA $03 ; | $03 = index to frame start (0 or 1)
PHX ; /
LDA $14C8,x
CMP #$02
BNE LOOP_START_2
STZ $03
LDA $15F6,x
ORA #$80
STA $15F6,x
LOOP_START_2: LDA $00 ; \ tile x position = sprite x location ($00)
STA $0300,y ; /
LDA $01 ; \ tile y position = sprite y location ($01)
CLC
ADC #$08
STA $0301,y ; /
LDA $15F6,x ; tile properties xyppccct, format
LDX $02 ; \ if direction == 0...
BNE NO_FLIP ; |
ORA #$40 ; / ...flip tile
NO_FLIP: ORA $64 ; add in tile priority of level
STA $0303,y ; store tile properties
LDX $03 ; \ store tile
LDA TILEMAP,x ; |
STA $0302,y ; /
INY ; \ increase index to sprite tile map ($300)...
PLX ; pull, X = sprite index
LDY #$00 ; This means the tile drawn is 8x8.
LDA #$00 ; | A = (number of tiles drawn - 1)
JSL $01B7B3 ; / don't draw if offscreen
RTS ; RETURN
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; display smoke effect for bullet bill shooter
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SUB_SMOKE: LDY #$03 ; \ find a free slot to display effect
FINDFREE: LDA $17C0,y ; |
BEQ FOUNDONE ; |
DEY ; |
BPL FINDFREE ; |
RTS ; / RETURN if no slots open
X_OFFSET: db $F4,$0C
FOUNDONE: LDA #$01 ; \ set effect graphic to smoke graphic
STA $17C0,y ; /
LDA $D8,x ; \ smoke y position = generator y position
CLC
ADC #$08
STA $17C4,y ; /
LDA #$1B ; \ set time to show smoke
STA $17CC,y ; /
LDA $E4,x ; \ load generator x position and store it for later
STA $17C8,y ; / 18BD
LDX $15E9
RTS
Originally posted by TheJank Ok. Try this:
Collapsed text: Show/Hide Code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Uses first extra bit: NO
;;
;; Extra Property Byte 1
;; bit 0 - enable spin killing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!StunTime = $40
!EXTRA_PROP_1 = $7FAB28
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite init JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PRINT "INIT ",pc
%SubHorzPos()
TYA
STA $157C,x
LDA #$C0
STA $AA,x
LDA $157C,x ; \ set x speed based on direction
BEQ RIGHT
LEFT:
LDA #$E0 ; |
BRA SET
RIGHT:
LDA #$20
SET:
STA $B6,x ; /
JSL $01802A
RTL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite code JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PRINT "MAIN ",pc
PHB ; \
PHK ; | main sprite function, just calls local subroutine
PLB ; |
JSR SPRITE_CODE_START ; |
PLB ; |
RTL ; /
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite main code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
X_SPEED: db $20,$E0
Y_SPEED: db $C0,$C0,$C0,$C0
KILLED_X_SPEED: db $F0,$10
RETURN: RTS
SPRITE_CODE_START:
CHECK STUN:
LDA $18BD ;check stun timer
BEQ RESTOFCODE ;if zero, goes to the rest of the code
LDA #$XX ;change XX to the pose you want
STA $13E0 ;store the pose in the proper address
RESTOFCODE:
JSR SUB_GFX ; graphics routine
LDA $14C8,x ; \
CMP #$08 ; | if status != 8, RETURN
BNE RETURN ; /
LDA $9D ; \ if sprites locked, RETURN
BNE RETURN ;
%SubOffScreen() ; handle off screen situation
LDA $1588,x ; \ if sprite is in contact with an object...
AND #$07 ; |
BEQ NO_OBJ_CONTACT ; |
LDA $157C,x ; | flip the direction status
EOR #$01 ; |
STA $157C,x ; /
LDA #$1C ; \ sound effect
STA $1DFC ; /
JSR SUB_SMOKE
LDA $B6,x
EOR #$FF
INC A
STA $B6,x
STZ $14C8,x
NO_OBJ_CONTACT:
LDA $1588,x ; if on the ground, reset the turn counter
AND #$04
BEQ IN_AIR
LDA $1528,x
INC A
AND #$03
STA $1528,x
TAY
LDA Y_SPEED,y
STA $AA,x
LDY $157C,x ; \ set x speed based on direction
LDA X_SPEED,y ; |
STA $B6,x ; /
IN_AIR: JSL $01802A ; update position based on speed values
DONE_WITH_SPEED: JSL $018032 ; interact with sprites
JSL $01A7DC ; check for mario/sprite contact (carry set = contact)
BCC RETURN_24 ; RETURN if no contact
LDA $1490 ; \ if mario star timer > 0, goto HAS_STAR
BNE HAS_STAR ; / NOTE: branch to RETURN_24 to disable star killing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
LDA.b #!StunTime ; \ Freeze Mario
STA $18BD ; /
LDA #$XX ;change XX to the pose you want
STA $13E0 ;store the pose in the proper
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
LDA #$1C ; \ sound effect
STA $1DFC ; /
STZ $14C8,x ; Kill iceball
JSR SUB_SMOKE
LDA $187A ; \ if not riding Yoshi
BNE LOSEYOSHI ; / skip over routine
JSL $00F5B7 ; Hurt Mario. Delete this line if you want the iceball to just freeze him.
RETURN_24: RTS ; final RETURN
LOSEYOSHI: PHX ; back up X (sprite index)
PHY ; back up Y
LDX $18E2 ; Yoshi sprite index +1, would be zero if no Yoshi
LDA #$10 ;
STA $163D,x ;
LDA #$03 ; \ turn off
STA $1DFA ; / Yoshi drums
LDA #$13 ; \ play lose-Yoshi
STA $1DFC ; / sound effect
LDA #$02 ; \ set Yoshi to
STA $C1,x ; / running-away state
STZ $187A ; reset riding Yoshi flag
STZ $0DC1 ;
LDA #$C0 ; \ make Mario
STA $7D ; / jump upwards
STZ $7B ; no X movement
LDY $157B,x ; \
PHX ; | set Yoshi's
TYX ; | running-away
LDA $02A4B3,x ; | X speed
PLX ; |
STA $B5,x ; /
STZ $1593,x ;
STZ $151B,x ;
STZ $18AE ;
LDA #$30 ; \ Mario invincible
STA $1497 ; / timer
PLY ; restore Y
PLX ; restore X (sprite index)
RTS
HAS_STAR: LDA #$02 ; \ status = 2 (being killed by star)
STA $14C8,x ; /
LDA #$D0 ; \ set y speed
STA $AA,x ; /
%SubHorzPos() ; get new direction
LDA KILLED_X_SPEED,y ; \ set x speed based on direction
STA $B6,x ; /
;INC $18D2 ; increment number consecutive enemies killed
LDA $18D2 ; \
CMP #$07
BCC NO_RESET2 ; |
LDA #$07 ; |
STA $18D2 ; /
NO_RESET2: TAY
LDA STAR_SOUNDS,y ; | ... play sound effect
STA $1DF9 ; /
NO_SOUND2: RTS ; final RETURN
STAR_SOUNDS: db $13,$13,$14,$15,$16,$17,$18,$19
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite graphics routine
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
TILEMAP: db $42,$43,$52,$53
SUB_GFX: %GetDrawInfo() ; sets y = OAM offset
LDA $157C,x ; \ $02 = direction
STA $02 ; /
LDA $14 ; \
LSR A ; |
LSR A ; |
LSR A ; |
CLC ; |
ADC $15E9 ; |
AND #$03 ; |
STA $03 ; | $03 = index to frame start (0 or 1)
PHX ; /
LDA $14C8,x
CMP #$02
BNE LOOP_START_2
STZ $03
LDA $15F6,x
ORA #$80
STA $15F6,x
LOOP_START_2: LDA $00 ; \ tile x position = sprite x location ($00)
STA $0300,y ; /
LDA $01 ; \ tile y position = sprite y location ($01)
CLC
ADC #$08
STA $0301,y ; /
LDA $15F6,x ; tile properties xyppccct, format
LDX $02 ; \ if direction == 0...
BNE NO_FLIP ; |
ORA #$40 ; / ...flip tile
NO_FLIP: ORA $64 ; add in tile priority of level
STA $0303,y ; store tile properties
LDX $03 ; \ store tile
LDA TILEMAP,x ; |
STA $0302,y ; /
INY ; \ increase index to sprite tile map ($300)...
PLX ; pull, X = sprite index
LDY #$00 ; This means the tile drawn is 8x8.
LDA #$00 ; | A = (number of tiles drawn - 1)
JSL $01B7B3 ; / don't draw if offscreen
RTS ; RETURN
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; display smoke effect for bullet bill shooter
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SUB_SMOKE: LDY #$03 ; \ find a free slot to display effect
FINDFREE: LDA $17C0,y ; |
BEQ FOUNDONE ; |
DEY ; |
BPL FINDFREE ; |
RTS ; / RETURN if no slots open
X_OFFSET: db $F4,$0C
FOUNDONE: LDA #$01 ; \ set effect graphic to smoke graphic
STA $17C0,y ; /
LDA $D8,x ; \ smoke y position = generator y position
CLC
ADC #$08
STA $17C4,y ; /
LDA #$1B ; \ set time to show smoke
STA $17CC,y ; /
LDA $E4,x ; \ load generator x position and store it for later
STA $17C8,y ; / 18BD
LDX $15E9
RTS
I highlighted the changes I made, so you can easily see them. (make sure to change XX to the pose you want!)
Let me know if this works, I didn't test it myself.
For some reason it doesn't change the pose, it stays with the 0F pose.
Collapsed text: Show/Hide
Originally posted by TheJank Ohhh, ok, my bad for not reading the entire code lol.
The reason it doesn't work is because the sprite is killed after it touches Mario and stuns him, so it never runs the part that I added to the code.
I can think of 2 solutions:
1. You can do a Hex Edit on the address $00CCDB, changing 0F to whatever you need. Note that this will change Mario's pose everytime he gets stunned, on every level.
2. You can patch this via UberASM, in case you want the pose to change only on this level.
Collapsed text: Show/Hide Code Main:
LDA $18BD ;load stun timer
BNE Stunned ;if not zero, go to stunned
RTL
Stunned:
LDA #$XX ;change XX to the pose you want
STA $13E0 ;this is used by the game to draw the pose
RTL
Either way, make sure to backup, always. In case I messed up somewhere, you wanna make sure this doesn't mess up your rom.
Also, undo the modifications that I made to the Sprite code. They're pointless.
Thank you very much, the 2 solutions work myt well.
It will look great on my Super Mario Bros 2 style hack.
Collapsed text: Show/Hide
Thanks a lot
TheJank
Hello
Help me with the Flurry sprite.
What I would like is for the sprite to stop chasing or stop looking at Mario at all times, and just walk like a normal sprite and continue on its way.
Here is the code the Sprite.
Collapsed text: Show/Hide Code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Flurry, from SMB2 (SMUSA) by Romi (optimized by Blind Devil)
;
;Extra Bit: No
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Extra Property 1
;bit 0 - can be killed by spin jump
;bit 1 - can be carried
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
TileMap: db $84,$86
Property: db $40,$00
MaxSpeed: db $18,$E8
SpeedTable: db $01,$FF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; INIT and MAIN JSL targets
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
print "MAIN ",pc
MAIN: PHB
PHK
PLB
CMP #$09
BCS .IsCarried
JSR SpriteMain
PLB
RTL
.IsCarried LDA $9D
BNE .IsCarried2
INC !1570,x
LDA !14C8,x
CMP #$09
BNE .IsCarried2
LDA !1588,x
AND #$04
BEQ .IsCarried2
LDA #$E0
STA !AA,x
INC !1504,x
LDA !1504,x
CMP #$02
BNE .IsCarried2
LDA #$08
STA !14C8,x
STZ !AA,x
.IsCarried2 PHX
PHX
LDY !15EA,x
LDA !1570,x
LSR #$03
AND #$01
TAX
LDA.w TileMap,x
STA $0302|!Base2,y
PLX
LDA !157C,x
TAX
LDA $0303|!Base2,y
ORA Property,x
ORA #$80
STA $0303|!Base2,y
PLX
PLB
print "INIT ",pc
RTL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SPRITE_ROUTINE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Return: RTS
SpriteMain: JSR SpriteGraphic
LDA $9D
BNE Return
LDA !14C8,x
CMP #$08
BNE Return
INC !1570,x
LDA #$00
%SubOffScreen()
JSL $01802A|!BankB
LDA !1588,x
BIT #$03
BEQ .SidesCheck
PHA
LDA !B6,x
EOR #$FF
INC A
STA !B6,x
PLA
.SidesCheck AND #$04
BNE .OnGround
STZ !157C,x
LDA !B6,x
BPL $03
INC !157C,x
LDA !1570,x
AND #$01
BNE .Interact
LDA !157C,x
EOR #$01
TAY
LDA $B6,x
BEQ .Interact
BRA .AdjustSpeed
.OnGround LDY #$00
LDA $94
CMP !E4,x
LDA $95
SBC !14E0,x
BPL $01
INY
TYA
STA !157C,x
LDA !1570,x
LSR A
BCS .SpeedUpdate
LSR A
BCC .Interact
.SpeedUpdate LDA !B6,x
CMP MaxSpeed,y
BEQ .Interact
.AdjustSpeed CLC
ADC SpeedTable,y
STA !B6,x
.Interact LDY #$B9
LDA $1490|!Base2 ; Star timer
BNE .DeafaultInteraction
LDA !7FAB28,x
AND #$01
AND $140D|!Base2
BEQ .StoreTo167A
.DeafaultInteraction LDY #$39
.StoreTo167A TYA
STA !167A,x
JSL $01803A|!BankB ; both sprite and Mario intraction
BCC .R
LDA !14C8,x
CMP #$08
BNE .R
PHK
PER .R
PEA $8020
JML $01B45C|!BankB
.R RTS
BCC .SpriteWins
LDA !7FAB28,x ; | Is the sprite carryable?
AND #$02 ; |
BEQ .MarioWins ;/
BIT $16
BVC .MarioWins
LDA #$0B
STA !14C8,x
STZ !1540,x
STZ !1504,x ; times the sprite bounced
LDA #$99
STA !167A,x
RTS
.MarioWins LDA #$08
STA !154C,x
RTS
.SpriteWins LDA !154C,x
BNE .R
JSL $00F5B7|!BankB
RTS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Sprite's Graphic
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SpriteGraphic:
%GetDrawInfo()
LDA !1570,x
LSR #3
AND #$01
STA $03
LDA !157C,x
STA $02
PHX
REP #$20
LDA $00
STA $0300|!Base2,y
SEP #$20
LDX $03
LDA TileMap,x
STA $0302|!Base2,y
LDX $02
LDA Property,x
LDX $15E9|!Base2
ORA !15F6,x
ORA $64
STA $0303|!Base2,y
PLX
LDY #$02
LDA #$00
JSL $01B7B3|!BankB
RTS
Originally posted by Thomas I believe deleting the code here should do what you want:
Code .OnGround LDY #$00
LDA $94
CMP !E4,x
LDA $95
SBC !14E0,x
BPL $01
INY
TYA
STA !157C,x
Leave the ".OnGround" part, though, so you should replace that chunk with just this:
Thank you very much
Thomas , it worked although I made some more changes, so that it walks normally, the interaction with walls, and the fix to give the flip graphics.
Thank you very much for the help.
Tag (div) was not closed. Tag (div) was not closed.
Hello.
How are you.
Could someone help me with this.
How do I get this kill sprite code to work on my 32x32 sprite.
Poro, it just runs as if it were a 16x16 sprite kill code routine.
There would be a way for the code to work in my 32x32 sprite, if this sprite kills any sprite that touches it.
This is the code to kill sprites.
Collapsed text: Show/Hide Code LDY #!SprSize-1
LoopStart:
LDA !14C8,Y ; Skip dead sprites
CMP #$08
BCC NextSprite
LDA !1686,Y ; Skip sprites that don't interact with others
AND #$08
BNE NextSprite
LDA !1564,Y
BNE NextSprite
JSR SprSprInteract
NextSprite:
DEY
BPL LoopStart
RTS
SprSprInteract:
JSL $03B69F|!BankB
PHX
TYX
JSL $03B6E5|!BankB
PLX
JSL $03B72B|!BankB
BCC Return1
LDA #$08
STA !14C8,x
PHX
TYX
LDA !7FAB28,x
BPL KillSprite
LDA !7FAB10,x
AND #$08
BNE IncreaseHits
KillSprite:
LDA #$02 ; Sprite status = disappear in cloud of smoke
STA !14C8,x
LDA #$D0
STA !AA,X
JSL $01AB6F|!BankB
LDA #$04
JSL $02ACE5|!BankB
PLX
LDA #$15
STA $1DF9
Return1:
RTS
IncreaseHits:
JSL $01AB72|!BankB
LDA !1534,x
ORA #$80
STA !1534,x
PLX
RTS
Originally posted by Thomas Probably
has to do with the hitbox size you have set for the sprite.
SMW can't assume hitbox size from the graphics, you have to manually define it. The original game does it through the sprite's CFG file; if you open it in Pixi's CFG editor, you can change that setting here:
Change the sprite clipping value to one that more accurately reflects the size of your sprite (e.g. 23).
Thank you very much
Thomas
It works although it took me a while to find the
proper clipping. but I made it.
I also used this clipping routine that fit the sprite.
clipping: Show/Hide Code LDA #$0E ; \ change clipping y
STA !1662,Y ; /
LDA #$0E ; \ change clipping x
STA !1662,X ; /
Posted on 2022-03-04 03:53:10 AM in SMB2 shell. | Last edited 2022-04-03 03:56:56 AM by ModBot
SMB2 shell
Sprite type.
A sprite that acts as a riding shell, which can also be grabbed for throwing.
Also when thrown the shell will kill the enemies, when it hits the wall it will turn into smoke.
Pages: 1 2
Follow Us On