September 16th patch update

DLL version incremented
Beacon functionality added
Support for loading screen match preview display
Placeholder handling of new key-bindable mod commands
This commit is contained in:
PG-SteveT 2020-09-16 10:03:04 -07:00
parent e37e174be1
commit fd05be35c1
68 changed files with 1313 additions and 267 deletions

View file

@ -262,6 +262,8 @@ void AnimClass::Draw_It(int x, int y, WindowNumberType window) const
void const * remap = NULL;
ShapeFlags_Type flags = SHAPE_CENTER|SHAPE_WIN_REL;
bool alt = false;
int width = 0;
int height = 0;
/*
** Some animations require special fixups.
@ -277,6 +279,12 @@ void AnimClass::Draw_It(int x, int y, WindowNumberType window) const
transtable = Map.UnitShadow;
alt = true;
break;
case ANIM_BEACON_VIRTUAL:
width = 29;
height = 39;
flags = flags | SHAPE_BOTTOM | SHAPE_COMPACT;
break;
}
/*
@ -305,7 +313,7 @@ void AnimClass::Draw_It(int x, int y, WindowNumberType window) const
*/
if ((window == WINDOW_VIRTUAL) || (Fetch_Stage() < Class->Stages)) {
// Add 'this' parameter to call new shape draw intercept. ST - 5/22/2019
CC_Draw_Shape(this, shapefile, shapenum, x, y, window, flags, remap, transtable, DIR_N, Class->VirtualScale);
CC_Draw_Shape(this, shapefile, shapenum, x, y, window, flags, remap, transtable, DIR_N, Class->VirtualScale, width, height);
}
}
IsTheaterShape = false;
@ -553,7 +561,8 @@ AnimClass::AnimClass(AnimType animnum, COORDINATE coord, unsigned char timedelay
IsInvisible(false),
Delay(timedelay),
Accum(0),
AttachLayer(LAYER_NONE)
AttachLayer(LAYER_NONE),
KillTime(0ULL)
{
#ifdef VIC
if (Class->Stages == -1) {
@ -741,6 +750,19 @@ void AnimClass::AI(void)
}
}
/*
** Check the kill time.
*/
if (KillTime > 0ULL) {
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
unsigned long long now = (unsigned long long)ft.dwLowDateTime + ((unsigned long long)ft.dwHighDateTime << 32ULL);
if (now >= KillTime) {
IsToDelete = true;
}
}
/*
** Delete this animation and bail early if the animation is flagged to be deleted
** immediately.
@ -1255,4 +1277,20 @@ void AnimClass::Do_Atom_Damage(HousesType ownerhouse, CELL cell)
//GamePalette.Set(FADE_PALETTE_SLOW, Call_Back); //TO_FIX. ST 5/8/2019
}
#endif
}
}
void AnimClass::Set_Owner(HousesType owner)
{
OwnerHouse = owner;
if (Target_Legal(VirtualAnimTarget)) {
As_Animation(VirtualAnimTarget)->Set_Owner(owner);
}
}
void AnimClass::Set_Visible_Flags(unsigned flags)
{
VisibleFlags = flags;
if (Target_Legal(VirtualAnimTarget)) {
As_Animation(VirtualAnimTarget)->Set_Visible_Flags(flags);
}
}