-
Notifications
You must be signed in to change notification settings - Fork 80
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] Refactor scene_table_c.py
#272
Conversation
Thanks! Bug reports below about scene numbering, but you seem to also have noticed one so probably will be fixed in one go Deleting a scene breaks numberingFor example deleting deku tree: diff --git a/include/tables/scene_table.h b/include/tables/scene_table.h
index 0337e1252..282dfda32 100644
--- a/include/tables/scene_table.h
+++ b/include/tables/scene_table.h
@@ -9,7 +9,6 @@
* - Argument 5: ? (Unknown)
* - Argument 6: ? (Unknown)
*/
-/* 0x00 */ DEFINE_SCENE(ydan_scene, g_pn_06, SCENE_DEKU_TREE, SDC_DEKU_TREE, 1, 2)
/* 0x01 */ DEFINE_SCENE(ddan_scene, g_pn_08, SCENE_DODONGOS_CAVERN, SDC_DODONGOS_CAVERN, 1, 3)
/* 0x02 */ DEFINE_SCENE(bdan_scene, g_pn_07, SCENE_JABU_JABU, SDC_JABU_JABU, 1, 4)
/* 0x03 */ DEFINE_SCENE(Bmori1_scene, g_pn_01, SCENE_FOREST_TEMPLE, SDC_FOREST_TEMPLE, 2, 5) then the first scene starts at 0x01 Added scenes start numbering one earlyFor example adding two scenes: diff --git a/include/tables/scene_table.h b/include/tables/scene_table.h
index 0337e1252..0d2156a29 100644
--- a/include/tables/scene_table.h
+++ b/include/tables/scene_table.h
@@ -120,3 +120,5 @@
/* 0x6B */ DEFINE_SCENE(hairal_niwa2_scene, g_pn_12, SCENE_HAIRAL_NIWA2, SDC_CASTLE_COURTYARD_GUARDS, 0, 0)
/* 0x6C */ DEFINE_SCENE(sasatest_scene, none, SCENE_SASATEST, SDC_DEFAULT, 0, 0)
/* 0x6D */ DEFINE_SCENE(testroom_scene, none, SCENE_TESTROOM, SDC_DEFAULT, 0, 0)
+// Added scenes
+/* 0x6D */ DEFINE_SCENE(mydefnewscen_scene, none, SCENE_MYDEFNEWSCEN, SDC_DEKU_TREE, 0, 0)
+/* 0x6E */ DEFINE_SCENE(againsnne_scene, none, SCENE_AGAINSNNE, SDC_DEKU_TREE, 0, 0) for some reason the first one added uses 0x6D which is already SCENE_TESTROOM |
there's still newline issues but the other ones should be fixed |
newline issues should be fixed now, I also found some issues related to exporting and removing custom scenes and they should be fixed too I also added some comments and descriptions for the missing classes/functions (when the name's not self-explanatory at least) I have hope in this being good to go |
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.
Exporting a scene in HackerOoT works on this branch. I have not tried deleting scenes as I don't want to break my game.
I was too annoyed of people complaining about how the scene table has issues with HackerOoT because of how weird Fast64 handled that file, so basically started over from nothing
This new version is removing the "Enable HackerOoT Features" requirement and should keep any preprocessor things (ifdefs, includes, etc) and any comment (including multi-line ones), basically everything that isn't an actual scene entry
It should work properly but I haven't done extended testing yet and there's 2 minor issues right now (that I will fix soon™, also I need to cleanup a bit):
The benefits of this new code is improved readability and less lines (saved 26 ones)
Note: I know the spec export has minor issues (and I hate it) but that will be part of a dedicated PR