mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-01 17:52:05 +00:00
* Updated to ZDoom r3121:
- Added a 'block sight' line flag. - Updated UDMF spec for player class and skill amount because the old menu limits no longer apply. - Fixed: FloorAndCeiling_LowerRaise needs to consider 4 args in maps to account for the Boom compatibility hack parameter. - Fixed: 3DMidtextures did not work correctly in sectors with slopes. - Added a check to output a clear error message if no IWAD definitions could be loaded. - Added fix for timing of the boss cube while a time freezer is active. - Added cursor support for SDL. - Let's not be so quick to break savegame compatibility... - Fixed some incorrect P_CheckSight flag use in p_enemy.cpp. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1183 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
41e65154a5
commit
ced25f823f
18 changed files with 105 additions and 29 deletions
|
@ -112,6 +112,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
checkswitchrange = <bool>;// Switches can only be activated when vertically reachable.
|
||||
blockprojectiles = <bool>;// Line blocks all projectiles
|
||||
blockuse = <bool>; // Line blocks all use actions
|
||||
blocksight = <bool>; // Line blocks monster line of sight
|
||||
|
||||
}
|
||||
|
||||
|
@ -162,8 +163,8 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
alphafloor = <float>; // translucency of floor plane (only has meaning with Sector_SetPortal) Default is 1.0.
|
||||
alphaceiling = <float>; // translucency of ceiling plane (only has meaning with Sector_SetPortal) Default is 1.0.
|
||||
gravity = <float>; // Sector's gravity. Default is 1.0.
|
||||
lightcolor = <integer>; // Sector'S light color as RRGGBB value, default = 0xffffff.
|
||||
fadecolor = <integer>; // Sector'S fog color as RRGGBB value, default = 0x000000.
|
||||
lightcolor = <integer>; // Sector's light color as RRGGBB value, default = 0xffffff.
|
||||
fadecolor = <integer>; // Sector's fog color as RRGGBB value, default = 0x000000.
|
||||
desaturation = <float>; // Color desaturation factor. 0 = none, 1 = full, default = 0.
|
||||
silent = <bool>; // Actors in this sector make no sound,
|
||||
nofallingdamage = <bool>; // Falling damage is disabled in this sector
|
||||
|
@ -183,12 +184,8 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
|
||||
thing
|
||||
{
|
||||
skill# = <bool> // Unlike the base spec, # can range from 1-8.
|
||||
// 8 is the maximum amount of skills the skill
|
||||
// menu can display.
|
||||
class# = <bool> // Unlike the base spec, # can range from 1-8.
|
||||
// 8 is the maximum amount of classes the class
|
||||
// menu can display.
|
||||
skill# = <bool> // Unlike the base spec, # can range from 1-16.
|
||||
class# = <bool> // Unlike the base spec, # can range from 1-16.
|
||||
conversation = <int> // Assigns a conversation dialogue to this thing.
|
||||
// Parameter is the conversation ID, 0 meaning none.
|
||||
countsecret = <bool>; // Picking up this actor counts as a secret.
|
||||
|
@ -292,6 +289,10 @@ Added 'countsecret' actor property.
|
|||
1.15 14.12.2010
|
||||
Added vertex floor and ceiling height properties
|
||||
|
||||
1.16 23.01.2011
|
||||
Added blocksight linedef flag
|
||||
Removed remarks of 8 being the maximum number of player classes/skill levels the menu can handle so the spec now properly lists 16 as limit.
|
||||
|
||||
===============================================================================
|
||||
EOF
|
||||
===============================================================================
|
||||
|
|
|
@ -227,7 +227,7 @@ DEFINE_SPECIAL(Elevator_LowerToNearest, 247, 2, 2, 2)
|
|||
DEFINE_SPECIAL(HealThing, 248, 1, 2, 2)
|
||||
DEFINE_SPECIAL(Door_CloseWaitOpen, 249, 3, 4, 4)
|
||||
DEFINE_SPECIAL(Floor_Donut, 250, 3, 3, 3)
|
||||
DEFINE_SPECIAL(FloorAndCeiling_LowerRaise, 251, 3, 3, 3)
|
||||
DEFINE_SPECIAL(FloorAndCeiling_LowerRaise, 251, 3, 3, 4)
|
||||
DEFINE_SPECIAL(Ceiling_RaiseToNearest, 252, 2, 2, 2)
|
||||
DEFINE_SPECIAL(Ceiling_LowerToLowest, 253, 2, 2, 2)
|
||||
DEFINE_SPECIAL(Ceiling_LowerToFloor, 254, 2, 2, 2)
|
||||
|
|
|
@ -325,6 +325,7 @@ enum
|
|||
MF6_ADDITIVEPOISONDAMAGE = 0x00100000,
|
||||
MF6_ADDITIVEPOISONDURATION = 0x00200000,
|
||||
MF6_NOMENU = 0x00400000, // Player class should not appear in the class selection menu.
|
||||
MF6_BOSSCUBE = 0x00800000, // Actor spawned by A_BrainSpit, flagged for timefreeze reasons.
|
||||
|
||||
// --- mobj.renderflags ---
|
||||
|
||||
|
|
|
@ -269,6 +269,10 @@ void FIWadManager::ParseIWadInfos(const char *fn)
|
|||
}
|
||||
delete resfile;
|
||||
}
|
||||
if (mIWadNames.Size() == 0 || mIWads.Size() == 0)
|
||||
{
|
||||
I_FatalError("No IWAD definitions found");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -152,6 +152,7 @@ enum ELineFlags
|
|||
ML_FIRSTSIDEONLY = 0x00800000, // activated only when crossed from front side
|
||||
ML_BLOCKPROJECTILE = 0x01000000,
|
||||
ML_BLOCKUSE = 0x02000000, // blocks all use actions through this line
|
||||
ML_BLOCKSIGHT = 0x04000000, // blocks monster line of sight
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -142,6 +142,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BrainSpit)
|
|||
}
|
||||
// [GZ] Calculates when the projectile will have reached destination
|
||||
spit->special2 += level.maptime;
|
||||
spit->flags6 |= MF6_BOSSCUBE;
|
||||
}
|
||||
|
||||
if (!isdefault)
|
||||
|
|
|
@ -443,6 +443,7 @@ xx(smoothlighting)
|
|||
xx(blockprojectiles)
|
||||
xx(blockuse)
|
||||
xx(hidden)
|
||||
xx(blocksight)
|
||||
|
||||
xx(Renderstyle)
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ bool P_CheckMissileRange (AActor *actor)
|
|||
{
|
||||
fixed_t dist;
|
||||
|
||||
if (!P_CheckSight (actor, actor->target, SF_SEEPASTBLOCKEVERYTHING|SF_SEEPASTSHOOTABLELINES))
|
||||
if (!P_CheckSight (actor, actor->target, SF_SEEPASTBLOCKEVERYTHING))
|
||||
return false;
|
||||
|
||||
if (actor->flags & MF_JUSTHIT)
|
||||
|
@ -1151,7 +1151,7 @@ bool P_IsVisible(AActor *lookee, AActor *other, INTBOOL allaround, FLookExParams
|
|||
}
|
||||
|
||||
// P_CheckSight is by far the most expensive operation in here so let's do it last.
|
||||
return P_CheckSight(lookee, other, SF_SEEPASTBLOCKEVERYTHING);
|
||||
return P_CheckSight(lookee, other, SF_SEEPASTSHOOTABLELINES);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -2473,6 +2473,7 @@ FUNC(LS_Line_SetBlocking)
|
|||
ML_BLOCKEVERYTHING,
|
||||
ML_RAILING,
|
||||
ML_BLOCKUSE,
|
||||
ML_BLOCKSIGHT,
|
||||
-1
|
||||
};
|
||||
|
||||
|
|
|
@ -740,7 +740,8 @@ bool PIT_CheckLine (line_t *ld, const FBoundingBox &box, FCheckPosition &tm)
|
|||
// so don't mess around with the z-position
|
||||
if (ld->frontsector->floorplane==ld->backsector->floorplane &&
|
||||
ld->frontsector->floorplane==tm.thing->Sector->floorplane &&
|
||||
!ld->frontsector->e->XFloor.ffloors.Size() && !ld->backsector->e->XFloor.ffloors.Size())
|
||||
!ld->frontsector->e->XFloor.ffloors.Size() && !ld->backsector->e->XFloor.ffloors.Size() &&
|
||||
!open.abovemidtex)
|
||||
{
|
||||
open.bottom=INT_MIN;
|
||||
}
|
||||
|
|
|
@ -299,9 +299,12 @@ void AActor::Serialize (FArchive &arc)
|
|||
<< BlockingLine
|
||||
<< pushfactor
|
||||
<< Species
|
||||
<< Score
|
||||
<< DesignatedTeam
|
||||
<< lastpush << lastbump
|
||||
<< Score;
|
||||
if (SaveVersion >= 3113)
|
||||
{
|
||||
arc << DesignatedTeam;
|
||||
}
|
||||
arc << lastpush << lastbump
|
||||
<< PainThreshold
|
||||
<< DamageFactor
|
||||
<< WeaveIndexXY << WeaveIndexZ
|
||||
|
@ -2747,6 +2750,11 @@ void AActor::Tick ()
|
|||
//Added by MC: Freeze mode.
|
||||
if (bglobal.freeze || level.flags2 & LEVEL2_FROZEN)
|
||||
{
|
||||
// Boss cubes shouldn't be accelerated by timefreeze
|
||||
if (flags6 & MF6_BOSSCUBE)
|
||||
{
|
||||
special2++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -2777,6 +2785,11 @@ void AActor::Tick ()
|
|||
|
||||
if (!(flags5 & MF5_NOTIMEFREEZE))
|
||||
{
|
||||
// Boss cubes shouldn't be accelerated by timefreeze
|
||||
if (flags6 & MF6_BOSSCUBE)
|
||||
{
|
||||
special2++;
|
||||
}
|
||||
//Added by MC: Freeze mode.
|
||||
if (bglobal.freeze && !(player && !player->isbot))
|
||||
{
|
||||
|
|
|
@ -256,7 +256,7 @@ bool SightCheck::P_SightCheckLine (line_t *ld)
|
|||
}
|
||||
|
||||
// try to early out the check
|
||||
if (!ld->backsector || !(ld->flags & ML_TWOSIDED))
|
||||
if (!ld->backsector || !(ld->flags & ML_TWOSIDED) || (ld->flags & ML_BLOCKSIGHT))
|
||||
return false; // stop checking
|
||||
|
||||
// [RH] don't see past block everything lines
|
||||
|
|
|
@ -874,6 +874,10 @@ public:
|
|||
Flag(ld->flags, ML_BLOCKUSE, key);
|
||||
continue;
|
||||
|
||||
case NAME_blocksight:
|
||||
Flag(ld->flags, ML_BLOCKSIGHT, key);
|
||||
continue;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
static void I_CheckGUICapture ();
|
||||
static void I_CheckNativeMouse ();
|
||||
|
||||
static bool GUICapture;
|
||||
bool GUICapture;
|
||||
static bool NativeMouse = true;
|
||||
|
||||
extern int paused;
|
||||
|
@ -36,6 +36,9 @@ EXTERN_CVAR (Bool, fullscreen)
|
|||
extern int WaitingForKey, chatmodeon;
|
||||
extern constate_e ConsoleState;
|
||||
|
||||
extern SDL_Surface *cursorSurface;
|
||||
extern SDL_Rect cursorBlit;
|
||||
|
||||
static BYTE KeySymToDIK[SDLK_LAST], DownState[SDLK_LAST];
|
||||
|
||||
static WORD DIKToKeySym[256] =
|
||||
|
@ -114,6 +117,11 @@ static void I_CheckGUICapture ()
|
|||
GUICapture = wantCapt;
|
||||
if (wantCapt)
|
||||
{
|
||||
int x, y;
|
||||
SDL_GetMouseState (&x, &y);
|
||||
cursorBlit.x = x;
|
||||
cursorBlit.y = y;
|
||||
|
||||
FlushDIKState ();
|
||||
memset (DownState, 0, sizeof(DownState));
|
||||
repeat = !sdl_nokeyrepeat;
|
||||
|
@ -260,15 +268,14 @@ static void I_CheckNativeMouse ()
|
|||
if (wantNative != NativeMouse)
|
||||
{
|
||||
NativeMouse = wantNative;
|
||||
SDL_ShowCursor (wantNative ? cursorSurface == NULL : 0);
|
||||
if (wantNative)
|
||||
{
|
||||
SDL_ShowCursor (1);
|
||||
SDL_WM_GrabInput (SDL_GRAB_OFF);
|
||||
FlushDIKState (KEY_MOUSE1, KEY_MOUSE8);
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_ShowCursor (0);
|
||||
SDL_WM_GrabInput (SDL_GRAB_ON);
|
||||
CenterMouse ();
|
||||
}
|
||||
|
@ -347,8 +354,8 @@ void MessagePump (const SDL_Event &sev)
|
|||
int x, y;
|
||||
SDL_GetMouseState (&x, &y);
|
||||
|
||||
event.data1 = x;
|
||||
event.data2 = y;
|
||||
cursorBlit.x = event.data1 = x;
|
||||
cursorBlit.y = event.data2 = y;
|
||||
event.type = EV_GUI_Event;
|
||||
if(sev.type == SDL_MOUSEMOTION)
|
||||
event.subtype = EV_GUI_MouseMove;
|
||||
|
|
|
@ -60,6 +60,9 @@
|
|||
#include "i_system.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "templates.h"
|
||||
#include "v_palette.h"
|
||||
#include "textures.h"
|
||||
#include "bitmap.h"
|
||||
|
||||
#include "stats.h"
|
||||
#include "hardware.h"
|
||||
|
@ -830,7 +833,39 @@ unsigned int I_MakeRNGSeed()
|
|||
return seed;
|
||||
}
|
||||
|
||||
SDL_Surface *cursorSurface = NULL;
|
||||
SDL_Rect cursorBlit = {0, 0, 32, 32};
|
||||
bool I_SetCursor(FTexture *cursorpic)
|
||||
{
|
||||
return false;
|
||||
if (cursorpic != NULL && cursorpic->UseType != FTexture::TEX_Null)
|
||||
{
|
||||
// Must be no larger than 32x32.
|
||||
if (cursorpic->GetWidth() > 32 || cursorpic->GetHeight() > 32)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cursorSurface == NULL)
|
||||
cursorSurface = SDL_CreateRGBSurface (0, 32, 32, 32, MAKEARGB(0,255,0,0), MAKEARGB(0,0,255,0), MAKEARGB(0,0,0,255), MAKEARGB(255,0,0,0));
|
||||
|
||||
SDL_ShowCursor(0);
|
||||
SDL_LockSurface(cursorSurface);
|
||||
BYTE buffer[32*32*4];
|
||||
memset(buffer, 0, 32*32*4);
|
||||
FBitmap bmp(buffer, 32*4, 32, 32);
|
||||
cursorpic->CopyTrueColorPixels(&bmp, 0, 0);
|
||||
memcpy(cursorSurface->pixels, bmp.GetPixels(), 32*32*4);
|
||||
SDL_UnlockSurface(cursorSurface);
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_ShowCursor(1);
|
||||
|
||||
if (cursorSurface != NULL)
|
||||
{
|
||||
SDL_FreeSurface(cursorSurface);
|
||||
cursorSurface = NULL;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -76,6 +76,9 @@ void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, in
|
|||
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
||||
|
||||
extern IVideo *Video;
|
||||
extern SDL_Surface *cursorSurface;
|
||||
extern SDL_Rect cursorBlit;
|
||||
extern bool GUICapture;
|
||||
|
||||
EXTERN_CVAR (Float, Gamma)
|
||||
|
||||
|
@ -404,7 +407,13 @@ void SDLFB::Update ()
|
|||
}
|
||||
|
||||
SDL_UnlockSurface (Screen);
|
||||
|
||||
|
||||
if (cursorSurface != NULL && GUICapture)
|
||||
{
|
||||
// SDL requires us to draw a surface to get true color cursors.
|
||||
SDL_BlitSurface(cursorSurface, NULL, Screen, &cursorBlit);
|
||||
}
|
||||
|
||||
SDLFlipCycles.Clock();
|
||||
SDL_Flip (Screen);
|
||||
SDLFlipCycles.Unclock();
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
// This file was automatically generated by the
|
||||
// updaterevision tool. Do not edit by hand.
|
||||
|
||||
#define ZD_SVN_REVISION_STRING "3111"
|
||||
#define ZD_SVN_REVISION_NUMBER 3111
|
||||
#define ZD_SVN_REVISION_STRING "3121"
|
||||
#define ZD_SVN_REVISION_NUMBER 3121
|
||||
|
|
|
@ -528,10 +528,7 @@ OptionMenu "MouseOptions"
|
|||
Option "Enable mouse", "use_mouse", "YesNo"
|
||||
Option "Enable mouse in menus", "m_use_mouse", "MenuMouse", "use_mouse"
|
||||
Option "Show back button", "m_show_backbutton", "Corners", "use_mouse"
|
||||
IfOption(Windows) // No cursors on SDL right now.
|
||||
{
|
||||
Option "Cursor", "vid_cursor", "Cursors"
|
||||
}
|
||||
Option "Cursor", "vid_cursor", "Cursors"
|
||||
StaticText ""
|
||||
Slider "Overall sensitivity", "mouse_sensitivity", 0.5, 2.5, 0.1
|
||||
Option "Prescale mouse movement", "m_noprescale", "NoYes"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue