From 04452ad919e4121db333c4a9d83dd68182c74db0 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 20 Jan 2017 14:20:19 -1000 Subject: [PATCH] Windows fixes --- DataSpec/DNACommon/MAPA.cpp | 1 + DataSpec/DNAMP1/FRME.cpp | 28 ++++++++++++++++++--------- Runtime/Audio/CStreamAudioManager.cpp | 2 +- Runtime/MP1/MP1.cpp | 2 +- hecl | 2 +- nod | 2 +- 6 files changed, 24 insertions(+), 13 deletions(-) diff --git a/DataSpec/DNACommon/MAPA.cpp b/DataSpec/DNACommon/MAPA.cpp index 1427945f6..4d1db0afe 100644 --- a/DataSpec/DNACommon/MAPA.cpp +++ b/DataSpec/DNACommon/MAPA.cpp @@ -282,6 +282,7 @@ bool ReadMAPAToBlender(hecl::BlenderConnection& conn, os << "mesh = bpy.data.meshes.new('MAP')\n" + "mesh.show_edge_seams = True\n" "obj = bpy.data.objects.new(mesh.name, mesh)\n" "bm.to_mesh(mesh)\n" "bpy.context.scene.objects.link(obj)\n" diff --git a/DataSpec/DNAMP1/FRME.cpp b/DataSpec/DNAMP1/FRME.cpp index 8df387e0f..99e9ccb20 100644 --- a/DataSpec/DNAMP1/FRME.cpp +++ b/DataSpec/DNAMP1/FRME.cpp @@ -470,13 +470,24 @@ bool FRME::Extract(const SpecBase &dataSpec, } resPath = pakRouter.getResourceRelativePath(entry, info->texture); } - hecl::SystemUTF8View resPathView(resPath); - os.format("if '%s' in bpy.data.images:\n" - " image = bpy.data.images['%s']\n" - "else:\n" - " image = bpy.data.images.load('''//%s''')\n" - " image.name = '%s'\n" - "material = bpy.data.materials.new('%s')\n" + + if (resPath.size()) + { + hecl::SystemUTF8View resPathView(resPath); + os.format("if '%s' in bpy.data.images:\n" + " image = bpy.data.images['%s']\n" + "else:\n" + " image = bpy.data.images.load('''//%s''')\n" + " image.name = '%s'\n", + texName.c_str(), texName.c_str(), + resPathView.str().c_str(), texName.c_str()); + } + else + { + os << "image = None\n"; + } + + os.format("material = bpy.data.materials.new('%s')\n" "material.specular_intensity = 0.0\n" "tex_slot = material.texture_slots.add()\n" "tex_slot.texture = bpy.data.textures.new('%s', 'IMAGE')\n" @@ -484,9 +495,8 @@ bool FRME::Extract(const SpecBase &dataSpec, "material.active_texture = tex_slot.texture\n" "bm = bmesh.new()\n" "verts = []\n", - texName.c_str(), texName.c_str(), - resPathView.str().c_str(), texName.c_str(), w.header.name.c_str(), w.header.name.c_str()); + for (int i=0 ; iquadCoordCount ; ++i) { int ti; diff --git a/Runtime/Audio/CStreamAudioManager.cpp b/Runtime/Audio/CStreamAudioManager.cpp index 342b5bd3c..2f8b04c2f 100644 --- a/Runtime/Audio/CStreamAudioManager.cpp +++ b/Runtime/Audio/CStreamAudioManager.cpp @@ -921,7 +921,7 @@ struct SDSPPlayer { std::string x0_fileName; EPlayerState x10_playState = EPlayerState::Stopped; - float x14_volume = 0.0; + float x14_volume = 0.f; float x18_fadeIn = 0.f; float x1c_fadeOut = 0.f; u32 x20_internalHandle = -1; diff --git a/Runtime/MP1/MP1.cpp b/Runtime/MP1/MP1.cpp index ad5f9ca84..80ac3727d 100644 --- a/Runtime/MP1/MP1.cpp +++ b/Runtime/MP1/MP1.cpp @@ -232,7 +232,7 @@ void CMain::Init(const hecl::Runtime::FileStoreManager& storeMgr, x164_archSupport->PreloadAudio(); //g_TweakManager->ReadFromMemoryCard("AudioTweaks"); - CStreamAudioManager::Start(false, "Audio/rui_samusL.dsp|Audio/rui_samusR.dsp", 0x7f, true, 1.f, 1.f); + //CStreamAudioManager::Start(false, "Audio/rui_samusL.dsp|Audio/rui_samusR.dsp", 0x7f, true, 1.f, 1.f); } bool CMain::Proc() diff --git a/hecl b/hecl index 3ecbf32de..92be70739 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 3ecbf32de81e1b3c76ad9519ca728a8fc2debe0b +Subproject commit 92be7073997f5a4ea4a040b893a11eed3dca5b70 diff --git a/nod b/nod index bb6a5ff44..b3a76428d 160000 --- a/nod +++ b/nod @@ -1 +1 @@ -Subproject commit bb6a5ff4446536bfda10dab4506988d8227363f3 +Subproject commit b3a76428da3bfb83bd973f985b0760a6b55c2abe