Ver código fonte

Partial fix for hero flag rendering
(-) blue & teal heroes are still gitchy. IDN why ...

AlexVinS 11 anos atrás
pai
commit
2ec8c31558
2 arquivos alterados com 4 adições e 1 exclusões
  1. 3 0
      client/Graphics.cpp
  2. 1 1
      client/mapHandler.cpp

+ 3 - 0
client/Graphics.cpp

@@ -267,6 +267,9 @@ void Graphics::loadHeroFlagsDetail(std::pair<std::vector<CDefEssential *> Graphi
 			SDL_SetColorKey(curImg.bitmap, SDL_SRCCOLORKEY,
 				SDL_MapRGB(curImg.bitmap->format, 0, 255, 255)
 				);
+			#ifndef VCMI_SDL1
+			SDL_SetSurfaceBlendMode(curImg.bitmap,SDL_BLENDMODE_NONE);
+			#endif
 		}
 	}
 }

+ 1 - 1
client/mapHandler.cpp

@@ -503,7 +503,7 @@ void CMapHandler::terrainRect( int3 top_tile, ui8 anim, const std::vector< std::
 				if(obj->ID != Obj::HERO && !obj->coveringAt(top_tile.x + bx, top_tile.y + by))
 					continue;
 
-				static const int notBlittedInPuzzleMode[] = {124};
+				static const int notBlittedInPuzzleMode[] = {Obj::HOLE};
 
 				//don't print flaggable objects in puzzle mode
 				if(puzzleMode && (obj->isVisitable() || std::find(notBlittedInPuzzleMode, notBlittedInPuzzleMode+1, obj->ID) != notBlittedInPuzzleMode+1)) //?