Banner
Views: 236,398,902
Time: 2013-05-23 08:48:46 AM
12 users online: Daniel08, Falconpunch, K1ngHacks, Kazeshin, o Ladida, LadiesMan_217, LaughingLuigi, o ShadowPhoenix, SMW_Forever, Torchkas, yoshiguy978, Z0mbie1337 - Guests: 31 - Bots: 11Users: 22,868 (1,278 active)
Latest: LuckyDearly
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.
? Ball Question
Forum Index - SMW Hacking - General SMW Hacking Help - ? Ball Question
Pages: « 1 »
Why exactly is the green ? Ball backwards in the GFX file?
It's most likely related to shared sprite GFX routines. The entire code of the goal sphere sprite is this:

Code
GoalSphere: 20 0D 9F JSR.W SubSprGfx2Entry1 CODE_018766: A5 9D LDA RAM_SpritesLocked ; \ Branch if sprites locked CODE_018768: D0 1E BNE Return018788 ; / CODE_01876A: A5 13 LDA RAM_FrameCounter CODE_01876C: 29 1F AND.B #$1F CODE_01876E: 05 9D ORA RAM_SpritesLocked CODE_018770: 20 52 B1 JSR.W CODE_01B152 CODE_018773: 20 E4 A7 JSR.W MarioSprInteractRt CODE_018776: 90 10 BCC Return018788 CODE_018778: 9E C8 14 STZ.W $14C8,X CODE_01877B: A9 FF LDA.B #$FF CODE_01877D: 8D 93 14 STA.W $1493 CODE_018780: 8D DA 0D STA.W $0DDA CODE_018783: A9 0B LDA.B #$0B CODE_018785: 8D FB 1D STA.W $1DFB ; / Change music Return018788: 60 RTS ; Return


Normally, sprite tiles get X-flipped when the sprite is facing right, but right will be the default direction for them if the direction is never set. The goal sphere doesn't do anything related to the graphics other than call a shared GFX routine (SubSprGfx2Entry1), and it never sets its direction because it doesn't need to, so it is automatically always "facing" right, so the shared GFX routine flips the tile it uses. If you wanted to change this, the best way might be to make the sprite's init routine set its direction to left so that the tile doesn't get flipped (or just use a custom sprite). Assuming that you are a) using a headered ROM and b) not using Tessera, a patch to do that might look like this:

Code
header lorom org $018211 dw NewGoalSphereInitRt org $01CD27 NewGoalSphereInitRt: INC $157C,x RTS
My brain hurts.

Actually, it doesn't matter. I was just curious, and was wondering if I was doing anything wrong by SMB3-ing it and also making it backwards.
Last edited on 2012-03-02 09:21:06 AM by Roads1.
That isn't the only sprite flipped backwards; the feather, mushroom, piranha plant, info box, key, and Yoshi's egg are backwards as well, and there's probably a lot more.
Pages: « 1 »
Forum Index - SMW Hacking - General SMW Hacking Help - ? Ball Question

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

Copyright © 2005 - 2013 - SMW Central
Legal Information - Link To Us


Total queries: 29

Menu