Banner
Views: 943,574,024
Time:
12 users online: chillymittz, GrumpyWalrus, Hatsune_Blake, Infinity, KaidenThelens, OEO6, RandomType,  RussianMan, Souldbminer, syogayaki, TheKazooBloccGosh, TheLegendaryOrb - Guests: 69 - Bots: 74 Users: 52,467 (1,989 active)
Latest: BedtimeGuy
Tip: Try sketching out ideas for overworlds and levels. Even if they don't manage to fit into Lunar Magic completely, at least you have a base to work from, instead of doing it all from scratch.
Not logged in.
Help about Imamelia's C3 2014 sprites
Forum Index - SMW Hacking - SMW Hacking Help - Help about Imamelia's C3 2014 sprites
Pages: « 1 » Link - Thread Closed
I recall there's a patch that allows Imamelia's C3 2014 sprites to work properly, but I don't know if I need to apply it to the rom or into the sprite file. Can you please help me about this? I know this was already asked before, but I didn't want to go back to it in order to avoid hijacking other users' threads.

--------------------
Yo, it's been a while.
That would be a shared subroutines patch, which is rendered obsolete by PIXI due to it including shared subroutines as a core functionality.

You'll want to replace various calls via defines in these sprites by the PIXI equivalents of subroutine calls. I opened a few of them and I've spotted the following three:

Replace all instances of JSL !SubOffScreenX0 by %SubOffScreen()
Replace all instances of JSL !GetDrawInfo by %GetDrawInfo()
Replace all instances of JSL !SubHorizPos by %SubHorzPos()

There must be others, but I don't know which sprites you want to use.

Also, you should really link the sprites you're talking about. I had to look them up. They're not that famous that you can just say "imamelia's C3 2014 sprites" and everyone knows what you mean instantly.

--------------------
Originally posted by Koopster
Replace all instances of JSL !SubOffScreenX0 by %SubOffScreen()

Minor correction: Replace JSL !SubOffScreenX0 by LDA #$00 : %SubOffScreen() as the sprite may otherwise not despawn correctly.
Originally posted by Koopster
That would be a shared subroutines patch, which is rendered obsolete by PIXI due to it including shared subroutines as a core functionality.

You'll want to replace various calls via defines in these sprites by the PIXI equivalents of subroutine calls. I opened a few of them and I've spotted the following three:

Replace all instances of JSL !SubOffScreenX0 by %SubOffScreen()
Replace all instances of JSL !GetDrawInfo by %GetDrawInfo()
Replace all instances of JSL !SubHorizPos by %SubHorzPos()

There must be others, but I don't know which sprites you want to use.

Also, you should really link the sprites you're talking about. I had to look them up. They're not that famous that you can just say "imamelia's C3 2014 sprites" and everyone knows what you mean instantly.

Well I want to specifically use the giant thwomp.

--------------------
Yo, it's been a while.
Then it's a case of replacing JSL !SubOffScreenX0 by LDA #$00 : %SubOffScreen() and other instances pointed out some posts ago:

Originally posted by Koopster
Replace all instances of JSL !GetDrawInfo by %GetDrawInfo()
Replace all instances of JSL !SubHorizPos by %SubHorzPos()


--------------------
I did all the steps you gave me, but it gives me this error:
An error has been detected:
c:/users/dell/desktop/gaming/emulators/super nintendo/hack editor/another hack/sprites/imamelia's c3 2014 sprites/sprites/giant_thwomp.asm:270: error: (E5117): Unknown command. [JSL 0]
By the way, here's the link to imamelia's C3 2014 sprites:
https://bin.smwcentral.net/u/3471/imamelia%2527s%2BC3%2B2014%2Bsprites.zip

--------------------
Yo, it's been a while.
There's no "JSL 0" in the original code. You must have replaced something wrong.

--------------------
Originally posted by Koopster
There's no "JSL 0" in the original code. You must have replaced something wrong.

Nope, I did exactly as mensioned previously, but it gave me the error.
Here's the whole code:
Code
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; Giant Thwomp, by imamelia
;
; This is a 48x64 Thwomp.
;
; Uses first extra bit: NO
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

incsrc subroutinedefs.asm

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; defines and tables
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TileDispX:
	db $F0,$00,$10,$F0,$10,$F0,$10,$F0,$00,$10,$F8,$08,$F8,$08
TileDispY:
	db $E0,$E0,$E0,$F0,$F0,$00,$00,$10,$10,$10,$F0,$F0,$00,$00
Tilemap:
	db $80,$82,$80,$A0,$A0,$C0,$C0,$E0,$E2,$E0,$A1,$A1,$C1,$C1
	db $80,$82,$80,$A0,$A0,$C0,$C0,$E0,$E2,$E0,$84,$84,$A4,$A4
	db $80,$82,$80,$A0,$A0,$C0,$C0,$E0,$E2,$E0,$C4,$C4,$E4,$E4
TileProps:
	db $03,$03,$43,$03,$43,$03,$43,$03,$03,$43,$03,$43,$03,$43
TileIndexes:
	db $00,$0E,$1C

KilledXSpeed:
	db $F0,$10

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; init routine wrapper
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

print "INIT ",pc
	JSR SpriteInitRt
	RTL

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; init routine
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SpriteInitRt:
	LDA $D8,x
	STA $151C,x
	LDA $E4,x
	CLC
	ADC #$08
	STA $E4,x
	RTS
	
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; main routine wrapper
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

print "MAIN ",pc
	PHB
	PHK
	PLB
	JSR SpriteMainRt
	PLB
	RTL

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; main routine
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SpriteMainRt:

	JSR SubGFX

	LDA $14C8,x
	CMP #$08
	BNE ReturnMain
	LDA $9D
	BNE ReturnMain

	LDA #$00 : %SubOffScreen()
	JSR PlayerInteractionRt
	LDA $C2,x
	JSL $8086DF
	
	dw State00_Waiting
	dw State01_Slamming
	dw State02_Returning

ReturnMain:
	RTS

State00_Waiting:
	LDA $186C,x
	BNE .IncState
	LDA $15A0,x
	BNE .Return
	%GetDrawInfo()
	TYA
	STA $157C,x
	STZ $1528,x
	LDA $0F
	CLC
	ADC #$40
	CMP #$80
	BCS .Check2
	LDA #$01
	STA $1528,x
.Check2
	LDA $0F
	CLC
	ADC #$24
	CMP #$50
	BCS .Return
.IncState
	LDA #$02
	STA $1528,x
	INC $C2,x
	STZ $AA,x
.Return
	RTS

State01_Slamming:
	JSL $81801A
	LDA $AA,x
	CMP #$3E
	BCS .NoAccel
	ADC #$04
	STA $AA,x
.NoAccel
	JSL $819138
	LDA $1588,x
	AND #$04
	BEQ .Return
	JSR SetSomeYSpeed
	LDY #$28
	STY $1887
	LDA $77
	AND #$04
	BEQ $03
	STY $18BD
	LDA #$09
	STA $1DFC
	LDA #$40
	STA $1540,x
	INC $C2,x
.Return
	RTS

State02_Returning:
	LDA $1540,x
	BNE .Return
	STZ $1528,x
	LDA $D8,x
	CMP $151C,x
	BNE .SetReturnSpeed
	STZ $C2,x
	RTS
.SetReturnSpeed
	LDA #$F0
	STA $AA,x
	JSL $81801A
.Return
	RTS

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; graphics routine
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SubGFX:

	%GetDrawInfo()

	LDA $1528,x
	STA $02
	LDX #$0D
.Loop
	STX $04
	LDA $00
	CLC
	ADC.w TileDispX,x
	STA $0300,y
	LDA $01
	CLC
	ADC.w TileDispY,x
	STA $0301,y
	LDA.w TileProps,x
	ORA $64
	STA $0303,y
	PHX
	LDX $02
	LDA.w TileIndexes,x
	CLC
	ADC $04
	TAX
	LDA.w Tilemap,x
	PLX
	STA $0302,y
	INY #4
	DEC $04
	DEX
	BPL .Loop
	LDX $15E9
	LDY #$02
	LDA #$0D
	JSL $81B7B3
	RTS

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; subroutines
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;------------------------------------------------
; player and sprite interaction
;------------------------------------------------

PlayerInteractionRt:
;	LDA $167A,x
;	AND #$20
;	BNE .ProcessInteract
	TXA
	EOR $13
	AND #$01
	ORA $15A0,x
	BEQ .ProcessInteract
.NoContact
	CLC
	RTS
.ProcessInteract
;	%SubHorzPos()
;	LDA $0F
;	CLC
;	ADC #$50
;	CMP #$A0
;	BCS .NoContact
;	JSL !SubVertPos2
;	LDA $0E
;	CLC
;	ADC #$60
;	CMP #$C0
;	BCS .NoContact
	LDA $71
	BNE .NoContact
	LDA #$00
	BIT $0D9B
	BVS .SkipCheckP
	LDA $13F9,x
	EOR $1632,x
.SkipCheckP
	BNE .NoContact2
	JSR SetPlayerClipping
	JSR SetSpriteClipping
	JSR CheckForContact
	BCC .Return
	LDA $1490
	BNE .HasStar
	JSL !SubVertPos
	LDA $0E
	CMP #$C6
	BPL .SpriteWins
	LDA $140D
	ORA $187A
	BEQ .SpriteWins
	JSL $81AA33
	JSL $81AB99
	LDA #$02
	STA $1DF9
.NoContact2
	CLC
.Return
	RTS
.SpriteWins
	LDA $154C,x
	ORA $15D0,x
	BNE .NoContact2
	JSL $80F5B7
	RTS
.HasStar
	LDA #$D0
	STA $AA,x
	%SubHorzPos()
	LDA KilledXSpeed,y
	STA $B6,x
	INC $18D2
	LDA $18D2
	CMP #$08
	BCC .NoReset
	LDA #$08
	STA $18D2
.NoReset
	JSL $82ACE5
	LDX $18D2
	CPX #$08
	BCS .NoSound
	LDA $037FFF,x
	STA $1DF9
.NoSound
	LDX $15E9
	LDA #$02
	STA $14C8,x
	RTS

SetPlayerClipping:
	PHX
	REP #$20
	LDA $94
	CLC
	ADC #$0002
	STA $00
	LDA #$000C
	STA $04
	SEP #$20
	LDX #$00
	LDA $73
	BNE .Inc1
	LDA $19
	BNE .Next1
.Inc1
	INX
.Next1
	LDA $187A
	BEQ .Next2
	INX #2
.Next2
	LDA $83B660,x
	STA $06
	STZ $07
	LDA $83B65C,x
	REP #$20
	AND #$00FF
	CLC
	ADC $96
	STA $02
	SEP #$20
	PLX
	RTS

SetSpriteClipping:
	LDA $14E0,x
	XBA
	LDA $E4,x
	REP #$20
	SEC
	SBC #$000E
	STA $08
	LDA #$002C
	STA $0C
	SEP #$20
	LDA $14D4,x
	XBA
	LDA $D8,x
	REP #$20
	SEC
	SBC #$0020
	STA $0A
	LDA #$003C
	STA $0E
	SEP #$20
	RTS

CheckForContact:
	REP #$20
.CheckX
	LDA $00
	CMP $08
	BCC .CheckXSub2
.CheckXSub1
	SEC
	SBC $08
	CMP $0C
	BCS .ReturnNoContact
	BRA .CheckY
.CheckXSub2
	LDA $08
	SEC
	SBC $00
	CMP $04
	BCS .ReturnNoContact
.CheckY
	LDA $02
	CMP $0A
	BCC .CheckYSub2
.CheckYSub1
	SEC
	SBC $0A
	CMP $0E
	BCS .ReturnNoContact
.ReturnContact
	SEC
	SEP #$20
	RTS
.CheckYSub2
	LDA $0A
	SEC
	SBC $02
	CMP $06
	BCC .ReturnContact
.ReturnNoContact
	CLC
	SEP #$20
	RTS

;------------------------------------------------
; SetSomeYSpeed?? ($019A04)
;------------------------------------------------

SetSomeYSpeed:
	LDA $1588,x
	BMI .Label1
	LDA #$00
	LDY $15B8,x
	BEQ .Label2
.Label1
	LDA #$18
.Label2
	STA $AA,x
	RTS


By, the way, subroutinedefs.asm is already available.
And there's no JSL 0 in the code at all.

--------------------
Yo, it's been a while.


Code
JSL !SubVertPos

Should be %SubVertPos().

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Will this fix the JSR 0 error(that appeared from nowhere that is....maybe)?

--------------------
Yo, it's been a while.
Can only know if you try.

--------------------
It's actually working now, but I haven't tested the sprite yet in the game. But it should be good to go now. Do I need to add these changes to all the other sprites?

--------------------
Yo, it's been a while.
Yes, if you plan to use one of them.

--------------------
One last question about the giant thwomp, how do I configure the distance where it changes it's face before charging, and when it starts charging (When Mario gets close to it of course)?

--------------------
Yo, it's been a while.
I asked about the thwomp charging when Mario gets closer because I'm having a problem.
Check these images out:


The problem is that the sprite is still charging down even when Mario gets further. How do I fix this problem?

--------------------
Yo, it's been a while.
So it's been more than half a month that I asked for help about the giant thwomp's behaviour fix, because I can't let it smash even if I get further. Is there anyone familiar with this sprite? If so, can you please give me tips about this?

--------------------
Yo, it's been a while.
Is anyone familiar with the codes of this sprite?

--------------------
Yo, it's been a while.
Hey guys, it's been 4 days now, and I didn't recieve any reply about the giant Thwomp problem, I can't keep working on it if it's still smashing even if I get further. So how do I make it smash just when mario gets closer as shown previously:
Originally posted by MegaSonic1999



--------------------
Yo, it's been a while.
Ok you have bumped your own thread 4 times already, this should be indication that either people don't know, don't want to do it or have given you the info already.
I'm closing this because you are needlessly bumping it to push it to the top of the forum.
Pages: « 1 » Link - Thread Closed
Forum Index - SMW Hacking - SMW Hacking Help - Help about Imamelia's C3 2014 sprites

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks