mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-11 23:50:51 +02:00
Temp fix for shroud gaps, units no longer will draw in shroud neighbor tiles.
This commit is contained in:
@@ -187,6 +187,7 @@ class CellClass
|
||||
int x_screen_pos;
|
||||
int y_screen_pos;
|
||||
int debug_select;
|
||||
bool inShadow;
|
||||
|
||||
/*
|
||||
** Per-player view of whether a cell is mapped. One bit for each house type. ST - 8/2/2019 3:00PM
|
||||
|
||||
@@ -1935,12 +1935,14 @@ void DisplayClass::CacheVisibleCells(void) {
|
||||
cellptr->visibleFrame = g_startFrameTime;
|
||||
cellptr->x_world_pos = xpixel;
|
||||
cellptr->y_world_pos = ypixel;
|
||||
cellptr->inShadow = false;
|
||||
cellDisplayCache[numCachedDisplayCells++].ptr = cellptr;
|
||||
}
|
||||
else {
|
||||
if (Cell_Shadow(cell, PlayerPtr) >= 0) {
|
||||
cellptr->visibleFrame = g_startFrameTime;
|
||||
cellptr->x_world_pos = xpixel;
|
||||
cellptr->inShadow = true;
|
||||
cellptr->y_world_pos = ypixel;
|
||||
cellDisplayCache[numCachedDisplayCells++].ptr = cellptr;
|
||||
}
|
||||
@@ -2274,6 +2276,9 @@ void DisplayClass::Redraw_OIcons(void)
|
||||
{
|
||||
for (int i = 0; i < numCachedDisplayCells; i++) {
|
||||
CellClass* cellptr = cellDisplayCache[i].ptr;
|
||||
if (cellptr->inShadow) {
|
||||
continue;
|
||||
}
|
||||
cellptr->Draw_It(cellptr->x_world_pos, cellptr->y_world_pos, true);
|
||||
}
|
||||
}
|
||||
@@ -2333,7 +2338,9 @@ void DisplayClass::Redraw_Shadow(void)
|
||||
//}
|
||||
|
||||
if (shadow >= 0) {
|
||||
CCGlobalShroudRender = true;
|
||||
CC_DrawHD_Shape(ShadowShapes, shadow, xpixel, ypixel, WINDOW_TACTICAL, SHAPE_GHOST, NULL, ShadowTrans);
|
||||
CCGlobalShroudRender = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,6 +323,7 @@ extern HouseClass * PlayerPtr;
|
||||
extern PaletteClass CCPalette;
|
||||
extern void* CCGlobalOveridePalette;
|
||||
extern bool CCGlobalShadowRender;
|
||||
extern bool CCGlobalShroudRender;
|
||||
extern int CCPaletteHouseColor;
|
||||
extern HSVClass HSVColors[8];
|
||||
extern PaletteClass BlackPalette;
|
||||
|
||||
@@ -434,6 +434,27 @@ long Buffer_Frame_To_Page(int shapeNum, int x, int y, int width, int height, str
|
||||
|
||||
xstart = xstart + WindowList[Window][WINDOWX];// + LogicPage->Get_XPos();
|
||||
ystart = ystart + WindowList[Window][WINDOWY];// + LogicPage->Get_YPos();
|
||||
if (CCGlobalShroudRender) {
|
||||
//if ((shapeNum % 3) == 0) {
|
||||
// xstart = xstart - 2;
|
||||
// ystart = ystart - 2;
|
||||
// width = width + 2;
|
||||
// height = height + 2;
|
||||
//}
|
||||
//else {
|
||||
xstart = xstart - 2;
|
||||
ystart = ystart - 2;
|
||||
width = width + 2;
|
||||
height = height + 2;
|
||||
//}
|
||||
//char tmp[128];
|
||||
//sprintf(tmp, "%d", shapeNum);
|
||||
//GL_DrawForegroundText(6, xstart, ystart, tmp);
|
||||
|
||||
//width = width + 2;
|
||||
//height = height + 2;
|
||||
}
|
||||
|
||||
//GL_SetClipRect(WindowList[Window][WINDOWX], WindowList[Window][WINDOWY], WindowList[Window][WINDOWWIDTH], WindowList[Window][WINDOWWIDTH]);
|
||||
if(renderHDTexture)
|
||||
GL_RenderImage(shape_image, xstart, ystart, width, height, (int)fade_table, shapeNum);
|
||||
|
||||
Reference in New Issue
Block a user