Merge branch 'Isometric-Dev' into master

This commit is contained in:
jmarshall23
2020-08-06 15:44:55 -07:00
committed by GitHub
433 changed files with 172342 additions and 8485 deletions
+32 -7
View File
@@ -3064,6 +3064,15 @@ bool TechnoClass::Electric_Zap(COORDINATE target_coord, int which, WindowNumberT
gonnadraw = true;
}
TechnoTypeClass const& tclass = *Techno_Type_Class();
WeaponTypeClass const* weapon = (which == 0) ? tclass.PrimaryWeapon : tclass.SecondaryWeapon;
if (weapon->Prism) {
CellClass::ConvertCoordsToIsometric(x, y);
CellClass::ConvertCoordsToIsometric(x1, y1);
GL_RenderLine(x, y, x1, y1, 163, 203, 205, 3.0f);
return true;
}
static int _shape[]={ 2, 3, 1, 0, 2, 3, 1, 0};
static int _xadd[8][8]={
{ 0, 8, 8, 8, 0, 0, 0, 0},
@@ -3129,10 +3138,14 @@ bool TechnoClass::Electric_Zap(COORDINATE target_coord, int which, WindowNumberT
// Electric zap coordinates are always tactical, so don't use the partial window if passed - SKY
x += _xadd[facing][lastfacing];
y += _yadd[facing][lastfacing];
int xx = x;
int yy = y;
CellClass::ConvertCoordsToIsometric(xx, yy);
if (remap != NULL) {
CC_Draw_Shape(this, "LITNING", LightningShapes, _shape[facing]+(shots ? 4 : 0), x, y, (window != WINDOW_PARTIAL) ? window : WINDOW_TACTICAL, SHAPE_FADING|SHAPE_CENTER|SHAPE_WIN_REL, remap);
CC_Draw_Shape(this, "LITNING", LightningShapes, _shape[facing]+(shots ? 4 : 0), xx, yy, (window != WINDOW_PARTIAL) ? window : WINDOW_TACTICAL, SHAPE_FADING|SHAPE_CENTER|SHAPE_WIN_REL, remap);
} else {
CC_Draw_Shape(this, "LITNING", LightningShapes, _shape[facing]+(shots ? 4 : 0), x, y, (window != WINDOW_PARTIAL) ? window : WINDOW_TACTICAL, SHAPE_CENTER|SHAPE_WIN_REL);
CC_Draw_Shape(this, "LITNING", LightningShapes, _shape[facing]+(shots ? 4 : 0), xx, yy, (window != WINDOW_PARTIAL) ? window : WINDOW_TACTICAL, SHAPE_CENTER|SHAPE_WIN_REL);
}
lastfacing = facing;
}
@@ -4449,7 +4462,7 @@ void TechnoClass::Techno_Draw_Object(void const * shapefile, int shapenum, int x
assert(IsActive);
if (rotation != DIR_N || scale != 0x0100) {
Disable_Uncompressed_Shapes();
//Disable_Uncompressed_Shapes();
}
if (shapefile != NULL) {
@@ -4457,6 +4470,10 @@ void TechnoClass::Techno_Draw_Object(void const * shapefile, int shapenum, int x
void const * remap = Remap_Table();
void const * shadow = Map.UnitShadow;
if (shapenum >= Get_Build_Frame_Count(shapefile)) {
shapenum = 0;
}
#ifdef PARTIAL
/*
** Create a minimum shape rectangle if one hasn't already been
@@ -4547,7 +4564,7 @@ void TechnoClass::Techno_Draw_Object(void const * shapefile, int shapenum, int x
#endif
}
Enable_Uncompressed_Shapes();
// Enable_Uncompressed_Shapes();
}
@@ -4707,7 +4724,7 @@ void const * TechnoClass::Remap_Table(void) const
if (Techno_Type_Class()->IsRemappable) {
return(House->Remap_Table(IsBlushing, Techno_Type_Class()->Remap));
}
return(ColorRemaps[PCOLOR_GOLD].RemapTable);
return NULL;
}
@@ -6575,7 +6592,7 @@ int TechnoTypeClass::Cost_Of(void) const
* HISTORY: *
* 07/29/1995 JLB : Created. *
*=============================================================================================*/
void const * TechnoTypeClass::Get_Cameo_Data(void) const
struct Image_t*TechnoTypeClass::Get_Cameo_Data(void) const
{
return(CameoData);
}
@@ -6759,7 +6776,15 @@ bool TechnoTypeClass::Read_INI(CCINIClass & ini)
SightRange = ini.Get_Int(Name(), "Sight", SightRange);
Level = ini.Get_Int(Name(), "TechLevel", Level);
MaxSpeed = MPHType(_Scale_To_256(ini.Get_Int(Name(), "Speed", fixed(MaxSpeed, 256) * 100)));
Cost = ini.Get_Int(Name(), "Cost", Cost);
bool fastBuild = ini.Get_Int("General", "FastBuild", 0);
if(fastBuild) {
Cost = 15;
}
else {
Cost = ini.Get_Int(Name(), "Cost", Cost);
}
MaxAmmo = ini.Get_Int(Name(), "Ammo", MaxAmmo);
Risk = Reward = Points = ini.Get_Int(Name(), "Points", Points);
Ownable = ini.Get_Owners(Name(), "Owner", Ownable);