-
Notifications
You must be signed in to change notification settings - Fork 45
New Animated Material types #192
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
Conversation
|
should be ready now, I don't think I want to add anything else |
Reonu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature needs to be documented in a wiki or similar when you have time because it's pretty complex and easy to mess up. But the PR itself looks good to me, it works.
|
will merge tomorrow at the same time we'll merge the fast64 PR |
Still a draft but I feel like I'm getting close to the end, this PR adds the following:
Details about the event manager
The event manager I made can be used for anything, I have a lot of ideas of usage that can't be done here since it's unrelated but it'll do more cool stuff in the future! To setup one for animated materials it's very simple:
as you can see it's very similar to how cutscene works (don't mind
EVENT_FREEZE_TYPE_NONEyet it's started by unfinished), you just need to do that then in this case useeventsin theAnimatedMaterialentry like:to use that anywhere you only need to setup the data then run
EventManager_ProcessScript, it will return true or false depending on if the events to watch are completedDetails about the new animated material types
As stated earlier, this adds new types of animated materials:
ANIM_MAT_TYPE_COLOR_CYCLE: same as the originalANIM_MAT_TYPE_COLORexcept this can take a keyframe array to set the duration of the displayed colorsANIM_MAT_TYPE_TEX_TIMED_CYCLE: exact same principle as above except it's textures instead of colorsANIM_MAT_TYPE_TEXTURE: draws a simple texture, makes more sense to use with an attached event to allow you to swap between 2 textures, it can be useful for time of day-based entrances like vanilla OoT doesANIM_MAT_TYPE_MULTITEXTURE: this one can do many things depending on how you're using it, the basics of this type is it can be same as above except you can blend the textures to make a smooth transition and you can also change the opacity of the textures, this allows you to have a lot of possibilitiesANIM_MAT_TYPE_EVENT: this will draw the material only when the events are completed, it's unfinished/untested but I think it should work assuming the mesh's DL is correctANIM_MAT_TYPE_SURFACE_SWAP: this allows you to swap surface types, you can use it just for that purpose or you can also provide a list of tris, that will allow you to change the surface types they're attached to but also change the polygon's flagsANIM_MAT_TYPE_OSCILLATING_TWO_TEX: this is exactly like the original two texture scroll except this adds oscillation instead of moving forever in the same direction (provided by kenton)I'm not done yet but I'm making good progress, also I'll have to update Fast64 but I'll do that when I'll be satisfied with my types
These new types and the event manager are both based on z64rom, thanks to them for such creativity! (and letting me making my own implementation based on their work)
related Fast64 PR: Fast-64/fast64#623