def __init__(self, phasedLoading = False): self.wantProws = config.GetBool('want-sprits', 0) self.hulls = { } self.texInfo = ({ }, { }, { }) self.models = { } self.mastSets = { } ShipBlueprints.setupWheel() ShipBlueprints.setupShipTextures() self.preprocessMast(ShipGlobals.Masts.Main_Tri) self.preprocessMast(ShipGlobals.Masts.Fore_Tri) self.preprocessHull(ShipGlobals.INTERCEPTORL1) self.preprocessMast(ShipGlobals.Masts.Skel_Main_A) self.preprocessMast(ShipGlobals.Masts.Skel_Main_B) self.preprocessMast(ShipGlobals.Masts.Skel_Tri) self.preprocessMast(ShipGlobals.Masts.Skel_Fore) self.preprocessMast(ShipGlobals.Masts.Skel_Aft) self.preprocessHull(ShipGlobals.SKEL_INTERCEPTORL3) self.preprocessHull(ShipGlobals.SKEL_WARSHIPL3) if not phasedLoading: self.handlePhase4() self.handlePhase5() self.baseLayer = TextureStage('base') self.colorLayer = TextureStage('color') self.logoLayer = TextureStage('logo') self.logoLayerNoColor = TextureStage('logoNoColor') self.logoLayerNoColorInv = TextureStage('logoNoColorInverse') self.logoLayerInv = TextureStage('logoInverse') self.vertLayer = TextureStage('vertex') self.colorLayer.setSort(1) self.colorLayer.setCombineRgb(TextureStage.CMReplace, TextureStage.CSTexture, TextureStage.COSrcColor) self.colorLayer.setCombineAlpha(TextureStage.CMReplace, TextureStage.CSTexture, TextureStage.COSrcAlpha) self.colorLayer.setTexcoordName('uvColor') self.logoLayer.setSort(2) self.logoLayer.setCombineRgb(TextureStage.CMInterpolate, TextureStage.CSTexture, TextureStage.COSrcColor, TextureStage.CSPrevious, TextureStage.COSrcColor, TextureStage.CSTexture, TextureStage.COSrcAlpha) self.logoLayer.setCombineAlpha(TextureStage.CMReplace, TextureStage.CSPrevious, TextureStage.COSrcAlpha) self.logoLayer.setTexcoordName('uvLogo') self.logoLayerInv.setSort(2) self.logoLayerInv.setCombineRgb(TextureStage.CMInterpolate, TextureStage.CSTexture, TextureStage.COOneMinusSrcColor, TextureStage.CSPrevious, TextureStage.COSrcColor, TextureStage.CSTexture, TextureStage.COSrcAlpha) self.logoLayerInv.setCombineAlpha(TextureStage.CMReplace, TextureStage.CSPrevious, TextureStage.COSrcAlpha) self.logoLayerInv.setTexcoordName('uvLogo') self.logoLayerNoColor.setSort(2) self.logoLayerNoColor.setCombineRgb(TextureStage.CMInterpolate, TextureStage.CSTexture, TextureStage.COSrcColor, TextureStage.CSConstant, TextureStage.COSrcColor, TextureStage.CSTexture, TextureStage.COSrcAlpha) self.logoLayerNoColor.setCombineAlpha(TextureStage.CMReplace, TextureStage.CSPrevious, TextureStage.COSrcAlpha) self.logoLayerNoColor.setTexcoordName('uvLogo') self.logoLayerNoColor.setColor((1, 1, 1, 1)) self.logoLayerNoColorInv.setSort(2) self.logoLayerNoColorInv.setCombineRgb(TextureStage.CMInterpolate, TextureStage.CSTexture, TextureStage.COOneMinusSrcColor, TextureStage.CSConstant, TextureStage.COSrcColor, TextureStage.CSTexture, TextureStage.COSrcAlpha) self.logoLayerNoColorInv.setCombineAlpha(TextureStage.CMReplace, TextureStage.CSPrevious, TextureStage.COSrcAlpha) self.logoLayerNoColorInv.setTexcoordName('uvLogo') self.logoLayerNoColorInv.setColor((1, 1, 1, 1)) self.vertLayer.setSort(3) self.vertLayer.setCombineRgb(TextureStage.CMModulate, TextureStage.CSPrevious, TextureStage.COSrcColor, TextureStage.CSPrimaryColor, TextureStage.COSrcColor) self.vertLayer.setCombineAlpha(TextureStage.CMReplace, TextureStage.CSPrimaryColor, TextureStage.COSrcAlpha) self.baseLayer.setSort(4) self.baseLayer.setCombineRgb(TextureStage.CMModulate, TextureStage.CSTexture, TextureStage.COSrcColor, TextureStage.CSPrevious, TextureStage.COSrcColor) self.baseLayer.setCombineAlpha(TextureStage.CMModulate, TextureStage.CSTexture, TextureStage.COSrcAlpha, TextureStage.CSPrevious, TextureStage.COSrcAlpha)
def __init__(self, phasedLoading = False): self.wantProws = config.GetBool('want-sprits', 0) self.hulls = { } self.texInfo = ({ }, { }, { }) self.models = { } self.mastSets = { } ShipBlueprints.setupWheel() ShipBlueprints.setupShipTextures() self.preprocessMast(ShipGlobals.Masts.Main_Tri) self.preprocessMast(ShipGlobals.Masts.Fore_Tri) self.preprocessHull(ShipGlobals.INTERCEPTORL1) self.preprocessMast(ShipGlobals.Masts.Skel_Main_A) self.preprocessMast(ShipGlobals.Masts.Skel_Main_B) self.preprocessMast(ShipGlobals.Masts.Skel_Tri) self.preprocessMast(ShipGlobals.Masts.Skel_Fore) self.preprocessMast(ShipGlobals.Masts.Skel_Aft) self.preprocessHull(ShipGlobals.SKEL_INTERCEPTORL3) self.preprocessHull(ShipGlobals.SKEL_WARSHIPL3) if not phasedLoading: self.handlePhase4() self.handlePhase5() self.baseLayer = TextureStage('base') self.colorLayer = TextureStage('color') self.logoLayer = TextureStage('logo') self.logoLayerNoColor = TextureStage('logoNoColor') self.vertLayer = TextureStage('vertex') self.colorLayer.setSort(1) self.colorLayer.setCombineRgb(TextureStage.CMReplace, TextureStage.CSTexture, TextureStage.COSrcColor) self.colorLayer.setCombineAlpha(TextureStage.CMReplace, TextureStage.CSTexture, TextureStage.COSrcAlpha) self.colorLayer.setTexcoordName('uvColor') self.logoLayer.setSort(2) self.logoLayer.setCombineRgb(TextureStage.CMInterpolate, TextureStage.CSTexture, TextureStage.COSrcColor, TextureStage.CSPrevious, TextureStage.COSrcColor, TextureStage.CSTexture, TextureStage.COSrcAlpha) self.logoLayer.setCombineAlpha(TextureStage.CMReplace, TextureStage.CSPrevious, TextureStage.COSrcAlpha) self.logoLayer.setTexcoordName('uvLogo') self.logoLayerNoColor.setSort(2) self.logoLayerNoColor.setCombineRgb(TextureStage.CMInterpolate, TextureStage.CSTexture, TextureStage.COSrcColor, TextureStage.CSConstant, TextureStage.COSrcColor, TextureStage.CSTexture, TextureStage.COSrcAlpha) self.logoLayerNoColor.setCombineAlpha(TextureStage.CMReplace, TextureStage.CSPrevious, TextureStage.COSrcAlpha) self.logoLayerNoColor.setTexcoordName('uvLogo') self.logoLayerNoColor.setColor((1, 1, 1, 1)) self.vertLayer.setSort(3) self.vertLayer.setCombineRgb(TextureStage.CMModulate, TextureStage.CSPrevious, TextureStage.COSrcColor, TextureStage.CSPrimaryColor, TextureStage.COSrcColor) self.vertLayer.setCombineAlpha(TextureStage.CMReplace, TextureStage.CSPrimaryColor, TextureStage.COSrcAlpha) self.baseLayer.setSort(4) self.baseLayer.setCombineRgb(TextureStage.CMModulate, TextureStage.CSTexture, TextureStage.COSrcColor, TextureStage.CSPrevious, TextureStage.COSrcColor) self.baseLayer.setCombineAlpha(TextureStage.CMModulate, TextureStage.CSTexture, TextureStage.COSrcAlpha, TextureStage.CSPrevious, TextureStage.COSrcAlpha)