mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- various small bits of cleanup.
This commit is contained in:
parent
e59d976691
commit
f765783437
13 changed files with 34 additions and 19 deletions
|
@ -186,6 +186,7 @@ inline walltype* sectortype::firstWall() const
|
|||
extern sectortype sectorbackup[MAXSECTORS];
|
||||
extern walltype wallbackup[MAXWALLS];
|
||||
|
||||
extern bool inpreparemirror;
|
||||
|
||||
inline tspriteptr_t renderAddTSpriteFromSprite(spritetype* tsprite, int& spritesortcnt, uint16_t const spritenum)
|
||||
{
|
||||
|
|
|
@ -154,7 +154,7 @@ int16_t pointhighlight=-1, linehighlight=-1, highlightcnt=0;
|
|||
|
||||
static int16_t numhits;
|
||||
|
||||
char inpreparemirror = 0;
|
||||
bool inpreparemirror = 0;
|
||||
|
||||
|
||||
//
|
||||
|
|
|
@ -28,8 +28,6 @@ extern int16_t globalpicnum;
|
|||
|
||||
extern int32_t globalorientation;
|
||||
|
||||
extern char inpreparemirror;
|
||||
|
||||
extern int32_t hitallsprites;
|
||||
|
||||
int32_t animateoffs(int tilenum, int fakevar);
|
||||
|
|
|
@ -89,12 +89,14 @@ void Job_Init()
|
|||
VMFunction* LookupFunction(const char* qname, bool validate)
|
||||
{
|
||||
size_t p = strcspn(qname, ".");
|
||||
if (p == 0) I_Error("Call to undefined function %s", qname);
|
||||
if (p == 0)
|
||||
I_Error("Call to undefined function %s", qname);
|
||||
FString clsname(qname, p);
|
||||
FString funcname = qname + p + 1;
|
||||
|
||||
auto func = PClass::FindFunction(clsname, funcname);
|
||||
if (func == nullptr) I_Error("Call to undefined function %s", qname);
|
||||
if (func == nullptr)
|
||||
I_Error("Call to undefined function %s", qname);
|
||||
if (validate)
|
||||
{
|
||||
// these conditions must be met by all functions for this interface.
|
||||
|
|
|
@ -340,6 +340,10 @@ static void DoParseListMenuBody(FScanner &sc, DListMenuDescriptor *desc, bool &s
|
|||
{
|
||||
desc->mCenter = true;
|
||||
}
|
||||
else if (sc.Compare("Selecteditem"))
|
||||
{
|
||||
desc->mSelectedItem = desc->mItems.Size() - 1;
|
||||
}
|
||||
else if (sc.Compare("animatedtransition"))
|
||||
{
|
||||
desc->mAnimatedTransition = true;
|
||||
|
|
|
@ -540,9 +540,9 @@ void DrawPlayerArrow(int cposx, int cposy, int cang, int pl_x, int pl_y, int zoo
|
|||
int py2 = DMulScale(arrow[i + 3], pxvect, arrow[i+2], pyvect, 16) + (height << 11);
|
||||
|
||||
int ox1 = px1 - cposx;
|
||||
int oy1 = py1 - cposx;
|
||||
int oy1 = py1 - cposy;
|
||||
int ox2 = px2 - cposx;
|
||||
int oy2 = py2 - cposx;
|
||||
int oy2 = py2 - cposy;
|
||||
|
||||
int sx1 = DMulScale(ox1, xvect, -oy1, yvect, 16) + (width << 11);
|
||||
int sy1 = DMulScale(oy1, xvect, ox1, yvect, 16) + (height << 11);
|
||||
|
|
|
@ -374,7 +374,15 @@ void RunNetSpecs (int player, int buf)
|
|||
while (stream < end)
|
||||
{
|
||||
int type = ReadByte (&stream);
|
||||
Net_DoCommand (type, &stream, player);
|
||||
try
|
||||
{
|
||||
Net_DoCommand(type, &stream, player);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
NetSpecs[player][buf].SetData(NULL, 0);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
if (!demorecording)
|
||||
|
|
|
@ -16,6 +16,7 @@ EXTERN_CVAR(Bool, cl_weaponsway)
|
|||
EXTERN_CVAR(Bool, cl_viewhbob)
|
||||
EXTERN_CVAR(Bool, cl_viewvbob)
|
||||
EXTERN_CVAR(Bool, cl_interpolate)
|
||||
EXTERN_CVAR(Bool, cl_capfps)
|
||||
EXTERN_CVAR(Bool, cl_slopetilting)
|
||||
EXTERN_CVAR(Int, cl_showweapon)
|
||||
EXTERN_CVAR(Int, cl_weaponswitch)
|
||||
|
|
|
@ -456,7 +456,8 @@ static void BuildEpisodeMenu()
|
|||
// Build skill menu
|
||||
int addedSkills = 0;
|
||||
desc = MenuDescriptors.CheckKey(NAME_Skillmenu);
|
||||
if (desc != nullptr && (*desc)->IsKindOf(RUNTIME_CLASS(DListMenuDescriptor)))
|
||||
// If the skill names list ios empty, a predefined menu is assumed
|
||||
if (desc != nullptr && gSkillNames[0].IsNotEmpty() && (*desc)->IsKindOf(RUNTIME_CLASS(DListMenuDescriptor)))
|
||||
{
|
||||
DListMenuDescriptor* ld = static_cast<DListMenuDescriptor*>(*desc);
|
||||
DMenuItemBase* popped = nullptr;
|
||||
|
|
|
@ -358,16 +358,13 @@ void FNodeBuilder::FLevel::FindMapBounds()
|
|||
minx = maxx = Vertices[0].fX();
|
||||
miny = maxy = Vertices[0].fY();
|
||||
|
||||
for (int i = 1; i < NumLines; ++i)
|
||||
for (int i = 1; i < NumVertices; ++i)
|
||||
{
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
vertex_t *v = (j == 0 ? Lines[i].v1 : Lines[i].v2);
|
||||
if (v->fX() < minx) minx = v->fX();
|
||||
else if (v->fX() > maxx) maxx = v->fX();
|
||||
if (v->fY() < miny) miny = v->fY();
|
||||
else if (v->fY() > maxy) maxy = v->fY();
|
||||
}
|
||||
vertex_t* v = &Vertices[i];
|
||||
if (v->fX() < minx) minx = v->fX();
|
||||
else if (v->fX() > maxx) maxx = v->fX();
|
||||
if (v->fY() < miny) miny = v->fY();
|
||||
else if (v->fY() > maxy) maxy = v->fY();
|
||||
}
|
||||
|
||||
MinX = FLOAT2FIXED(minx);
|
||||
|
|
|
@ -106,6 +106,9 @@ void InitFont()
|
|||
BigFont = new FFont(0, "BigFont");
|
||||
BigFont->CopyFrom(*BigFont15);
|
||||
}
|
||||
if (!BigFont) BigFont = ConFont;
|
||||
if (!SmallFont) SmallFont = ConFont;
|
||||
|
||||
OriginalSmallFont = SmallFont;
|
||||
OriginalBigFont = BigFont;
|
||||
}
|
||||
|
|
|
@ -302,7 +302,6 @@ void HWDrawInfo::DispatchSprites()
|
|||
{
|
||||
HWSprite hwsprite;
|
||||
int num = tiletovox[tilenum];
|
||||
if (num != 435) Printf("%d - %d\n", tilenum, num);
|
||||
if (hwsprite.ProcessVoxel(this, voxmodels[num], tspr, §or[tspr->sectnum], voxrotate[num]))
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -91,6 +91,7 @@ static void CallCreateMapFunction(const char* qname, DObject* runner, MapRecord*
|
|||
|
||||
void CallCreateSummaryFunction(const char* qname, DObject* runner, MapRecord* map, SummaryInfo* info, MapRecord* map2)
|
||||
{
|
||||
if (qname == nullptr || *qname == 0) return; // no level summary defined.
|
||||
auto func = LookupFunction(qname);
|
||||
auto s = func->Proto->ArgumentTypes.Size();
|
||||
auto at = func->Proto->ArgumentTypes.Data();
|
||||
|
|
Loading…
Reference in a new issue