# Conflicts: # src/posix/cocoa/i_video.mm
This commit is contained in:
commit
ebf33ed24e
23 changed files with 1295 additions and 1243 deletions
|
|
@ -97,12 +97,9 @@ public:
|
|||
|
||||
bool ResetAirSupply (bool playgasp = true);
|
||||
int GetMaxHealth(bool withupgrades = false) const;
|
||||
void TweakSpeeds (double &forwardmove, double &sidemove);
|
||||
void MorphPlayerThink ();
|
||||
void ActivateMorphWeapon ();
|
||||
AWeapon *PickNewWeapon (PClassActor *ammotype);
|
||||
AWeapon *BestWeapon (PClassActor *ammotype);
|
||||
void CheckWeaponSwitch(PClassActor *ammotype);
|
||||
void GiveDeathmatchInventory ();
|
||||
void FilterCoopRespawnInventory (APlayerPawn *oldplayer);
|
||||
|
||||
|
|
@ -111,8 +108,6 @@ public:
|
|||
|
||||
// These are virtual on the script side only.
|
||||
void PlayIdle();
|
||||
void PlayRunning();
|
||||
void PlayAttacking ();
|
||||
void PlayAttacking2 ();
|
||||
|
||||
const char *GetSoundClass () const;
|
||||
|
|
@ -567,8 +562,6 @@ inline bool AActor::IsNoClip2() const
|
|||
return false;
|
||||
}
|
||||
|
||||
#define CROUCHSPEED (1./12)
|
||||
|
||||
bool P_IsPlayerTotallyFrozen(const player_t *player);
|
||||
|
||||
#endif // __D_PLAYER_H__
|
||||
|
|
|
|||
|
|
@ -446,46 +446,6 @@ FState *AWeapon::GetReadyState ()
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AWeapon :: GetAtkState
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
FState *AWeapon::GetAtkState (bool hold)
|
||||
{
|
||||
IFVIRTUAL(AWeapon, GetAtkState)
|
||||
{
|
||||
VMValue params[2] = { (DObject*)this, hold };
|
||||
VMReturn ret;
|
||||
FState *retval;
|
||||
ret.PointerAt((void**)&retval);
|
||||
VMCall(func, params, 2, &ret, 1);
|
||||
return retval;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AWeapon :: GetAtkState
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
FState *AWeapon::GetAltAtkState (bool hold)
|
||||
{
|
||||
IFVIRTUAL(AWeapon, GetAltAtkState)
|
||||
{
|
||||
VMValue params[2] = { (DObject*)this, hold };
|
||||
VMReturn ret;
|
||||
FState *retval;
|
||||
ret.PointerAt((void**)&retval);
|
||||
VMCall(func, params, 2, &ret, 1);
|
||||
return retval;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AWeapon :: GetStateForButtonName
|
||||
|
|
|
|||
|
|
@ -132,8 +132,6 @@ public:
|
|||
FState *GetUpState ();
|
||||
FState *GetDownState ();
|
||||
FState *GetReadyState ();
|
||||
FState *GetAtkState (bool hold);
|
||||
FState *GetAltAtkState (bool hold);
|
||||
|
||||
FState *GetStateForButtonName (FName button);
|
||||
|
||||
|
|
|
|||
|
|
@ -1450,6 +1450,13 @@ bool FLevelLocals::IsJumpingAllowed() const
|
|||
return !(flags & LEVEL_JUMP_NO);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(FLevelLocals, IsJumpingAllowed)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
|
||||
ACTION_RETURN_BOOL(self->IsJumpingAllowed());
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
|
|
@ -1464,6 +1471,12 @@ bool FLevelLocals::IsCrouchingAllowed() const
|
|||
return !(flags & LEVEL_CROUCH_NO);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(FLevelLocals, IsCrouchingAllowed)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
|
||||
ACTION_RETURN_BOOL(self->IsCrouchingAllowed());
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
|
|
@ -1478,6 +1491,13 @@ bool FLevelLocals::IsFreelookAllowed() const
|
|||
return !(flags & LEVEL_FREELOOK_NO);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(FLevelLocals, IsFreelookAllowed)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
|
||||
ACTION_RETURN_BOOL(self->IsFreelookAllowed());
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
|
|
@ -1932,6 +1952,7 @@ DEFINE_FIELD_BIT(FLevelLocals, flags2, missilesactivateimpact, LEVEL2_MISSILESAC
|
|||
DEFINE_FIELD_BIT(FLevelLocals, flags2, monsterfallingdamage, LEVEL2_MONSTERFALLINGDAMAGE)
|
||||
DEFINE_FIELD_BIT(FLevelLocals, flags2, checkswitchrange, LEVEL2_CHECKSWITCHRANGE)
|
||||
DEFINE_FIELD_BIT(FLevelLocals, flags2, polygrind, LEVEL2_POLYGRIND)
|
||||
DEFINE_FIELD_BIT(FLevelLocals, flags2, allowrespawn, LEVEL2_ALLOWRESPAWN)
|
||||
DEFINE_FIELD_BIT(FLevelLocals, flags2, nomonsters, LEVEL2_NOMONSTERS)
|
||||
DEFINE_FIELD_BIT(FLevelLocals, flags2, frozen, LEVEL2_FROZEN)
|
||||
DEFINE_FIELD_BIT(FLevelLocals, flags2, infinite_flight, LEVEL2_INFINITE_FLIGHT)
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
#include "gl/system//gl_interface.h"
|
||||
#include "vm.h"
|
||||
|
||||
EXTERN_CVAR(Int, vid_renderer)
|
||||
extern int currentrenderer;
|
||||
|
||||
|
||||
CUSTOM_CVAR (Bool, gl_lights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
|
|
@ -164,7 +164,7 @@ void ADynamicLight::BeginPlay()
|
|||
specialf1 = DAngle(double(SpawnAngle)).Normalized360().Degrees;
|
||||
visibletoplayer = true;
|
||||
|
||||
if (vid_renderer == 1 && gl.legacyMode && (flags4 & MF4_ATTENUATE))
|
||||
if (currentrenderer == 1 && gl.legacyMode && (flags4 & MF4_ATTENUATE))
|
||||
{
|
||||
args[LIGHT_INTENSITY] = args[LIGHT_INTENSITY] * 2 / 3;
|
||||
args[LIGHT_SECONDARY_INTENSITY] = args[LIGHT_SECONDARY_INTENSITY] * 2 / 3;
|
||||
|
|
|
|||
|
|
@ -378,9 +378,13 @@ void FGameConfigFile::DoGlobalSetup ()
|
|||
if (var != NULL) var->ResetToDefault();
|
||||
var = FindCVar("uiscale", NULL);
|
||||
if (var != NULL) var->ResetToDefault();
|
||||
|
||||
}
|
||||
|
||||
if (last < 215)
|
||||
{
|
||||
// Previously a true/false boolean. Now an on/off/auto tri-state with auto as the default.
|
||||
FBaseCVar *var = FindCVar("snd_hrtf", NULL);
|
||||
if (var != NULL) var->ResetToDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
#include "g_levellocals.h"
|
||||
#include "actorinlines.h"
|
||||
|
||||
EXTERN_CVAR(Int, vid_renderer)
|
||||
extern int currentrenderer;
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
@ -197,7 +197,7 @@ static void P_Add3DFloor(sector_t* sec, sector_t* sec2, line_t* master, int flag
|
|||
|
||||
// kg3D - software renderer only hack
|
||||
// this is really required because of ceilingclip and floorclip
|
||||
if((vid_renderer == 0) && (flags & FF_BOTHPLANES))
|
||||
if((currentrenderer == 0) && (flags & FF_BOTHPLANES))
|
||||
{
|
||||
P_Add3DFloor(sec, sec2, master, FF_EXISTS | FF_THISINSIDE | FF_RENDERPLANES | FF_NOSHADE | FF_SEETHROUGH | FF_SHOOTTHROUGH |
|
||||
(flags & (FF_INVERTSECTOR | FF_TRANSLUCENT | FF_ADDITIVETRANS)), alpha);
|
||||
|
|
|
|||
|
|
@ -3270,6 +3270,14 @@ void P_CheckFakeFloorTriggers (AActor *mo, double oldz, bool oldz_has_viewheight
|
|||
}
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, CheckFakeFloorTriggers)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_FLOAT(oldz);
|
||||
PARAM_BOOL_DEF(oldz_has_viewh);
|
||||
P_CheckFakeFloorTriggers(self, oldz, oldz_has_viewh);
|
||||
return 0;
|
||||
}
|
||||
//===========================================================================
|
||||
//
|
||||
// PlayerLandedOnThing
|
||||
|
|
|
|||
269
src/p_pspr.cpp
269
src/p_pspr.cpp
|
|
@ -126,6 +126,7 @@ DEFINE_FIELD(DPSprite, Next)
|
|||
DEFINE_FIELD(DPSprite, Owner)
|
||||
DEFINE_FIELD(DPSprite, Sprite)
|
||||
DEFINE_FIELD(DPSprite, Frame)
|
||||
DEFINE_FIELD(DPSprite, Flags)
|
||||
DEFINE_FIELD(DPSprite, ID)
|
||||
DEFINE_FIELD(DPSprite, processPending)
|
||||
DEFINE_FIELD(DPSprite, x)
|
||||
|
|
@ -601,82 +602,6 @@ DEFINE_ACTION_FUNCTION(_PlayerInfo, BringUpWeapon)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PROC P_FireWeapon
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void P_FireWeapon (player_t *player, FState *state)
|
||||
{
|
||||
AWeapon *weapon;
|
||||
|
||||
// [SO] 9/2/02: People were able to do an awful lot of damage
|
||||
// when they were observers...
|
||||
if (player->Bot == nullptr && bot_observer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
weapon = player->ReadyWeapon;
|
||||
if (weapon == nullptr || !weapon->CheckAmmo (AWeapon::PrimaryFire, true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player->WeaponState &= ~WF_WEAPONBOBBING;
|
||||
player->mo->PlayAttacking ();
|
||||
weapon->bAltFire = false;
|
||||
if (state == nullptr)
|
||||
{
|
||||
state = weapon->GetAtkState(!!player->refire);
|
||||
}
|
||||
P_SetPsprite(player, PSP_WEAPON, state);
|
||||
if (!(weapon->WeaponFlags & WIF_NOALERT))
|
||||
{
|
||||
P_NoiseAlert (player->mo, player->mo, false);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PROC P_FireWeaponAlt
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void P_FireWeaponAlt (player_t *player, FState *state)
|
||||
{
|
||||
AWeapon *weapon;
|
||||
|
||||
// [SO] 9/2/02: People were able to do an awful lot of damage
|
||||
// when they were observers...
|
||||
if (player->Bot == nullptr && bot_observer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
weapon = player->ReadyWeapon;
|
||||
if (weapon == nullptr || weapon->FindState(NAME_AltFire) == nullptr || !weapon->CheckAmmo (AWeapon::AltFire, true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player->WeaponState &= ~WF_WEAPONBOBBING;
|
||||
player->mo->PlayAttacking ();
|
||||
weapon->bAltFire = true;
|
||||
|
||||
if (state == nullptr)
|
||||
{
|
||||
state = weapon->GetAltAtkState(!!player->refire);
|
||||
}
|
||||
|
||||
P_SetPsprite(player, PSP_WEAPON, state);
|
||||
if (!(weapon->WeaponFlags & WIF_NOALERT))
|
||||
{
|
||||
P_NoiseAlert (player->mo, player->mo, false);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PROC P_DropWeapon
|
||||
|
|
@ -935,78 +860,6 @@ DEFINE_ACTION_FUNCTION(AStateProvider, A_WeaponReady)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PROC P_CheckWeaponFire
|
||||
//
|
||||
// The player can fire the weapon.
|
||||
// [RH] This was in A_WeaponReady before, but that only works well when the
|
||||
// weapon's ready frames have a one tic delay.
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void P_CheckWeaponFire (player_t *player)
|
||||
{
|
||||
AWeapon *weapon = player->ReadyWeapon;
|
||||
|
||||
if (weapon == NULL)
|
||||
return;
|
||||
|
||||
// Check for fire. Some weapons do not auto fire.
|
||||
if ((player->WeaponState & WF_WEAPONREADY) && (player->cmd.ucmd.buttons & BT_ATTACK))
|
||||
{
|
||||
if (!player->attackdown || !(weapon->WeaponFlags & WIF_NOAUTOFIRE))
|
||||
{
|
||||
player->attackdown = true;
|
||||
P_FireWeapon (player, NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if ((player->WeaponState & WF_WEAPONREADYALT) && (player->cmd.ucmd.buttons & BT_ALTATTACK))
|
||||
{
|
||||
if (!player->attackdown || !(weapon->WeaponFlags & WIF_NOAUTOFIRE))
|
||||
{
|
||||
player->attackdown = true;
|
||||
P_FireWeaponAlt (player, NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player->attackdown = false;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PROC P_CheckWeaponSwitch
|
||||
//
|
||||
// The player can change to another weapon at this time.
|
||||
// [GZ] This was cut from P_CheckWeaponFire.
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void P_CheckWeaponSwitch (player_t *player)
|
||||
{
|
||||
if (player == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ((player->WeaponState & WF_DISABLESWITCH) || // Weapon changing has been disabled.
|
||||
player->morphTics != 0) // Morphed classes cannot change weapons.
|
||||
{ // ...so throw away any pending weapon requests.
|
||||
player->PendingWeapon = WP_NOCHANGE;
|
||||
}
|
||||
|
||||
// Put the weapon away if the player has a pending weapon or has died, and
|
||||
// we're at a place in the state sequence where dropping the weapon is okay.
|
||||
if ((player->PendingWeapon != WP_NOCHANGE || player->health <= 0) &&
|
||||
player->WeaponState & WF_WEAPONSWITCHOK)
|
||||
{
|
||||
P_DropWeapon(player);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PROC P_CheckWeaponButtons
|
||||
|
|
@ -1046,53 +899,13 @@ static void P_CheckWeaponButtons (player_t *player)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PROC A_ReFire
|
||||
//
|
||||
// The player can re-fire the weapon without lowering it entirely.
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AStateProvider, A_ReFire)
|
||||
DEFINE_ACTION_FUNCTION(APlayerPawn, CheckWeaponButtons)
|
||||
{
|
||||
PARAM_ACTION_PROLOGUE(AStateProvider);
|
||||
PARAM_STATE_ACTION_DEF(state);
|
||||
A_ReFire(self, state);
|
||||
PARAM_SELF_PROLOGUE(APlayerPawn);
|
||||
P_CheckWeaponButtons(self->player);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void A_ReFire(AActor *self, FState *state)
|
||||
{
|
||||
player_t *player = self->player;
|
||||
bool pending;
|
||||
|
||||
if (NULL == player)
|
||||
{
|
||||
return;
|
||||
}
|
||||
pending = player->PendingWeapon != WP_NOCHANGE && (player->WeaponState & WF_REFIRESWITCHOK);
|
||||
if ((player->cmd.ucmd.buttons & BT_ATTACK)
|
||||
&& !player->ReadyWeapon->bAltFire && !pending && player->health > 0)
|
||||
{
|
||||
player->refire++;
|
||||
P_FireWeapon (player, state);
|
||||
}
|
||||
else if ((player->cmd.ucmd.buttons & BT_ALTATTACK)
|
||||
&& player->ReadyWeapon->bAltFire && !pending && player->health > 0)
|
||||
{
|
||||
player->refire++;
|
||||
P_FireWeaponAlt (player, state);
|
||||
}
|
||||
else
|
||||
{
|
||||
player->refire = 0;
|
||||
player->ReadyWeapon->CheckAmmo (player->ReadyWeapon->bAltFire
|
||||
? AWeapon::AltFire : AWeapon::PrimaryFire, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PROC A_OverlayOffset
|
||||
|
|
@ -1459,80 +1272,6 @@ void P_SetupPsprites(player_t *player, bool startweaponup)
|
|||
P_BringUpWeapon (player);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//
|
||||
// PROC P_MovePsprites
|
||||
//
|
||||
// Called every tic by player thinking routine
|
||||
//
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
void player_t::TickPSprites()
|
||||
{
|
||||
DPSprite *pspr = psprites;
|
||||
while (pspr)
|
||||
{
|
||||
// Destroy the psprite if it's from a weapon that isn't currently selected by the player
|
||||
// or if it's from an inventory item that the player no longer owns.
|
||||
if ((pspr->Caller == nullptr ||
|
||||
(pspr->Caller->IsKindOf(RUNTIME_CLASS(AInventory)) && barrier_cast<AInventory *>(pspr->Caller)->Owner != pspr->Owner->mo) ||
|
||||
(pspr->Caller->IsKindOf(NAME_Weapon) && pspr->Caller != pspr->Owner->ReadyWeapon)))
|
||||
{
|
||||
pspr->Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
pspr->Tick();
|
||||
}
|
||||
|
||||
pspr = pspr->Next;
|
||||
}
|
||||
|
||||
if ((health > 0) || (ReadyWeapon != nullptr && !(ReadyWeapon->WeaponFlags & WIF_NODEATHINPUT)))
|
||||
{
|
||||
if (ReadyWeapon == nullptr)
|
||||
{
|
||||
if (PendingWeapon != WP_NOCHANGE)
|
||||
P_BringUpWeapon(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
P_CheckWeaponSwitch(this);
|
||||
if (WeaponState & (WF_WEAPONREADY | WF_WEAPONREADYALT))
|
||||
{
|
||||
P_CheckWeaponFire(this);
|
||||
}
|
||||
// Check custom buttons
|
||||
P_CheckWeaponButtons(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
void DPSprite::Tick()
|
||||
{
|
||||
if (processPending)
|
||||
{
|
||||
// drop tic count and possibly change state
|
||||
if (Tics != -1) // a -1 tic count never changes
|
||||
{
|
||||
Tics--;
|
||||
|
||||
// [BC] Apply double firing speed.
|
||||
if ((Flags & PSPF_POWDOUBLE) && Tics && (Owner->mo->FindInventory (PClass::FindActor(NAME_PowerDoubleFiringSpeed), true)))
|
||||
Tics--;
|
||||
|
||||
if (!Tics)
|
||||
SetState(State->GetNextState());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@ private:
|
|||
DPSprite () {}
|
||||
|
||||
void Serialize(FSerializer &arc);
|
||||
void Tick();
|
||||
|
||||
public: // must be public to be able to generate the field export tables. Grrr...
|
||||
TObjPtr<AActor*> Caller;
|
||||
|
|
|
|||
930
src/p_user.cpp
930
src/p_user.cpp
File diff suppressed because it is too large
Load diff
|
|
@ -116,6 +116,8 @@
|
|||
|
||||
DFrameBuffer *CreateGLSWFrameBuffer(int width, int height, bool bgra, bool fullscreen);
|
||||
|
||||
int currentrenderer;
|
||||
|
||||
CUSTOM_CVAR(Bool, vid_glswfb, true, CVAR_NOINITCALL | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
{
|
||||
Printf("This won't take effect until " GAMENAME " is restarted.\n");
|
||||
|
|
@ -135,11 +137,14 @@ CUSTOM_CVAR(Bool, swtruecolor, TRUECOLOR_DEFAULT, CVAR_ARCHIVE | CVAR_GLOBALCONF
|
|||
{
|
||||
// Strictly speaking this doesn't require a mode switch, but it is the easiest
|
||||
// way to force a CreateFramebuffer call without a lot of refactoring.
|
||||
extern int NewWidth, NewHeight, NewBits, DisplayBits;
|
||||
NewWidth = screen->GetWidth();
|
||||
NewHeight = screen->GetHeight();
|
||||
NewBits = DisplayBits;
|
||||
setmodeneeded = true;
|
||||
if (currentrenderer == 0)
|
||||
{
|
||||
extern int NewWidth, NewHeight, NewBits, DisplayBits;
|
||||
NewWidth = screen->GetWidth();
|
||||
NewHeight = screen->GetHeight();
|
||||
NewBits = DisplayBits;
|
||||
setmodeneeded = true;
|
||||
}
|
||||
}
|
||||
|
||||
CUSTOM_CVAR(Bool, fullscreen, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
|
@ -157,14 +162,12 @@ CUSTOM_CVAR(Bool, vid_autoswitch, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_
|
|||
Printf("You must restart " GAMENAME " to apply graphics switching mode\n");
|
||||
}
|
||||
|
||||
static int s_currentRenderer;
|
||||
|
||||
CUSTOM_CVAR(Int, vid_renderer, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
{
|
||||
// 0: Software renderer
|
||||
// 1: OpenGL renderer
|
||||
|
||||
if (self != s_currentRenderer)
|
||||
if (self != currentrenderer)
|
||||
{
|
||||
switch (self)
|
||||
{
|
||||
|
|
@ -657,7 +660,7 @@ DFrameBuffer* CocoaVideo::CreateFrameBuffer(const int width, const int height, c
|
|||
|
||||
DFrameBuffer* fb = NULL;
|
||||
|
||||
if (1 == s_currentRenderer)
|
||||
if (1 == currentrenderer)
|
||||
{
|
||||
fb = new OpenGLFrameBuffer(NULL, width, height, 32, 60, fullscreen);
|
||||
}
|
||||
|
|
@ -1360,13 +1363,13 @@ static void I_DeleteRenderer()
|
|||
|
||||
void I_CreateRenderer()
|
||||
{
|
||||
s_currentRenderer = vid_renderer;
|
||||
currentrenderer = vid_renderer;
|
||||
|
||||
if (NULL == Renderer)
|
||||
{
|
||||
extern FRenderer* gl_CreateInterface();
|
||||
|
||||
Renderer = 1 == s_currentRenderer
|
||||
Renderer = 1 == currentrenderer
|
||||
? gl_CreateInterface()
|
||||
: new FSoftwareRenderer;
|
||||
atterm(I_DeleteRenderer);
|
||||
|
|
|
|||
|
|
@ -323,10 +323,13 @@ CUSTOM_CVAR(Bool, swtruecolor, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITC
|
|||
{
|
||||
// Strictly speaking this doesn't require a mode switch, but it is the easiest
|
||||
// way to force a CreateFramebuffer call without a lot of refactoring.
|
||||
NewWidth = screen->GetWidth();
|
||||
NewHeight = screen->GetHeight();
|
||||
NewBits = DisplayBits;
|
||||
setmodeneeded = true;
|
||||
if (currentrenderer == 0)
|
||||
{
|
||||
NewWidth = screen->GetWidth();
|
||||
NewHeight = screen->GetHeight();
|
||||
NewBits = DisplayBits;
|
||||
setmodeneeded = true;
|
||||
}
|
||||
}
|
||||
|
||||
CUSTOM_CVAR (Bool, fullscreen, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ FCanvasTextureInfo *FCanvasTextureInfo::List;
|
|||
DVector3a view;
|
||||
DAngle viewpitch;
|
||||
|
||||
DEFINE_GLOBAL(LocalViewPitch);
|
||||
|
||||
// CODE --------------------------------------------------------------------
|
||||
static void R_Shutdown ();
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ EXTERN_CVAR (Float, snd_sfxvolume)
|
|||
CVAR (Int, snd_samplerate, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Int, snd_buffersize, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (String, snd_output, "default", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Int, snd_hrtf, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Int, snd_hrtf, -1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
|
||||
#if !defined(NO_OPENAL)
|
||||
#define DEF_BACKEND "openal"
|
||||
|
|
|
|||
|
|
@ -756,7 +756,7 @@ OpenALSoundRenderer::OpenALSoundRenderer()
|
|||
if(ALC.SOFT_HRTF)
|
||||
{
|
||||
attribs.Push(ALC_HRTF_SOFT);
|
||||
if(*snd_hrtf < 0)
|
||||
if(*snd_hrtf == 0)
|
||||
attribs.Push(ALC_FALSE);
|
||||
else if(*snd_hrtf > 0)
|
||||
attribs.Push(ALC_TRUE);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ const char *GetVersionString();
|
|||
// Version stored in the ini's [LastRun] section.
|
||||
// Bump it if you made some configuration change that you want to
|
||||
// be able to migrate in FGameConfigFile::DoGlobalSetup().
|
||||
#define LASTRUNVERSION "214"
|
||||
#define LASTRUNVERSION "215"
|
||||
|
||||
// Protocol version used in demos.
|
||||
// Bump it if you change existing DEM_ commands or add new ones.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue