# Path: xnb_parse/type_reader.py
# class EnumTypeReader(ValueTypeReader):
#     is_enum_type = True
#     enum_type = None
#     enum_type4 = None
# 
#     def read(self):
#         value = self.stream.read_int32()
#         if self.file_version == VERSION_40 and self.enum_type4 is not None:
#             enum_type = self.enum_type4
#         else:
#             enum_type = self.enum_type
#         if callable(enum_type):
#             return enum_type(value)
#         else:
#             return value
# 
# class TypeReaderPlugin(Plugin):
#     """
#     type reader plugins
#     """
# 
# class ValueTypeReader(BaseTypeReader):
#     is_value_type = True
# 
# Path: xnb_parse/xna_types/mercury/basic.py
# class BlendMode(Enum):
#     __slots__ = ()
#     enum_values = dict(enumerate(['Add', 'Alpha', 'Subtract', 'Multiply', 'None']))
# 
# class VariableFloat(_VariableFloat):
#     __slots__ = ()
# 
# class VariableFloat3(_VariableFloat3):
#     __slots__ = ()


from xnb_parse.type_reader import EnumTypeReader, TypeReaderPlugin, ValueTypeReader
from xnb_parse.xna_types.mercury.basic import BlendMode, VariableFloat, VariableFloat3
mercury particle engine basic type readers
"""

from __future__ import print_function



class VariableFloatReader(ValueTypeReader, TypeReaderPlugin):
    target_type = 'ProjectMercury.VariableFloat'
    reader_name = 'Microsoft.Xna.Framework.Content.ReflectiveReader`1[ProjectMercury.VariableFloat]'

    def read(self):
        value = self.stream.read_single()
        variation = self.stream.read_single()
        return VariableFloat(value, variation)


class VariableFloat3Reader(ValueTypeReader, TypeReaderPlugin):
    target_type = 'ProjectMercury.VariableFloat3'
    reader_name = 'Microsoft.Xna.Framework.Content.ReflectiveReader`1[ProjectMercury.VariableFloat3]'

    def read(self):
        value = self.stream.read_vector3()
        variation = self.stream.read_vector3()
        return VariableFloat3(value, variation)


class BlendModeReader(EnumTypeReader, TypeReaderPlugin):
    target_type = 'ProjectMercury.BlendMode'
    reader_name = 'ProjectMercury.BlendMode'

# Path: xnb_parse/type_reader.py
# class EnumTypeReader(ValueTypeReader):
#     is_enum_type = True
#     enum_type = None
#     enum_type4 = None
# 
#     def read(self):
#         value = self.stream.read_int32()
#         if self.file_version == VERSION_40 and self.enum_type4 is not None:
#             enum_type = self.enum_type4
#         else:
#             enum_type = self.enum_type
#         if callable(enum_type):
#             return enum_type(value)
#         else:
#             return value
# 
# class TypeReaderPlugin(Plugin):
#     """
#     type reader plugins
#     """
# 
# class ValueTypeReader(BaseTypeReader):
#     is_value_type = True
# 
# Path: xnb_parse/xna_types/mercury/basic.py
# class BlendMode(Enum):
#     __slots__ = ()
#     enum_values = dict(enumerate(['Add', 'Alpha', 'Subtract', 'Multiply', 'None']))
# 
# class VariableFloat(_VariableFloat):
#     __slots__ = ()
# 
# class VariableFloat3(_VariableFloat3):
#     __slots__ = ()


# Path: xnb_parse/type_readers/mercury/basic.py
from xnb_parse.type_reader import EnumTypeReader, TypeReaderPlugin, ValueTypeReader
from xnb_parse.xna_types.mercury.basic import BlendMode, VariableFloat, VariableFloat3

mercury particle engine basic type readers
"""

from __future__ import print_function



class VariableFloatReader(ValueTypeReader, TypeReaderPlugin):
    target_type = 'ProjectMercury.VariableFloat'
    reader_name = 'Microsoft.Xna.Framework.Content.ReflectiveReader`1[ProjectMercury.VariableFloat]'

    def read(self):
        value = self.stream.read_single()
        variation = self.stream.read_single()
        return VariableFloat(value, variation)


class VariableFloat3Reader(ValueTypeReader, TypeReaderPlugin):
    target_type = 'ProjectMercury.VariableFloat3'
    reader_name = 'Microsoft.Xna.Framework.Content.ReflectiveReader`1[ProjectMercury.VariableFloat3]'

    def read(self):
        value = self.stream.read_vector3()
        variation = self.stream.read_vector3()
        return VariableFloat3(value, variation)


class BlendModeReader(EnumTypeReader, TypeReaderPlugin):
    target_type = 'ProjectMercury.BlendMode'
    reader_name = 'ProjectMercury.BlendMode'

    enum_type = BlendMode