Commit Graph

261 Commits

Author SHA1 Message Date
stevenaaus 02c566eec0 Miscellaneous doco updates
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@269 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 05:01:12 +00:00
stevenaaus 41d8164068 PF_traceline causes program to die badly if given non-numeric (isnan) vectors. So we must check to not allow this happening. Additionally, stop program execution is developer cvar is set. Note: Compiling program with gcc option \'-ffast-math\' (and more specifically, -funsafe-math-optimizations) is an alternative fix than this patch. It performs FPU opts that gloss over the issue
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@268 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 03:59:29 +00:00
stevenaaus d9ed158672 Swap left and right arrow keys in the videomode menu. (Right arrow now increases resolution, which is more standard)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@267 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 03:42:52 +00:00
kristianduske 7817c3271a Changed base SDK to 10.4.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@266 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-13 12:05:26 +00:00
kristianduske 593f36ee98 Mac OS X launcher can be suppressed by passing "-nolauncher" on the command line.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@265 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-12 15:41:32 +00:00
kristianduske ade148f09b Mac OS X launcher can be suppressed by passing "-nolauncher" on the command line.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@264 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-12 15:41:15 +00:00
kristianduske 47f5a1b812 Trying to recover broken XCode project files.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@263 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-10 17:51:17 +00:00
sezero a67c4ddf4a net_sys.h: update comments and tidy up.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@262 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-09 14:03:07 +00:00
kristianduske 789dd2a686 Replaced SDL network driver with BSD driver for Mac OS X.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@261 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-09 12:44:44 +00:00
sezero 40b6d80f99 struct sockaddr has unsigned char sa_len as the first member in BSD
in BSD variants and the family member is also an unsigned char instead
of (unsigned) short. So we define HAVE_SA_LEN for those BDS variants
and check for the offsetof for the sa_family member and also change
the struct qsockaddr to mirror that.  This should matter only when
PLATFORM_UNIX is defined.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@260 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-09 12:20:39 +00:00
kristianduske 38c31f616f Added the Sparkle framework to OS X launcher for automatic updates (this is not entirely ready for release yet).
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@254 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-08 13:17:35 +00:00
stevenaaus 26d6246ff9 Add a "prev weapon" menu item (from Sander)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@253 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-04 03:09:07 +00:00
sezero 427d671c24 host_cmd.c, menu.c: sanitize whitespace/formatting.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@252 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 19:45:16 +00:00
sezero 11b6986944 menu.c: Added an options enum for the options menu. Added an options menu
entry for mouse look toggling.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@251 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 18:28:23 +00:00
sezero edd2a2a34f revert incorrect changes to NUM_GAMEOPTIONS and gameoptions_cursor_table from rev. 246.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@250 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 17:33:03 +00:00
sezero 6bbb06b490 gl_mesh.c (BuildTris): worked around a type-punned pointer. adapted from quakeforge.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@249 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-01 21:11:16 +00:00
sezero e1046e68c6 * renamed Length() to VectorLength() for consistency with its friends.
* mathlib.c: Removed the unnecessary sqrt() prototype.
(VectorLength): Made it to just return sqrt(DotProduct(arg,arg))
(VectorNormalize): Calculate the length as sqrt(DotProduct(arg,arg)).
* mathlib.h (CLAMP): Renamed the macro arguments from min and max to
_minval and _maxval.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@248 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-01 19:22:46 +00:00
stevenaaus 57bf6f49b9 Add a statusbar alpha slider, and change default scr_sbaralpha to 0.95
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@247 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-29 06:48:25 +00:00
stevenaaus 86dea5717b Link the status bar size to the scale slider, though it's size only increases half as fast
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@246 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-29 01:52:04 +00:00
stevenaaus 630499ae8f History fixed - Ozkan's newline fix seems ok.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@245 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-28 07:50:27 +00:00
stevenaaus 57484778cd Make some fixes for command line history now that history is persistent
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@244 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-28 07:08:16 +00:00
stevenaaus 30d9246c7b There seems bugs in the command-line code. Revert this "blank newline" fix first, then look for more
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@243 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-27 21:45:33 +00:00
stevenaaus b9f418d276 -bgvolume switch stays... Allows CD music/ambient music to play while minimized
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@242 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-26 08:47:11 +00:00
sezero f81f9f5e05 Under windows, run the game (windowed), go into a saved game,
press Esc to get the menu, minimize using the mouse on the
window's minimize icon and then restore and you'll have sound
all the same.  HOWEVER: If you minimize by pressing the icon
on the start bar, sound will be lost upon restoring. Or, if
you use alt-tab to get away from the game window the same will
happen. Or, if you run the game fullscreen and use alt-tab to
go to the desktop (alt-tab is the only way I know) you will
lose the sound again.  Here, we are probably are hitting an
SDL_APPACTIVE or SDL_APPINPUTFOCUS event more than once and
since the block counter goes > 1 we are not restoring properly.
For now, making snd_blocked to act as a boolean and not as a
counter fixes the issue.  Hmmm...

* main_sdl.c: Revert revision 238 change, no longer necessary.
* snd_dma.c: Make snd_blocked act as a boolean and not as a
counter.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@241 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-25 12:20:17 +00:00
sezero b4ae05875e made MAXCMDLINE definition public through keys.h.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@240 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-25 10:36:14 +00:00
sezero 02e9d464ff Windows/dirent.c: include stddef.h for MSVC to get intptr_t.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@239 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-25 08:28:27 +00:00
stevenaaus 54a2f21892 (Some?) Win32/64 does not re-enable sound after app is minimized and restored, so (temporarily?) add a -bgsound switch to disable sound being muted
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@238 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-23 20:58:04 +00:00
stevenaaus c31e3d107a Enable messages and says to be 256 chars long, with a scrolling input line across top of screen. Allow tab button in demos.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@237 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-23 20:55:11 +00:00
sezero c5f8c44ce8 * Windows/dirent.c: For 64 bit compatibility, changed the handle member
of struct DIR from long to intptr_t, which is what _findfirst() returns
and _findnext() and _findclose() accepts, and removed the brain-dead long
casts in the code. This file is probably only used with M$VC, therefore
this doesn't affect gcc/mingw compilations and previous binaries.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@236 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-15 09:15:42 +00:00
sezero cfee212570 keys.c (History_Shutdown): Don't let it write an empty string to history.txt
if no console commands were used.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@235 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 10:50:40 +00:00
sezero f7d02fcbbf host.c (Host_Init): Do not exec quake.rc for dedicated servers. Instead,
exec autoexec.cfg and stuffcmds in that case. Also moved running the start
map for dedicated servers here.
host_cmd.c (Host_Startdemos_f): Moved running the start map for dedicated
servers to Host_Init().


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@234 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 08:45:40 +00:00
sezero 29d4cad280 host.c (Host_Init): Don't call V_Init, Chase_Init, Key_Init, Con_Init, M_Init,
ExtraMaps_Init and Modlist_Init for dedicated servers either.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@233 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 08:16:58 +00:00
sezero bd2385e5ea * keys.c (HISTORY_FILE_NAME): define simply as history.txt without
prefixing with a game directory, so that the history file would be
written into the basedir and not affected by dynamic game directory
changes.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@232 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 07:56:28 +00:00
sezero 52f4e89d99 host.c (Host_Shutdown): Write the console command history file only if
not a dedicated server. Same for shutting down the CDAudio and sound
subsystems.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@231 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 00:31:12 +00:00
sezero 7383a1647b keys.c (History_Init): Made global again.
(History_Shutdown): Likewise.
keys.h: Added prototypes for History_Init and History_Shutdown.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@230 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 00:15:22 +00:00
sezero 9154ed3539 * keys.c (History_Init): Make it static. Tidy-up its formatting.
(History_Shutdown): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@229 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-25 23:55:41 +00:00
stevenaaus 819208b38c Add Bakers/Ezquakes persistent history feature
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@228 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-25 13:32:49 +00:00
sezero c1ff4646c2 net_udp.c, net_wins.c, net_wipx.c: Add more informative debug messages.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@227 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 18:11:00 +00:00
sezero eeb7b890ca net_wins.c (WINS_GetLocalAddress): Make sure buff is null terminated.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@226 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 18:09:02 +00:00
sezero 1da39b9337 net_wins.c (WINS_Init): Fix error return value as INVALID_SOCKET.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@225 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 18:05:43 +00:00
sezero fe05326ae9 * console.h (Con_DebugLog): Add prototype.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@224 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 11:02:13 +00:00
sezero b65383bf2d Reorganize files for platform-specific code:
* sys_sdl_win.c: Copied from sys_sdl.c. Windows-only. Remove unix code.
(Sys_Init): New procedure. Call AllocConsole() and get input and output
handles for dedicated servers.
(Sys_ConsoleInput): Add a windows version.
(Sys_Error): Adjust for the allocated console and use windows api.
Adjust message output. Remove the console timeout, doesn't work somehow.
Just display the console for 3 seconds and then exit. Rely on SDL that
it redirects/logs the stdout/stderr to files.
* sys_sdl_unix.c: Rename from sys_sdl.c. Unix-only. Remove windows code.
(Sys_Init): New procedure.
(Sys_Error): Remove Windows-oriented dedicated server specific code.
Adjust message output.
* sys_sdl.c: Delete.
* sys.h (Sys_Init): Add prototype.
* main_sdl.c (main): Call Sys_Init().
* pl_linux.c (PL_ErrorDialog): Remove terminal printing which Sys_Error
already does.
* pl_osx.m (PL_ErrorDialog): Update from uhexen2.
* pl_win.c: Make icon handle static. whitespace and formatting tidy-up.
* Makefile, Makefile.darwin, Makefile.w32, Makefile.w64: Adjust for the
sys_sdl.c name change to sys_sdl_unix.c and sys_sdl_win.c.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@223 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 11:01:24 +00:00
sezero fa6bc1ca0d * net_udp.c (UDP_Read): Remove the get_qsockaddr() helper which came from the
old fitzsdl port, and use the struct qsockaddr *addr argument with typecasting
as in original quake.
(get_qsockaddr): Remove.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@222 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 16:23:06 +00:00
sezero 027f7d2033 * net_udp.c (UDP_Init): Fix Con_SafePrintf() call.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@221 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 16:17:17 +00:00
sezero 6fa1c54ada net_udp, net_wins, net_wipx network drivers update:
- do not try to set the quake hostname to the machine name if it isn't set.
- use the newly added unix/windows socket api compatibility macros from
net_sys.h: using just an int as the socketfd wasn't a problem without win64
support: the windows SOCKET type is not only unsigned but may actually be
wider (uintptr_t, which is 8 bytes on win64).


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@220 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 15:24:40 +00:00
sezero b1835226d6 net_sdlnet.c: reverted parts of rev. 197/198.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@219 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 13:27:30 +00:00
sezero 1f9a960e86 net_main.c: more trivialities.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@218 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 12:27:30 +00:00
sezero 1f5cc564e8 net_bsd.c, net_dgrm.h, net_loop.c, net_loop.h, net_sdl.c, net_win.c: more trivialities.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@217 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 12:20:25 +00:00
sezero 7951b78a96 * host_cmd.c, menu.c, sv_main.c: Include net_sys.h (for net_defs.h).
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@216 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 11:50:21 +00:00
sezero 5ad7537be2 * Makefile, Makefile.darwin, Makefile.w32, Makefile.w64: Build changes:
The SDL_net driver is now disabled by default and platform-specific network
drivers will be used. To compile for SDL_net, a command like "make SDLNET=1"
must be used, in which case a new preprocessor macro _USE_SDLNET will be
defined in the CFLAGS. For windows targets when not using SDL_net, WINSOCK2
is added as another option: A command line like "make WINSOCK2=1" will enable
WinSock2 api and a new preprocessor macro _USE_WINSOCK2 will be defined in
the CFLAGS. Or, a command line like "make WINSOCK2=0" will disable WinSock2
api and the old WinSock 1.1 api will be used instead. For Win64, WinSock2 is
enabled by default. For Win32, WinSock 1.1 is the default api.
* net_bsd.c, net_dgrm.c, net_loop.c, net_main.c, net_sdl.c, net_sdlnet.c,
net_udp.c, net_win.c, net_wins.c, net_wipx.c: Use the newly added net_sys.h
header. The sys_socket_t type is not in use, yet.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@215 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 11:10:38 +00:00