Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

EarthBound/ASM/Palette Routines: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(Document more subroutines)
Line 6: Line 6:


==<tt>$C0030F-$C0035A</tt>: Iterate map palette animation frame<span class="anchor" id="$C0030F"></span>==
==<tt>$C0030F-$C0035A</tt>: Iterate map palette animation frame<span class="anchor" id="$C0030F"></span>==
Decrements [[EarthBound:Palette_Memory#$7E445C|Animation Palette Remaining Frames]], and if zero, updates WRAM ([[EarthBound:Palette_Memory#$7E445E|Animation Palette Number]] and Animation Palette Remaining Frames) for the next animation palette and calls the subroutine at [[#$C0A1F2|$C0A1F2]] to load the next palette.
==<tt>$C0A1F2-$C0A20B</tt>: Load map palette animation palette<span class="anchor" id="$C0A1F2"></span>==
Loads a palette from [[EarthBound:Palette_Memory#$7EB800|Decompressed Map Animation Palettes]] and replaces the current map palette.
===Inputs===
* <tt>accumulator</tt>: Map animation palette number


[[Category:EarthBound:ASM|Palette Routines]]
[[Category:EarthBound:ASM|Palette Routines]]
{{Internal Data|game=EarthBound}}
{{Internal Data|game=EarthBound}}
{{stub}}
{{stub}}

Revision as of 17:40, 17 July 2023

This is a sub-page of EarthBound/ASM.

$C0023F-$C0030E: Load map palette animation

First checks if the currently loaded map palette is animated, as indicated by a non-zero Palette Animation Index and a non-zero Animation Number of Palettes for that animation index, and sets the Animation Palette Active Flag accordingly in WRAM. If the palette is animated, loads Decompressed Map Animation Palettes, Animation Palette Frame Durations, Animation Palette Remaining Frames, and Animation Palette Number to WRAM.

$C0030F-$C0035A: Iterate map palette animation frame

Decrements Animation Palette Remaining Frames, and if zero, updates WRAM (Animation Palette Number and Animation Palette Remaining Frames) for the next animation palette and calls the subroutine at $C0A1F2 to load the next palette.

$C0A1F2-$C0A20B: Load map palette animation palette

Loads a palette from Decompressed Map Animation Palettes and replaces the current map palette.

Inputs

  • accumulator: Map animation palette number
So very stubbly.
This page is rather stubbly and could use some expansion.
Are you a bad enough dude to rescue this article?