Commit graph

263 commits

Author SHA1 Message Date
stevenaaus
1dca306415 README changes
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@270 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 07:40:48 +00:00
stevenaaus
96d68f5b7f Miscellaneous doco updates
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@269 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 05:01:12 +00:00
stevenaaus
2eeced7210 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@268 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 03:59:29 +00:00
stevenaaus
fd2bf27771 Swap left and right arrow keys in the videomode menu. (Right arrow now increases resolution, which is more standard)
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@267 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 03:42:52 +00:00
kristianduske
9dcf5ed4d2 Changed base SDK to 10.4.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@266 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-13 12:05:26 +00:00
kristianduske
984bc6efde Mac OS X launcher can be suppressed by passing "-nolauncher" on the command line.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@265 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-12 15:41:32 +00:00
kristianduske
69da93815e Mac OS X launcher can be suppressed by passing "-nolauncher" on the command line.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@264 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-12 15:41:15 +00:00
kristianduske
b31e54bd73 Trying to recover broken XCode project files.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@263 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-10 17:51:17 +00:00
sezero
b33dc95bd9 net_sys.h: update comments and tidy up.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@262 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-09 14:03:07 +00:00
kristianduske
edf31fe611 Replaced SDL network driver with BSD driver for Mac OS X.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@261 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-09 12:44:44 +00:00
sezero
19051b0f9b 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@260 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-09 12:20:39 +00:00
kristianduske
c09f459026 Added the Sparkle framework to OS X launcher for automatic updates (this is not entirely ready for release yet).
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@254 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-08 13:17:35 +00:00
stevenaaus
78a24e27cc Add a "prev weapon" menu item (from Sander)
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@253 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-04 03:09:07 +00:00
sezero
79c16e7f0a host_cmd.c, menu.c: sanitize whitespace/formatting.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@252 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 19:45:16 +00:00
sezero
7a618b80cb menu.c: Added an options enum for the options menu. Added an options menu
entry for mouse look toggling.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@251 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 18:28:23 +00:00
sezero
dff408e7f5 revert incorrect changes to NUM_GAMEOPTIONS and gameoptions_cursor_table from rev. 246.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@250 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 17:33:03 +00:00
sezero
9498f94675 gl_mesh.c (BuildTris): worked around a type-punned pointer. adapted from quakeforge.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@249 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-01 21:11:16 +00:00
sezero
da8996a8f5 * 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@248 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-01 19:22:46 +00:00
stevenaaus
b9ab6be4f8 Add a statusbar alpha slider, and change default scr_sbaralpha to 0.95
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@247 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-29 06:48:25 +00:00
stevenaaus
b63d812769 Link the status bar size to the scale slider, though it's size only increases half as fast
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@246 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-29 01:52:04 +00:00
stevenaaus
f0ee5581c0 History fixed - Ozkan's newline fix seems ok.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@245 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-28 07:50:27 +00:00
stevenaaus
10b21499a2 Make some fixes for command line history now that history is persistent
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@244 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-28 07:08:16 +00:00
stevenaaus
977e81c8c1 There seems bugs in the command-line code. Revert this "blank newline" fix first, then look for more
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@243 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-27 21:45:33 +00:00
stevenaaus
6ffcbdc338 -bgvolume switch stays... Allows CD music/ambient music to play while minimized
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@242 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-26 08:47:11 +00:00
sezero
ab217aaf82 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@241 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-25 12:20:17 +00:00
sezero
23a767e4b2 made MAXCMDLINE definition public through keys.h.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@240 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-25 10:36:14 +00:00
sezero
e1c4c0d973 Windows/dirent.c: include stddef.h for MSVC to get intptr_t.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@239 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-25 08:28:27 +00:00
stevenaaus
8ca2bc684b (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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@238 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-23 20:58:04 +00:00
stevenaaus
57c129aa17 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@237 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-23 20:55:11 +00:00
sezero
4087928d2b * 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@236 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-15 09:15:42 +00:00
sezero
43e872d1d1 keys.c (History_Shutdown): Don't let it write an empty string to history.txt
if no console commands were used.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@235 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 10:50:40 +00:00
sezero
72f4ccebb2 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@234 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 08:45:40 +00:00
sezero
4f5dd899fd 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@233 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 08:16:58 +00:00
sezero
406ed513d4 * 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@232 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 07:56:28 +00:00
sezero
53b780c9a2 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@231 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 00:31:12 +00:00
sezero
b33ac1c08a keys.c (History_Init): Made global again.
(History_Shutdown): Likewise.
keys.h: Added prototypes for History_Init and History_Shutdown.


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


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@229 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-25 23:55:41 +00:00
stevenaaus
5d8098f1a5 Add Bakers/Ezquakes persistent history feature
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@228 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-25 13:32:49 +00:00
sezero
7f884a951b net_udp.c, net_wins.c, net_wipx.c: Add more informative debug messages.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@227 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 18:11:00 +00:00
sezero
94387b68a2 net_wins.c (WINS_GetLocalAddress): Make sure buff is null terminated.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@226 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 18:09:02 +00:00
sezero
dde3458f13 net_wins.c (WINS_Init): Fix error return value as INVALID_SOCKET.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@225 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 18:05:43 +00:00
sezero
50cea5662f * console.h (Con_DebugLog): Add prototype.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@224 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 11:02:13 +00:00
sezero
b2aba1c07d 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@223 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 11:01:24 +00:00
sezero
4c86b544f5 * 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@222 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 16:23:06 +00:00
sezero
850ef74acf * net_udp.c (UDP_Init): Fix Con_SafePrintf() call.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@221 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 16:17:17 +00:00
sezero
bb11a66451 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@220 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 15:24:40 +00:00
sezero
94a056abcf net_sdlnet.c: reverted parts of rev. 197/198.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@219 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 13:27:30 +00:00
sezero
4a202dad3d net_main.c: more trivialities.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@218 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 12:27:30 +00:00
sezero
c8bdc511d8 net_bsd.c, net_dgrm.h, net_loop.c, net_loop.h, net_sdl.c, net_win.c: more trivialities.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@217 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 12:20:25 +00:00
sezero
63c98a9576 * host_cmd.c, menu.c, sv_main.c: Include net_sys.h (for net_defs.h).
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@216 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 11:50:21 +00:00