Commit graph

1133 commits

Author SHA1 Message Date
stevenaaus
329243bdb6 cd fix needed fo gameplay
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@292 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 01:28:40 +00:00
stevenaaus
b9544e4934 Make "cd play" progress tracks
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@291 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 00:35:22 +00:00
sezero
61ac767167 * cd_sdl.c (export_cddev_arg): make putevn() actually work.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@290 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 23:46:16 +00:00
sezero
1bcbee0f96 * cd_sdl.c (export_cddev_arg): fixed bad snprintf and the crash it was
causing.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@289 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 23:20:16 +00:00
sezero
030bbe5a3d cd_sdl.c: no need for uhexen2's CVS version identifier to stay here.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@288 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 17:23:39 +00:00
sezero
67e1f62305 * cd_sdl.c (get_cddev_arg): fix stupid typo in uppercasing.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@287 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 15:55:54 +00:00
sezero
b79ff5e9c2 * cd_sdl.c (get_cddev_arg): check for null or empty arguments also
for non-windows platforms.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@286 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 14:32:34 +00:00
sezero
9c06e7a75f * cd_sdl.c: Remove unnecessary SDL_getenv.h include.
(CDAudio_Init): Move the bad ugly hack about SDL_CDROM environment
variable into the new export_cddev_arg() helper. FOr the -cddev option,
call the new get_cddev_arg() helper.

(export_cddev_arg): SDL_CDROM environment variable hack moved from
CDAudio_Init() to here. Fixed bad strcat() usage orto the array. Made it
for non-windows platforms only.

(get_cddev_arg): Added for checking the argument to the -cddev option.
For non-windows platforms just return the argument itself. For windows,
arg should be like "D:\", make sure it is so, but tolerate args like "D"
or "D:", as well.

(CDAudio_Next): Make static. Minor cleanups.

(CDAudio_Prev): Make static. Minor cleanups.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@285 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 14:05:32 +00:00
stevenaaus
352681d0f5 cd command tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@284 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 10:31:00 +00:00
stevenaaus
c821878ca7 Add "cd next" and "cd prev" commands. Add a new "-cd" option , which in combination with "-dedicated", allows QS to be a stand-alone cd player... Useful\!
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@283 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 09:49:03 +00:00
stevenaaus
7622990e13 Set SDL_CDROM environment variable when using -cddev. Some doco updates.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@282 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 04:12:19 +00:00
sezero
e46ff4f5b6 MS Visual Studio support:
* Quake/console.c, net_udp.c: replace snprintf by q_snprintf.
* Quake/common.h: Define q_snprintf as _snprintf for windows and as
snprintf for all others. Likewise for q_vsnprintf. Disable several
MSVC warnings. Define fmin and fmax as min and max macros for MSVC.
* Windows/quakespasm.vcproj, quakespasm.sln: Add Visual Studio 2005
project files.
* Windows/SDL_x64.zip: Add SDL x64 import libraries for MSVC.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@281 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-20 02:25:22 +00:00
sezero
3e6760e6c5 Makefile.w32, Makefile.w64: made them a little bit more flexible by adding
CROSS_COMPILE and TARGET variables.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@280 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-17 19:30:35 +00:00
kristianduske
8931642fac OS X launcher now uses -fullscreen argument to switch into fullscreen mode instead of just omitting the -windowed argument.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@279 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 22:31:28 +00:00
sezero
2808f8893b pr_cmds.c (PF_traceline): Added a FIXME note about the NaN issue with certain progs.dat
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@278 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 21:02:31 +00:00
sezero
b800f8ff69 added q_stdinc.h, adapted from uhexen2, to tidy up several includes and
macros in one place.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@277 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 20:55:39 +00:00
sezero
102fb41b74 pr_cmds.c (PF_traceline): fix entity number printing.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@276 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 20:50:31 +00:00
sezero
088d07a753 mathlib.h, mathlib.c: changed nanmask from being a global to being
a macro.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@275 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 20:10:20 +00:00
sezero
9998315606 * pr_cmd.c: replaced isnan() calls with quake's own ISNAN() macro.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@274 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 20:06:06 +00:00
sezero
1ee99859d1 added note that the "homedir" patch here is outdated
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@273 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 19:44:58 +00:00
kristianduske
81c61116c5 git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@272 af15c1b1-3010-417e-b628-4374ebc0bcbd 2010-08-14 19:41:09 +00:00
stevenaaus
09e39cc3f0 README tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@271 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 11:59:39 +00:00
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
sezero
7a36701fa8 * 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: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@215 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 11:10:38 +00:00
sezero
291a531b44 * arch_def.h, net_sys.h, wsaerror.h: New headers, adapted from uhexen2.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@214 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:55:21 +00:00
sezero
7239a9a679 net_defs.h (net_driver_t): Removed the controlSock member. It is not used
for any purpose in either of Loop, Datagram or Serial drivers. It used to
be assigned the value returned by the Init() procedure of the relevant
driver which is either 0 for success or -1 for failure, therefore there is
no purpose to it at all.
net_main.c (NET_Init): Removed the controlSocket var and adjusted for the
net_driver_t change.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@213 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:50:21 +00:00
sezero
b4cb4368a4 net_main.c: made static variables and functions static. formatting tidy-ups.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@212 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:41:34 +00:00
sezero
4e508de0e6 net_dgrm.c: made the statistic counter variables static. same for the
testPollProcedure and test2PollProcedure varibles and StrAddr, NET_Ban_f,
SendMessageNext, ReSendMessage, PrintStats and NET_Stats_f functions.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@211 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:16:58 +00:00
sezero
b963f776e5 net_dgrm.c: made the packetBuffer struct static.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@210 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:03:10 +00:00
sezero
31e63fecf0 * common.c: Renamed the empty Test_f function of johnfitz to FitzTezt_f.
Renamed its associated console command to fitztest.
* net_dgrm.c: Renamed back Net_Test_f to Test_f. Added back the test,
test2 and ban console commands.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@209 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:58:12 +00:00
sezero
e98d1efcc3 * net_dgrm.c: changed the types of banAddr and banMask to struct in_addr.
changed the type of testAddr in _Datagram_CheckNewConnections() to in_addr_t.
a little formatting tidy-up.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@208 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:45:24 +00:00
sezero
dcd4743a2b * net_defs.h, net_udp.c, net_wins.c, net_wipx.c, net_sdlnet.c: prefixed
the members of qsockaddr structure with a "q".


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@207 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:20:32 +00:00
sezero
b95bf1ae87 * net_udp.c: Changed broadcastaddr type to struct sockaddr_in.
* net_wins.c: Likewise.
* net_wipx.c: Changed broadcastaddr type to struct sockaddr_ipx.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@206 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:00:56 +00:00
sezero
eb45598f39 * net_win.c, net_wins.c, net_wipx.c: warning and compilation fixes.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@205 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 20:50:27 +00:00
sezero
2cbdc2f756 * net.h: separated the functions and data exported through net.h into two:
net.h now holds all public exports and the new net_defs.h holds the exports
only required by the net layer. besides the net_* files, host_cmd.c and
sv_main.c are the only reasonable foreign importers of net_defs.h: they
require accessing the qsocket_s structure members. The only one that does
not fit is menu.c needing some net exports, but it may be properly handled,
later on.
* net_defs.h: New header.
* host_cmd.c: Include net_defs.h.
* menu.c: Likewise.
* net_bsd.c: Likewise.
* net_dgrm.c: Likewise.
* net_loop.c: Likewise.
* net_main.c: Likewise.
* net_sdl.c: Likewise.
* net_sdlnet.c: Likewise.
* net_udp.c: Likewise.
* net_win.c: Likewise.
* net_wins.c: Likewise.
* net_wipx.c: Likewise.
* sv_main.c: Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@204 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 17:21:10 +00:00
sezero
45ce066ee5 from uhexen2:
* net_dgrm.c (Datagram_Init): Datagram_Init() must return -1 if it couldn't
initialize any drivers.
* net_main.c (): dedicated servers must error out if no network drivers are
available.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@203 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 15:33:45 +00:00
sezero
b2bb022eb5 * net_main.c: added commentary on the driver checks in the code.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@202 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 15:19:58 +00:00
sezero
1fc6e7c34c net_main.c (NET_SendToAll): Really change all occurances of state2 to msg_sent.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@201 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 15:06:26 +00:00
sezero
0f948f8231 * net_main.c: Fix NET_SendToAll() so that it really skips non-connected
clients. While we're at it, change the type of the blocktime argument
to double (the comparison is against a double.) Rename the cryptic
state1 and state2 variables to something more indicative of thei
purpose, ie. msg_init and msg_sent. from uhexen2.
* net.h, host.c, sv_main.c: Adjust for the NET_SendToAll() argument type
change.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@200 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 15:00:57 +00:00
sezero
2b569dc06b * net_udp.c: Changed myAddr type to in_addr_t.
* net_wins.c: Changed myAddr type to u_long.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@199 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 13:10:52 +00:00
sezero
e789fcaed0 * net_sdlnet.c: Pass "localhost" instead of NULL to SDLNet_ResolveHost().
added some remarks about missing functionality in SDL_net.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@198 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 12:50:51 +00:00
sezero
9a09a1ee08 * net_sdlnet.c: Added ASSERT_SOCKETID for paranoid debugging purposes,
disabled by default. Made socket_id() to work in two passes, once for
looking for a match and the next for looking for an empty slot in the
net_sockets[] array. Made it to Sys_Error if there are no empty slots.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@197 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 11:05:28 +00:00
sezero
013a3ad1db Some more tidy-up and minor fixing in net stuff. Largely trivial. Also
added winquake.h.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@196 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 10:03:05 +00:00
sezero
719ba437b7 * gl_vidsdl.c, in_sdl.c, main_sdl.c, net_sdlnet.c, pl_linux.c, pl_osx.m,
pl_win.c, sys_sdl.c: Explicitly include SDL.h in the SDL source files. At
present, quakedef.h already includes SDL.h you may never know what would
happen in the future.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@195 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 22:50:48 +00:00
sezero
858fea3461 * input.h: Removed the SDL_MAJOR_VERSION guards around BuildKeyMaps() and
Key_Map() prototypes. Made Key_Map() to accept void* argument instead of
SDL_KeyboardEvent* so that the code can compile even without SDL.
* in_sdl.c (Key_Map): Adjusted for argument type change with proper cast
to SDL_KeyboardEvent*. The assembler output is the same as before.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@194 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 22:45:18 +00:00
sezero
288edb93a0 Makefiles: Removed an obsoleted comment. Added objects for platform-specific
network drivers in commented out form.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@193 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 20:15:21 +00:00
sezero
0e7d3d7009 * net_wipx.c, net_wipx.h: added from Fitzquake-0.85 source.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@192 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 20:07:04 +00:00
sezero
59574dd7a3 net_udp.h: Renamed all function argument names as socket to socketid.
net_udp.c: Renamed all function argument names as socket to socketid.
Replaced the inet_addr("127.0.0.1") call with htonl(INADDR_LOOPBACK).
Replaced qboolean _true with int _true.
net.h: Renamed the OpenSocket and CloseSocket function pointers to
Open_Socket and Close_Socket.
net_dgrm.c: Adjusted for Open_Socket and Close_Socket change.
net_sdlnet.c: Made some functions static.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@191 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 18:20:22 +00:00
sezero
c5f6ed0763 * net_udp.c: more minor fixes and tidy-ups.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@190 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 17:04:04 +00:00
sezero
44608bb902 * sys_sdl.c: Added a Sys_ConsoleInput implementation from uhexen2.
Only for unix for the time being.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@189 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 16:50:15 +00:00
sezero
2aeca5e276 * net_bsd.c: minor whitespace tidy-up.
* net_sdl.c (net_drivers[]): removed duplicated Datagram entry.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@188 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 16:45:38 +00:00
sezero
28bc6db8d1 * net_udp.c: Some cleanups & tidy-ups.
* net_bsd.c: Added from original Quake source.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@187 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 16:37:28 +00:00
sezero
6ee0b477b2 * main_sdl.c: better dedicated server loop.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@186 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 14:50:48 +00:00
sezero
e05ac1be84 * gl_model.c (Mod_LoadFaces): Do not call GL_SubdivideSurface() in dedicated
servers, otherwise we segfault in SubdividePolygon() at the BoundPoly() call.
This is a workaround, the actual problem is yet to be looked into.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@185 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 14:16:05 +00:00
sezero
6b05365aa3 * main_sdl.c: Skip the SDL_Event stuff in dedicated servers.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@184 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 14:10:19 +00:00
sezero
6667ab7afb * host_cmd.c (Host_Map_f): Do not call IN_Activate() for dedicated servers.
(Host_Changelevel_f): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@183 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 09:00:22 +00:00
sezero
e909c83a9c -Wshadow fixes:
sv_user.c (SV_WaterMove): use the global wishspeed.
(SV_ReadClientMessage): rename cmd to ccmd.
view.c (forward, right, up): make them local to V_CalcRoll() and not global.
net.h (playername, playercolor): remove externs for the non-existant globals.
r_sprite.c (R_GetSpriteFrame): rename the function's argument to currentent.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@182 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 19:03:31 +00:00
sezero
546eb4ff15 renamed the global channels to snd_channels. removed the global variable
sound_nominal_clip_dist and made it into a macro in snd_dma.c.
snd_dma.c: general whitespace and formatting cleanup.
(S_StaticSound): Explicitly cast vol to int when assigning it to ss->master_vol.
(S_UpdateAmbientSounds): changed the type of vol from float to int. used int
casts in its calculations. added explicit int casts when assigning values to
chan->master_vol.
(S_Update_): added explicit unsigned int casts in endtime calculations.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@181 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 17:25:24 +00:00
sezero
e5953b445c renamed cvar variable volume to sfxvolume in order to avoid shadowing.
(console name is still volume, no changes to that.)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@180 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 16:38:22 +00:00
sezero
48ecd3b74b snd_mix.c: General whitespace and formatting tidy up.
(DWORD): Deleted macro.
(S_TransferStereo16): Removed unnecessary pbuf pointer and used shm-> buffer
directly.
(S_TransferPaintBuffer): Removed unnecessary pbuf pointer and used shm-> buffer
directly. Removed the shadowing instance of snd_vol and used the global var.
(S_PaintChannels): Replaced Q_memset with memset.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@179 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 16:28:30 +00:00
sezero
ad73b2d75a gl_model.c (Mod_LoadTextures): Don't use "min" or "max" as a var name.
net_dgrm.c (Net_Test_f): Likewise.
pr_cmds.c (SetMinMaxSize, PF_setsize): Likewise.
pr_exec.c (PR_Profile_f): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@178 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-01 12:10:49 +00:00
sezero
da11e5c84f gl_rmain.c, gl_rmisc.c, cl_tent.c, quakedef.h: removed leftovers from GLTEST.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@177 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-01 10:55:40 +00:00
sezero
a9c3e4d9e4 common.h: tweak the qboolean and NULL definitions for __cplusplus. from uhexen2.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@176 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 12:10:25 +00:00
sezero
4da670cd2c mathlib.h (max, min): The min and max were declared as inline but
were never defined. Moved them from mathlib.c to here as static
inline functions q_min and q_max. Define min and max as q_min and
q_max.
mathlib.c (max, min): Moved to mathlib.h as q_max and q_min static
inlines.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@175 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 10:56:27 +00:00
sezero
3c237ac3d7 quakedef.h: Define inline as __inline if !__cplusplus && _MSC_VER
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@174 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 10:55:59 +00:00
sezero
fbffcfa3b9 menu.c (m_return_state, m_quit_prevstate): fixed typo.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@173 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 10:12:00 +00:00
sezero
faef222404 menu.c (m_return_state): changed type to m_state_e
(m_quit_prevstate): Likewise.
menu.h (m_return_state): added extern declaration.
net_dgrm.c (m_return_state): removed extern declaration.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@172 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 09:15:50 +00:00
sezero
cff54a63a6 cvar.c (Cvar_RegisterVariable): change the callback function argument type
to cvarcallback_t.
cvar.h (Cvar_RegisterVariable): adjust prototype.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@171 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 08:01:29 +00:00
sezero
6d3f3f2081 host_cmd.c, console.c, gl_draw.c, image.c, gl_model.c, r_sprite.c, cl_parse.c,
gl_warp.c, host.c, gl_mesh.c, gl_sky.c, gl_texmgr.c, cvar.c, sv_main.c, cvar.h,
gl_screen.c, r_brush.c, gl_vidsdl.c, zone.c, cl_main.c, cmd.c, snd_dma.c,
snd_mem.c, common.c, sv_phys.c: Added explicit casts to eliminate -Wc++-compat
warnings.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@170 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 07:42:36 +00:00
sezero
cc80c805b4 keys.c (Key_SetBinding): Avoid the C++ keyword "new".
pr_cmds.c (PF_normalize, PF_vlen): Likewise.
zone.c (Z_TagMalloc, Cache_Move, Cache_TryAlloc): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@169 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 06:39:09 +00:00
sezero
73c8c176f0 gl_mesh.c: Change the type of used[] array from qboolean to int, because
it is assigned not just true or false values but other integers like "2"
as well, and it would cause a mess if compiled as a C++ source.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@168 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 06:27:56 +00:00
sezero
562e37c468 MacOSX/QuakeSpasm.xcodeproj/
Updated XCode project files from Levent Yavas.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@167 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-21 19:03:17 +00:00
sezero
2bb4a6625e sys_sdl.c (Sys_Error): Call Host_Shutdown().
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@166 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-18 14:15:19 +00:00
sezero
0c4c7bf1a9 quakedef.h: bumped QuakeSpasm version to 3 (0.85.3) for further development
and future releases.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@165 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-03 15:28:18 +00:00
stevenaaus
d1c21ccd0e Fix mouse release issue after toggling fullscreen
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@163 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-02 02:22:24 +00:00
sezero
775d00d580 host_cmd.c (Host_Startdemos_f): Add missing linefeed in Cbuf_InsertText() call.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@162 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-28 06:42:09 +00:00
sezero
4ecfa98178 gl_vidnt.c, gl_vidsdl.c: if 0'ed out unused CheckArrayExtensions().
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@161 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 12:40:19 +00:00
sezero
eab6d09c2a sys.h, sys_sdl.c: Removed unused Sys_MakeCodeWriteable and Sys_DebugLog.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@160 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 12:37:20 +00:00
sezero
390db7c153 console.c: Added LOG_Init() and LOG_Close() as two new procedures, adapted
from uhexen2. Moved debug log initialization from Con_Init() to LOG_Init().
Made Con_DebugLog() to operate without varargs stuff. Log file is written
into host_parms->basedir now, not into a gamedir.
console.h: Added prototypes for LOG_Init() and LOG_Close().
host.c (Host_Init): Added LOG_Init().
(Host_Shutdown): Added LOG_Close().
quakedef.h (quakeparms_t): Moved the typedef to an earlier place before
any of the other quake headers are included.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@159 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 08:24:13 +00:00
sezero
c5ab356b4d main_sdl.c (main): Remove leading linefeed from the init message.
common.c (COM_InitArgv): Move the leading linefeed to the end of message.

Index: main_sdl.c
===================================================================
--- main_sdl.c	(revision 157)
+++ main_sdl.c	(working copy)
@@ -58,7 +58,7 @@
 	if (!parms.membase)
 		Sys_Error ("Not enough memory free; check disk space\n");
 
-	Con_Printf("\nFitzQuake %1.2f (c) John Fitzgibbons\n", FITZQUAKE_VERSION);
+	Con_Printf("FitzQuake %1.2f (c) John Fitzgibbons\n", FITZQUAKE_VERSION);
 	Con_Printf("SDL port (c) Sleepwalkr, Baker\n");
 	Con_Printf("QuakeSpasm %1.2f.%d (c) Ozkan Sezer, Stevenaaus\n", FITZQUAKE_VERSION, QUAKESPASM_VER_PATCH);
 
Index: common.c
===================================================================
--- common.c	(revision 157)
+++ common.c	(working copy)
@@ -1150,7 +1150,7 @@
 	if (n > 0 && com_cmdline[n-1] == ' ')
 		com_cmdline[n-1] = 0; //johnfitz -- kill the trailing space
 
-	Con_Printf("\nCommand line: %s",com_cmdline);
+	Con_Printf("Command line: %s\n", com_cmdline);
 
 	safe = false;
 


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@158 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 07:15:19 +00:00
sezero
f761ea4b28 host_cmd.c (Host_Mapname_f): Simplified map name retrieval.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@157 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 21:16:50 +00:00
sezero
016b5860ab zone.c: A little whitespace tidy-up here and there.
(hunk_t): Increased name array length to 24. Fixed the strncpy() calls
into that field so that it will be null terminated.
(cache_system_t): Increased name array length to 32.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@156 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 20:40:18 +00:00
sezero
b8052f88bd sys_sdl.c (Sys_Error): made text3, text4 and text5 into const char arrays.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@155 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 16:55:14 +00:00
sezero
5bd3fccecd Constified Con_DebugLog, Con_Print, Con_Printf, Con_Warning, Con_DPrintf,
Con_DPrintf2, Con_SafePrintf, Con_CenterPrintf, Con_LogCenterPrint,
Con_NotifyBox, PL_ErrorDialog, PR_RunError, Host_EndGame, Host_Error,
SV_ClientPrintf, SV_BroadcastPrintf, Host_ClientCommands, Sys_DebugLog,
Sys_Error, Sys_Printf, BOPS_Error and va. Added noreturn attribute to
Sys_Error, Sys_Quit, BOPS_Error, PR_RunError, Host_EndGame and Host_Error.
Added format printf attribute to Con_DebugLog, Con_Printf, Con_Warning,
Con_DPrintf, Con_DPrintf2, Con_SafePrintf, Con_CenterPrintf, PL_ErrorDialog,
PR_RunError, Host_EndGame, Host_Error, SV_ClientPrintf, SV_BroadcastPrintf,
Host_ClientCommands, Sys_DebugLog, Sys_Error, Sys_Printf and va. Adjusted
Host_Status_f and NET_Ban_f for the new attributes. Fixed broken format
strings in Con_Dump_f, Mod_LoadTexinfo, PR_AllocStringSlots and FloorDivMod.
Defined __attribute__ macros in quakedef.h so that we don't break non-gcc
compilers.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@154 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 16:30:40 +00:00
sezero
268b5a3e90 mathlib.h (VectorNormalizeFast): Use a float/int union instead of type
punning to avoid strict aliasing violations. the compiler used to emit
a warning from rsprite.c:R_DrawSpriteModel() where the macro is used.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@153 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 14:11:48 +00:00
sezero
9aa55ecbed r_alias.c (GL_DrawAliasFrame): Initialize vert2 to vert1 when not lerping,
which avoids a bogus compiler warning.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@152 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 14:02:37 +00:00
sezero
7dd3951cff gl_model.c (Mod_LoadTextures): If lump->filelen == 0, initialize m to NULL
in order to avoid a bogus compiler warning.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@151 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:47:19 +00:00
sezero
42d4e43d5f r_alias.c (GL_DrawAliasFrame): Initialize blend and iblend to 0 when not
lerping, which avoids a bogus compiler warning.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@150 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:44:24 +00:00
sezero
9a75b0a989 gl_vidnt.c (VID_SetMode): Initialize stat to false to avoid a compiler warning.
Some whitespace tidy-ups all over.
gl_vidsdl.c (VID_SetMode): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@149 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:41:39 +00:00
sezero
68aa123a2c gl_vidsdl.c (VID_Init): If -height is not specified on the command line,
initialize height to width*3/4 which avoids a compiler warning.
gl_vidnt.c (VID_Init): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@148 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:37:56 +00:00
sezero
6d761aafe8 gl_vidsdl.c (VID_SetMode): If mode setting failed, error out before doing
anything else unnecessary in between.
gl_vidnt.c (VID_SetMode): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@147 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:33:07 +00:00
sezero
fa0abdefdf removed net_udp.* from XCode project files. added conback.h to them.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@146 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 21:27:36 +00:00
sezero
29e7ef959d changed SDL conditional in input.h to SDL_MAJOR_VERSION
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@145 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 16:54:55 +00:00
sezero
eefe96b000 moved BuildKeyMaps(), Key_Map() and key_map[] from keys.c to in_sdl.c.
made key_map[] static to in_sdl.c. moved the relevant prototypes to
input.h for SDL builds only.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@144 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 16:25:08 +00:00
sezero
4295ad9f9b Makefiles: tweaked+tidied the objects (based on uhexen2 makefile.)
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@143 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 15:55:02 +00:00
sezero
24d7cbe9de renamed main.c to main_sdl.c.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@142 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 15:21:59 +00:00
sezero
fd2f95586d Makefiles: do not rely on /bin/true. define do_strip as a macro for debug and
non-debug cases and use it, instead. (adapted from tyrquake makefile.)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@141 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 14:50:18 +00:00
sezero
3381b05750 added conback to windows codeblocks project file. removed gl_test from
codeblocks project files.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@140 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 14:01:52 +00:00
sezero
4dd3d91a86 added conback.c to XCode project files.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@139 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 13:55:15 +00:00
sezero
cd1b95ad90 removed gl_test.c
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@138 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 13:55:00 +00:00
sezero
2cdc2146b6 removed macmini.* from the MacOSX XCode project directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@137 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 13:47:52 +00:00
sezero
fe91b2680f added fitzquake085.txt as a reference doc. split fitzquake080.txt into
the original fitzquake080.txt and fitzquake080sdl.txt.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@136 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 13:32:50 +00:00
sezero
dc1d341a73 updated to Steven's new icon.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@135 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:55:10 +00:00
sezero
03761c9528 deleted fitzquake512.tga
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@134 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:50:52 +00:00
sezero
7798b0b5e2 renamed several Fitzquake.* files to QuakeSpasm.* and adjusted the places
where they are referenced.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@133 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:48:09 +00:00
sezero
ec070a1f40 renamed several Fitzquake.* files to QuakeSpasm.* and adjusted the places
where they are referenced.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@132 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:45:12 +00:00
sezero
dd4f1dd96a deleted Fitzquake.depend from the codeblocks project directories.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@131 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:22:25 +00:00
sezero
aa8d0efbf2 deleted fitzquake.bmp, fitz_bmp.h and fitzquake.ico, removed their reference
from the relevant source files.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@130 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:21:14 +00:00
sezero
e29ba6238c gl_vidsdl.c, gl_vidnt.c: more sync'ing between gl_vidsdl.c and fitz-0.85
version of gl_vidnt.c.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@129 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 11:10:07 +00:00
sezero
9eabbc1b14 menu.c (M_AdjustSliders): Changed all of the second if conditions to else if.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@128 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 11:08:12 +00:00
sezero
278a0e4d49 gl_vidsdl.c: minor editing for a little less diff output against gl_vidnt.c.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@127 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 10:10:16 +00:00
sezero
3df0b9927d gl_vidnt.c (GL_MTexCoord2fFunc, GL_SelectTextureFunc): these aren't externs
in this file. made it to look like gl_vidsdl.c.
glquake.h: removed commented out multitexture stuff.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@126 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 09:50:44 +00:00
stevenaaus
7334c743a0 Change the "screen size" slider to a scale slider
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@125 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 09:25:13 +00:00
stevenaaus
76bcad2d2b Add conback files to *nix codeblocks project
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@124 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 09:04:26 +00:00
sezero
d7c4af2298 gl_vidsdl.c: fixed copy+paste error from rev. 119.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@123 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 07:25:39 +00:00
sezero
373875ec4a gl_vidsdl.c (VID_Restart): make sure that scr_conscale.value is positive
in conwidth and conheight recalculation (fitzquake-0.85 change).


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@122 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:55:20 +00:00
sezero
8c1d892b4a gl_vidsdl.c (VID_Menu_RebuildBppList): if there are no valid fullscreen
bpps for this width/height, just pick one (fitzquake-0.85 change).


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@121 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:52:27 +00:00
sezero
77f510e772 gl_vidsdl.c: Several Cvar_Set weirdness tidy-ups from fitzquake-0.85.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@120 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:48:36 +00:00
sezero
15586ec7a6 gl_vidsdl.c: Several Con_Printf("WARNING: ....") to Con_Warning("....")
changes from fitzquake-0.85.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@119 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:43:24 +00:00
sezero
97d314f0fc sv_main.c (localmodels): Bumped array size from 5 to 6 in order for it
to operate correctly with the raised limits of fitzquake-0.85.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@118 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:24:51 +00:00
sezero
f8a5363bfd make the code to compile with -fno-common flag:
glquake.h (dev_stats): Add extern.
(dev_peakstats): Likewise.
(dev_overflows): Likewise.
(lightmap_textures): Likewise.
(gl_warpimagesize): Likewise.
(r_drawflat_cheatsafe): Likewise.
(r_fullbright_cheatsafe): Likewise.
(r_lightmap_cheatsafe): Likewise.
(r_drawworld_cheatsafe): Likewise.
gl_texmgr.h (notexture): Likewise.
(nulltexture): Likewise.
(d_8to24table): Likewise.
(d_8to24table_fbright): Likewise.
(d_8to24table_nobright): Likewise.
(d_8to24table_conchars): Likewise.
(d_8to24table_shirt): Likewise.
(d_8to24table_pants): Likewise.
gl_screen.c (sb_lines): Remove and make it live only in sbar.c.
(vid): Remove and make it live only in gl_vid*.c
gl_vidsdl.c (m_state): Remove and make it live only in menu.c.
gl_vidnt.c (m_state): Likewise.
net_dgrm.c (m_state): Remove extern declaration.
menu.c (m_state): Tagged the m_state enum as m_state_e and moved it to menu.h.
Declared m_state as enum m_state_e.
menu.h (enum m_state_e): Moved from menu.c to here.
(m_state): Added extern declaration.
gl_rmain.c (r_drawflat_cheatsafe): Made the global to live here.
(r_fullbright_cheatsafe): Likewise.
(r_lightmap_cheatsafe): Likewise.
(r_drawworld_cheatsafe): Likewise.
gl_warp.c (gl_warpimagesize): Likewise.
host.c (dev_stats): Likewise.
(dev_peakstats): Likewise.
(dev_overflows): Likewise.
gl_texmgr.c (notexture): Likewise.
(nulltexture): Likewise.
(d_8to24table): Likewise.
(d_8to24table_fbright): Likewise.
(d_8to24table_nobright): Likewise.
(d_8to24table_conchars): Likewise.
(d_8to24table_shirt): Likewise.
(d_8to24table_pants[): Likewise.
r_brush.c (lightmap_textures): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@117 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 19:02:29 +00:00
sezero
4549e5a97c menu.c (M_Quit_Draw): updated the authors string and tweaked the string
length calculation by dropping some sprintf() and strlen() calls.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@116 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 18:32:26 +00:00
stevenaaus
4270587d5e Add OSX makefile
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@114 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 00:30:57 +00:00
stevenaaus
1ddaa2c97e Make conspeed cvar persistent
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@113 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 00:27:14 +00:00
stevenaaus
4fad37c3e7 A few QuakeSpasm name fixes
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@112 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 00:25:31 +00:00
sezero
fc6fc9cf95 New quakespasm icon from Steven.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@111 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-27 13:50:43 +00:00
sezero
f3bf597c12 sv_main.c (SV_SpawnServer): made the dummy array 8 bytes long.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@110 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 14:15:34 +00:00
sezero
9919f2dbc8 Don't explicitly expose pr_strings to the whole engine, make it static
to pr_edict.c. Assign a static array of zeroes to sv.model_precache[0]
and sv.sound_precache[0], instead of pr_strings, in sv_main.c.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@109 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 14:11:10 +00:00
sezero
f252dba2f8 zone.c (Z_Realloc): Fixed the old_size value.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@108 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 12:03:08 +00:00
sezero
12dfc720c4 gl_vidsdl.c (VID_Init): Removed the gldir variable, not used anymore.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@107 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-07 07:35:39 +00:00
sezero
a1f4730338 gl_vidsdl.c (VID_Init): Removed creation of the 'glquake' directory. Not
used for quite some time.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@106 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-07 07:27:54 +00:00
sezero
66a046a809 net_dgrm.c (Strip_Port): rewrote it to not modify its input string and
return its own copy, which I feel safer with. Adjusted its callers.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@105 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 21:03:03 +00:00
sezero
50df0eeb00 det_dgrm.c (_Datagram_Connect): Added error feedback when we could not
resolve the given host name.
(Test_f): Likewise.
(Test2_f): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@104 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 14:20:46 +00:00
sezero
08a2938f65 det_dgrm.c (Strip_Port): New proc stripping off port from the given host
name and assining the new port number to net_hostport. based on ProQuake
code. This makes a command line like "+connect ip:port" work.
(Test_f): Call Strip_Port().
(Test2_f): Likewise.
(Datagram_Connect): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@103 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 14:10:37 +00:00
sezero
f81bcce75c common.c (COM_Parse): commented out the check for ':' in regular word parsing
so that a command line like "+connect ip:port2 works.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@102 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 13:35:05 +00:00
sezero
ef5d5481aa net_dgrm.c (_Datagram_Connect): fix the printf call in the CCREP_REJECT case.
manually null terminate the reason string buffer.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@101 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 10:48:18 +00:00
sezero
b40b2f958b net_sdlnet.c (SDLN_GetAddrFromName): use net_hosport instead of hardcoded
26000 in the SDLNet_ResolveHost() call.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@100 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 10:29:43 +00:00
stevenaaus
15d39fa705 S.A. history fixes
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@99 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-05 22:12:23 +00:00
sezero
9f4bb6b578 cl_main.c (CL_EstablishConnection): Send a clc_nop at the end of the function.
This has been referred to by Baker as the NAT fix of ProQuake. Applied upon
Steven's suggestion and it made me able to connect to bigfoot.quake1.net:26001
too.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@98 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-05 16:11:06 +00:00
sezero
d5d508397c main.c (main): Block/Unblock sound upon focus loss/gain, implemented
under the SDL_ACTIVEEVENT case.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@97 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 23:10:13 +00:00
sezero
c5bcfbcda0 quakedef.h (quakeparms_t): removed the cachedir member which doesn't serve
any purpose for quite some time. added userdir as a new member, user's
directory on UNIX platforms. if user directories are enabled, basedir
and userdir will point to different memory locations, otherwise to the same.
this member will be enabled/used later.
common.c: removed all references to cachedir and com_cachedir which don't
serve any purpose for quite some time.
main (main): removed assingment to cachedir member.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@96 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 12:50:12 +00:00
sezero
bd586a0fc9 common.c (com_basedir): added new global char array.
(COM_InitFilesystem): used global com_basedir instead of the automatic
basedir variable.
common.h (com_basedir): added extern.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@95 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 11:55:13 +00:00
sezero
dce9ca86e1 gl_screen.c (SCR_ScreenShot_f): Changed screenshot name to spasmXXXX.tga
as suggested by Piotr Szymaniak.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@94 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 11:35:28 +00:00
sezero
38cc82bde7 console.c (BuildMapList, Con_TabComplete): fix sporadic erratic behaviour
with map name completion. from Steven.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@93 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 10:44:59 +00:00
sezero
73b3628feb common.c (va): made va() to cycle between four static buffers so that we
can call it one after another. will be needed later.
(get_va_buffer): new helper for va().


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@92 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 10:28:12 +00:00
sezero
cc68abd0eb quakedef.h: incremented QuakeSpasm version to 0.2 (0.85.2)
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@91 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 09:32:44 +00:00
sezero
6348504f6c host_cmd.c (ExtraMaps_Add): Fix the list sorting.
(Modlist_Add): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@90 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 09:03:22 +00:00
sezero
544a98a675 host_cmd.c (Modlist_Init): fix the return value check for Q_strcasecmp().
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@89 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 08:58:54 +00:00
sezero
0b9e24ba9f host_cmd.c (Host_InitCommands): register Host_Mods_f as "games" too, as an
alias to the existing "mods" command. (this was unintentionally applied in
revision 87, sigh...)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@88 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 08:05:36 +00:00
sezero
62b24bc1ba common.c (Q_strncasecmp): fix it so that it properly returns negative and
positive values.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@87 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 08:00:57 +00:00
sezero
38a5823de7 sys_sdl.c: implemented Sys_mkdir.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@86 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 07:47:16 +00:00
sezero
7d6a47a0f2 sys_sdl.c: renamed filelength to Sys_filelength in order to avoid conflicts
when compiling for windows.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@85 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 07:45:12 +00:00
sezero
d1e09241f3 bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h,
d_ifacea.h, draw.h, gl_texmgr.h, glquake.h, image.h, input.h, keys.h, mathlib.h,
menu.h, modelgen.h, net.h, net_dgrm.h, net_loop.h, net_sdlnet.h, net_udp.h,
net_wins.h, platform.h, pr_comp.h, progdefs.h, progs.h, protocol.h, quakedef.h,
render.h, resource.h, sbar.h, screen.h, server.h, sound.h, spritegn.h, sys.h,
vid.h, view.h, wad.h, world.h, zone.h: added include guards to the headers.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@84 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-21 00:01:08 +00:00
sezero
cd36e9182e fitzquake.bmp: added new miage file (24 bit, 32*32, converted from
fitzquake.ico)
fitz_bmp.h: new header, dumped bytes from fitzquake.bmp.
pl_linux.c (PL_SetWindowIcon): implemented window icon.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@82 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 21:23:09 +00:00
sezero
3122477389 fitzquake.bmp: added new miage file (24 bit, 32*32, converted from
fitzquake.ico)
fitz_bmp.h: new header, dumped bytes from fitzquake.bmp.
pl_linux.c (PL_SetWindowIcon): implemented window icon.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@81 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 21:14:46 +00:00
sezero
3c9ee9e095 pl_linux.c (PL_ErrorDialog): print to stderr. append a '\n' to the message.
updated the todo note.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@80 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 21:04:29 +00:00
sezero
1f4c235e45 gray_big.bmp, gray_big.lmp: added custom conback image files for QuakeSpasm.
mk_header.c : added tiny C source to generate conback.h header from the lmp.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@79 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 12:01:01 +00:00
sezero
c8af0b7fe4 made loading of embedded custom conback friendly with dynamic gamedirs:
gl_draw.c (Draw_CheckConback): new proc.
 (Draw_Init): moved mod-provided gfx/conback.lmp check form here to
Draw_CheckConback().
draw.h (Draw_CheckConback): added prototype.
gl_texmgr.c (TexMgr_NewGame): call Draw_CheckConback().


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@78 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 09:55:32 +00:00
sezero
e69e898ff6 gl_draw.c: search for a mod-provided conback image in Draw_Init time
and cache the result, instead of doing it everytime.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@77 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 09:30:14 +00:00
sezero
e3b1a1c237 the custom embedded comback image is intended to replace the id1 image ..
* .. when running in fitz-compatibility mode (-fitz command line switch)
* .. or when the mods themselves did not provide their own conback image
themselves, ie. the "Q" conback image of id1 is just not wanted. So, just
modify/corrupt the gfx/conback.lmp filename in the id1/pak0.pak file list,
achieving the intention that way.
common.c (kill_id1_conback): new QuakeSpasm customization helper.
 (COM_InitFilesystem): call kill_id1_conback() just after adding the id1
directory to the search path when not running in fitzmode.
gl_draw.c (Draw_ConbackPic): when not running in fitzmode, do search for
the gfx/conback.lmp file before loading the embedded custom image to see
whether the mod provided its own conback image.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@76 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 08:50:31 +00:00
sezero
fdd49b4337 console.c (Con_TabComplete): added a workaround after the weirdness that has
been happening with the argument completion for the changelevel command after
the completion changes. from Steven.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@75 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 08:29:48 +00:00
sezero
6a4f6a681b common.c (COM_FindFile): commented out the debug messages about finding
and not finding a file.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@74 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 08:20:20 +00:00
sezero
f6ffef0cbd common.c (COM_Init): move the -fitz command line switch check before the
filesystem initialization.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@73 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 08:14:30 +00:00
sezero
d1a5ffa5f4 host_cmd.c (Host_Changelevel_f): activate mouse input upon changelevel.
(from Steven.)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@72 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 01:20:45 +00:00
sezero
3664b17504 cl_main.c (CL_NextDemo): fix for an obscure bug when there are no demos
listed with startdemos: run the game, go into a savegame or start a new
game, type F3 and press Esc enough times to go back to normal view, bring
down the console and enter "timedemo demo1". when the demo ends, the only
thing I was able to *see* was the loading label, no other activity at all,
although I can still do F10 (quit) and blindly press Y to exit the game,
so the engine didn't crash. problem was that CL_NextDemo() didn't check
if an actual nextdemo exists before calling SCR_BeginLoadingPlaque() which
set scr_drawloading to true, so scr_drawloading still remained as true..
fixed thusly.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@71 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 01:10:18 +00:00
sezero
e4f5aa6caa snd_mix.c (SND_InitScaletable): fixed the snd_scaletable init breakage with
gcc-4.1 and -O1 and higher From Kevin Shanahan (Tyrann). although the bug is
fixed in gcc, it is safer to have this workaround here.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@70 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:25:33 +00:00
sezero
cc83310a03 gl_model.c (Mod_LoadModel): buf needn't be an unsigned int pointer, made
it into a byte pointer, extracted the mod type from the header by bit shifts.
also removed the unnecessary void pointer variable.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@69 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:20:08 +00:00
sezero
0cdc5fc146 gl_rmisc.c (R_Envmap_f): the envmap command can only be run when there's something
to render, ie. when connected to a server. besides, the refdef must be restored when
it is completed.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@68 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:05:14 +00:00
sezero
e8d7acd267 pr_exec.c (PR_Profile_f): the profile command can only be run when the server is active.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@67 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:00:40 +00:00
sezero
e7d7be3f77 cmd.c (Cbuf_Execute), net_dgrm.c (Datagram_GetMessage), net_loop.c (Loop_GetMessage):
replaced memcpy calls for overlapping areas with memmove().


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@66 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 23:55:17 +00:00
sezero
69558f7bea console.c: Steven's patch adding argument completion to map and changelevel
commands.  this is not a true argument completion, only a tiny hack for the
two aforementioned commands.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@65 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 16:35:13 +00:00
sezero
76e99b804e console.c: Steven's patch making console command completion display a little
more like bash, showing the maximum matching partial at the first time instead
of auto-completing to the first match.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@64 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 16:28:41 +00:00
sezero
e33c4e7b37 gl_vidsdl.c (VID_Toggle): removed extra failure message (left over from commit r62).
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@63 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 16:18:24 +00:00
sezero
c04767d2de gl_vidsdl.c (VID_Toggle): made it so that when SDL_WM_ToggleFullScreen() fails,
a VID_Restart will be attempted (hoping ~that~ will succeed..)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@62 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 16:03:45 +00:00
sezero
48ca117b82 use Steven's patch andallow for the 'demos' command to work in !fitzmod :
host_cmd.c (Host_Startdemos_f): reverted rev.50 change. when not fitzmode,
made it to directly go to the menu instead CL_NetxDemo().
menu.c (M_Main_Key): when not fitzmode, do not CL_NextDemo() for K_ESCAPE
case.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@61 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 13:32:21 +00:00
sezero
33a17e97f0 updated the copyleft file from ftp://ftp.gnu.org/gnu/Licenses/COPYING-2.0
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@60 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 12:40:45 +00:00
sezero
2b4f0a8373 removed the 9.5 MB Icon.psd file.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@59 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 12:20:09 +00:00
sezero
55bbdd2162 menu.c (OPTIONS_ITEMS): keep as 13 and don't define as 14 for windows,
because the SDL port seems to have removed the "use mouse" entry in the
options menu.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@58 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 11:55:21 +00:00
sezero
bf5dab9359 console.c (Con_TabComplete): check for key_tabpartial[0] instead of strlen(key_tabpartial).
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@57 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 09:15:23 +00:00
sezero
f21aed26a8 gl_draw.c: fixed several strict aliasing violations about glpic_t.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@56 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 22:11:26 +00:00
sezero
705eda52a1 Makefile.w32, Makefile.w64: now that net_sdlnet.c is properly cleaned up
and is not messing with socket api functions, windows versions no longer
need linking to wsock32.dll or ws2_32.dll.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@55 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 22:02:13 +00:00
sezero
3d3db02977 net_sdlnet.c: cleanup and warning fixes: automatic changing of the "hostname"
cvar according to internet hostname has been removed. SDL_net doesn't provide
and equivalent of gethostname() and mixing APIs is not a good idea. servers
will be called "UNNAMED" if they don't set it themselves. Also removed the
inet_addr("127.0.0.1") call and replaced it with SDL_SwapBE32(INADDR_LOOPBACK).
defined INADDR_LOOPBACK as 0x7f000001 if not already defined. properly guarded
the AF_INET and MAXHOSTNAMELEN definitions to be on the safe side. replaced
all variables named 'socket' to 'socket_p' so as to avoid confusions with the
socket api. fixed two strict aliasing violations in SDLN_OpenSocket() and
SDLN_GetSocketAddr().


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@54 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 21:56:10 +00:00
sezero
3fb1c4111d gl_draw.c (Draw_ConbackPic): new proc for drawing the normal conback image
in fitzmode mode otherwise drawing the custom QuakeSpasm conback from memory.
(Draw_ConsoleBackground): use the new Draw_ConbackPic().
Makefile, Makefile.w32, Makefile.w64: added conback.c to the build.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@53 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 16:55:28 +00:00
sezero
bbf86a263b conback.c, conback.h: added new QuakeSpasm conback data.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@52 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 16:45:28 +00:00
sezero
7f7c8719b2 draw.h, gl_draw.c, gl_vidsdl.c: removed my recently added Draw_ClearMenuPicCache()
helper. not necessary at all.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@51 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 16:00:34 +00:00
sezero
301079acc9 Steven's customizations:
host_cmd.c (Host_Startdemos_f): if not running in fitzmode, don't add demos
to the loop and set cls.demonum.to -1.
menu.c (M_Draw): if not running in fitzmode, quit immediately without the
dialog for the m_quit case.
sbar.c (Sbar_SoloScoreboard): restored the original behavior depending on
whether we are running in fitzmode.
Marked the code with /* QuakeSpasm customization: */ in those places.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@50 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 12:55:19 +00:00
sezero
18d37f3eaa Makefile, Makefile.w32, Makefile.w64: renamed the binary name to quakespasm[.exe]
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@49 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 12:14:51 +00:00
sezero
d9fae484a0 common.c (COM_Init): updated endianism check.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@48 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 12:00:31 +00:00
sezero
8c18c63731 common.c, common.h: added check for '-fitz' command line switch which, if true,
makes quakespasm to run in fitzquake mode and disable custom quakespasm hacks.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@47 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 11:45:18 +00:00
sezero
5ddd5a30cb in_sdl.c: made total_dx, total_dy and FilterMouseEvents() static. added
a boolean no_mouse. added check for '-nomouse' command line switch which
disables all mouse events.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@46 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 11:33:12 +00:00
sezero
053735ef0f main.c (main): Fixed the utterly broken SDL active event mask usage. In
its original form, gcc rightfully considered that case a dead code even
when not optimizing. Commented out the contents of the case for now.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@45 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 10:33:33 +00:00
sezero
3445dddc72 gl_vidsdl.c (VID_MenuKey): fixed a typo: cursor position 4 controls vid_vsync,
not vid_fullscreen.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@44 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 23:37:24 +00:00
sezero
c7e2a5f5ea console.c, gl_vidsdl.c, host_cmd.c, in_sdl.c, main.c, menu.c, net_sdl.c,
net_sdlnet.c, sys_sdl.c: a lot of space-to-tab whitespace tidy-ups in the
files created or touched by the SDL port. no actual code change.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@43 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 23:32:04 +00:00
sezero
e6d7db7c48 Makefile.w32, Makefile.w64: make sure to link to the correct winsock
library, which must be what SDL_net.dll is already linked to, which is
wsock32.dll for win32, and ws2_32.dll for win64 (mingw-w64.)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@42 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 19:23:00 +00:00
sezero
a03bcdf451 Makefile.w64: now that native amd64 builds work, added a Win64 makefile for
cross-compilation using mingw-w64.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@41 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 16:40:41 +00:00
sezero
46326769ae pl_win.c: Fixed for win64 (GCL_HICON is deprecated, use GCLP_HICON and
SetClassLongPtr.)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@40 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 16:39:20 +00:00
sezero
2923910635 Makefile, Makefile.w32: now that native amd64 builds work, adjusted for CPUFLAGS.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@39 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 15:25:25 +00:00
sezero
d1c2475623 64 bit compatibility effort, 4/nn: x86_64 works just fine now, yey!
the QuakeC interpreter used to use string pointer offsets from pr_strings
even when the pointers lead to engine data which is often well out of
32bit range on a 64bit architecture and they lead to crashes.  they now
go through the new PR_SetEngineString and PR_GetString functions which
turn any address outside the pr_strings area into an index into a table
of engine string addresses, adding new string addresses to the table as
needed. the engine strings table is allocated with 256 entries at first
(see the PR_STRING_ALLOCSLOTS definition in pr_edict.c) and its size is
incremented by 256 as needed and re-allocated on the zone. managing that
allocation and reallocation is accomplished by the recently added Z_Realloc
function. implementation based on the uhexen2 (hexen2: hammer of thyrion)
engine which, in turn, is loosely based on twilight and quakeforge engines.
pr_strings range check is from tyrquake.
pr_edict.c: added the new PR_SetEngineString, PR_GetString, PR_AllocString
public functions and the new private PR_AllocStringSlots function. made
ED_NewString private to pr_edict.c and reworked it to return an index to a
newly allocated string.
progs.h: added prototypes for the new public PR_SetEngineString, PR_GetString
and PR_AllocString functions.
host_cmd.c, pr_cmds.c, pr_edict.c, pr_exec.c, progs.h, sv_main.c, sv_phys.c:
modifed to use the new PR_SetEngineString and PR_GetString functions.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@38 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 15:04:50 +00:00
sezero
3f650bb508 pr_cmds.c (pr_builtin): made static.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@37 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 11:05:24 +00:00
sezero
97e7148e53 pr_cmds.c: changed pr_string_temp to cycle between 16 static buffers in
order to handle many prints in ftos and vtos calls.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@36 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 11:03:34 +00:00
sezero
b736e5de36 64 bit compatibility effort, 3/nn:
pr_edict.c (type_size): make it 1, not sizeof(void*)/4, because quake progs
is strictly 32 bits where sizeof(void*) is 4.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@35 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 07:28:44 +00:00
sezero
9c837a77ae 64 bit compatibility effort, 2/nn: type correctness work in common.h,
gl_draw.c, gl_model.c, gl_sky.c, gl_texmgr.c, gl_texmgr.h, r_alias.c,
r_brush.c, r_part.c, r_world.c, snd_mem.c.  next step will be server
side (progs) work which is actually the heart of the problems.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@34 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 21:26:11 +00:00
sezero
cd19da00f7 64 bit compatibility effort, 1/nn: type correctness work in common.c,
common.h, gl_vidsdl.c, mathlib.h, zone.c, zone.h. added Z_Realloc as a
new function (will be used later.) next step will be type correctness
work in opengl stuff.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@33 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 21:22:20 +00:00
sezero
a4387ef574 renamed the "Mac OS X" directory to MacOSX (without spaces).
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@32 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 15:54:59 +00:00
sezero
63e1984607 host_cmd.c (Host_Changelevel_f): get rid of console or menu (key_dest = key_game).
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@31 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 15:39:06 +00:00
sezero
a5bb22bc76 console.c (Con_DrawConsole): Change engine/version string to QuakeSpasm,
use the QUAKESPASM_VER_PATCH to append to the FITZQUAKE_VERSION.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@30 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 14:48:23 +00:00
sezero
4e1517ca9c quakedef.h (QUAKESPASM_VERSION): define as 0.1 for now.
(QUAKESPASM_VER_PATCH): define as 1 for now (helper to print a string like
0.85.1)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@29 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 14:45:40 +00:00
sezero
cba5a07940 sbar.c (Sbar_SoloScoreboard): modified to include the map name and
skill. (patch by Steven, modified to utilize cl.mapname by OZ.)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@28 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 14:21:11 +00:00
sezero
1027529671 common.c, common.h: constified the replacement string library functions.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@27 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 13:02:22 +00:00
sezero
78d750bfcd cd_sdl.c: replaced the stub with the implementation we have in the uhexen2 project.
cd_null.c: added new file.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@26 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:51:25 +00:00
sezero
2e74d42aad main.c (main): Print version information at startup.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@25 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:32:26 +00:00
sezero
2244b0cbcf gl_sky.c, r_alias.c, r_part.c, r_world.c: added newline at the end of the files.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@24 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:24:38 +00:00
sezero
4a1e055e5f draw.h: Added prototype for the new Draw_ClearMenuPicCache().
gl_draw.c (Draw_ClearMenuPicCache): VID_Restart procedures does not seem to
clear the menu picture cache. Added this new tiny helper to do that job.
gl_vidsdl.c (VID_Restart): do call Draw_ClearMenuPicCache().

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@23 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:16:07 +00:00
sezero
c6b4d392cc main.c (main): The Shift+ESC console key bing is not restricted to LSHIFT
any more: changed the mask from KMOD_LSHIFT to KMOD_SHIFT.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@22 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:05:29 +00:00
sezero
3e501fd591 chase.c, cl_input.c, cl_parse.c, client.h, common.c, common.h, console.h,
cvar.h, draw.h, gl_draw.c, gl_fog.c, gl_mesh.c, gl_model.c, gl_model.h,
gl_rmain.c, gl_rmisc.c, gl_screen.c, gl_sky.c, gl_texmgr.c, glquake.h,
host.c, keys.c, keys.h, main.c, menu.c, menu.h, pr_cmds.c, quakedef.h,
r_alias.c, r_brush.c, r_part.c, r_sprite.c, r_world.c, sbar.c, sbar.h,
screen.h, snd_dma.c, snd_mem.c, snd_mix.c, sv_main.c, sys_sdl.c, vid.h,
view.h, world.c, world.h:  Loads of warning fixes about missing function
prototypes, missing parens around &, missing braces leading to ambiguous
else statements and unused and uninitialized variables. There are still a
couple of unitialised variables here and there, but not much. The warnings
about strict aliasing violations need taking care of.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@21 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:01:07 +00:00
sezero
f90bc772fa gl_draw.c (scr_conalpha): write to config.cfg.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@20 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 10:16:20 +00:00
sezero
fe2fef1252 common.c (COM_InitArgv): remove the trailing whitespace added at the end
of cmdline string only if there is one. print out the command line as an
informational message.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@19 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 10:10:58 +00:00
sezero
7fb6e2ffdb cmd.c (Cmd_StuffCmds_f): fix logic so that it works properly with sdl/unix
port (on Unix, argv[0] is command name and is not empty).


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@18 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 10:01:46 +00:00
sezero
7969f06a91 cl_demo.c (CL_PlayDemo_f): get rid of the menu and/or console when starting a demo.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@17 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:55:13 +00:00
sezero
d2e5ae9161 client.h (client_state_t): added mapname[128] as a new member to hold the
current map file name without path and extension.
cl_parse.c (CL_ParseServerInfo): copy the naked name of the map file to
the cl structure.
host_cmd.c (Host_Map_f): print the current map name if no arguments are
given. print help message if not connected.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@16 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:47:04 +00:00
sezero
60545a8f18 main.c (DEFAULT_MEMORY): Changed default heap size from 32 to 64 MiB.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@15 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:12:35 +00:00
sezero
dc8da67934 gl_vidsdl.c (VID_Toggle): New proc for easy windowed-fullscreen toggling
using SDL. Works only under X11.
keys.c (Key_Event): Moved ALT-Enter windowed-fulscreen toggle handling to
main() in main.c so that it works properly for now.
main.c (main): Moved ALT-Enter windowed-fulscreen toggle handling from
keys.c to main() so that it works properly for now.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@14 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:10:43 +00:00
sezero
454f953008 gl_vidsdl.c (VID_Init): Changed default mode to windowed. Added -w as an
alternative to -window command line switch. added new -f and -fullscreen
command line switches. added comments about the problems being encountered
when default mode is fullscreen.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@13 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:01:53 +00:00
sezero
7e0d4bf0ca gl_vidsdl.c (VID_InitDIB): change default width from 640 to 800. (Steven)
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@12 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:53:20 +00:00
sezero
60cc9e212d several cvar tweaks by Steven:
gl_draw.c (scr_conalpha): change value from 1.0 to 0.5
gl_rmain.c (r_shadows): write to config.cfg.
gl_rmain.c (r_wateralpha): write to config.cfg.
gl_rmain.c (r_dynamic): write to config.cfg.
gl_rmain.c (r_novis): write to config.cfg.
gl_rmain.c (gl_flashblend): change to 0 (disable) and write to config.cfg.
gl_screen.c (scr_conspeed): change value from 300 to 500
gl_vidsdl.c (vid_fullscreen): change value to 0 (disable)
gl_vidsdl.c (vid_width): change value from 640 to 800
gl_vidsdl.c (vid_height): change value from 480 to 600


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@11 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:50:45 +00:00
sezero
3a52c696d2 console.c (Con_DrawConsole): Added SDL to the version string.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@10 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:42:58 +00:00
sezero
2db0a55f84 common.c (COM_FindFile): Made PackFile debug message prints into Con_DPrintf so
that they don't spam the console.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@9 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:40:26 +00:00
sezero
484cc36fce common.c (COM_LoadFile): Commented out the Draw_BeginDisc call. It causes core
dumps when called excessively in big mods.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@8 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:25:33 +00:00
sezero
2e5a7d7c80 added plain makefiles for native linux and cross-win32 builds.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@7 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:16:43 +00:00
sezero
77abdf620a snd_dma.c: added SNDDMA_LockBuffer() as a new API, needed for, well, proper buffer
locking.  removed simsound. removed unused S_AmbientOff() and S_AmbientOn(). other
multiple cleanups and fixes.
snd_sdl.c: replaced the old broken implementation which used to cause LRU failures
with the one adapted from the uhexen2 project.
sound.h: added missing prototypes, including the new SNDDMA_LockBuffer().


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@6 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:45:06 +00:00
sezero
fe8afccb88 snd_mem.c (FindNextChunk): fixed segfaults due to bad wav files like some
of those in the arwop mod.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@5 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:37:38 +00:00
sezero
63e3dc3c88 net_sdlnet.c, pl_win.c, quakedef.h: fixed SDL header includes.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@4 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:33:12 +00:00
sezero
564b2e2609 common.c (COM_FileBase): fix an old quake bug where it can start hunting
whole memory for the nul terminator.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@3 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:30:23 +00:00
sezero
08c736b005 initial import of SDL port of Fitzquake-0.85 / 20090510 sources.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@2 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:26:55 +00:00