From dcd40b2018392c3e8dcf49c05a31f13f393b6f38 Mon Sep 17 00:00:00 2001 From: Justin Marshall Date: Wed, 5 Aug 2020 12:55:32 -0700 Subject: [PATCH] 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. --- code/redalert/building.cpp | 47 ++++++++++++++--------------- data/xml/tilesets/ra_structures.xml | 37 +---------------------- rules.ini | 14 +++++++-- 3 files changed, 36 insertions(+), 62 deletions(-) diff --git a/code/redalert/building.cpp b/code/redalert/building.cpp index 6c312b2..f8ea390 100644 --- a/code/redalert/building.cpp +++ b/code/redalert/building.cpp @@ -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; /* diff --git a/data/xml/tilesets/ra_structures.xml b/data/xml/tilesets/ra_structures.xml index bdb64f1..f4ccab8 100644 --- a/data/xml/tilesets/ra_structures.xml +++ b/data/xml/tilesets/ra_structures.xml @@ -3,42 +3,7 @@ Red_Alert\Structures - - - ABAN01 - 0 - - - - ABAN04/aban04_0000.png - ABAN04/aban04_0001.png - - - - - - ABAN02 - 0 - - - - ABAN05/aban12_0000.png - ABAN05/aban12_0001.png - - - - - - ABAN03 - 0 - - - - ABAN06/aban06_0000.png - ABAN06/aban06_0001.png - - - + \ No newline at end of file diff --git a/rules.ini b/rules.ini index 8c3c842..1de5727 100644 --- a/rules.ini +++ b/rules.ini @@ -8,7 +8,7 @@ [General] ; dev options -FastBuild=0 +FastBuild=1 ; crates CrateMinimum=1 ; crates are normally one per human player but never below this number @@ -1486,6 +1486,7 @@ ActiveAnimNonDamagedStart=0 ActiveAnimNonDamagedFrames=9 ActiveAnimDamagedStart=10 ActiveAnimDamagedFrames=9 +IdleAnimIgnorePowerState=1 ; refinery [PROC] @@ -3071,15 +3072,24 @@ Strength=400 Points=5 Armor=wood Repariable=false +Snow=isosno.pal +Temperate=isotem.pal +Image=aban04 [ABAN02] Strength=400 Points=5 Armor=wood Repariable=false +Snow=isosno.pal +Temperate=isotem.pal +Image=aban12 [ABAN03] Strength=400 Points=5 Armor=wood -Repariable=false \ No newline at end of file +Repariable=false +Snow=isosno.pal +Temperate=isotem.pal +Image=aban06