Bläddra i källkod

Merge pull request #125 from paulsapps/installer

Update metadata, output better model names
paulsapps 11 år sedan
förälder
incheckning
2b7b401eb9

+ 1 - 1
dependencies/SUDM

@@ -1 +1 @@
-Subproject commit a9aa8eb8e4bb7bdce7aa7a8a495da24c834914d1
+Subproject commit bd17bdc33a0424d605932f6269b0591aefa547c0

+ 45 - 19
output/field_models_and_animation_metadata.xml

@@ -62,6 +62,13 @@
 			<var Bank="3" Address="217" Name="act1_7_flags1"/>
 			<var Bank="3" Address="223" Name="act1_1_flags4"/>
 			
+			<var Bank="6" Address="0" Name="triangleId"/>
+			<var Bank="6" Address="6" Name="expectedTriangleId"/>
+			<var Bank="6" Address="9" Name="movieFrameNumber"/>
+			
+			<var Bank="5" Address="21" Name="bMoviePlaying"/>
+			<var Bank="5" Address="11" Name="bMoviePastFrame30"/>
+		
 			<var Bank="13" Address="30" Name="pointer"/>
 			<var Bank="13" Address="31" Name="materia_full"/>
 			<var Bank="13" Address="91" Name="save_flag"/>
@@ -120,14 +127,16 @@
 		
 			<entity name="marine" new="Marlene"/>
 			
-			<entity name="drL" new="door_left"/>
-			<entity name="drR" new="door_right"/>
+			<entity name="drL" new="DoorLeft"/>
+			<entity name="drR" new="DoorRight"/>
 		
 			
 		</entity_names>
 		
 		<!-- Apply only to the given field, overrides the "global data -->
 		<field name="md1stin">
+				
+			<!-- TODO correct namess -->
 			<function entity_name="test" name="f1" new="action1" />
 			
 			<function entity_name="test" name="f2" new="action1" Comment="Barret run from train and invite Cloud" />
@@ -159,27 +168,33 @@
 		</field>
 		
 		<field name="md1_1">
-			<function name="f1" new="scene_part_1" Comment="Move Cloud to talk position for the scene." />
-			<function name="f2" new="scene_part_5" Comment="Cloud reply his name to Avalanche." />
-			<function name="f3" new="scene_part_9" />
-			<function name="f4" new="scene_part_14" />
-			<function name="f5" new="scene_part_16" Comment="look at reactor and run after Barret and others." />
-			
-			<function name="f6" new="scene_part_8" />
-			<function name="f7" new="scene_part_13" />
-			<function name="f8" new="scene_part_15" />
+			<!-- TODO not applied -->
+			<entity name="entity_8" new="Movie" />
+
+			<function entity_name="Cloud" name="script_3" new="scene_part_1" Comment="Move Cloud to talk position for the scene." />
+			<function entity_name="Cloud" name="script_5" new="scene_part_5" Comment="Cloud reply his name to Avalanche." />
+			<function entity_name="Cloud" name="script_6" new="scene_part_6" Comment="Cloud tells Biggs that he didn't care about names." />
+			<function entity_name="Cloud" name="script_7" new="scene_part_9" />
+			<function entity_name="Cloud" name="script_8" new="scene_part_14" />
+			<function entity_name="Cloud" name="script_9" new="scene_part_16" Comment="look at reactor and run after Barret and others." />
 			
-			<function name="f9" new="scene_part_2" Comment="Turn to Cloud and start talk to him." />
-			<function name="f10" new="scene_part_4" Comment="Dialog with Jessie and Cloud. We input Cloud name during this scene and call Cloud reply." />
+			<function entity_name="Barret" name="script_3" new="scene_part_8" />
+			<function entity_name="Barret" name="script_4" new="scene_part_13" />
+			<function entity_name="Barret" name="script_5" new="scene_part_15" />
 			
-			<function name="f11" new="scene_part_7" />
-			<function name="f12" new="scene_part_11" />
+			<function entity_name="Biggs" name="script_3" new="scene_part_2" Comment="Turn to Cloud and start talk to him." />
+			<function entity_name="Biggs" name="script_4" new="scene_part_4" Comment="Dialog with Jessie and Cloud. We input Cloud name during this scene and call Cloud reply." />
+			<function entity_name="Biggs" name="script_5" new="scene_part_7" />
+			<function entity_name="Biggs" name="script_6" new="scene_part_11" />
 		
-			<function name="f13" new="scene_part_3" Comment="Stop breaking gate for a while and talk." />
-			<function name="f14" new="scene_part_10" />
+			<function entity_name="Jessie" name="script_3" new="scene_part_3" Comment="Stop breaking gate for a while and talk." />
+			<function entity_name="Jessie" name="script_4" new="scene_part_10" />
+			
+			<function entity_name="Wedge" name="script_3" new="scene_part_12" />
+			
+			<function entity_name="DoorLeft" name="script_3" new="open" />
+			<function entity_name="DoorRight" name="script_3" new="open" />
 			
-			<function name="f15" new="scene_part_12" />
-		
 		</field>
 		
 	</scripts>
@@ -212,6 +227,17 @@
 		<animation name="bxhf" target="Dead2"></animation>
 		<animation name="bxia" target="Throwed"></animation>
 	
+		<animation name="auee" target="LookAtPeople"></animation>
+		<animation name="ajdd" target="TalkNo"></animation>
+		<animation name="bxib" target="Idle"></animation>
+		<animation name="bxic" target="TalkGesture"></animation>
+		<animation name="bxid" target="BreakUp"></animation>
+		<animation name="bxie" target="BreakUpLookBack"></animation>
+		<animation name="bxif" target="BreakUpGetUp"></animation>
+		<animation name="bxja" target="LookAround"></animation>
+	
+		<animation name="bxjf" target="DoorIdle"></animation>
+	
 		
 		<animation name="adcb" target="Idle"></animation>
 		<animation name="adcc" target="Walk"></animation>

+ 11 - 8
utilities/q-gears-launcher/src/ff7DataInstaller.cpp

@@ -72,13 +72,16 @@ static std::string FieldModelDir()
 // TOOD: Share with pc model exporter
 static void exportMesh(std::string outdir, const Ogre::MeshPtr &mesh)
 {
+    QGears::String baseMeshName;
+    QGears::StringUtil::splitFull(mesh->getName(), baseMeshName);
+
     Ogre::MeshSerializer        mesh_ser;
 
     Ogre::SkeletonPtr           skeleton(mesh->getSkeleton());
     Ogre::SkeletonSerializer    sk_ser;
-    sk_ser.exportSkeleton(skeleton.getPointer(), outdir +  skeleton->getName());
+    sk_ser.exportSkeleton(skeleton.getPointer(), outdir + baseMeshName + ".skeleton");
 
-    mesh->setSkeletonName(FieldModelDir() + "/" + mesh->getSkeletonName());
+    mesh->setSkeletonName(FieldModelDir() + "/" + baseMeshName + ".skeleton");
 
     mesh_ser.exportMesh(mesh.getPointer(), outdir + mesh->getName());
 
@@ -114,7 +117,7 @@ static void exportMesh(std::string outdir, const Ogre::MeshPtr &mesh)
                                         textures.insert(unit->getTextureName());
                                         Ogre::String baseName;
                                         QGears::StringUtil::splitBase(unit->getTextureName(), baseName);
-                                        unit->setTextureName(FieldModelDir() + "/" + baseName + ".png");
+                                        unit->setTextureName(FieldModelDir() + "/" + baseMeshName + "_" + baseName + ".png");
                                     }
                                 }
                             }
@@ -127,9 +130,8 @@ static void exportMesh(std::string outdir, const Ogre::MeshPtr &mesh)
         }
         ++i;
     }
-    QGears::String base_name;
-    QGears::StringUtil::splitFull(mesh->getName(), base_name);
-    mat_ser.exportQueued(outdir + base_name + QGears::EXT_MATERIAL);
+
+    mat_ser.exportQueued(outdir + baseMeshName + QGears::EXT_MATERIAL);
 
     for (auto& textureName : textures)
     {
@@ -139,7 +141,7 @@ static void exportMesh(std::string outdir, const Ogre::MeshPtr &mesh)
 
         Ogre::String baseName;
         QGears::StringUtil::splitBase(textureName, baseName);
-        image.save(outdir + baseName + ".png");
+        image.save(outdir + baseMeshName + "_" + baseName + ".png");
     }
 }
 
@@ -863,6 +865,7 @@ static bool IsTestField(Ogre::String& resourceName)
         resourceName == "md1stin" ||
         resourceName == "md1_1" ||
         resourceName == "md1_2" ||
+        resourceName == "md8_1" ||
         resourceName == "nmkin_1" ||
         resourceName == "nmkin_2" ||
         resourceName == "nmkin_3" ||
@@ -977,7 +980,7 @@ void FF7DataInstaller::ConvertFields(std::string archive, std::string inputDir,
             QGears::AFileManager       &afl_mgr(QGears::AFileManager::getSingleton());
             QGears::AFilePtr  a = afl_mgr.load(anim, "FFVII").staticCast<QGears::AFile>();
 
-            // Convert the FF7 name to a more readble name set in the meta data
+            // Convert the FF7 name to a more readable name set in the meta data
             Ogre::String baseName;
             QGears::StringUtil::splitBase(anim, baseName);
             a->addTo(skeleton, QGears::FF7::NameLookup::animation(baseName));