Commit Graph

15 Commits

Author SHA1 Message Date
Ozkan Sezer 50e014d050 Updated support for building the OSX versions using Makefile.darwin. Do
not rely on sdl-config on OSX Framework builds, define new SDL_FRAMEWORK
and NO_SDL_CONFIG preprocessor macros to indicate that and include SDL.h
with the "SDL" subdirectory name included. Add new libmad and ogg/vorbis
headers and static and dynamic libraries for macosx. Xcode project files
need further updating.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@699 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-08-16 04:51:41 +00:00
Ozkan Sezer 19953bd399 silenced -Wsign-compare warnings.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@575 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 19:06:08 +00:00
Ozkan Sezer 1928f2e1b8 * first shot at cvar flag system and cvar layer clean-ups :
- removed the archive and server members of cvar_t structure
  which are now represented by the CVAR_ARCHIVE, CVAR_NOTIFY
  and CVAR_SERVERINFO flags.
- added new Cvar_SetROM and Cvar_SetValueROM functions to 
  set vars marked as CVAR_ROM (read-only vars) programaticaly
- added Cvar_SetCallback() as a new function to assign (or
  remove) a callback function to a cvar.
- changed Cvar_RegisterVariable() to only accept a var pointer
  as in original quake
- moved notification handling from Cvar_Set() to callbacks.
- changed Cvar_Set() so that it doesn't reallocate the var's
  string buffer if nothing is changed, nor does it run the
  var's callback.
- changed the 'registered' and 'cmdline' cvars to be read-only
  so that the users can't change it using the console.  (and
  with 'registered' flagged as CVAR_ROM, the 'static_registered'
  thing is no longer required)
- added comment that sending cmdline upon CCREQ_RULE_INFO is
  evil...
- more to follow later.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@566 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-28 22:01:33 +00:00
Ozkan Sezer bb5a1d6e38 sys_sdl_unix.c, sys_sdl_win.c (Sys_Sleep): rely on SDL_Delay() instead
of platform specific usleep() or Sleep() calls.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@532 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-21 10:40:18 +00:00
Ozkan Sezer 9d809a3687 SDL input driver: updated from the uHexen2 project adding native keymap
and dead key support to the console, thanks to Sander van Dijk.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@524 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-16 14:11:37 +00:00
Ozkan Sezer 870b40f7aa sys_sdl_unix.c, sys_sdl_win.c (Sys_ConsoleInput): Moved isDedicated check to...
host.c (Host_GetConsoleCommands): ... here, where it should be.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@520 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 15:51:28 +00:00
Ozkan Sezer 2b919188d6 renamed Sys_FloatTime to Sys_DoubleTime (the thing always returned double
you know..) and adjusted all callers accordingly.  changed Sys_Sleep() to
take a milliseconds argument, added implementations for unix (usleep) and
windows (Sleep).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@512 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 16:01:01 +00:00
Ozkan Sezer cccff603e4 made Sys_ConsoleInput() to return const
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@508 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 12:02:37 +00:00
Ozkan Sezer 36b0f26220 made unix Sys_mkdir() to print strerror in case of failure.
made windows Sys_mkdir() to use windows api functions.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@507 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 10:50:26 +00:00
Ozkan Sezer a85d8dcd6a made global host_parms a pointer, set in main(). adjusted places where
host_parms is used. made COM_Init() and Host_Init() to take no arguments.
made Sys_Init() to set host_parms->userdir: at present, it is set to
host_parms->basedir, to be changed properly when user directories are
implemented.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@443 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-19 16:41:45 +00:00
Ozkan Sezer c53dd74e4d cvar'ize the game loop throttling by adding the new sys_throttle with
a default value of 0.02.  changing its value to 0 disables throttling.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@427 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-27 07:05:18 +00:00
Ozkan Sezer 3f006ac62f * common.c (COM_FileExists): changed return type to qboolean.
(COM_filelength): new procedure.
(COM_FindFile): adjustments to avoid multiple file open/close operations just a
little.
* common.h (COM_FileExists): adjusted prototype.
* bgmusic.c (BGM_PlayCDtrack): adjusted for COM_FileExists() return type change.
* sys_sdl_win.c, sys_sdl_unix.c (Sys_filelength): changed return type to long.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@408 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-10 17:25:43 +00:00
Ozkan Sezer e08d6cf1e3 replaced all usess of vsprintf by q_vsnprintf
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@320 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-31 16:57:12 +00:00
Ozkan Sezer 906df3f650 const correctness changes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@300 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 02:22:55 +00:00
Ozkan Sezer d098087606 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@223 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 11:01:24 +00:00
Renamed from Quake/sys_sdl.c (Browse further)