Commit graph

1117 commits

Author SHA1 Message Date
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