Commit graph

4889 commits

Author SHA1 Message Date
Christoph Oelckers
b5033d2940 - fixed a bad check from pull request #325. 2015-07-15 09:11:08 +02:00
Christoph Oelckers
585366f872 - fixed signedness warning. 2015-07-15 09:08:15 +02:00
Christoph Oelckers
fe2e293d02 - added some error checks for trying to create unsupported animations for textures with full path names. 2015-07-13 09:08:08 +02:00
Christoph Oelckers
eeaea59828 - fixed: FTagManager::RemoveSectorTags must check if the StartForSector array is large enough to contain the sector whose information is to be removed. 2015-07-13 08:42:42 +02:00
Marrub
9e1a82a830 fix menus muting themselves when the volume is changed 2015-07-10 08:45:15 +00:00
Braden Obrzut
3adda344b6 - Missing common resolution 1680x1050 added to resolution list of SDL and Cocoa. 2015-07-06 02:58:01 -04:00
Randy Heit
0fa0dc5f9e Add support for alias parameter substitution in quoted strings
- For backward compatibility, you need to indicate that substitution is
  allowed in the string by prepending it with a % character:

    alias asay "say %\"%1\""

  The above will substitute the alias parameter.

    alias asay "say \"%1\""

  The above will not substitute the alias parameter but use the string
  literal "%1" directly.
2015-06-30 13:01:48 -05:00
coelckers
f0b73b30c0 Merge pull request #341 from Edward850/railfix
Add missing MF7_FORCEDECAL flag for rail attacks, and changed operation to doubles
2015-06-25 08:57:03 +02:00
Edward Richardson
2a69ae2a43 Change all float calcs in rails to doubles 2015-06-25 13:57:36 +12:00
Edward Richardson
8670b7ecf7 Use puff decal with MF7_FORCEDECAL 2015-06-25 12:53:46 +12:00
Christoph Oelckers
85449a6b8a - fixed: A_BFGSpray checked the spray actor's class for MTHRUSPECIES, not the actual shooter. 2015-06-21 13:04:47 +02:00
Eevee (Alex Munroe)
911b35370e Let's go wild and do it for the ceiling, too. 2015-06-09 13:41:48 -07:00
Eevee (Alex Munroe)
3b2126ba95 Don't allow pressing a checkswitchrange switch that's in the floor. 2015-06-09 13:20:10 -07:00
alexey.lysiuk
2200569793 Fixed build on OS X without FMODEx 2015-06-07 11:31:53 +03:00
Christoph Oelckers
4444d3c0c5 - removed the _3DFLOOR #define because we really do not want to comment this out anymore, right? 2015-06-07 09:41:44 +02:00
Christoph Oelckers
3fea074d35 - respect FF_INVERTSECTOR when checking a 3D floor's terrain. 2015-06-07 09:33:15 +02:00
Christoph Oelckers
2b59a35e84 Merge branch 'texture-scaling-3d-floors' of https://github.com/eevee/zdoom 2015-06-07 09:09:55 +02:00
Eevee (Alex Munroe)
15b97c1409 Fix scaling of 3D floor wall textures.
The scale factors are now taken from the same part of the sidedef that
provides the texture.
2015-06-06 18:26:13 -07:00
Eevee (Alex Munroe)
8fa9aa2627 Use the correct sidedef's middle scaling when drawing 3D floors.
This wants `curline->sidedef`, which is the 3D sidedef currently being
drawn.  `sidedef` appears to be the last regular sidedef that happened
to be drawn?  The perils of globals.
2015-06-06 18:17:50 -07:00
Eevee (Alex Munroe)
221c2d2d82 Transfer flat-based damage (P_PlayerOnSpecialFlat) to 3D floors. 2015-06-06 16:07:48 -07:00
Eevee (Alex Munroe)
8a428e69b6 Don't play a terrain splash if the player didn't take damage. 2015-06-06 16:07:48 -07:00
Eevee (Alex Munroe)
a87a86198c Transfer friction to swimmable 3D floors. 2015-06-06 16:07:48 -07:00
Braden Obrzut
662345adb8 - Fixed: More endian issues in the ACS VM. 2015-06-05 22:22:54 -04:00
Christoph Oelckers
ae3b52a68a - fixed: Software renderer's colormap variables should not be accessed from common renderer interface code. 2015-06-04 09:20:55 +02:00
MajorCooke
4c390d92a4 -...forgot this one. 2015-06-02 12:22:26 -05:00
MajorCooke
22570e079e * Added LAXTELEFRAGDMG. This flag forces all damage to be factored, regardless being above or below the telefrag threshold.
- This only affects damage calculations being received by the end result. If the original damage was not a million or more, from the start, it will not hurt invulnerable-flagged or kill buddha-flagged monsters.
- Fixed: Damage was inconsistent by the time the function checked for player cheats/invulnerability and (monster and player) buddha, yet monster invulnerability checked the original damage prior to factor processing. This means a damage source that intended to damage another below the threshold could accidentally increase with a powerdamage multiplier or the recipient with a weakness for it, resulting in invulnerability/buddha foiling. Now, checks for telefrag damage using the raw original value on player godmode, player/monster invulnerability and buddha.
2015-06-02 12:10:45 -05:00
Christoph Oelckers
c1e3c16232 Merge branch 'master' of https://github.com/rheit/zdoom 2015-05-28 09:23:14 +02:00
Christoph Oelckers
65cc361e9b - added Zandronum's text input menu items. 2015-05-28 09:22:48 +02:00
Edoardo Prezioso
4546df7dc3 - Fixed SetActorPitch and ChangeActorPitch issue.
The code did not take into account the player's limited pitch.
2015-05-28 00:41:07 +02:00
Christoph Oelckers
733873351a Merge branch 'master' of https://github.com/rheit/zdoom 2015-05-25 19:58:02 +02:00
Christoph Oelckers
9f208409f2 - fixed: The tag check in Sector_CopyScroller was inverted (it should reject sectors with the given tag, but it rejected everything else.) 2015-05-25 19:57:36 +02:00
Braden Obrzut
c9214c1ce9 - Fixed: Hexen's status bar top graphic was drawn 1 pixel too low.
- Fixed: Artiflash played on initial save loading. I seem to recall this looking like an intentional change, but perhaps I broke it since it's completely pointless to play the animation only on the first load of a save game if nothing has been loaded beforehand.
2015-05-20 13:10:08 -04:00
Braden Obrzut
e46b25f628 - Fixed: god2 didn't trigger invulnerability in SBarInfo. 2015-05-20 12:54:13 -04:00
Braden Obrzut
354ec022b3 - On Windows resizing a window just renders the image to the size of the window, so lets do the same for SDL (makes mouse coordinate scaling easier). 2015-05-20 12:32:17 -04:00
Braden Obrzut
4d082d93cd - Use SDL_RenderSetLogicalSize to handle animorphic ratios in fullscreen with SDL backend.
- Reuse the old window in the SDL backend since in some instances switching windows causes issues (OS X fullscreen for instance (while using the SDL backend of course)).
- Clear the SDL render before copying in the framebuffer to remove HOM-like effect.
2015-05-19 17:09:20 -04:00
Christoph Oelckers
4d496f8b04 Merge branch 'master' of https://github.com/rheit/zdoom 2015-05-17 21:41:09 +02:00
Christoph Oelckers
1e3230486e - Fixed: FTagManager::Clear did not clear the line ID hashing index. 2015-05-17 21:40:25 +02:00
Braden Obrzut
f10416af8a - Fixed: Missing WINAPI macro in SHGetFolderPathA (MSDN documentation didn't include it so I didn't. Apparently Microsoft is just incosistent since it's documented in functions like GetLongPathName.) 2015-05-07 23:52:58 -04:00
Christoph Oelckers
87ff82dba6 - fixed: Trying to remove sector tags for line-less sectors crashed when there were no sector tags at all in a map. 2015-05-07 13:05:18 +02:00
Christoph Oelckers
b587c85a81 - fixed: On Windows the cache path could end up with double slashes when no AppData folder could be found. 2015-05-07 00:45:36 +02:00
Christoph Oelckers
535102ae6e - fixed: NULLing the flash state in P_BringUpWeapon should be done before setting the main weapon state so that it doesn't cancel any flash state effects that get initiated there. 2015-05-05 11:23:41 +02:00
Christoph Oelckers
f8fd28118b Merge branch 'master' of https://github.com/rheit/zdoom 2015-05-04 08:56:04 +02:00
Christoph Oelckers
6f0caee4ba - fixed: Searching for tag 0 was no longer possible.
The new tag manager considers tag 0 'untagged' and won't create entries in its tag list for it, so the normal search algorithm can not find any such sector.
It now uses a linear search over all sectors instead, if tag 0 is looked for.
2015-05-04 08:55:31 +02:00
MajorCooke
6639f871c6 - Fixed A_SetRipMin/Max not working properly. 2015-05-03 17:55:01 -05:00
Edoardo Prezioso
353ace8be7 - Improve the code readability in LookupLevelName. 2015-05-02 14:18:52 +02:00
Edoardo Prezioso
4217c2ccd6 - Fixed a very old bug in LookupLevelName code.
If the map name neither matched 'ExMy', 'MAPxy' or 'LEVELxy', 'checkstring' was left uninitialized before using as argument to 'strstr', leading to undefined results.

Spotted with Valgrind.
2015-05-02 13:46:34 +02:00
MajorCooke
dc00d61f4d - Added TF_OVERRIDE to A_Teleport.
- Overrides the NOTELEPORT flag so actors with velocity don't need to disable it in order to perform A_Teleport, which could be screwed up by a teleporting line or sudden ACS interference.
- Ensure that the result is set to false if it fails prematurely. Wasn't sure if this was needed, but with the upcoming if/else statements, better safe than sorry.
2015-05-01 08:32:07 -05:00
MajorCooke
1ecc048441 - Change the pointer to be at the end instead of the start. 2015-04-30 08:28:41 -05:00
MajorCooke
492ef1b716 - Added A_JumpIfHigherOrLower.
- (int ptr = AAPTR_TARGET, state high, state low, float offsethigh = 0, float offsetlow = 0, bool includeHeight = true)
- Jumps if the pointer of the calling actor is higher or lower than itself, adding offsethigh or offsetlow depending on the circumstance.
- includeHeight works twofold.
- Includes the height of the calling actor if the pointer is higher to truly determine if they are completely above them or not.
- Includes the height of the pointer if the pointer is lower.
- Disable it to only check z differences without adding height.
2015-04-30 08:15:48 -05:00
coelckers
a6dcd20447 Merge pull request #321 from edward-san/tflags_fix
- Fixed compiler errors and warnings from TFlags.
2015-04-30 13:01:59 +02:00
Christoph Oelckers
4316740ee9 - some color coding of error messages during ACS loading. (not that I expect that the people these are meant for will read them anyway...) 2015-04-30 12:59:26 +02:00
Christoph Oelckers
97e63b1319 - split up FBehavior constructor to better be able to weed out broken ACS modules.
Please note that this WILL break old savegames from mods which put ACS sources or unrelated data in the ACS namespace!
2015-04-30 12:53:44 +02:00
Edoardo Prezioso
cda4fece1b - Fixed compiler errors and warnings from TFlags. 2015-04-30 12:35:29 +02:00
Christoph Oelckers
50a3f8a3d2 - fixed copy/paste error. 2015-04-30 12:31:47 +02:00
Christoph Oelckers
84351419a3 Merge branch 'master' of https://github.com/crimsondusk/zdoom
Conflicts:
	src/actor.h
2015-04-30 10:03:50 +02:00
Christoph Oelckers
9880af1b0c - this line got lost during conflict resolution. 2015-04-30 09:18:13 +02:00
Christoph Oelckers
405fc31e81 Merge branch 'master' of https://github.com/DaZombieKiller/zdoom
Conflicts:
	src/actor.h
2015-04-30 09:14:31 +02:00
coelckers
691855e19b Merge pull request #304 from MajorCooke/morphundoalways
- Added MORPH_UNDOALWAYS for morph powerups.
2015-04-30 09:05:41 +02:00
coelckers
c2e91293d2 Merge pull request #310 from MajorCooke/telefogfix
- Allow teleport fogs to set the teleporting actors as their targets, so...
2015-04-30 09:02:10 +02:00
Christoph Oelckers
7d90c65427 - mask out Strife mapthing flags when starting an original Hexen map. 2015-04-29 08:42:54 +02:00
Christoph Oelckers
3c1fa3bed9 - fixed some GCC warnings. 2015-04-29 00:19:21 +02:00
Christoph Oelckers
a2100410f2 - fix in GL nodes loader. 2015-04-28 22:13:50 +02:00
Christoph Oelckers
f087903fca - remove some redundancy from TeleportFog code. 2015-04-28 22:11:43 +02:00
coelckers
15fbf2510a Merge pull request #320 from edward-san/clang_3_5_crash_solved
- Clang 3.5.1+ fixed the compiler bug in ACS code.
2015-04-28 22:06:50 +02:00
coelckers
ce4adc48a7 Merge pull request #319 from edward-san/inventory
Little TakeInventory refactoring.
2015-04-28 22:06:31 +02:00
Christoph Oelckers
319671b54a - let cheats only give weapons in weapon slots.
This avoids problems which replace the entire arsenal and don't want the original weapons in there.
2015-04-28 22:05:43 +02:00
Edoardo Prezioso
92fe265abe - Clang 3.5.1+ fixed the compiler bug in ACS code.
Referring to commit 1c96039d7a .
2015-04-28 19:25:06 +02:00
Edoardo Prezioso
b51fac344d Little TakeInventory refactoring.
Introduce AActor::TakeInventory, which unifies DoTakeInv from ACS and DoTakeInventory from Decorate, and AInventory::DepleteOrDestroy, which is extracted from the DoTakeInv core function, and use both where they're needed.
I don't know if the differences between DoTakeInv and DoTakeInventory were intentional, so I kept both behaviors.
2015-04-28 15:45:11 +02:00
Christoph Oelckers
a93c30238b Merge branch 'master' of https://github.com/rheit/zdoom 2015-04-27 20:38:09 +02:00
Christoph Oelckers
c6fe0835d3 - fixed: The check for unblocking overlapping actors was a bit too lax.
The code never checked the starting position of the move and could be erroneously triggered in rare situations where the distance increased between actors but the hit boxes started overlapping because x or y distance got below the radius.
Changed it so that the code only gets executed when there's already an overlap before the move.
2015-04-27 20:37:01 +02:00
Braden Obrzut
9ba5e30bed - Moved autoload initialization to a separate function so that the rest of the ini can be loaded as before. Some platforms do indeed place zdoom.pk3 elsewhere. 2015-04-27 14:15:03 -04:00
Edoardo Prezioso
346fcf584c - Fixed C++11 warnings from recent commits. 2015-04-27 15:22:09 +02:00
Christoph Oelckers
47e7a30cab - reshuffled some stuff to satisfy Linux compilers (hopefully) 2015-04-27 13:19:34 +02:00
Randy Heit
68e43fe65d You never want to blindly switch between widechar and ANSI functions 2015-04-26 20:53:16 -05:00
Randy Heit
0380ba642b Blur de hur 2015-04-26 20:43:01 -05:00
Christoph Oelckers
13fb76db21 - changed lump reader setup for music so that for uncompressed data it opens a new FILE instead of caching the lump.
This reinstates behavior of pre-OpenAL versions but still uses the FileReader interface to keep the simplified code of the OpenAL branch.
2015-04-26 23:28:05 +02:00
Christoph Oelckers
4294b94728 - since Wads.ReopenLumpNum already performs caching on the lump data it is not really necessary anymore to maintain a separate musiccache, so this code can be removed. 2015-04-26 22:09:19 +02:00
MajorCooke
43053b89a5 - Set the morphing and unmorphing actor as target for the teleport fog. This will allow for better interactions on what should happen between the morphee without needing to make monster AI needing to search for them in particular or rely upon TIDs. 2015-04-26 10:06:13 -05:00
Christoph Oelckers
aecff68a4d - cleanup of sound system startup and menu handling:
* added global functions that check whether FMod and OpenAL are present, without initializing the sound backend.
* make sound init code more fault tolerant. It will now try to switch between FMod and OpenAL if the currently active one cannot be found but the other one can.
* added 'ifoption' checks for sound backend to menu code.
* only show sound backends which are present and hide the options for the ones which are not.
2015-04-26 12:13:21 +02:00
Christoph Oelckers
8e70a9b894 - added a NULL check to FMODStreamCapsule destructor, just to be safe. 2015-04-26 09:58:10 +02:00
Christoph Oelckers
a23afbd7ce Merge branch 'master' into openal 2015-04-26 09:37:49 +02:00
Christoph Oelckers
46e975418d - fixeed: Sound sequence overrides took the parameter from the wrong data structure. 2015-04-26 08:48:49 +02:00
Christoph Oelckers
6bb79be85c - got rid of std::auto_ptr, courtesy of Blzut3's patch. 2015-04-25 17:50:57 +02:00
coelckers
b9fdc21547 Merge pull request #317 from Edward850/master
Slightly more information on ACS serialize errors
2015-04-25 13:14:58 +02:00
Christoph Oelckers
d880783784 - make OpenAL and the decoder libraries delay loaded so that ZDoom can still start without them being present.
This required the addition of a few exception handlers so to avoid #ifdef overuse I also added some #defines for non-Windows systems that allow using __try and __except directly in the code without #ifdef'ing them out.
2015-04-25 12:25:10 +02:00
Christoph Oelckers
12118550d2 - fixed some warnings in OpenAL code. 2015-04-25 10:34:47 +02:00
Christoph Oelckers
dccd35ef29 - uncoupled OpenAL music updates from UpdateSounds.
UpdateSounds will not be called during screen wipes and the entire setup of this function suggests that this is not advisable at all.
The OpenAL stream updates were done deep inside this function implicitly.
This caused music to stop while a wipe was in progress. So in order to allow uninterrupted music playback during screen wipes the music updates need to be handled separately from sound updates and be called both in the main loop and the wipe loop.

I think that the OpenAL music updating should be offloaded to a separate thread but at least it's working now without causing interruptions during wipes.
2015-04-25 10:26:14 +02:00
Christoph Oelckers
54c2a14145 Merge branch 'master' into openal 2015-04-25 09:13:11 +02:00
Christoph Oelckers
682f3e230a - fixed: We should not try calling unicode functions on ASCII strings.
Should ZDoom ever switch to unicode I_GetLongPathName will have to be adjusted, but for now it must call GetLongPathNameA, not GetLongPathNameW.
2015-04-25 09:08:59 +02:00
Edward Richardson
0fd93cc033 Slightly more information on ACS serialize errors 2015-04-25 18:10:26 +12:00
Braden Obrzut
75471df787 - Made a few Win32 calls optional in order to restore capatibility with Windows NT 4.0 (not that anyone is using NT 4, but it was a trivial fix) 2015-04-24 23:07:32 -04:00
Christoph Oelckers
0da6939e84 - unmark OpenAL as 'advanced' in CMake so we can set its include and library paths in the IDE without having to enable the advanced display which isn't really helpful. 2015-04-24 22:30:28 +02:00
Christoph Oelckers
c91745c714 - some fixes to make OpenAL branch compile with VC++ 2013 and OpenAL support. 2015-04-24 17:42:56 +02:00
Christoph Oelckers
1f2a431d15 Merge branch 'master' into openal 2015-04-24 09:21:06 +02:00
Christoph Oelckers
920a4fbf45 - fixed: The HashTags function considered sector and line #0 invalid. 2015-04-23 21:27:36 +02:00
coelckers
45b006252a Merge pull request #316 from Doom2fan/RailgunSpiralOffset
Added SpiralOffset parameter to railgun functions.
2015-04-23 21:17:41 +02:00
Chronos Ouroboros
6a6836b1e7 Added SpiralOffset to railgun functions. 2015-04-23 15:11:54 -03:00
Christoph Oelckers
a54404074a - fixed: IDs that map to nothing must be removed from the spawn/conversation ID maps. 2015-04-23 20:09:12 +02:00
Randy Heit
8d501fdb9f Fix some issues with changing player viewheight at runtime
- Viewheight change was delayed: Viewheight must be copied to player
  structure as well as the PlayerPawn. Not sure if should actually use
  deltaviewheight to spread the change out over a few tics instead of
  being instant.
- Viewheight not preserved when travelling: player->viewheight must be
  restored from pawn->ViewHeight, because the temporary player set it back
  to the default viewheight.
2015-04-22 23:22:27 -05:00
Randy Heit
ca16d99445 Fixed: FOptionMenuItem::GetIndent() did not handle localized strings 2015-04-22 22:57:15 -05:00
Randy Heit
0cbb3132e6 Don't spam Dropped packet messages for disconnected players 2015-04-22 22:35:38 -05:00
Randy Heit
d6b8603cb6 Ignore sv_unlimited_pickup on items that stay
- See http://forum.zdoom.org/viewtopic.php?f=2&t=47790
2015-04-22 22:27:56 -05:00
Randy Heit
03c3621bb4 Use a different var to track unset DTA_FillColor instead of a default value
- If palette index 255 happens to be white (e.g. as in Hexen), trying to
  use white with DTA_FillColor would treat it as if you had never passed
  it to DrawTexture().
2015-04-22 22:18:44 -05:00
Randy Heit
a7ff9478a7 Fixed: S_PrecacheLevel() could create orphan channels
- S_PrecacheLevel() must also mark currently playing sounds as
  used. If we don't, the sound could be unloaded and the underlying
  channel stopped without triggering a channel callback. That would leave
  the code in s_sound.cpp thinking the sound is still playing even though
  it isn't.
- Added an invalid channel check to FMODSoundRenderer::StopChannel() so
  that orphan channels passed to it will be returned at least when
  S_StopAllChannels() is called.
2015-04-22 20:33:08 -05:00
Randy Heit
7ee1853403 Remove OpenAL and Sound Manager output options for FMOD
- OpenAL never actualy worked properly and was removed in later FMODs.
- Sound Manager was deprecated by Apple long ago and is not supported for
  64-bit applications. It was also removed in later FMODs.
2015-04-22 19:09:33 -05:00
Randy Heit
dba76c1aea Disable PCM-8 output when not using DirectSound
- PCM-8 sounds like garbage with WASAPI and WaveOut, so force anything not
  DirectSound to use PCM-16 if PCM-8 is selected.
2015-04-22 18:32:45 -05:00
Randy Heit
f7bd3acec4 Add OpenString to FScanner class 2015-04-22 17:34:36 -05:00
Christoph Oelckers
3300817d65 - removed some leftover code from initial development in the DoomEdNum parser. 2015-04-20 23:20:56 +02:00
Christoph Oelckers
cad282142d - fixed some last issues with the tag manager. 2015-04-19 18:22:39 +02:00
Christoph Oelckers
db61c1cb57 - allow multiple line IDs as well using the same method as for sector tags. 2015-04-19 17:51:34 +02:00
Christoph Oelckers
b921157f57 - uncouple sector tag storage from the sector data to allow multiple tags per sector.
Tags are now handled by a tag manager class which stores sector/tag pairs. This way multiple entries can be added per sector.
Since UDMF does not have any arrays the additional tags are stored as a space separated string as 'MoreIDs'.
2015-04-19 12:33:27 +02:00
Christoph Oelckers
6326cd74b4 - moved tag iterators to their own file. 2015-04-19 09:07:05 +02:00
Christoph Oelckers
2719ce86dc Merge branch 'master' of https://github.com/rheit/zdoom 2015-04-19 08:48:41 +02:00
Christoph Oelckers
f65a07c952 - minor bit of cleanup of tags code. 2015-04-19 08:48:20 +02:00
Randy Heit
b3c7b9679a Fixed: writeopl broke when the OPL3 cores were added
- When the OPL3 cores were added, DiskWriterIO was never updated to take
  into account things like more than two OPL2 chips can be configured.
- DiskWriterIO no longer does any file writing directly. That function has
  been split off into an OPLDump class, which has two specializations: one
  for RDOS Play, and the other for DOSBox. If one chip is configured, it
  dumps for a single OPL2, otherwise it dumps for an OPL3 (effectively
  dual OPL2).
- TODO: Figure out why playback of raw OPL files doesn't sound nearly as
  good as playing MIDI with the OPL emulation. It's probably something
  simple I overlooked.
2015-04-18 22:51:28 -05:00
Christoph Oelckers
f983f778f2 - moved ScaleCoordsFromWindow to the BaseWinFB base class to eliminate two identical implementations.
(GZDoom would have had to implement a third identical copy in its GL framebuffer as well.)
2015-04-17 21:39:07 +02:00
Christoph Oelckers
f57e08102c Merge branch 'master' of https://github.com/rheit/zdoom 2015-04-17 19:41:08 +02:00
Christoph Oelckers
6e28963141 - added a sanity check to GL nodes loader for a potential crash. 2015-04-17 19:40:45 +02:00
Braden Obrzut
1fa1e26cf9 - SDL backend could use the new ScaleCoordsFromWindow since it does similarly for fullscreen. 2015-04-17 00:24:33 -04:00
Randy Heit
9b6756114b Scale mouse coordinates based on window size
- Fixed: If you enlarged the game window (in windowed mode) so that the
  window is bigger than the selected resolution, the menu would still take
  its inputs from the portion in the upper left that matched the
  resolution.
2015-04-16 17:45:57 -05:00
Christoph Oelckers
d166211ce0 - reverted changes from copying over p_3dfloors.cpp with GZDoom's version. 2015-04-16 19:55:46 +02:00
Christoph Oelckers
e30958f443 - fixed: The check for completely invisible 3D floor in the sorting code checked the wrong flags. 2015-04-16 18:07:45 +02:00
Christoph Oelckers
3cb4eb44a8 - fixed: APowerRegeneration::DoEffect did not call the super method. 2015-04-16 08:29:21 +02:00
Christoph Oelckers
203f88ce6e - some sanitizing of sector tag/line id management:
* make setting the line ID with P_TranslateLineDef explicit because there's one FraggleScript function that needs to work around the changes caused by this. There's also some functions setting only a temporary linedef. These would inevitably cause problems if the underlying data gets changed.
* remove FS function 'ChangeTag'. Fortunately this was just some long forgotten test stuff that can be removed without affecting any maps, but the feature would cause some serious problems in a more complex system.

With these changes it is guaranteed that after map setup the tag/ids won't change anymore.
2015-04-15 20:10:27 +02:00
Christoph Oelckers
5d819036b3 Merge branch 'master' of https://github.com/rheit/zdoom 2015-04-15 09:45:09 +02:00
Christoph Oelckers
418e6a16b8 - fixed UDMF user variables could be set for the base namespaces which do not define them. 2015-04-15 09:43:43 +02:00
Christoph Oelckers
902593198b - wrapped all line ID accesss just like sector tags 2015-04-15 09:37:06 +02:00
Randy Heit
006868c072 Miscellaneous warning fixes 2015-04-14 18:02:15 -05:00
Christoph Oelckers
47543bb766 - while we're at it, let's also wrap line ID searches in an iterator class so that we can do multiple IDs per line later as well. 2015-04-15 00:47:06 +02:00
Christoph Oelckers
425e5b9ffc - replaced P_FindSectorFromTag with an FSectorTagIterator class.
This is done to encapsulate the gory details of tag search in one place so that the implementation of multiple tags per sector remains contained to a few isolated spots in the code.
This also moves the special 'tag == 0 -> activate backsector' handling into the iterator class.
2015-04-14 22:39:57 +02:00
Christoph Oelckers
2faf836aa1 - some minor rework of tag access interface after I realized that some stuff (e.g. Strife's scrolling sector special) need the primary tag to treated specially. 2015-04-14 18:48:19 +02:00
Christoph Oelckers
238046655c - wrapped all accesses to the sector tag into accessor functions, as preparation for allowing multiple tags per sector. 2015-04-14 18:32:14 +02:00
Christoph Oelckers
d7092f40a3 Merge branch 'master' of https://github.com/rheit/zdoom 2015-04-13 22:09:18 +02:00
Christoph Oelckers
6fc63daabd - fixed: Zips whose central directory cannot be read need to print an error message. 2015-04-13 22:08:44 +02:00
Braden Obrzut
7217c69be4 - Fixed portability issue in ANIMATED with systems that treat char as unsigned. 2015-04-12 15:22:39 -04:00
arezey
810a1dc28d Fixed the way mt.exe is invoked 2015-04-12 02:44:12 +03:00
arezey
e40f3c7350 Merge branch 'master' of https://github.com/crimsondusk/zdoom 2015-04-12 02:16:34 +03:00
arezey
a6287a4706 Fix compilation with CMake on Windows when some other building tool than
msbuild is used.
2015-04-12 02:11:51 +03:00
Christoph Oelckers
9f2b3efd13 - fixed: The terrain types array needs to be extended if a texture outside its bounds is processed - this can happen for textures with long names. 2015-04-11 18:09:18 +02:00
Christoph Oelckers
0a1d1db0ba - fixed missing #incöudes of version.h for GAMENAME. 2015-04-11 17:40:26 +02:00
Christoph Oelckers
a81dd798a8 - fixed incorrect memset argument. 2015-04-11 14:35:32 +02:00
Edoardo Prezioso
0c5d55d0a3 - More GAMENAME replacements in strings.
These changes will change only some displayed messages.
2015-04-09 21:16:59 +02:00
Christoph Oelckers
9b95c134a7 - fixed: Lumps from a directory need to store the full file path so that they still can be accessed when the internal path is changed due to a filter directory. 2015-04-09 09:14:53 +02:00
Randy Heit
6428b399d6 Try to sanitize the exec+pullin mess
- Old mess:
  * Execute autoexec files right away.
  * Execute -exec files right away.
  * Execute command line commands right away.
    - If, during any of the above, an unknown command or a set of an
      unknown variable is encountered, store it for later.
    - Pullin commands are directly executed and add to the list of files
      to load.
  * Do a little setup, including parsing CVARINFOs.
  * Retry saved commands in case CVARINFO added a cvar they refer to.
- New, less messy, mess:
  * Parse autoexec files into an array.
  * Parse -exec files.
  * Parse command line commands.
    - During all of the above, exec commands are also parsed into the
      array immediately rather than being saved for execution later.
    - Pullin commands are parsed into a different array. The pullin
      command doesn't actually do anything directly anymore.
  * Add all the pullin files to the list of files to load.
  * Do a little setup, including parsing CVARINFOs.
  * Execute every command that was parsed in the preceding steps.
2015-04-07 12:55:50 -05:00
MajorCooke
1799ae91c9 - Allow teleport fogs to set the teleporting actors as their targets, so modders can create interactions between the two.
- Fixed: P_MoveThing had source and destination fog spawning backwards.
- Fixed a case where the NOTELEPORT flag would be ignored on A_Teleport.
- Added pointer selection to A_Teleport. Defaults to AAPTR_DEFAULT (calling actor). State jumps will only be done by the calling actor.
2015-04-07 11:14:02 -05:00
Randy Heit
e4cadc90a5 Fix grammar: then -> than 2015-04-07 11:08:28 -05:00
Christoph Oelckers
c5a4221b58 - fixed handling of args for non-actor mapthings again. As it turns out there was insufficient information in the data to properly decide this case so a new flag was added to make it all more reliable. 2015-04-07 16:27:57 +02:00
Christoph Oelckers
268e7df992 - fixed: We must not allow the engine to start without a default MAPINFO definition.
Both 'Adventures of Square' IWADs were missing an entry for base MAPINFO and as a result did not define the common editor numbers.
To prevent this, a new mindefaults MAPINFO was added to zdoom.pk3 which now gets loaded if IWADINFO does not specify a game-specific file.
This minimum setting sets all gamedefaults to a reasonable base value and defines all other things that are required to be defined.
2015-04-07 14:09:55 +02:00
Christoph Oelckers
dd91141b35 - updated the blurb that's being put above the IWAD specific autoload sections. 2015-04-07 09:11:46 +02:00
Christoph Oelckers
6f5dbdefb0 - fixed: args of non-actor mapthings were ignored. 2015-04-07 08:51:21 +02:00
Christoph Oelckers
e75bdf86db - move section renaming code into FGameConfigFile's constructor so renaming of the old and creation of the new autoload sections can be done in one step, not two. 2015-04-07 08:46:42 +02:00
Christoph Oelckers
c584e9ec95 - fixed destructor call of FConfigSection in FConfigFile. 2015-04-06 23:23:50 +02:00
Christoph Oelckers
4971e7def1 - another GCC countof fix... 2015-04-06 21:40:14 +02:00
Christoph Oelckers
7d2ab461d9 - don't use 'countof' to iterate through a static array that's defined inside a function. Some GCC versions apparently do not like that. 2015-04-06 20:59:43 +02:00
Christoph Oelckers
a013703e1c - add a NULL pointer check for the config to BaseFileSearch. 2015-04-06 16:44:03 +02:00
Christoph Oelckers
dfda74ffe3 - automatically create autoload section based on IWADINFO.
This has an important implication:
Previously the config was loaded before IWADINFO so in order to allow the config to access the data this had to be switched around.
This means that zdoom.pk3 will not be looked for in the global IWAD search paths anymore, but since it shouldn't be there to begin with it should be an acceptable compromise.
2015-04-06 13:52:08 +02:00
Christoph Oelckers
258822ef3b - redid autoload handler and resource file filtering to use the newly defined method with multi-part names.
As a result the old 'Group' property could be removed and all other means to get a section name were disabled.
As an example, if the code gets 'doom.doom2.commercial' it will use the following sections in this order:

global.autoload
doom.autoload
doom.doom2.autoload
doom.doom2.commercial.autoload.
2015-04-06 11:57:12 +02:00
Christoph Oelckers
3114a26bc8 - allow renaming of config sections and added migration code to rename the old autoload sections to the more flexible naming system that's planned. 2015-04-06 11:21:28 +02:00
Christoph Oelckers
cac634567b - use a proper FString to hold the name of config sections instead of a buffer tacked onto the actual structure. This is necessary if we want to be able to rename a section. 2015-04-06 10:51:28 +02:00
Randy Heit
b300cfaf62 Remove old pre-INI config migration code
- As if any of this matters now. It's not the 90s anymore.
2015-04-05 21:56:00 -05:00
Randy Heit
c36222d2ef Externalized default key bindings 2015-04-05 21:40:53 -05:00
Randy Heit
62d036a63e Added gametype-based filter
- For when IWADs are too specific, filter by the base gametype too.
- Minor small edits to the sndinfo.txt files so that zipdir will notice
  the changes, since it doesn't check path names when checking for
  file differences.
2015-04-05 20:24:49 -05:00
Christoph Oelckers
a91997d12c - fixed: Don't try to load autoload sections for empty section names. 2015-04-05 22:07:24 +02:00
Christoph Oelckers
0ae74b844d Merge branch 'osx_text_paste' of https://github.com/alexey-lysiuk/gzdoom 2015-04-05 12:18:23 +02:00
alexey.lysiuk
7b89312923 Fixed potential issue with read beyond buffer boundaries 2015-04-05 11:52:57 +03:00
alexey.lysiuk
ebd8f24103 Fixed compilation with OS X SDK 10.4 2015-04-05 11:39:49 +03:00
alexey.lysiuk
82f7b439c8 Improved text pasting on OS X
Support for UTF-8 and UTF-16 encodings should cover all cases of text pasting from clipboard
2015-04-05 10:59:07 +03:00
Randy Heit
89054f5d60 Use filtering and LOADACS to autoload strfhelp.o
- No more special case for STRFHELP in the executable!
2015-04-04 18:40:48 -05:00
Randy Heit
e451faa1cc Fixed: FString::ReallocBuffer could write to unallocated memory
- Previously, calling ReallocBuffer with a smaller buffer size than the
  current one could overwrite unallocated memory. This required that the
  string it was called on had more than one reference and therefore
  required creating a new copy. The entire original string would be
  copied, whether it fit in the new buffer or not.
2015-04-04 18:20:05 -05:00
Randy Heit
6da887c34f Use Truncate to chop off extension in LumpNameSetup.
- Left() always creates a new string. Truncate() can reuse the old one if
  it only has one reference.
2015-04-04 18:20:05 -05:00
Randy Heit
4315423200 Rename ns_invalid to ns_hidden
- Also use ns_hidden by name in LumpNameSetup().
2015-04-04 18:20:04 -05:00
Randy Heit
2103fe2a14 Make FResourceLump::LumpNameSetup's argument an FString 2015-04-04 18:20:03 -05:00
Randy Heit
bbbbb7ac9d Reorder FMapThing to remove padding 2015-04-04 18:20:03 -05:00
Christoph Oelckers
1fddd1859e - fixed: FResourceFile::FilterLumps must use a proper copy of the filename to pass to LumpNameSetup instead of a pointer to the file name's stringbuffer, because that function will overwrite the variable it is taken from. 2015-04-05 00:38:29 +02:00
Christoph Oelckers
25e19ab471 Merge branch 'master' of https://github.com/rheit/zdoom 2015-04-05 00:31:55 +02:00
Christoph Oelckers
b6a4511dd1 - move conversation ID definition to MAPINFO as well. Uses the newly added filter feature to handle the teaser differences. 2015-04-05 00:31:15 +02:00
rheit
60a0966f0f Merge pull request #306 from alexey-lysiuk/osx_vid_autoswitch
Added control of automatic graphics switching on OS X
2015-04-04 15:41:18 -05:00
Christoph Oelckers
6e45c565a0 - fixed: FResourceLump::LumpNameSetup's iname parameter can point to the FullName variable's stringbuffer so any assignment to that variable must be done indirectly. 2015-04-04 20:52:55 +02:00
Teemu Piippo
ca012bc9be - adapted AActor to use TFlags 2015-04-04 19:40:43 +03:00
Teemu Piippo
830a7ee003 - added TFlags 2015-04-04 19:19:17 +03:00
alexey.lysiuk
193b491b63 Added control of automatic graphics switching on OS X
Automatic graphics switching is enabled by default
Set vid_autoswitch CVAR to false to disable it
2015-04-04 17:36:55 +03:00
Christoph Oelckers
87229f4787 Merge branch 'fix_filter_crash' of https://github.com/alexey-lysiuk/gzdoom 2015-04-04 14:12:13 +02:00
Christoph Oelckers
bd96adafda - cleanup 2015-04-04 14:12:04 +02:00
alexey.lysiuk
8b92c45f84 Fixed crash in lump filtering caused by uninitialized variables 2015-04-04 12:38:37 +03:00
Christoph Oelckers
747e160c96 Merge branch 'master' of https://github.com/rheit/zdoom 2015-04-04 10:30:37 +02:00
Christoph Oelckers
51591d10b0 - handle slope things through new definition tables as well. Since these get processed outside P_SpawnMapThing it required some restructuring so that the actual spawn data is present when slope things get processed.
- removed FMapThing::Serialize because it isn't used anywhere - it was rather broken anyway.
2015-04-04 10:25:01 +02:00
Randy Heit
7b4d6e2f87 Add lump filtering for archive resources
- Multi-directory archives (e.g. zips) now support filtering lumps
  depending on the loaded IWAD. The search rules are the same as for the
  Autoload entries in the user's ini. For instance, if you are playing
  Doom 2, the following filters will be applied:
  * "filter/doom2/*"
  * "filter/doom/*"
  They will be renamed to strip out the "filter/doom2/" and "filter/doom/"
  parts and will be ordered so they take precedence over any files not
  inside a filter/ directory. Any files inside another filter/ directory
  (e.g. "filter/hexen/*") will be ignored.
2015-04-03 22:42:22 -05:00
Randy Heit
fc6f983c13 Fix memory leak when passing directories to -file 2015-04-03 21:50:08 -05:00
Randy Heit
efa82cf38b Consolidate archive sorting into FResourceFile base class 2015-04-03 20:22:18 -05:00
Randy Heit
966d0b7034 Use FString for FResourceLump::FullName 2015-04-03 20:00:58 -05:00
Christoph Oelckers
2ec8e2c2ac - moved spawn ID definitions to MAPINFO as well and removed all 'Game' directives from DECORATE because editor and spawn numbers are the only thing that required them. 2015-04-04 00:39:09 +02:00
Christoph Oelckers
4f7ec3ad89 - print proper information about non-actor mapthings. 2015-04-03 22:23:42 +02:00
Christoph Oelckers
9e5bf38123 - handle all special mapthing items (player starts, polyobj spots) via the new MAPINFO method instead of hard coding them in the spawn function.
(Note: The buildmap loading code should be adjusted to the new functionality as well eventually.)
2015-04-03 21:17:10 +02:00
MajorCooke
087d564343 - Added MORPH_UNDOALWAYS for morph powerups. 2015-04-03 12:16:27 -05:00
Christoph Oelckers
15dbbc9137 - set editor numbers through MAPINFO. The DECORATE way still works ans will override any definition made in MAPINFO.
- use a standard TMap for finding editor numbers
2015-04-03 16:51:45 +02:00
Christoph Oelckers
ccd9fb9c23 - moved FDoomEdMap to its own file to make the upcoming changes a bit nicer to handle. 2015-04-03 10:54:55 +02:00
Christoph Oelckers
6c603b3c78 Merge branch 'misc_code_improvements' of https://github.com/edward-san/zdoom 2015-04-03 09:33:33 +02:00
Christoph Oelckers
4c06e71536 Merge branch 'dmgforcedfix' of https://github.com/MajorCooke/zdoom 2015-04-03 09:32:46 +02:00
MajorCooke
27c1434585 - Fixed: Buddha never took forced damage into account. 2015-04-02 20:52:51 -05:00
Randy Heit
d37f9cbcae Add flies (doomed #112) from the Hexen retail beta
...because it brought back memories of adding Strife support.
- The search function is radically different, but the flying mechanics are
  the same.
2015-04-02 17:52:54 -05:00