mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
0e9eb2f305
6 changed files with 82 additions and 76 deletions
|
@ -81,7 +81,7 @@ struct MapinfoEdMapItem
|
||||||
{
|
{
|
||||||
FName classname; // DECORATE is read after MAPINFO so we do not have the actual classes available here yet.
|
FName classname; // DECORATE is read after MAPINFO so we do not have the actual classes available here yet.
|
||||||
short special;
|
short special;
|
||||||
bool argsdefined;
|
signed char argsdefined;
|
||||||
int args[5];
|
int args[5];
|
||||||
// These are for error reporting. We must store the file information because it's no longer available when these items get resolved.
|
// These are for error reporting. We must store the file information because it's no longer available when these items get resolved.
|
||||||
FString filename;
|
FString filename;
|
||||||
|
@ -181,14 +181,14 @@ void FMapInfoParser::ParseDoomEdNums()
|
||||||
editem.special = -1;
|
editem.special = -1;
|
||||||
}
|
}
|
||||||
memset(editem.args, 0, sizeof(editem.args));
|
memset(editem.args, 0, sizeof(editem.args));
|
||||||
editem.argsdefined = false;
|
editem.argsdefined = 0;
|
||||||
|
|
||||||
int minargs = 0;
|
int minargs = 0;
|
||||||
int maxargs = 5;
|
int maxargs = 5;
|
||||||
FString specialname;
|
FString specialname;
|
||||||
if (sc.CheckString(","))
|
if (sc.CheckString(","))
|
||||||
{
|
{
|
||||||
editem.argsdefined = true; // mark args as used - if this is done we need to prevent assignment of map args in P_SpawnMapThing.
|
editem.argsdefined = 5; // mark args as used - if this is done we need to prevent assignment of map args in P_SpawnMapThing.
|
||||||
if (editem.special < 0) editem.special = 0;
|
if (editem.special < 0) editem.special = 0;
|
||||||
if (!sc.CheckNumber())
|
if (!sc.CheckNumber())
|
||||||
{
|
{
|
||||||
|
@ -221,7 +221,14 @@ void FMapInfoParser::ParseDoomEdNums()
|
||||||
editem.args[i] = sc.Number;
|
editem.args[i] = sc.Number;
|
||||||
i++;
|
i++;
|
||||||
if (!sc.CheckString(",")) break;
|
if (!sc.CheckString(",")) break;
|
||||||
|
// special check for the ambient sounds which combine the arg being set here with the ones on the mapthing.
|
||||||
|
if (sc.CheckString("+"))
|
||||||
|
{
|
||||||
|
editem.argsdefined = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
sc.MustGetNumber();
|
sc.MustGetNumber();
|
||||||
|
|
||||||
}
|
}
|
||||||
if (specialname.IsNotEmpty() && (i < minargs || i > maxargs))
|
if (specialname.IsNotEmpty() && (i < minargs || i > maxargs))
|
||||||
{
|
{
|
||||||
|
|
|
@ -283,7 +283,7 @@ struct FDoomEdEntry
|
||||||
{
|
{
|
||||||
const PClass *Type;
|
const PClass *Type;
|
||||||
short Special;
|
short Special;
|
||||||
bool ArgsDefined;
|
signed char ArgsDefined;
|
||||||
int Args[5];
|
int Args[5];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,9 @@ public:
|
||||||
// Returns a random number in the range [0,mod)
|
// Returns a random number in the range [0,mod)
|
||||||
int operator() (int mod)
|
int operator() (int mod)
|
||||||
{
|
{
|
||||||
return GenRand32() % mod;
|
return (0 == mod)
|
||||||
|
? 0
|
||||||
|
: (GenRand32() % mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns rand# - rand#
|
// Returns rand# - rand#
|
||||||
|
|
|
@ -4674,10 +4674,10 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy args to mapthing so that we have them in one place for the rest of this function
|
// copy args to mapthing so that we have them in one place for the rest of this function
|
||||||
if (mentry->ArgsDefined)
|
if (mentry->ArgsDefined > 0)
|
||||||
{
|
{
|
||||||
if (mentry->Type!= NULL) mthing->special = mentry->Special;
|
if (mentry->Type!= NULL) mthing->special = mentry->Special;
|
||||||
memcpy(mthing->args, mentry->Args, sizeof(mthing->args));
|
memcpy(mthing->args, mentry->Args, sizeof(mthing->args[0]) * mentry->ArgsDefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
int pnum = -1;
|
int pnum = -1;
|
||||||
|
|
|
@ -625,7 +625,7 @@ void CocoaVideo::SetFullscreenMode(const int width, const int height)
|
||||||
[m_window setHidesOnDeactivate:YES];
|
[m_window setHidesOnDeactivate:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
[m_window setFrame:displayRect display:YES];
|
[m_window setFrame:screenFrame display:YES];
|
||||||
[m_window setFrameOrigin:NSMakePoint(0.0f, 0.0f)];
|
[m_window setFrameOrigin:NSMakePoint(0.0f, 0.0f)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1231,10 +1231,7 @@ NSSize I_GetContentViewSize(const NSWindow* const window)
|
||||||
const NSView* const view = [window contentView];
|
const NSView* const view = [window contentView];
|
||||||
const NSSize frameSize = [view frame].size;
|
const NSSize frameSize = [view frame].size;
|
||||||
|
|
||||||
// TODO: figure out why [NSView frame] returns different values in "fullscreen" and in window
|
return (vid_hidpi)
|
||||||
// In "fullscreen" the result is multiplied by [NSScreen backingScaleFactor], but not in window
|
|
||||||
|
|
||||||
return (vid_hidpi && !fullscreen)
|
|
||||||
? [view convertSizeToBacking:frameSize]
|
? [view convertSizeToBacking:frameSize]
|
||||||
: frameSize;
|
: frameSize;
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,70 +118,70 @@ DoomEdNums
|
||||||
9997 = SecActExit
|
9997 = SecActExit
|
||||||
9998 = SecActEnter
|
9998 = SecActEnter
|
||||||
9999 = SecActHitFloor
|
9999 = SecActHitFloor
|
||||||
14001 = AmbientSound, 1
|
14001 = AmbientSound, 1, +
|
||||||
14002 = AmbientSound, 2
|
14002 = AmbientSound, 2, +
|
||||||
14003 = AmbientSound, 3
|
14003 = AmbientSound, 3, +
|
||||||
14004 = AmbientSound, 4
|
14004 = AmbientSound, 4, +
|
||||||
14005 = AmbientSound, 5
|
14005 = AmbientSound, 5, +
|
||||||
14006 = AmbientSound, 6
|
14006 = AmbientSound, 6, +
|
||||||
14007 = AmbientSound, 7
|
14007 = AmbientSound, 7, +
|
||||||
14008 = AmbientSound, 8
|
14008 = AmbientSound, 8, +
|
||||||
14009 = AmbientSound, 9
|
14009 = AmbientSound, 9, +
|
||||||
14010 = AmbientSound, 10
|
14010 = AmbientSound, 10, +
|
||||||
14011 = AmbientSound, 11
|
14011 = AmbientSound, 11, +
|
||||||
14012 = AmbientSound, 12
|
14012 = AmbientSound, 12, +
|
||||||
14013 = AmbientSound, 13
|
14013 = AmbientSound, 13, +
|
||||||
14014 = AmbientSound, 14
|
14014 = AmbientSound, 14, +
|
||||||
14015 = AmbientSound, 15
|
14015 = AmbientSound, 15, +
|
||||||
14016 = AmbientSound, 16
|
14016 = AmbientSound, 16, +
|
||||||
14017 = AmbientSound, 17
|
14017 = AmbientSound, 17, +
|
||||||
14018 = AmbientSound, 18
|
14018 = AmbientSound, 18, +
|
||||||
14019 = AmbientSound, 19
|
14019 = AmbientSound, 19, +
|
||||||
14020 = AmbientSound, 20
|
14020 = AmbientSound, 20, +
|
||||||
14021 = AmbientSound, 21
|
14021 = AmbientSound, 21, +
|
||||||
14022 = AmbientSound, 22
|
14022 = AmbientSound, 22, +
|
||||||
14023 = AmbientSound, 23
|
14023 = AmbientSound, 23, +
|
||||||
14024 = AmbientSound, 24
|
14024 = AmbientSound, 24, +
|
||||||
14025 = AmbientSound, 25
|
14025 = AmbientSound, 25, +
|
||||||
14026 = AmbientSound, 26
|
14026 = AmbientSound, 26, +
|
||||||
14027 = AmbientSound, 27
|
14027 = AmbientSound, 27, +
|
||||||
14028 = AmbientSound, 28
|
14028 = AmbientSound, 28, +
|
||||||
14029 = AmbientSound, 29
|
14029 = AmbientSound, 29, +
|
||||||
14030 = AmbientSound, 30
|
14030 = AmbientSound, 30, +
|
||||||
14031 = AmbientSound, 31
|
14031 = AmbientSound, 31, +
|
||||||
14032 = AmbientSound, 32
|
14032 = AmbientSound, 32, +
|
||||||
14033 = AmbientSound, 33
|
14033 = AmbientSound, 33, +
|
||||||
14034 = AmbientSound, 34
|
14034 = AmbientSound, 34, +
|
||||||
14035 = AmbientSound, 35
|
14035 = AmbientSound, 35, +
|
||||||
14036 = AmbientSound, 36
|
14036 = AmbientSound, 36, +
|
||||||
14037 = AmbientSound, 37
|
14037 = AmbientSound, 37, +
|
||||||
14038 = AmbientSound, 38
|
14038 = AmbientSound, 38, +
|
||||||
14039 = AmbientSound, 39
|
14039 = AmbientSound, 39, +
|
||||||
14040 = AmbientSound, 40
|
14040 = AmbientSound, 40, +
|
||||||
14041 = AmbientSound, 41
|
14041 = AmbientSound, 41, +
|
||||||
14042 = AmbientSound, 42
|
14042 = AmbientSound, 42, +
|
||||||
14043 = AmbientSound, 43
|
14043 = AmbientSound, 43, +
|
||||||
14044 = AmbientSound, 44
|
14044 = AmbientSound, 44, +
|
||||||
14045 = AmbientSound, 45
|
14045 = AmbientSound, 45, +
|
||||||
14046 = AmbientSound, 46
|
14046 = AmbientSound, 46, +
|
||||||
14047 = AmbientSound, 47
|
14047 = AmbientSound, 47, +
|
||||||
14048 = AmbientSound, 48
|
14048 = AmbientSound, 48, +
|
||||||
14049 = AmbientSound, 49
|
14049 = AmbientSound, 49, +
|
||||||
14050 = AmbientSound, 50
|
14050 = AmbientSound, 50, +
|
||||||
14051 = AmbientSound, 51
|
14051 = AmbientSound, 51, +
|
||||||
14052 = AmbientSound, 52
|
14052 = AmbientSound, 52, +
|
||||||
14053 = AmbientSound, 53
|
14053 = AmbientSound, 53, +
|
||||||
14054 = AmbientSound, 54
|
14054 = AmbientSound, 54, +
|
||||||
14055 = AmbientSound, 55
|
14055 = AmbientSound, 55, +
|
||||||
14056 = AmbientSound, 56
|
14056 = AmbientSound, 56, +
|
||||||
14057 = AmbientSound, 57
|
14057 = AmbientSound, 57, +
|
||||||
14058 = AmbientSound, 58
|
14058 = AmbientSound, 58, +
|
||||||
14059 = AmbientSound, 59
|
14059 = AmbientSound, 59, +
|
||||||
14060 = AmbientSound, 60
|
14060 = AmbientSound, 60, +
|
||||||
14061 = AmbientSound, 61
|
14061 = AmbientSound, 61, +
|
||||||
14062 = AmbientSound, 62
|
14062 = AmbientSound, 62, +
|
||||||
14063 = AmbientSound, 63
|
14063 = AmbientSound, 63, +
|
||||||
14064 = AmbientSound, 64
|
14064 = AmbientSound, 64, +
|
||||||
14065 = AmbientSound
|
14065 = AmbientSound
|
||||||
14066 = SoundSequence
|
14066 = SoundSequence
|
||||||
14067 = AmbientSoundNoGravity
|
14067 = AmbientSoundNoGravity
|
||||||
|
|
Loading…
Reference in a new issue