Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crtower3 Parameter 255 missing #24

Open
Sebanisu opened this issue Oct 5, 2021 · 3 comments
Open

crtower3 Parameter 255 missing #24

Sebanisu opened this issue Oct 5, 2021 · 3 comments

Comments

@Sebanisu
Copy link

Sebanisu commented Oct 5, 2021

ctrtower3 keeps the flame animation in palette 8, parameter 255, with 11 states.
parameter 255 missing:
image

Here's a snap of an app I'm working on. I was trying to find the torch animation:
image

image

I'm still alittle confused to where this flame is animated in the scripts.

@Sebanisu
Copy link
Author

Sebanisu commented Oct 5, 2021

Here is a dump of tiles from the map:
crtower3.map.xlsx

@myst6re
Copy link
Owner

myst6re commented Oct 6, 2021

For me the parameter 255 does not contains states, but I was maybe mistaken :)

@Sebanisu
Copy link
Author

Sebanisu commented Oct 6, 2021

I think this isn't that common. In OpenVIII I was also filtering by 0xFF.
Yesterday I tried to alter the filter by first scanning parameter 255 with a state greater than 1 and collecting what palette it was using.

var palettes_animating = _quads
  .Where(x => x.AnimationID == 0xFF && x.AnimationState != 0)
  .Select(x => x.PaletteID).Distinct().ToList();

When scanning for parameters and states also adding parameter 255 if the palette was detected.

            _animations = _quads.Where(x => x.AnimationID != 0xFF 
                                 || (x.AnimationID == 0xFF && palettes_animating.Contains(x.PaletteID)))
                .Select(x => x.AnimationID)
                .Distinct()
                .ToDictionary(x => x, x => _quads
                .Where(y => y.AnimationID == x && (x != 0xFF 
                                 || (x == 0xFF && palettes_animating.Contains(y.PaletteID))))
                .OrderBy(y => y.AnimationState)
                .ToList());
            _animations.ForEach(x => x.Value.Where(y => y.AnimationState != 0).ForEach(w => w.Hide()));

Though I didn't spend much time on it. The flame started showing up but it wasn't bug free (skipped a frame or something else). For some reason the flame's z axis is behind the sky. I haven't seen it in game in so long I wonder what it supposed to look like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants