Commit Graph

849 Commits

Author SHA1 Message Date
Ozkan Sezer de9eca45e1 draw.h, gl_draw.c, gl_vidsdl.c: removed my recently added Draw_ClearMenuPicCache()
helper. not necessary at all.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@51 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 16:00:34 +00:00
Ozkan Sezer a5c45574d5 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@50 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 12:55:19 +00:00
Ozkan Sezer 0a26b3bc2d Makefile, Makefile.w32, Makefile.w64: renamed the binary name to quakespasm[.exe]
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@49 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 12:14:51 +00:00
Ozkan Sezer 4065ce7280 common.c (COM_Init): updated endianism check.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@48 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 12:00:31 +00:00
Ozkan Sezer 44ad29724b 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@47 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 11:45:18 +00:00
Ozkan Sezer 0dce9ae100 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@46 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 11:33:12 +00:00
Ozkan Sezer 04e31c1ac6 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@45 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 10:33:33 +00:00
Ozkan Sezer 7a8705bc34 gl_vidsdl.c (VID_MenuKey): fixed a typo: cursor position 4 controls vid_vsync,
not vid_fullscreen.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@44 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 23:37:24 +00:00
Ozkan Sezer 6c7d3d7205 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@43 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 23:32:04 +00:00
Ozkan Sezer 9d9354165c 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@42 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 19:23:00 +00:00
Ozkan Sezer afe632313d Makefile.w64: now that native amd64 builds work, added a Win64 makefile for
cross-compilation using mingw-w64.


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@40 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 16:39:20 +00:00
Ozkan Sezer 222ea1945c Makefile, Makefile.w32: now that native amd64 builds work, adjusted for CPUFLAGS.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@39 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 15:25:25 +00:00
Ozkan Sezer 89e17301c9 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@38 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 15:04:50 +00:00
Ozkan Sezer 90d1f32d75 pr_cmds.c (pr_builtin): made static.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@37 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 11:05:24 +00:00
Ozkan Sezer bed9185cae 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@36 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 11:03:34 +00:00
Ozkan Sezer 8899591d25 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@35 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 07:28:44 +00:00
Ozkan Sezer f9928b24ac 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@34 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 21:26:11 +00:00
Ozkan Sezer 9e861e3102 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@33 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 21:22:20 +00:00
Ozkan Sezer a979425e69 host_cmd.c (Host_Changelevel_f): get rid of console or menu (key_dest = key_game).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@31 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 15:39:06 +00:00
Ozkan Sezer 054914f7bf 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@30 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 14:48:23 +00:00
Ozkan Sezer a8182018bf 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@29 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 14:45:40 +00:00
Ozkan Sezer a35284cfac 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@28 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 14:21:11 +00:00
Ozkan Sezer 8f3d2c5c7b common.c, common.h: constified the replacement string library functions.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@27 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 13:02:22 +00:00
Ozkan Sezer 243602a6e8 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@26 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:51:25 +00:00
Ozkan Sezer e755919a8f main.c (main): Print version information at startup.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@25 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:32:26 +00:00
Ozkan Sezer d857aff0f3 gl_sky.c, r_alias.c, r_part.c, r_world.c: added newline at the end of the files.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@24 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:24:38 +00:00
Ozkan Sezer 7411fe1a24 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@23 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:16:07 +00:00
Ozkan Sezer 95f413d1ea 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@22 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:05:29 +00:00
Ozkan Sezer 68fc38c3a6 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@21 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:01:07 +00:00
Ozkan Sezer 9ec8a8a8bb gl_draw.c (scr_conalpha): write to config.cfg.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@20 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 10:16:20 +00:00
Ozkan Sezer 73aef81aca 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@19 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 10:10:58 +00:00
Ozkan Sezer fce4227a91 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@18 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 10:01:46 +00:00
Ozkan Sezer ebe2cd66d7 cl_demo.c (CL_PlayDemo_f): get rid of the menu and/or console when starting a demo.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@17 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:55:13 +00:00
Ozkan Sezer 359116f394 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@16 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:47:04 +00:00
Ozkan Sezer 566ead5ada main.c (DEFAULT_MEMORY): Changed default heap size from 32 to 64 MiB.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@15 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:12:35 +00:00
Ozkan Sezer 0be5bbf691 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@14 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:10:43 +00:00
Ozkan Sezer f6603bf20e 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@13 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:01:53 +00:00
Ozkan Sezer be7f81ef84 gl_vidsdl.c (VID_InitDIB): change default width from 640 to 800. (Steven)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@12 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:53:20 +00:00
Ozkan Sezer 8309029808 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@11 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:50:45 +00:00
Ozkan Sezer 3e255ca4a6 console.c (Con_DrawConsole): Added SDL to the version string.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@10 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:42:58 +00:00
Ozkan Sezer 3a5b43816d common.c (COM_FindFile): Made PackFile debug message prints into Con_DPrintf so
that they don't spam the console.


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@8 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:25:33 +00:00
Ozkan Sezer 097c46c8b2 added plain makefiles for native linux and cross-win32 builds.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@7 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:16:43 +00:00
Ozkan Sezer 5f028f87a3 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@6 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:45:06 +00:00
Ozkan Sezer 141b4836ac snd_mem.c (FindNextChunk): fixed segfaults due to bad wav files like some
of those in the arwop mod.


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


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