mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Switched civilian building anims over to the TS SHP pipeline(from PNG) so the shadows work and such but for some reason these three civi buildings are more yellow need to look into that.
This commit is contained in:
+23
-24
@@ -468,6 +468,29 @@ void BuildingClass::Draw_It(int x, int y, WindowNumberType window) const
|
||||
** Actually draw the building shape.
|
||||
*/
|
||||
IsTheaterShape = Class->IsTheater; //Let Build_Frame know if this is a theater specific shape
|
||||
// jmarshall - shadows are going to need to be done differently, but for now this will work.
|
||||
if (Get_Build_TS_Shape(shapefile) && hdimage == NULL)
|
||||
{
|
||||
CCGlobalShadowRender = true;
|
||||
{
|
||||
int shadowFrameOffset = Get_Build_Frame_Count(shapefile) / 2;
|
||||
Techno_Draw_Object(shapefile, shadowFrameOffset + Shape_Number(), x, y, window);
|
||||
}
|
||||
if (Class->IdleHasShadowFrames && Class->IdleAnimShape != NULL) {
|
||||
int shapeNum = animFrameNum;
|
||||
int maxframes = Get_Build_Frame_Count(Class->IdleAnimShape);
|
||||
if (Class->IdleAnimNonDamagedFrames != -1) {
|
||||
maxframes = Class->IdleAnimNonDamagedFrames;
|
||||
}
|
||||
|
||||
shapeNum = shapeNum % maxframes;
|
||||
int shadowFrameOffset = Get_Build_Frame_Count(Class->IdleAnimShape) / 2;
|
||||
Techno_Draw_Object(Class->IdleAnimShape, shadowFrameOffset + shapeNum, x, y, window);
|
||||
}
|
||||
CCGlobalShadowRender = false;
|
||||
}
|
||||
// jmarshall end
|
||||
|
||||
// jmarshall - added HD support & custom palette support.
|
||||
PaletteClass globalPal = CCPalette;
|
||||
if(Class->CustomTheatrePalette[LastTheater] != NULL) {
|
||||
@@ -537,30 +560,6 @@ void BuildingClass::Draw_It(int x, int y, WindowNumberType window) const
|
||||
CCGlobalOveridePalette = NULL;
|
||||
// jmarshall end
|
||||
|
||||
|
||||
// jmarshall - shadows are going to need to be done differently, but for now this will work.
|
||||
if (Get_Build_TS_Shape(shapefile) && hdimage == NULL)
|
||||
{
|
||||
CCGlobalShadowRender = true;
|
||||
{
|
||||
int shadowFrameOffset = Get_Build_Frame_Count(shapefile) / 2;
|
||||
Techno_Draw_Object(shapefile, shadowFrameOffset + Shape_Number(), x, y, window);
|
||||
}
|
||||
if (Class->IdleHasShadowFrames && Class->IdleAnimShape != NULL) {
|
||||
int shapeNum = animFrameNum;
|
||||
int maxframes = Get_Build_Frame_Count(Class->IdleAnimShape);
|
||||
if (Class->IdleAnimNonDamagedFrames != -1) {
|
||||
maxframes = Class->IdleAnimNonDamagedFrames;
|
||||
}
|
||||
|
||||
shapeNum = shapeNum % maxframes;
|
||||
int shadowFrameOffset = Get_Build_Frame_Count(Class->IdleAnimShape) / 2;
|
||||
Techno_Draw_Object(Class->IdleAnimShape, shadowFrameOffset + shapeNum, x, y, window);
|
||||
}
|
||||
CCGlobalShadowRender = false;
|
||||
}
|
||||
// jmarshall end
|
||||
|
||||
IsTheaterShape = false;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user