Banner
Views: 853,006,124
Time:
22 users online: brickblock369, CalHal, Cartesius, chickaDEE Magazine, Diego, Drakel,  FPzero, Green Jerry, imamelia,  JamesD28, kaigem, katun24, Kentakiman,  KevinM,  Koopster, le4che,  MiniMawile303, Mintendo, qantuum, RAFAEL_M_C_, SimFan96, SuperMarisa1999 - Guests: 67 - Bots: 66 Users: 47,043 (2,524 active)
Latest: Mintendo
Tip: Try to make a hack that is both hard enough to be challenging and easy enough to be fun.Not logged in.
Editing the Disco Ball Sprite (Resolved)
Forum Index - SMW Hacking - SMW Hacking Help - Editing the Disco Ball Sprite (Resolved)
Pages: « 1 »
I downloaded a disassembly of the "Dark Room Spotlight" (which is informally known as the disco ball) and while the graphic drawing routine is compact, I'm too poor in ASM to really make enough sense of it to do what I want, and rather then spend a few hours looking through ASM guides just to do one little thing, I thought I'd ask here, if that's okay.

How would I be able to make the sprite animate slower? As well as not cycle through every sprite palette and stick to one. I'm totally okay with inserting an edit of the disassembly as a custom sprite but if it's possible to do with some hex editing on the base sprite (doubtful) then that's cool too. Thanks.
In the disassembly, go to lines 253-254 and you should see this:

Code
LDA $13		; if the light is on...
LSR		;


The more LSR opcodes you add, the slower the animation will be.

Code
LDA $13
LSR
LSR
LSR


For reference, most of sprites in SMW use 3 LSRs.
Thanks! That's simple enough to remember. I'd still like to know how to stop it from cycling through several palettes though, as it's an annoying habit of a couple SMW sprites I've seen (the throw block sprite is a particularly egregious example that I've found frustrating whenever I wanted to replace the sprite)
Hmm, if I'm not mistaken, this is the palette animation of this sprite:
TileProperties:
db $31,$33,$35,$37,$31,$33,$35,$37,$39
Changing the values here does 2 things:
1.Change the palette.
2.Change the GFX page.
Here are the values for the palette and sprite uses the 2nd GFX page(SP3-SP4) or 1st(SP1-SP2)(Pal-Palette):

Palette and 2nd GFX page

Pal 8-31
Pal 9-33
Pal A-35
Pal B-37
Pal C-39
Pal D-3B
Pal E-3D
Pal F-3F

Palette and 1st GFX page

Pal 8-30
Pal 9-32
Pal A-34
Pal B-36
Pal C-38
Pal D-3A
Pal E-3C
Pal F-3E

Example: To make the sprite flash through only palette 8(with the 2nd GFX page on), then it would look like this:

db $31,$31,$31,$31,$31,$31,$31,$31,$31
Sorry if my explanation stinks.

--------------------
You can download my VLDC12 entry Here - final update
Thank you very much! The sprite works exactly how I wanted it to now, and I've learned a couple valuable things too. Thanks a bunch.
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - Editing the Disco Ball Sprite (Resolved)

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

Copyright © 2005 - 2020 - 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