@@ -1143,13 +1143,19 @@ private void RecordBaseNode(GraphicalBaseNode graphicalBaseNode)
11431143 return ;
11441144 }
11451145
1146- const float opacity = 0.35f ;
1146+ const float opacity = 0.5f ;
11471147
11481148 ShapeImage bibGraphics = TheaterGraphics . BuildingBibTextures [ graphicalBaseNode . BuildingType . Index ] ;
11491149 ShapeImage graphics = TheaterGraphics . BuildingTextures [ graphicalBaseNode . BuildingType . Index ] ;
11501150 Color replacementColor = Color . DarkBlue ;
11511151 string iniName = graphicalBaseNode . BuildingType . ININame ;
1152- Color remapColor = ( graphicalBaseNode . BuildingType . ArtConfig . Remapable ? graphicalBaseNode . Owner . XNAColor : Color . White ) * opacity ;
1152+ Color remapColor ;
1153+ Color nonRemapColor = new Color ( 128 , 128 , 128 , 255 ) ;
1154+
1155+ if ( ! graphicalBaseNode . BuildingType . ArtConfig . Remapable )
1156+ remapColor = nonRemapColor ;
1157+ else
1158+ remapColor = new Color ( ( byte ) graphicalBaseNode . Owner . XNAColor . R , ( byte ) graphicalBaseNode . Owner . XNAColor . G , ( byte ) graphicalBaseNode . Owner . XNAColor . B , ( byte ) 255 ) * opacity ;
11531159
11541160 int yDrawOffset = Constants . CellSizeY / - 2 ;
11551161 int frameIndex = 0 ;
@@ -1180,14 +1186,19 @@ private void RecordBaseNode(GraphicalBaseNode graphicalBaseNode)
11801186 objectSpriteRecord . AddGraphicsEntry ( new ObjectSpriteEntry ( bibGraphics . GetPaletteTexture ( ) , bibFrame ,
11811187 new Rectangle ( bibFinalDrawPointX , bibFinalDrawPointY ,
11821188 bibFrame . SourceRectangle . Width , bibFrame . SourceRectangle . Height ) ,
1183- remapColor , false , false , new DepthRectangle ( 1f , 1f ) ) ) ;
1189+ nonRemapColor * opacity , false , false , new DepthRectangle ( 1f , 1f ) ) ) ;
11841190
11851191 if ( bibGraphics . HasRemapFrames ( ) )
11861192 {
1187- objectSpriteRecord . AddGraphicsEntry ( new ObjectSpriteEntry ( bibGraphics . GetPaletteTexture ( ) , bibGraphics . GetRemapFrame ( 0 ) ,
1188- new Rectangle ( bibFinalDrawPointX , bibFinalDrawPointY ,
1189- bibFrame . SourceRectangle . Width , bibFrame . SourceRectangle . Height ) ,
1190- remapColor , true , false , new DepthRectangle ( 1f , 1f ) ) ) ;
1193+ var remapFrame = bibGraphics . GetRemapFrame ( 0 ) ;
1194+
1195+ if ( remapFrame != null )
1196+ {
1197+ objectSpriteRecord . AddGraphicsEntry ( new ObjectSpriteEntry ( bibGraphics . GetPaletteTexture ( ) , bibGraphics . GetRemapFrame ( 0 ) ,
1198+ new Rectangle ( bibFinalDrawPointX , bibFinalDrawPointY ,
1199+ bibFrame . SourceRectangle . Width , bibFrame . SourceRectangle . Height ) ,
1200+ remapColor , true , false , new DepthRectangle ( 1f , 1f ) ) ) ;
1201+ }
11911202 }
11921203 }
11931204 }
@@ -1205,12 +1216,17 @@ private void RecordBaseNode(GraphicalBaseNode graphicalBaseNode)
12051216 int y = drawPoint . Y - frame . ShapeHeight / 2 + frame . OffsetY + Constants . CellSizeY / 2 + yDrawOffset ;
12061217 Rectangle drawRectangle = new Rectangle ( x , y , frame . SourceRectangle . Width , frame . SourceRectangle . Height ) ;
12071218
1208- objectSpriteRecord . AddGraphicsEntry ( new ObjectSpriteEntry ( graphics . GetPaletteTexture ( ) , texture , frame . SourceRectangle , drawRectangle , remapColor , false , false , new DepthRectangle ( 1f , 1f ) ) ) ;
1219+ objectSpriteRecord . AddGraphicsEntry ( new ObjectSpriteEntry ( graphics . GetPaletteTexture ( ) , texture , frame . SourceRectangle , drawRectangle , nonRemapColor * opacity , false , false , new DepthRectangle ( 1f , 1f ) ) ) ;
12091220
12101221 if ( graphics . HasRemapFrames ( ) )
12111222 {
1212- objectSpriteRecord . AddGraphicsEntry ( new ObjectSpriteEntry ( graphics . GetPaletteTexture ( ) , graphics . GetRemapFrame ( frameIndex ) . Texture ,
1213- graphics . GetRemapFrame ( frameIndex ) . SourceRectangle , drawRectangle , remapColor , true , false , new DepthRectangle ( 1f , 1f ) ) ) ;
1223+ var remapFrame = graphics . GetRemapFrame ( frameIndex ) ;
1224+
1225+ if ( remapFrame != null )
1226+ {
1227+ objectSpriteRecord . AddGraphicsEntry ( new ObjectSpriteEntry ( graphics . GetPaletteTexture ( ) , graphics . GetRemapFrame ( frameIndex ) . Texture ,
1228+ graphics . GetRemapFrame ( frameIndex ) . SourceRectangle , drawRectangle , remapColor , true , false , new DepthRectangle ( 1f , 1f ) ) ) ;
1229+ }
12141230 }
12151231
12161232 objectSpriteRecord . AddTextEntry ( new TextEntry ( "#" + baseNodeIndex , baseNodeIndexColor , drawPoint ) ) ;
0 commit comments