{
if(px < fieldPtr->GetWidth() && py < fieldPtr->GetHeight())
{
- SDL_Rect checkRect = {GameSurfaceSDL::sideBarWidth + (px - x) * squareGraphicWidth - 3, 30 + (py - y) * squareGraphicHeight - 3, 6, 6};
+ SDL_Rect checkRect1 = {GameSurfaceSDL::sideBarWidth + (px - x) * squareGraphicWidth - 2 + 12, 30 + (py - y) * squareGraphicHeight - 2 + 12, 4, 4};
+ SDL_Rect checkRect2 = {GameSurfaceSDL::sideBarWidth + (px - x) * squareGraphicWidth - 2, 30 + (py - y) * squareGraphicHeight - 2, 4, 4};
+ SDL_Rect checkRect3 = {GameSurfaceSDL::sideBarWidth + (px - x) * squareGraphicWidth - 2, 30 + (py - y) * squareGraphicHeight - 2 + 12, 4, 4};
+ SDL_Rect checkRect4 = {GameSurfaceSDL::sideBarWidth + (px - x) * squareGraphicWidth - 2 + 12, 30 + (py - y) * squareGraphicHeight - 2, 4, 4};
SDL_Rect blitRect = {GameSurfaceSDL::sideBarWidth + (px - x) * squareGraphicWidth, 30 + (py - y) * squareGraphicHeight , squareGraphicWidth, squareGraphicHeight};
if(subJectCreaturePtr->GetLore()->GetFieldLore(0, px, py) > 0)
{
SDL_BlitSurface(unknownFieldSurface, &fieldRect, windowSurface, &blitRect);
}
- if(fieldPtr->SightPass[(py * 2 + 1) * fieldPtr->GetWidth() + (px * 2 + 1)])
- SDL_FillRect(windowSurface, &checkRect, SDL_MapRGBA(windowSurface->format, 255, 255, 255, 255));
+ if(fieldPtr->GetSightPass(px * 2 + 1, py * 2 + 1))
+ SDL_FillRect(windowSurface, &checkRect1, SDL_MapRGBA(windowSurface->format, 255, 255, 255, 255));
else
- SDL_FillRect(windowSurface, &checkRect, SDL_MapRGBA(windowSurface->format, 255, 0, 0, 255));
+ SDL_FillRect(windowSurface, &checkRect1, SDL_MapRGBA(windowSurface->format, 255, 0, 0, 255));
+
+ if(fieldPtr->GetSightPass(px * 2, py * 2))
+ SDL_FillRect(windowSurface, &checkRect2, SDL_MapRGBA(windowSurface->format, 255, 255, 255, 255));
+ else
+ SDL_FillRect(windowSurface, &checkRect2, SDL_MapRGBA(windowSurface->format, 255, 0, 0, 255));
+
+ /*
+ if(fieldPtr->GetSightPass(px * 2, py * 2 + 1))
+ SDL_FillRect(windowSurface, &checkRect3, SDL_MapRGBA(windowSurface->format, 255, 255, 255, 255));
+ else
+ SDL_FillRect(windowSurface, &checkRect3, SDL_MapRGBA(windowSurface->format, 255, 0, 0, 255));
+ if(fieldPtr->GetSightPass(px * 2 + 1, py * 2))
+ SDL_FillRect(windowSurface, &checkRect4, SDL_MapRGBA(windowSurface->format, 255, 255, 255, 255));
+ else
+ SDL_FillRect(windowSurface, &checkRect4, SDL_MapRGBA(windowSurface->format, 255, 0, 0, 255));
+ */
+
}
}
}