Banner
Views: 926,252,807
Time:
23 users online: akari1129,  Anorakun,  brickblock369, bucko, Bumpty, ByLHacks,  Carld923, chickaDEE Magazine, Darknubs, DoodleMyNoodle, gui,  idol,  JamesD28, KevinM, KungFuFurby,  Lazy, lx5, Mirann, muzzl, nicknicknick2020, Pancake001,  Teows, TheJank - Guests: 97 - Bots: 75 Users: 51,773 (2,052 active)
Latest: ByLHacks
Tip: Using the retry system in your Kaizo: Light hack is recommended.
Not logged in.
Change Sprite Palette
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Change Sprite Palette
Pages: « 1 » Link
Hello,

I use the Platform Megapack in several levels of my hack. I want to change the palette number that vwrap_platform.asm (Vertically-wrapping Brown Platform) uses. How can I achieve that?

This is the code of the relevant platform:

Code
!falldown_timer = !1564
!platform_prop = !1594
!behavior = !C2
!offset = #(ss3-mpm_init_pointers)>>1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Grey falling platform
;
;	Init
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Platform_clip3:
db $2F,$33,$2F,$33
Platform_properties3:
db $00,$02,$00,$02
Platform_yspeed3:
db $10,$10,$F0,$F0

ss3_init:
		LDA #$01
		STA !15F6,x

		LDA !7FAB40,x
		SEC
		SBC.b !offset
		TAY

		LDA Platform_clip3,y
		STA !1662,x
		
		LDA Platform_properties3,y
		STA !platform_prop,x
		
		LDA Platform_yspeed3,y
		STA !AA,x
		
		RTS
		
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;		Main
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

ss3_main:
		LDA !platform_prop,x
		AND #$03
		INC
		INC
		
		JSR Shared_GFX			; Graphics routine

		LDA $9D					; Animation lock flag
		BNE ss3_return			; "freeze!"

		LDA #$00
		%SubOffScreen()
		
		JSL $01801A		; Update Y position	
	
		JSL $01B44F		; solid sprite
	
		LDA !AA,x
		BMI ss3_WrapUp
	ss3_WrapDown:
			JSR WrapDown
			RTS
	
	ss3_WrapUp:
			JSR WrapUp
	
	ss3_return:
		RTS


Thanks in advance!

--------------------
Mario Quits - My Kaizo hack in progress
The palette (and other properties) is stored here:
Code
LDA #$01
STA !15F6,x

You can change the #$01 to other values to change the palette:
- $01: palette 8
- $03: palette 9
- $05: palette A
- $07: palette B
etc.

You can also remove those two lines altogether: this should make the platform use the palette that you set in the CFG file (which you can edit using CFG editor).
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Change Sprite Palette

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