some audio things
[carveJwlIkooP6JGAAIwe30JlM.git] / blender_export.py
index a12850b2b347f02b0391166b8cb90ed191716083..3e4704ea466fa1e6d8d97eb3a4f44b6bb0dee6f2 100644 (file)
@@ -782,6 +782,11 @@ class classtype_audio(Structure):
       if obj.cv_data.bp1: flags |= 0x4
       if obj.cv_data.bp2: flags |= 0x8
 
+      if obj.cv_data.audio_format == 'stereo':
+         flags |= 0x200
+      if obj.cv_data.audio_format == 'remain compressed':
+         flags |= 0x400
+
       _.flags = flags
       _.volume = obj.cv_data.fltp
    #}
@@ -789,11 +794,14 @@ class classtype_audio(Structure):
    @staticmethod
    def editor_interface( layout, obj ):
    #{
-      layout.prop( obj.cv_data, "strp" )
+      layout.prop( obj.cv_data, "strp", text = "File (.ogg)" )
 
       layout.prop( obj.cv_data, "bp0", text = "Looping" )
       layout.prop( obj.cv_data, "bp1", text = "3D Audio" )
       layout.prop( obj.cv_data, "bp2", text = "Auto Start" )
+      layout.prop( obj.cv_data, "audio_format" )
+
+      layout.prop( obj.cv_data, "fltp", text = "Volume (0-1)" )
    #}
 
    @staticmethod
@@ -1266,6 +1274,7 @@ def encoder_process_material( mat ):
    if mat.cv_data.surface_prop == 'concrete': dest.surface_prop = 0
    if mat.cv_data.surface_prop == 'wood': dest.surface_prop = 1
    if mat.cv_data.surface_prop == 'grass': dest.surface_prop = 2
+   if mat.cv_data.surface_prop == 'tiles': dest.surface_prop = 3
 
    if mat.cv_data.shader == 'standard': dest.shader = 0
    if mat.cv_data.shader == 'standard_cutout': dest.shader = 1
@@ -2714,6 +2723,14 @@ class CV_OBJ_SETTINGS(bpy.types.PropertyGroup):
       ('classtype_spawn_link',"classtype_spawn_link","",150),
       ('classtype_nonlocal_gate', "classtype_nonlocal_gate", "", 300)
       ])
+
+   audio_format: bpy.props.EnumProperty(
+      name="Loaded format",
+      items = [
+         ('mono', "mono", "", 0),
+         ('stereo', "stereo", "", 1),
+         ('remain compressed', "remain compressed", "", 2)
+      ])
 #}
 
 class CV_BONE_SETTINGS(bpy.types.PropertyGroup):
@@ -2798,7 +2815,8 @@ class CV_MATERIAL_SETTINGS(bpy.types.PropertyGroup):
       items = [
       ('concrete','concrete','',0),
       ('wood','wood','',1),
-      ('grass','grass','',2)
+      ('grass','grass','',2),
+      ('tiles','tiles','',3)
       ])
    
    collision: bpy.props.BoolProperty( \