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

[OoT] New Exporter #256

Merged
merged 104 commits into from
Jul 26, 2024
Merged

[OoT] New Exporter #256

merged 104 commits into from
Jul 26, 2024

Conversation

Yanis42
Copy link
Contributor

@Yanis42 Yanis42 commented Sep 26, 2023

This is something I wanted to do for a while, it should work properly according to my tests (thanks again to Richie for that)

This relies on dataclasses, I don't think it's the best thing for performances but at least it makes the code easy to follow imo, also it includes functions to get C data so it's kinda 2 in 1, this makes you able to call one of the classes to export a specific type of data, I did that for cutscenes and collisions (collisions required more changes but cutscenes are a one-line change)

Anyway this was fun to make!


Any feedback/suggestions is appreciated! (the diff is huge but this doesn't edit a lot of the original files, most of the diff comes from new files I created)

Extra note: this fix the known issues related to waterbox duplicates, paths and the file(s) being inconsistent at export time, for instance actor entries swapping in the actor list for no reasons


This exporter has everything in the same place (inside the exporter folder) instead of having bits of export scattered here and there, I think it makes more sense like this

@kurethedead
Copy link
Contributor

I'm sorry about the extra work, but I did state that I thought init=False was not a good fit for the issues at hand, so I'm not sure why you went ahead with that without more discussion. I think you're missing the main point, which is that there are other issues related to the current code organization besides init=False that you aren't addressing. What I'm describing is a code debt issue, not a style issue. The fix I suggested wouldn't break the system you're describing at all, its still the same basic idea.

@Yanis42
Copy link
Contributor Author

Yanis42 commented Apr 18, 2024

I'll try to do the changes soon, I think it's dumb that my own opinions are blocking this cool thing

Copy link
Contributor

@kurethedead kurethedead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are good so far - there's just a couple spots missed where factory functions should be used to replace storing temporary objects as members. (Also, some other minor code organization issues). After this PR is merged I think the deletion of the old code should happen ASAP - its pretty confusing when trying to review seeing the same class defined twice in the codebase. For future PRs the deletion should be part of the PR.

fast64_internal/oot/exporter/classes.py Outdated Show resolved Hide resolved
fast64_internal/oot/exporter/collision/__init__.py Outdated Show resolved Hide resolved
fast64_internal/oot/exporter/collision/surface.py Outdated Show resolved Hide resolved
fast64_internal/oot/exporter/collision/waterbox.py Outdated Show resolved Hide resolved
fast64_internal/oot/exporter/room/header.py Outdated Show resolved Hide resolved
fast64_internal/oot/exporter/other/spec.py Outdated Show resolved Hide resolved
fast64_internal/oot/exporter/other/spec.py Outdated Show resolved Hide resolved
fast64_internal/oot/exporter/other/spec.py Outdated Show resolved Hide resolved
fast64_internal/oot/exporter/other/spec.py Outdated Show resolved Hide resolved
fast64_internal/oot/exporter/other/spec.py Outdated Show resolved Hide resolved
Yanis42 and others added 18 commits July 18, 2024 17:13
Refactor decomp edit files + SceneExport
* Deleted scene\exporter, fixed missing code references

* Removed unused code from oot_level_writer and oot_level_classes

* Removed oot_level_writer, contents moved into appropriate files

* Remove unused OOTRoom

* Black format
* Deleted scene\exporter, fixed missing code references

* Removed unused code from oot_level_writer and oot_level_classes

* Removed oot_level_writer, contents moved into appropriate files

* Remove unused OOTRoom

* Black format

* Create shape2.py

* Refactor room shape

* Remove old files

* Remove mesh.py

* Remove old comments

* Delete old code
* Deleted scene\exporter, fixed missing code references

* Removed unused code from oot_level_writer and oot_level_classes

* Removed oot_level_writer, contents moved into appropriate files

* Remove unused OOTRoom

* Black format

* Create shape2.py

* Refactor room shape

* Remove old files

* Remove mesh.py

* Remove old comments

* Delete old code

* Add occlusion plane system to new exporter
Copy link
Contributor

@kurethedead kurethedead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've only done very basic tests, but in terms of code organization I think this is good to go. I'll merge this soon unless any issues appear.

@kurethedead kurethedead merged commit 79fa1a8 into Fast-64:main Jul 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oot Has to do with the Ocarina of Time 64 side
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants