- code changes for last commit - they were not picked up automatically.

# Conflicts:
#	source/build/src/defs.cpp
This commit is contained in:
Christoph Oelckers 2020-09-10 23:12:52 +02:00
parent 4512b6463d
commit 2095e9e3c6
2 changed files with 16 additions and 16 deletions

View file

@ -234,13 +234,6 @@ static void loaddefs()
cycle_t deftimer; cycle_t deftimer;
deftimer.Reset(); deftimer.Reset();
deftimer.Clock(); deftimer.Clock();
if (fileSystem.FindFile("duke3d-megaton.def") >= 0)
{
// We do not load the Megaton .defs because they do not have any CRC checks and also override other assets than the weapons.
// This engine provided .def uses CRCs to protect user replacements.
if (!loaddefinitionsfile("engine/megaton-widescreen.def"))
duke3d_globalflags |= DUKE3D_NO_WIDESCREEN_PINNING; // fixme - this needs to be smarter and done on a per-weapon basis.
}
if (!loaddefinitionsfile(defsfile)) if (!loaddefinitionsfile(defsfile))
{ {
deftimer.Unclock(); deftimer.Unclock();
@ -248,6 +241,13 @@ static void loaddefs()
} }
TileFiles.SetBackup(); TileFiles.SetBackup();
userConfig.AddDefs.reset(); userConfig.AddDefs.reset();
// load the internal replacements last so that they do not clobber the CRC for the original items so that mod-side replacement are picked up.
if (fileSystem.FindFile("engine/duke-widescreen.def") >= 0)
{
loaddefinitionsfile("engine/duke-widescreen.def");
}
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View file

@ -461,8 +461,8 @@ void displayweapon_d(int snum, double smoothratio)
auto displayrpg = [&]() auto displayrpg = [&]()
{ {
pin = (isWorldTour() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R; //pin = (isWorldTour() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
auto rpgpic = isWorldTour() ? RPGGUNWIDE : RPGGUN; auto rpgpic = /*isWorldTour() ? RPGGUNWIDE :*/ RPGGUN;
if (sprite[p->i].pal == 1) if (sprite[p->i].pal == 1)
pal = 1; pal = 1;
@ -850,8 +850,8 @@ void displayweapon_d(int snum, double smoothratio)
} }
else else
{ {
pin = (isWW2GI() || isWorldTour() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R; //pin = 0; (isWW2GI() || isWorldTour() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
auto pic_5 = isWorldTour() ? FIRSTGUNRELOADWIDE : FIRSTGUN+5; auto pic_5 = /*isWorldTour() ? FIRSTGUNRELOADWIDE :*/ FIRSTGUN+5;
const int WEAPON2_RELOAD_TIME = 50; const int WEAPON2_RELOAD_TIME = 50;
auto reload_time = isWW2GI() ? aplWeaponReload[PISTOL_WEAPON][snum] : WEAPON2_RELOAD_TIME; auto reload_time = isWW2GI() ? aplWeaponReload[PISTOL_WEAPON][snum] : WEAPON2_RELOAD_TIME;
@ -1081,8 +1081,8 @@ void displayweapon_d(int snum, double smoothratio)
auto displayfreezer = [&] auto displayfreezer = [&]
{ {
pin = (isWW2GI() || isWorldTour() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R; //pin = (isWW2GI() || isWorldTour() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
auto pic = isWorldTour() ? FREEZEWIDE : FREEZE; auto pic = /*isWorldTour() ? FREEZEWIDE :*/ FREEZE;
if (sprite[p->i].pal == 1) if (sprite[p->i].pal == 1)
pal = 1; pal = 1;
@ -1099,10 +1099,10 @@ void displayweapon_d(int snum, double smoothratio)
looking_arc += rand() & 3; looking_arc += rand() & 3;
} }
gun_pos -= 16; gun_pos -= 16;
hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 261 - gun_pos, isWorldTour() ? FREEZEFIREWIDE : FREEZE + 2, -32, o|pin, pal); hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 261 - gun_pos, /*isWorldTour() ? FREEZEFIREWIDE :*/ FREEZE + 2, -32, o|pin, pal);
hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 235 - gun_pos, FREEZE + 3 + cat_frames[*kb % 6], -32, o | pin, pal); hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 235 - gun_pos, FREEZE + 3 + cat_frames[*kb % 6], -32, o | pin, pal);
} }
else hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 261 - gun_pos, isWorldTour() ? FREEZEWIDE : FREEZE, gs, o | pin, pal); else hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 261 - gun_pos, /*isWorldTour() ? FREEZEWIDE :*/ FREEZE, gs, o | pin, pal);
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -1281,7 +1281,7 @@ void displayweapon_d(int snum, double smoothratio)
auto displayshrinker = [&] auto displayshrinker = [&]
{ {
auto shrinker = isWorldTour() ? SHRINKERWIDE : SHRINKER; auto shrinker = /*isWorldTour() ? SHRINKERWIDE :*/ SHRINKER;
weapon_xoffset += 28; weapon_xoffset += 28;
looking_arc += 18; looking_arc += 18;
if (sprite[p->i].pal == 1) if (sprite[p->i].pal == 1)