mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
cccdfd6336
maps in the compatibility list. - Added compatibility settings for a few more levels in some classic WADs. - Added spechit overflow workaround for Strain MAP07. This is highly map specific because the original behavior cannot be restored. - Added a check for Doom's IWAD levels that forces COMPAT_SHORTTEX for them. MD5 cannot be used well here because there's many different IWADs with slightly different levels. This is only done for Doom format levels to ensure that custom IWADs for ZDoom are not affected. - fixed: level.flags2 was not reset at level start. - Fixed: Morph powerups can change the actor picking up the item so AInventory::CallTryPickup must be able to return the new actor. - Fixed: ACS's GiveInventory may not assume that a PlayerPawn is still attached to the player data after an item has been given. - Added a missing NULL pointer check to DBaseStatusBar::Blendview. SVN r1405 (trunk)
75 lines
1.8 KiB
C++
75 lines
1.8 KiB
C++
// Emacs style mode select -*- C++ -*-
|
|
//-----------------------------------------------------------------------------
|
|
//
|
|
// $Id:$
|
|
//
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
//
|
|
// This source is available for distribution and/or modification
|
|
// only under the terms of the DOOM Source Code License as
|
|
// published by id Software. All rights reserved.
|
|
//
|
|
// The source is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
|
// for more details.
|
|
//
|
|
// DESCRIPTION:
|
|
// Nil.
|
|
//
|
|
//-----------------------------------------------------------------------------
|
|
|
|
#ifndef __M_BBOX_H__
|
|
#define __M_BBOX_H__
|
|
|
|
#include "doomtype.h"
|
|
|
|
struct line_t;
|
|
|
|
class FBoundingBox
|
|
{
|
|
public:
|
|
FBoundingBox()
|
|
{
|
|
ClearBox();
|
|
}
|
|
|
|
FBoundingBox(fixed_t left, fixed_t bottom, fixed_t right, fixed_t top)
|
|
{
|
|
m_Box[BOXTOP] = top;
|
|
m_Box[BOXLEFT] = left;
|
|
m_Box[BOXRIGHT] = right;
|
|
m_Box[BOXBOTTOM] = bottom;
|
|
}
|
|
|
|
FBoundingBox(fixed_t x, fixed_t y, fixed_t radius)
|
|
{
|
|
m_Box[BOXTOP] = y + radius;
|
|
m_Box[BOXLEFT] = x - radius;
|
|
m_Box[BOXRIGHT] = x + radius;
|
|
m_Box[BOXBOTTOM] = y - radius;
|
|
}
|
|
|
|
void ClearBox ()
|
|
{
|
|
m_Box[BOXTOP] = m_Box[BOXRIGHT] = FIXED_MIN;
|
|
m_Box[BOXBOTTOM] = m_Box[BOXLEFT] = FIXED_MAX;
|
|
}
|
|
|
|
void AddToBox (fixed_t x, fixed_t y);
|
|
|
|
inline fixed_t Top () const { return m_Box[BOXTOP]; }
|
|
inline fixed_t Bottom () const { return m_Box[BOXBOTTOM]; }
|
|
inline fixed_t Left () const { return m_Box[BOXLEFT]; }
|
|
inline fixed_t Right () const { return m_Box[BOXRIGHT]; }
|
|
|
|
int BoxOnLineSide (const line_t *ld) const;
|
|
|
|
void Set(int index, fixed_t value) {m_Box[index] = value;}
|
|
|
|
protected:
|
|
fixed_t m_Box[4];
|
|
};
|
|
|
|
|
|
#endif //__M_BBOX_H__
|