Commit Graph

101 Commits

Author SHA1 Message Date
Braden Obrzut 5a4be4b62b - Added partial support for a signal based timer under Linux/Mac OS X in order to make cl_capfps effective at limiting CPU usage.
SVN r2310 (trunk)
2010-05-06 20:32:03 +00:00
Christoph Oelckers 9aa1e20c77 - Added Blzut3's Solaris patch.
SVN r2070 (trunk)
2010-01-01 09:21:04 +00:00
Randy Heit 26f14f439b - Fixed: The FPS meter cannot use I_MSTime(), because if the game is started
with +vid_fps 1, it can need the time before the timer is ready to start.


SVN r2009 (trunk)
2009-11-29 02:57:09 +00:00
Randy Heit 48d78730f3 - Mac version now links. Updaterevision refuses to give me a version number.
Zipdir is not doing byte swapping like it should. zdoom.ini is stored
  in ~/Preferences, but all other file accesses are probably going to be
  like Windows and look in the same directory as the executable.



SVN r1786 (trunk)
2009-09-03 03:51:41 +00:00
Randy Heit 33a397c04b - Basic Mac support: Everything compiles but does not yet link.
SVN r1780 (trunk)
2009-09-01 02:08:53 +00:00
Christoph Oelckers 2c54498d5c - fixed blue colormap
- Added parameters to A_VileAttack.
- Removed redundant definition of use_joystick from SDL/i_input.cpp.


SVN r1727 (trunk)
2009-07-17 08:08:02 +00:00
Randy Heit f74f6a1659 - Split the joystick menu into two parts: A top level with general options
and a list of all attached controllers, and a second level for configuring
  an individual controller.
- Fixed: Pressing Up at the top of a menu with more lines than fit on screen
  would find an incorrect bottom position if the menu had a custom top height.
- Added the cvars joy_dinput, joy_ps2raw, and joy_xinput to enable/disable
  specific game controller input systems independant of each other.
- Device change broadcasts are now sent to the Doom event queue, so
  device scanning can be handled in one common place.
- Added a fast version of IsXInputDevice that uses the Raw Input device
  list, because querying WMI for this information is painfully slow.
- Added support for compiling with FMOD Ex 4.26+ and running the game
  with an older DLL. This combination will now produce sound.


SVN r1717 (trunk)
2009-07-15 05:53:06 +00:00
Randy Heit 417779440d - Added joystick config loading and saving support; moved generic joystick
interfaces to m_joy.h.
- Added Raw Input PS2 adapter support.


SVN r1713 (trunk)
2009-07-11 01:40:01 +00:00
Randy Heit 7d4c21b167 - Fixed: SDL/i_system.cpp should use a return type for strrchr that has the same
constness as its first parameter. (As some GCCs will actually check this, I guess.)

SVN r1696 (trunk)
2009-06-30 23:26:03 +00:00
Randy Heit 0506606efc - Added I_GetAxes() stub for the SDL side.
- Added oleaut32.lib as an explicit library in the VC Proj, since the 2005 Express Edition
  doesn't include it implicitly the way the other versions do.

SVN r1673 (trunk)
2009-06-21 02:08:50 +00:00
Randy Heit a5b118cf7c - The reorganized DirectInput game controller code finally compiles. (Ugh! It
took far too long to reach this point.) Manual axis configuration is
  currently disabled, since I need to rewrite that, too. The eventual point of
  this is that the code will be modular enough that I can just plop in
  routines for XInput controllers and driver-less PlayStation 2 adapters
  without much fuss, since the old joystick code was very much DirectInput-
  centric.


SVN r1672 (trunk)
2009-06-20 03:16:08 +00:00
Randy Heit b458234c34 - Removed F16 mapping for SDL, because I guess it's not present in SDL 1.2.
SVN r1662 (trunk)
2009-06-09 21:48:22 +00:00
Randy Heit 39455bd80f - Added F16 to the SDL keymap and moved Pause back to its original location (from years ago.)
SVN r1654 (trunk)
2009-06-08 22:59:55 +00:00
Randy Heit 5245e8d4dd - I_CheckNativeMouse() now checks the foreground window to determine if the
mouse should be grabbed. This fixes the case where you start the game in
  the background and it grabs the mouse anyway.
- Changed raw mouse grabbing to call ShowCursor() directly instead of through
  SetCursorState(), since changing the pointer isn't working with it
  (probably due to the lack of legacy mouse messages), and the others work
  fine by setting an invisible cursor.
- Fixed: Raw mouse input passes wheel movements in an unsigned field, but the
  value is signed, so it requires a cast to use it.
- Reverted accidental changes to src/sdl/i_input.cpp.

SVN r1605 (trunk)
2009-05-26 00:30:51 +00:00
Randy Heit 0c4c90ac89 - SetCursorState() now calls ShowCursor() again, because capturing the mouse
with RIDEV_NOLEGACY apparently prevents SetCursor() from doing anything.
- Split mouse code off from i_input.cpp into i_mouse.cpp and added raw mouse
  handling. (WM_INPUT obsoleted most of DirectInput for XP.)
- Fixed: Similar to the Win32 mouse, using the DirectInput mouse in windowed
  mode, if you alt-tabbed away and then clicked on the window's title bar,
  mouse input would be frozen until the mouse was ungrabbed again.


SVN r1601 (trunk)
2009-05-24 03:15:04 +00:00
Randy Heit 466b6e4535 - Moved SetSoundPaused() out of i_input.cpp and into s_sound.cpp.
SVN r1598 (trunk)
2009-05-23 03:09:50 +00:00
Christoph Oelckers bf4e17703d - Fixed: Dehacked string replacement did not check the clusters' finaleflats.
- Changed the definition of several typedef'd structs so that they are
  properly named.
- Limited DEHSUPP lump lookup to search zdoom.pk3 only. It will no longer
  be possible to load DEHSUPP lumps from user WADs.
- Brought back the text-based DEHSUPP parser and changed it to be able to 
  reference states by label. Also changed label names of 
  DoomUnusedStates and added proper labels to all states that were
  previously forced to be the first state of an actor so that the old
  (limited) method could access them. This was done to address the following
  bug:
- Fixed: The player's death states calling A_PlayerSkinCheck should not be
  part of the state set that is accessible by Dehacked. These will produce
  error messages when mapped to non-players.

SVN r1512 (trunk)
2009-03-28 11:49:44 +00:00
Randy Heit 7371c4a516 - Changed random seed initialization so that it uses the system's
cryptographically secure random number generator, if available, instead
  of the current time.
- Changed the random number generator from Lee Killough's algorithm to the
  SFMT607 variant of the Mersenne Twister.

SVN r1507 (trunk)
2009-03-27 04:49:17 +00:00
Randy Heit 8724b45e15 - Changed Linux default for fullscreen to false.
- Removed CVAR_SERVERINFO flag from compatmode. Since it writes to
  compatflags, that should be enough. Having that flag set for both of
  them leads to problems with e.g. loading a savegame, where compatflags is
  restored, then compatmode is restored and it completely undoes whatever
  compatflags was restored to.
- Fixed: Trying to start a map for some single file that isn't really a map
  caused a crash.


SVN r1478 (trunk)
2009-03-15 01:41:53 +00:00
Randy Heit fcdab6a777 - Added sdl_nokeyrepeat to disable key repeating in the menus and console
on Linux.



SVN r1470 (trunk)
2009-03-11 00:17:31 +00:00
Randy Heit 035edb32ad - Stopped sending double the number of wheel events as appropriate to the
console under Linux.
- Added middle mouse button selection pasting for X systems.



SVN r1420 (trunk)
2009-02-10 02:16:41 +00:00
Randy Heit 025e36ee41 - Changed I_GetFromClipboard() to return an FString.
SVN r1414 (trunk)
2009-02-08 03:32:27 +00:00
Randy Heit be165578ea - Added GTK+-based clipboard support for Linux.
- Fixed: Most Linux filesystems do not fill in d_type for scandir(), so we
  cannot rely on it to detect directories.
- Added NicePath() function to perform shell-style ~ substitution on path
  names.
- Changed the default screenshot directory on Unix to ~/.zdoom/screenshots/.
- Added -shotdir command line option to temporarily override the
  screenshot_dir cvar.



SVN r1413 (trunk)
2009-02-08 02:52:43 +00:00
Randy Heit d0e7e574e1 - Added a fflush() call after the logfile write in I_FatalError so that the
error text is visible in the file while the error dialog is displayed.


SVN r1396 (trunk)
2009-02-04 01:23:47 +00:00
Christoph Oelckers 4bcd3faef8 - moved all code related to global ACS variables to p_acs.cpp where it belongs.
- fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew.
- merged MAPINFO branch back into trunk.

SVN r1393 (trunk)
2009-02-03 19:11:43 +00:00
Randy Heit a7ffb9db6a - Added button mappings for 8 mouse buttons on SDL. It works with my system,
but Linux being Linux, there are no guarantees that it's appropriate for
  other systems.
- Fixed: SDL input code did not generate GUI events for the mousewheel, so it
  could not be used to scroll the console buffer.



SVN r1381 (trunk)
2009-01-31 02:26:24 +00:00
Randy Heit b6528a604e SVN r1366 (trunk) 2009-01-25 01:16:00 +00:00
Christoph Oelckers 78933df10d - added GZDoom's 3D floor physics code. This is not active yet so anything compiled from this code won't have any support for it!
SVN r1351 (trunk)
2009-01-04 15:00:29 +00:00
Christoph Oelckers aa5bdd0884 - fixed r1342 changes
SVN r1345 (trunk)
2009-01-01 22:35:29 +00:00
Christoph Oelckers ee8ce6c1e1 - Changed Linux's I_MSTime to work the same as Windows's.
SVN r1342 (trunk)
2009-01-01 12:05:02 +00:00
Randy Heit 9430001425 - Added one to return value of SDL_GetTicks() to ensure non-zeroness.
SVN r1288 (trunk)
2008-11-14 23:16:21 +00:00
Randy Heit c1cefee2f4 - Made sdl/i_system.cpp:I_GetTimePolled() functionally equivalent to the
Win32 version.
- Updated fmod_wrap.h and fmodsound.cpp for FMOD 4.20.
- GCC warning removal.


SVN r1286 (trunk)
2008-11-09 05:50:54 +00:00
Randy Heit 30ef6a0c2d - Game time is now frozen during screen wipes. This obsoletes the DEM_WIPEON
and DEM_WIPEOFF commands. Fixes multimap demos desyncing when played back
  or recorded with wipes enabled, and prevents multiplayer games from
  starting until all players' wipes have finished.


SVN r1272 (trunk)
2008-10-21 02:27:21 +00:00
Randy Heit cb159b26c2 - Fixed: SDL builds did not shutdown the sound system at exit.
- Fixed: ThingCountSector and ThingCountNameSector did not remove enough
  entries from the stack, and did not put the result in the right slot.
- Fixed: Teleport lines were prioritized over secret lines when deciding what
  color to draw them on the automap.
- Fixed: Death-reverting morphs did not remove the morph item from the
  player's inventory when death caused the morph to revert.
- Updated fmod_wrap.h for FMOD Ex 4.18.


SVN r1259 (trunk)
2008-10-14 01:24:27 +00:00
Christoph Oelckers 3e291cf528 - Liux compile fixes.
SVN r1245 (trunk)
2008-09-23 07:46:23 +00:00
Christoph Oelckers d88e960bb9 - Fixed: The crosshair must be initialized after the texture manager because
on the fly texture creation for graphics patches is no longer supported.


SVN r1237 (trunk)
2008-09-19 22:34:32 +00:00
Christoph Oelckers b2b81fc8ad Linux compile fixes.
SVN r1236 (trunk)
2008-09-19 07:10:14 +00:00
Christoph Oelckers 71dd0d0269 - another #include fix for Linux.
- Added a 'logarithmic' parameter to S_GetRolloff.


SVN r1235 (trunk)
2008-09-18 21:00:12 +00:00
Christoph Oelckers 4ecb892df3 Fixed: sdl/i_input.cpp must include d_event.h.
SVN r1234 (trunk)
2008-09-18 06:57:51 +00:00
Christoph Oelckers b07542ddd6 More header cleanup.
SVN r1225 (trunk)
2008-09-15 00:47:31 +00:00
Christoph Oelckers db5723997c - Cleaned up some include dependencies.
SVN r1224 (trunk)
2008-09-14 23:54:38 +00:00
Randy Heit ad96225213 - Changed Linux to use clock_gettime for profiling instead of rdtsc. This
avoids potential erroneous results on multicore and variable speed
  processors. Windows will need to be updated accordingly.



SVN r1142 (trunk)
2008-08-10 03:25:08 +00:00
Randy Heit dda5ddd3c2 - Ported vlinetallasm4 to AMD64 assembly. Even with the increased number of
registers AMD64 provides, this routine still needs to be written as self-
  modifying code for maximum performance. The additional registers do allow
  for further optimization over the x86 version by allowing all four pixels
  to be in flight at the same time. The end result is that AMD64 ASM is about
  2.18 times faster than AMD64 C and about 1.06 times faster than x86 ASM.
  (For further comparison, AMD64 C and x86 C are practically the same for
  this function.) Should I port any more assembly to AMD64, mvlineasm4 is the
  most likely candidate, but it's not used enough at this point to bother.
  Also, this may or may not work with Linux at the moment, since it doesn't
  have the eh_handler metadata. Win64 is easier, since I just need to
  structure the function prologue and epilogue properly and use some
  assembler directives/macros to automatically generate the metadata. And
  that brings up another point: You need YASM to assemble the AMD64 code,
  because NASM doesn't support the Win64 metadata directives.
- Added an SSE version of DoBlending. This is strictly C intrinsics.
  VC++ still throws around unneccessary register moves. GCC seems to be
  pretty close to optimal, requiring only about 2 cycles/color. They're
  both faster than my hand-written MMX routine, so I don't need to feel
  bad about not hand-optimizing this for x64 builds.
- Removed an extra instruction from DoBlending_MMX, transposed two
  instructions, and unrolled it once, shaving off about 80 cycles from the
  time required to blend 256 palette entries. Why? Because I tried writing
  a C version of the routine using compiler intrinsics and was appalled by
  all the extra movq's VC++ added to the code. GCC was better, but still
  generated extra instructions. I only wanted a C version because I can't
  use inline assembly with VC++'s x64 compiler, and x64 assembly is a bit
  of a pain. (It's a pain because Linux and Windows have different calling
  conventions, and you need to maintain extra metadata for functions.) So,
  the assembly version stays and the C version stays out.
- Removed all the pixel doubling r_detail modes, since the one platform they
  were intended to assist (486) actually sees very little benefit from them.
- Rewrote CheckMMX in C and renamed it to CheckCPU.
- Fixed: CPUID function 0x80000005 is specified to return detailed L1 cache
  only for AMD processors, so we must not use it on other architectures, or
  we end up overwriting the L1 cache line size with 0 or some other number
  we don't actually understand.


SVN r1134 (trunk)
2008-08-09 03:13:43 +00:00
Christoph Oelckers fddf69e950 - Added DECORATE conversions for Hexen's Cleric Mace, Firedemon and fog by
Karate Chris.
- Added several type checks to the weapon slot code.
- Changed: Players no longer respawn in instant death sectors with 
  the 'Respawn where died' flag on.


SVN r1101 (trunk)
2008-08-02 08:38:07 +00:00
Randy Heit de5d4715c2 - Added Linux support for the CMakeLists. This meant downgrading them for
CMake 2.4, since the distros don't seem to consider 2.6 stable yet.
  As a bonus, GTK+ is no longer a required dependency; now it's optional.
- Made dehsupp ignore CR characters, so it doesn't spew warnings on Linux.



SVN r1092 (trunk)
2008-07-25 01:37:44 +00:00
Christoph Oelckers d2f1515aa6 - Fixed: When a weapon is destroyed, its sister weapon must also be destroyed.
- Added a check for PUFFGETSOWNER to A_BFGSpray.
- Moved the PUFFGETSOWNER check into P_SpawnPuff and removed the limitation
  to players only.
- Fixed: P_SpawnMapThing still checked FMapThing::flags for the class bits 
  instead of FMapThing::ClassFilter.
- Fixed: A_CustomMissile must not let P_SpawnMissile call P_CheckMissileSpawn.
  It must do this itself after setting the proper owner.
- Fixed: CCMD(give) increased the total item count.
- Fixed: A_Stop didn't set the player specific variables to 0.


SVN r1066 (trunk)
2008-07-05 10:17:10 +00:00
Christoph Oelckers 165875c7df - Fixed: Drawing the amount of an inventory item in the player's inventory did
not work
- Added: PowerupTime to drawnumber and drawbar.  You must specify a
  powerupgiver.  Although drawnumber goes in seconds the powerup has left
  drawbar will use ticks for extra accuracy.
- I have increased cross-port compatibility with Skulltag.  If an unknown
  game mode is provided for sbarinfo's gamemode command it will ignore it and
  continue.


SVN r1015 (trunk)
2008-06-03 07:21:11 +00:00
Christoph Oelckers 29380f70b3 - Added an option to consider intermission screens gameplay for purposes of
capturing the mouse.
- Changed: Telefragging should not thrust the victim if it isn't in precisely the
  same position as the killer.
- fixed: A_SpawnItemEx must call P_TeleportMove before checking the spawned
  object's position.


SVN r1014 (trunk)
2008-06-02 16:56:53 +00:00
Randy Heit 0d400522e4 - Fixed: PrtScn/SysRq key did not work on Linux.
SVN r999 (trunk)
2008-05-30 01:50:41 +00:00
Randy Heit 10c0d67b78 - Changed the MIDIStreamer to send the all notes off controller to each
channel when restarting the song, rather than emitting a single note off
  event which only has a 1 in 127 chance of being for a note that's playing
  on that channel. Then I decided it would probably be a good idea to reset
  all the controllers as well.
- Increasing the size of the internal Timidity stream buffer from 1/14 sec
  (copied from the OPL player) improved its sound dramatically, so apparently
  Timidity has issues with short stream buffers. It's now at 1/2 sec in
  length. However, there seems to be something weird going on with
  corazonazul_ff6boss.mid near the beginning where it stops and immediately
  restarts a guitar on the exact same note.
- Added a new sound debugging cvar: snd_drawoutput, which can show various
  oscilloscopes and spectrums.
- Internal TiMidity now plays music.
- Changed the progdir global variable into an FString.

SVN r900 (trunk)
2008-04-11 04:59:23 +00:00