diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..19120deec --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +xcuserdata +.DS_Store +Winquake/fmod diff --git a/readme.txt b/README.md similarity index 85% rename from readme.txt rename to README.md index 132bc4d14..a40d9e9c6 100644 --- a/readme.txt +++ b/README.md @@ -1,3 +1,14 @@ +# Quake OSX Port + +![osx_quake](https://cloud.githubusercontent.com/assets/448001/3096877/571addac-e5d9-11e3-8d66-f1d8b40565b8.png) + +This is a fork of the original GPL release of Quake, ported to OSX. The port should work on any BSD or Linux that supports GLFW and OpenAL. + +## Building + +This project should build using the latest Xcode. Open the [`osx` project in WinQuake](WinQuake/osx/osx.xcodeproj). You will need to install GLFW and OpenAL for windowing management and sound support. + +# Original Readme This is the complete source code for winquake, glquake, quakeworld, and glquakeworld. diff --git a/WinQuake/common.c b/WinQuake/common.c index e07e6ce91..478f7f803 100644 --- a/WinQuake/common.c +++ b/WinQuake/common.c @@ -1396,7 +1396,7 @@ int COM_FindFile (char *filename, int *handle, FILE **file) for (i=0 ; inumfiles ; i++) if (!strcmp (pak->files[i].name, filename)) { // found it! - Sys_Printf ("PackFile: %s : %s\n",pak->filename, filename); + //Sys_Printf ("PackFile: %s : %s\n",pak->filename, filename); if (handle) { *handle = pak->handle; @@ -1415,7 +1415,7 @@ int COM_FindFile (char *filename, int *handle, FILE **file) else { // check a file in the directory tree - if (!static_registered) + if (0 && !static_registered) { // if not a registered version, don't ever go beyond base if ( strchr (filename, '/') || strchr (filename,'\\')) continue; @@ -1448,7 +1448,7 @@ int COM_FindFile (char *filename, int *handle, FILE **file) strcpy (netpath, cachepath); } - Sys_Printf ("FindFile: %s\n",netpath); + //Sys_Printf ("FindFile: %s\n",netpath); com_filesize = Sys_FileOpenRead (netpath, &i); if (handle) *handle = i; diff --git a/WinQuake/fmod/api/studio/lib/libfmodstudioL.dylib b/WinQuake/fmod/api/studio/lib/libfmodstudioL.dylib new file mode 100644 index 000000000..49e108323 Binary files /dev/null and b/WinQuake/fmod/api/studio/lib/libfmodstudioL.dylib differ diff --git a/WinQuake/gl_mesh.c b/WinQuake/gl_mesh.c index 100c6628d..2116d4cf8 100644 --- a/WinQuake/gl_mesh.c +++ b/WinQuake/gl_mesh.c @@ -62,6 +62,7 @@ int StripLength (int starttri, int startv) mtriangle_t *last, *check; int k; + used[starttri] = 2; last = &triangles[starttri]; diff --git a/WinQuake/gl_vidglfw.c b/WinQuake/gl_vidglfw.c new file mode 100644 index 000000000..557daa5cc --- /dev/null +++ b/WinQuake/gl_vidglfw.c @@ -0,0 +1,459 @@ +#include +#include +#include +#include +#include +#include "quakedef.h" + +float gldepthmin, gldepthmax; +int texture_extension_number = 1; +int texture_mode = GL_LINEAR; +const char *gl_renderer = "none"; +qboolean isPermedia = false; +qboolean gl_mtexable = false; +cvar_t gl_ztrick = {"gl_ztrick","1"}; +static cvar_t m_filter = {"m_filter", "0"}; + +const char *gl_vendor; +const char *gl_renderer; +const char *gl_version; +const char *gl_extensions; + +unsigned d_8to24table[256]; +unsigned char d_15to8table[65536]; + +static unsigned char glfw_to_quake_keys[GLFW_KEY_LAST+1] = {}; + +static GLFWwindow* window = NULL; + +struct pos { + double x; + double y; +}; + +struct { + int width; + int height; + struct pos mouse_delta; + struct pos mouse; +} window_settings; + +void D_BeginDirectRect (int x, int y, byte *pbitmap, int width, int height) +{ +} + +void D_EndDirectRect (int x, int y, int width, int height) +{ +} + +void VID_Shutdown(void) +{ + Con_SafePrintf("Shutting down GLFW\n"); + glfwTerminate(); +} + +void VID_ShiftPalette(unsigned char *p) +{ +// VID_SetPalette(p); +} + +void VID_SetPalette (unsigned char *palette) +{ + byte *pal; + unsigned r,g,b; + unsigned v; + int r1,g1,b1; + int k; + unsigned short i; + unsigned *table; + int dist, bestdist; + + // + // 8 8 8 encoding + // + pal = palette; + table = d_8to24table; + for (i=0 ; i<256 ; i++) + { + r = pal[0]; + g = pal[1]; + b = pal[2]; + pal += 3; + + v = (255<<24) + (r<<0) + (g<<8) + (b<<16); + *table++ = v; + } + d_8to24table[255] &= 0xffffff; // 255 is transparent + + for (i=0; i < (1<<15); i++) { + /* Maps + 000000000000000 + 000000000011111 = Red = 0x1F + 000001111100000 = Blue = 0x03E0 + 111110000000000 = Grn = 0x7C00 + */ + r = ((i & 0x1F) << 3)+4; + g = ((i & 0x03E0) >> 2)+4; + b = ((i & 0x7C00) >> 7)+4; + pal = (unsigned char *)d_8to24table; + for (v=0,k=0,bestdist=10000*10000; v<256; v++,pal+=4) { + r1 = (int)r - (int)pal[0]; + g1 = (int)g - (int)pal[1]; + b1 = (int)b - (int)pal[2]; + dist = (r1*r1)+(g1*g1)+(b1*b1); + if (dist < bestdist) { + k=v; + bestdist = dist; + } + } + d_15to8table[i]=k; + } +} + +const char* get_string(GLenum name){ + return (const char*)glGetString(name); +} + +void GL_Init (void) +{ + gl_vendor = get_string(GL_VENDOR); + gl_renderer = get_string(GL_RENDERER); + gl_version = get_string(GL_VERSION); + gl_extensions = get_string(GL_EXTENSIONS); + Con_Printf ("GL_VENDOR: %s\n", gl_vendor); + Con_Printf ("GL_RENDERER: %s\n", gl_renderer); + Con_Printf ("GL_VERSION: %s\n", gl_version); + //Con_Printf ("GL_EXTENSIONS: %s\n", gl_extensions); + + // Con_Printf ("%s %s\n", gl_renderer, gl_version); + + gl_mtexable = false; + + glClearColor (1,0,0,0); + glCullFace(GL_FRONT); + glEnable(GL_TEXTURE_2D); + + glEnable(GL_ALPHA_TEST); + glAlphaFunc(GL_GREATER, 0.666); + + glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); + glShadeModel (GL_FLAT); + + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + + glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); +} + + +void GL_BeginRendering (int *x, int *y, int *width, int *height) +{ + *x = *y = 0; + *width = window_settings.width; + *height = window_settings.height; +} + +void GL_EndRendering (void) +{ + glFlush(); + glfwSwapBuffers(window); +} + +void Init_KBD(void) +{ + for (int i=0; i <= GLFW_KEY_LAST; i++) + { + if (isprint(i)) + { + // the engine expects normal keys to be lowercase + // swap and ASCII characters to lowercase (or leave unchanged). + glfw_to_quake_keys[i] = tolower(i); + } + } + + glfw_to_quake_keys[GLFW_KEY_TAB] = K_TAB; + glfw_to_quake_keys[GLFW_KEY_ENTER] = K_ENTER; + glfw_to_quake_keys[GLFW_KEY_ESCAPE] = K_ESCAPE; + glfw_to_quake_keys[GLFW_KEY_SPACE] = K_SPACE; + glfw_to_quake_keys[GLFW_KEY_BACKSPACE] = K_BACKSPACE; + glfw_to_quake_keys[GLFW_KEY_UP] = K_UPARROW; + glfw_to_quake_keys[GLFW_KEY_DOWN] = K_DOWNARROW; + glfw_to_quake_keys[GLFW_KEY_LEFT] = K_LEFTARROW; + glfw_to_quake_keys[GLFW_KEY_RIGHT] = K_RIGHTARROW; + glfw_to_quake_keys[GLFW_KEY_RIGHT_ALT] = K_ALT; + glfw_to_quake_keys[GLFW_KEY_LEFT_ALT] = K_ALT; + glfw_to_quake_keys[GLFW_KEY_RIGHT_CONTROL] = K_CTRL; + glfw_to_quake_keys[GLFW_KEY_LEFT_CONTROL] = K_CTRL; + glfw_to_quake_keys[GLFW_KEY_RIGHT_SHIFT] = K_SHIFT; + glfw_to_quake_keys[GLFW_KEY_LEFT_SHIFT] = K_SHIFT; + glfw_to_quake_keys[GLFW_KEY_F1] = K_F1; + glfw_to_quake_keys[GLFW_KEY_F2] = K_F2; + glfw_to_quake_keys[GLFW_KEY_F3] = K_F3; + glfw_to_quake_keys[GLFW_KEY_F4] = K_F4; + glfw_to_quake_keys[GLFW_KEY_F5] = K_F5; + glfw_to_quake_keys[GLFW_KEY_F6] = K_F6; + glfw_to_quake_keys[GLFW_KEY_F7] = K_F7; + glfw_to_quake_keys[GLFW_KEY_F8] = K_F8; + glfw_to_quake_keys[GLFW_KEY_F9] = K_F9; + glfw_to_quake_keys[GLFW_KEY_F10] = K_F10; + glfw_to_quake_keys[GLFW_KEY_F11] = K_F11; + glfw_to_quake_keys[GLFW_KEY_F12] = K_F12; + glfw_to_quake_keys[GLFW_KEY_INSERT] = K_INS; + glfw_to_quake_keys[GLFW_KEY_DELETE] = K_DEL; + glfw_to_quake_keys[GLFW_KEY_PAGE_DOWN] = K_PGDN; + glfw_to_quake_keys[GLFW_KEY_PAGE_UP] = K_PGUP; + glfw_to_quake_keys[GLFW_KEY_HOME] = K_HOME; + glfw_to_quake_keys[GLFW_KEY_END] = K_END; + glfw_to_quake_keys[GLFW_KEY_PAUSE] = K_PAUSE; + + // special + glfw_to_quake_keys[GLFW_KEY_LEFT_SUPER] = K_CTRL; + glfw_to_quake_keys[GLFW_KEY_RIGHT_SUPER] = K_CTRL; + + // mouse + glfw_to_quake_keys[GLFW_MOUSE_BUTTON_1] = K_MOUSE1; + glfw_to_quake_keys[GLFW_MOUSE_BUTTON_2] = K_MOUSE2; + glfw_to_quake_keys[GLFW_MOUSE_BUTTON_3] = K_MOUSE3; + glfw_to_quake_keys[161] = 126; // ~ +} + +qboolean VID_Is8bit(void) +{ + return 0; +} + +void VID_Init8bitPalette(void) +{ +} + +void error_callback(int error, const char* description) +{ + Con_Printf("GLFW Error 0x%08x: %s\n", error, description); +} + +static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) +{ + if (action == GLFW_REPEAT) return; + Key_Event(glfw_to_quake_keys[key], action == GLFW_PRESS); +} + +static void size_callback(GLFWwindow* window, int w, int h) +{ + window_settings.width = w; + window_settings.height = h; + // force a surface cache flush + // TODO: is this needed? + vid.recalc_refdef = 1; +} + +static void cursor_callback(GLFWwindow* window, double x, double y) +{ + window_settings.mouse_delta.x += (x - window_settings.mouse.x); + window_settings.mouse_delta.y += (y - window_settings.mouse.y); + window_settings.mouse.x = x; + window_settings.mouse.y = y; +} + +static void click_callback(GLFWwindow* window, int button, int action, int mods) +{ + Key_Event(glfw_to_quake_keys[button], action == GLFW_PRESS); +} + +static void scroll_callback(GLFWwindow* window, double x, double y) +{ + const int key = y > 0 ? K_MWHEELUP : K_MWHEELDOWN; + Key_Event(key, true); + Key_Event(key, false); +} + +void VID_Init(unsigned char *palette) +{ + Cvar_RegisterVariable (&m_filter); + Cvar_RegisterVariable (&gl_ztrick); + + Init_KBD(); + + + memset(&window_settings, 0, sizeof(window_settings)); + + + window_settings.height = 240; //1024; + window_settings.width = 320; // 1280; + + char gldir[MAX_OSPATH]; + + Con_Print("VID_Init\n"); + + glfwSetErrorCallback(error_callback); + + + /* Initialize the library */ + if (!glfwInit()) { + Sys_Error("Error initialising GLFW"); + } + + vid.maxwarpwidth = window_settings.width; // WARP_WIDTH; + vid.maxwarpheight = window_settings.height; // WARP_HEIGHT; + vid.width = window_settings.width; + vid.height = window_settings.height; + + vid.colormap = host_colormap; + vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048)); + + vid.conwidth = 640; + + vid.conwidth &= 0xfff8; // make it a multiple of eight + + if (vid.conwidth < 320) + vid.conwidth = 320; + + // pick a conheight that matches with correct aspect + vid.conheight = vid.conwidth*3 / 4; + + if (vid.conheight < 200) + vid.conheight = 200; + + if (vid.conheight > vid.height) + vid.conheight = vid.height; + if (vid.conwidth > vid.width) + vid.conwidth = vid.width; + + vid.aspect = ((float)vid.height / (float)vid.width) * (320.0 / 240.0); + vid.numpages = 2; + + /* Create a windowed mode window and its OpenGL context */ + window = glfwCreateWindow(vid.width, vid.height, "Quake", NULL, NULL); + if (!window) + { + glfwTerminate(); + Sys_Error("Error creating GLFW window"); + } + + Con_Printf("GLFW initialised %s\n", glfwGetVersionString()); + + glfwMakeContextCurrent(window); + glfwSetKeyCallback(window, key_callback); + glfwSetWindowSizeCallback(window, size_callback); + glfwSetCursorPosCallback(window, cursor_callback); + glfwSetMouseButtonCallback(window, click_callback); + glfwSetScrollCallback(window, scroll_callback); + + GL_Init(); + + sprintf (gldir, "%s/glquake", com_gamedir); + Sys_mkdir (gldir); + + // Check_Gamma(palette); + VID_SetPalette(palette); + + // Check for 3DFX Extensions and initialize them. + VID_Init8bitPalette(); + + Con_SafePrintf ("Video mode %dx%d initialized.\n", vid.width, vid.height); + + vid.recalc_refdef = 1; // force a surface cache flush +} + +void IN_Init (void) +{ + // see vid init +} + +void IN_Shutdown (void) +{ + // vid shutdown +} + +void IN_Commands (void) +{ +} + + +static int old_m_state = -1; +void Sys_SendKeyEvents (void) +{ + glfwPollEvents(); + + if (glfwWindowShouldClose(window)) + { + Con_Print("Closing GLFW window\n"); + glfwTerminate(); + Sys_Quit(); + } + + extern int m_state; + + //if (m_state != old_m_state) { + + if (m_state) { + glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL); + } else { + glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); + } + old_m_state = m_state; + //} +} + +/* + =========== + IN_Move + =========== + */ +void IN_MouseMove (usercmd_t *cmd) +{ + double x = window_settings.mouse_delta.x; + double y = window_settings.mouse_delta.y; + + if (m_filter.value) + { + x *= 0.5; + y *= 0.5; + } + + window_settings.mouse_delta.x = 0; + window_settings.mouse_delta.y = 0; + + if (!old_m_state) { + window_settings.mouse.x = window_settings.width / 2.0; + window_settings.mouse.y = window_settings.height / 2.0; + glfwSetCursorPos(window, window_settings.mouse.x, window_settings.mouse.y); + } + + x *= sensitivity.value; + y *= sensitivity.value; + + // add mouse X/Y movement to cmd + if ( (in_strafe.state & 1) || (lookstrafe.value && (in_mlook.state & 1) )) + cmd->sidemove += m_side.value * x; + else + cl.viewangles[YAW] -= m_yaw.value * x; + + if (in_mlook.state & 1) + V_StopPitchDrift (); + + if ( (in_mlook.state & 1) && !(in_strafe.state & 1)) + { + cl.viewangles[PITCH] += m_pitch.value * y; + if (cl.viewangles[PITCH] > 80) + cl.viewangles[PITCH] = 80; + if (cl.viewangles[PITCH] < -70) + cl.viewangles[PITCH] = -70; + } + else + { + if ((in_strafe.state & 1) && noclip_anglehack) + cmd->upmove -= m_forward.value * y; + else + cmd->forwardmove -= m_forward.value * y; + } +} + +void IN_Move (usercmd_t *cmd) +{ + IN_MouseMove(cmd); +} diff --git a/WinQuake/gl_vidlinuxglx.c b/WinQuake/gl_vidlinuxglx.c index 400adb467..ad37aeec6 100644 --- a/WinQuake/gl_vidlinuxglx.c +++ b/WinQuake/gl_vidlinuxglx.c @@ -550,7 +550,7 @@ void CheckMultiTextureExtensions(void) Con_Printf("Unable to open symbol list for main program.\n"); return; } - + qglMTexCoord2fSGIS = (void *) dlsym(prjobj, "glMTexCoord2fSGIS"); qglSelectTextureSGIS = (void *) dlsym(prjobj, "glSelectTextureSGIS"); diff --git a/WinQuake/gl_vidnt.c b/WinQuake/gl_vidnt.c index 932a68db7..78094f534 100644 --- a/WinQuake/gl_vidnt.c +++ b/WinQuake/gl_vidnt.c @@ -1593,7 +1593,7 @@ void VID_Init (unsigned char *palette) Cvar_RegisterVariable (&_windowed_mouse); Cvar_RegisterVariable (&gl_ztrick); - Cmd_AddCommand ("vid_nummodes", VID_NumModes_f); + Cmd_AddCommand ("vid_nummodes", V ID_NumModes_f); Cmd_AddCommand ("vid_describecurrentmode", VID_DescribeCurrentMode_f); Cmd_AddCommand ("vid_describemode", VID_DescribeMode_f); Cmd_AddCommand ("vid_describemodes", VID_DescribeModes_f); diff --git a/WinQuake/glquake.h b/WinQuake/glquake.h index f3c253c38..4e399512c 100644 --- a/WinQuake/glquake.h +++ b/WinQuake/glquake.h @@ -27,8 +27,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif +#ifdef __APPLE__ +#include +#include +#else #include #include +#endif void GL_BeginRendering (int *x, int *y, int *width, int *height); void GL_EndRendering (void); diff --git a/WinQuake/host.c b/WinQuake/host.c index 603f6b3f0..ba902c77e 100644 --- a/WinQuake/host.c +++ b/WinQuake/host.c @@ -709,7 +709,13 @@ void _Host_Frame (float time) CL_DecayLights (); } else - S_Update (vec3_origin, vec3_origin, vec3_origin, vec3_origin); + { + vec3_t up = {0,0,1}; + vec3_t rt = {0,1,0}; + vec3_t fw = {1,0,0}; + S_Update (vec3_origin, fw, rt, up); + } + CDAudio_Update(); diff --git a/WinQuake/keys.c b/WinQuake/keys.c index 6e48ad484..a81e21942 100644 --- a/WinQuake/keys.c +++ b/WinQuake/keys.c @@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "quakedef.h" +#include "assert.h" /* @@ -598,6 +599,9 @@ Should NOT be called during an interrupt! */ void Key_Event (int key, qboolean down) { + assert(key < 256); + if (key == 0) return; + char *kb; char cmd[1024]; diff --git a/WinQuake/osx/osx.xcodeproj/project.pbxproj b/WinQuake/osx/osx.xcodeproj/project.pbxproj new file mode 100644 index 000000000..19e773c37 --- /dev/null +++ b/WinQuake/osx/osx.xcodeproj/project.pbxproj @@ -0,0 +1,890 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 490F86C91D7B54F300ED1162 /* libfmod.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 490F86C31D7B546F00ED1162 /* libfmod.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 490F86CA1D7B54F300ED1162 /* libfmodL.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 490F86C01D7B53D800ED1162 /* libfmodL.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 490F86CD1D7B895600ED1162 /* libfmodL.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 490F86C01D7B53D800ED1162 /* libfmodL.dylib */; }; + 49FA5CAB1876C779007C0DDE /* snd_openal.c in Sources */ = {isa = PBXBuildFile; fileRef = 49FA5CAA1876C779007C0DDE /* snd_openal.c */; }; + 49FA5CAD1876C878007C0DDE /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49FA5CAC1876C878007C0DDE /* OpenAL.framework */; }; + 8F9898D718704F81003F5893 /* osx.1 in Copy Files */ = {isa = PBXBuildFile; fileRef = 8F9898D618704F81003F5893 /* osx.1 */; }; + 8F98990B18705138003F5893 /* sv_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F9898E818705138003F5893 /* sv_main.c */; }; + 8F98990C18705138003F5893 /* sv_move.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F9898E918705138003F5893 /* sv_move.c */; }; + 8F98990D18705138003F5893 /* sv_phys.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F9898EA18705138003F5893 /* sv_phys.c */; }; + 8F98990E18705138003F5893 /* sv_user.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F9898EB18705138003F5893 /* sv_user.c */; }; + 8F98991E18705138003F5893 /* view.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F9898FB18705138003F5893 /* view.c */; }; + 8F98992018705138003F5893 /* wad.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F9898FD18705138003F5893 /* wad.c */; }; + 8F98992118705138003F5893 /* world.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F9898FE18705138003F5893 /* world.c */; }; + 8F98992218705138003F5893 /* zone.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F9898FF18705138003F5893 /* zone.c */; }; + 8F98998118705244003F5893 /* cd_null.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98992518705244003F5893 /* cd_null.c */; }; + 8F98998318705244003F5893 /* chase.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98992718705244003F5893 /* chase.c */; }; + 8F98998418705244003F5893 /* cl_demo.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98992818705244003F5893 /* cl_demo.c */; }; + 8F98998518705244003F5893 /* cl_input.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98992918705244003F5893 /* cl_input.c */; }; + 8F98998618705244003F5893 /* cl_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98992A18705244003F5893 /* cl_main.c */; }; + 8F98998718705244003F5893 /* cl_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98992B18705244003F5893 /* cl_parse.c */; }; + 8F98998818705244003F5893 /* cl_tent.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98992C18705244003F5893 /* cl_tent.c */; }; + 8F98998918705244003F5893 /* cmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98992D18705244003F5893 /* cmd.c */; }; + 8F98998A18705244003F5893 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98992E18705244003F5893 /* common.c */; }; + 8F98998C18705244003F5893 /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98993018705244003F5893 /* console.c */; }; + 8F98998D18705244003F5893 /* crc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98993118705244003F5893 /* crc.c */; }; + 8F98998E18705244003F5893 /* cvar.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98993218705244003F5893 /* cvar.c */; }; + 8F98999D18705244003F5893 /* gl_draw.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98994118705244003F5893 /* gl_draw.c */; }; + 8F98999E18705244003F5893 /* gl_mesh.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98994218705244003F5893 /* gl_mesh.c */; }; + 8F98999F18705244003F5893 /* gl_model.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98994318705244003F5893 /* gl_model.c */; }; + 8F9899A018705244003F5893 /* gl_refrag.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98994418705244003F5893 /* gl_refrag.c */; }; + 8F9899A118705244003F5893 /* gl_rlight.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98994518705244003F5893 /* gl_rlight.c */; }; + 8F9899A218705244003F5893 /* gl_rmain.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98994618705244003F5893 /* gl_rmain.c */; }; + 8F9899A318705244003F5893 /* gl_rmisc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98994718705244003F5893 /* gl_rmisc.c */; }; + 8F9899A418705244003F5893 /* gl_rsurf.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98994818705244003F5893 /* gl_rsurf.c */; }; + 8F9899A518705244003F5893 /* gl_screen.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98994918705244003F5893 /* gl_screen.c */; }; + 8F9899A618705244003F5893 /* gl_test.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98994A18705244003F5893 /* gl_test.c */; }; + 8F9899AA18705244003F5893 /* gl_warp.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98994E18705244003F5893 /* gl_warp.c */; }; + 8F9899AB18705244003F5893 /* host_cmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98994F18705244003F5893 /* host_cmd.c */; }; + 8F9899AC18705244003F5893 /* host.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98995018705244003F5893 /* host.c */; }; + 8F9899B118705244003F5893 /* keys.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98995518705244003F5893 /* keys.c */; }; + 8F9899B218705244003F5893 /* mathlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98995618705244003F5893 /* mathlib.c */; }; + 8F9899B318705244003F5893 /* menu.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98995718705244003F5893 /* menu.c */; }; + 8F9899B718705244003F5893 /* net_bsd.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98995B18705244003F5893 /* net_bsd.c */; }; + 8F9899BA18705244003F5893 /* net_dgrm.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98995E18705244003F5893 /* net_dgrm.c */; }; + 8F9899BD18705244003F5893 /* net_loop.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98996118705244003F5893 /* net_loop.c */; }; + 8F9899BE18705244003F5893 /* net_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98996218705244003F5893 /* net_main.c */; }; + 8F9899C218705244003F5893 /* net_udp.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98996618705244003F5893 /* net_udp.c */; }; + 8F9899C318705244003F5893 /* net_vcr.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98996718705244003F5893 /* net_vcr.c */; }; + 8F9899C718705244003F5893 /* net_wso.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98996B18705244003F5893 /* net_wso.c */; }; + 8F9899C918705244003F5893 /* pr_cmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98996D18705244003F5893 /* pr_cmds.c */; }; + 8F9899CA18705244003F5893 /* pr_edict.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98996E18705244003F5893 /* pr_edict.c */; }; + 8F9899CB18705244003F5893 /* pr_exec.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98996F18705244003F5893 /* pr_exec.c */; }; + 8F9899DA18705244003F5893 /* sbar.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98997E18705244003F5893 /* sbar.c */; }; + 8F989A391870669E003F5893 /* gl_vidglfw.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F989A381870669E003F5893 /* gl_vidglfw.c */; }; + 8F989A3B18706842003F5893 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F989A3A18706842003F5893 /* OpenGL.framework */; }; + 8F989A3C18706878003F5893 /* r_part.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F98997918705244003F5893 /* r_part.c */; }; + 8F989A3E1870868C003F5893 /* libglfw3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F989A3D1870868C003F5893 /* libglfw3.dylib */; }; + 8F989A401870A096003F5893 /* sys_bsd.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F989A3F1870A096003F5893 /* sys_bsd.c */; }; + 8FB0B68C187B77E700677F13 /* snd_mem.c in Sources */ = {isa = PBXBuildFile; fileRef = 8F9898E218705138003F5893 /* snd_mem.c */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 490F86C81D7B54E100ED1162 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 6; + files = ( + 490F86C91D7B54F300ED1162 /* libfmod.dylib in CopyFiles */, + 490F86CA1D7B54F300ED1162 /* libfmodL.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8F9898CF18704F81003F5893 /* Copy Files */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + 8F9898D718704F81003F5893 /* osx.1 in Copy Files */, + ); + name = "Copy Files"; + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 490F86BE1D7B53B200ED1162 /* api */ = {isa = PBXFileReference; lastKnownFileType = folder; name = api; path = ../fmod/api; sourceTree = ""; }; + 490F86C01D7B53D800ED1162 /* libfmodL.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfmodL.dylib; path = ../fmod/api/lowlevel/lib/libfmodL.dylib; sourceTree = ""; }; + 490F86C31D7B546F00ED1162 /* libfmod.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfmod.dylib; path = ../fmod/api/lowlevel/lib/libfmod.dylib; sourceTree = ""; }; + 49FA5CAA1876C779007C0DDE /* snd_openal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_openal.c; path = ../snd_openal.c; sourceTree = ""; }; + 49FA5CAC1876C878007C0DDE /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + 8F9898D118704F81003F5893 /* osx */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = osx; sourceTree = BUILT_PRODUCTS_DIR; }; + 8F9898D618704F81003F5893 /* osx.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = osx.1; sourceTree = ""; }; + 8F9898DD18705138003F5893 /* screen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = screen.c; path = ../screen.c; sourceTree = ""; }; + 8F9898DE18705138003F5893 /* snd_dma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_dma.c; path = ../snd_dma.c; sourceTree = ""; }; + 8F9898E018705138003F5893 /* snd_gus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_gus.c; path = ../snd_gus.c; sourceTree = ""; }; + 8F9898E118705138003F5893 /* snd_linux.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_linux.c; path = ../snd_linux.c; sourceTree = ""; }; + 8F9898E218705138003F5893 /* snd_mem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_mem.c; path = ../snd_mem.c; sourceTree = ""; }; + 8F9898E318705138003F5893 /* snd_mix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_mix.c; path = ../snd_mix.c; sourceTree = ""; }; + 8F9898E418705138003F5893 /* snd_next.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_next.c; path = ../snd_next.c; sourceTree = ""; }; + 8F9898E518705138003F5893 /* snd_null.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_null.c; path = ../snd_null.c; sourceTree = ""; }; + 8F9898E618705138003F5893 /* snd_sun.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_sun.c; path = ../snd_sun.c; sourceTree = ""; }; + 8F9898E718705138003F5893 /* snd_win.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_win.c; path = ../snd_win.c; sourceTree = ""; }; + 8F9898E818705138003F5893 /* sv_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sv_main.c; path = ../sv_main.c; sourceTree = ""; }; + 8F9898E918705138003F5893 /* sv_move.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sv_move.c; path = ../sv_move.c; sourceTree = ""; }; + 8F9898EA18705138003F5893 /* sv_phys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sv_phys.c; path = ../sv_phys.c; sourceTree = ""; }; + 8F9898EB18705138003F5893 /* sv_user.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sv_user.c; path = ../sv_user.c; sourceTree = ""; }; + 8F9898EC18705138003F5893 /* sys_dos.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sys_dos.c; path = ../sys_dos.c; sourceTree = ""; }; + 8F9898ED18705138003F5893 /* sys_linux.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sys_linux.c; path = ../sys_linux.c; sourceTree = ""; }; + 8F9898EE18705138003F5893 /* sys_null.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sys_null.c; path = ../sys_null.c; sourceTree = ""; }; + 8F9898EF18705138003F5893 /* sys_sun.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sys_sun.c; path = ../sys_sun.c; sourceTree = ""; }; + 8F9898F118705138003F5893 /* sys_wind.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sys_wind.c; path = ../sys_wind.c; sourceTree = ""; }; + 8F9898F218705138003F5893 /* vid_dos.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vid_dos.c; path = ../vid_dos.c; sourceTree = ""; }; + 8F9898F318705138003F5893 /* vid_ext.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vid_ext.c; path = ../vid_ext.c; sourceTree = ""; }; + 8F9898F418705138003F5893 /* vid_null.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vid_null.c; path = ../vid_null.c; sourceTree = ""; }; + 8F9898F518705138003F5893 /* vid_sunx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vid_sunx.c; path = ../vid_sunx.c; sourceTree = ""; }; + 8F9898F618705138003F5893 /* vid_sunxil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vid_sunxil.c; path = ../vid_sunxil.c; sourceTree = ""; }; + 8F9898F718705138003F5893 /* vid_svgalib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vid_svgalib.c; path = ../vid_svgalib.c; sourceTree = ""; }; + 8F9898F818705138003F5893 /* vid_vga.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vid_vga.c; path = ../vid_vga.c; sourceTree = ""; }; + 8F9898FA18705138003F5893 /* vid_x.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vid_x.c; path = ../vid_x.c; sourceTree = ""; }; + 8F9898FB18705138003F5893 /* view.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = view.c; path = ../view.c; sourceTree = ""; }; + 8F9898FC18705138003F5893 /* vregset.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vregset.c; path = ../vregset.c; sourceTree = ""; }; + 8F9898FD18705138003F5893 /* wad.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wad.c; path = ../wad.c; sourceTree = ""; }; + 8F9898FE18705138003F5893 /* world.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = world.c; path = ../world.c; sourceTree = ""; }; + 8F9898FF18705138003F5893 /* zone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = zone.c; path = ../zone.c; sourceTree = ""; }; + 8F98992318705244003F5893 /* cd_audio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cd_audio.c; path = ../cd_audio.c; sourceTree = ""; }; + 8F98992418705244003F5893 /* cd_linux.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cd_linux.c; path = ../cd_linux.c; sourceTree = ""; }; + 8F98992518705244003F5893 /* cd_null.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cd_null.c; path = ../cd_null.c; sourceTree = ""; }; + 8F98992718705244003F5893 /* chase.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = chase.c; path = ../chase.c; sourceTree = ""; }; + 8F98992818705244003F5893 /* cl_demo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cl_demo.c; path = ../cl_demo.c; sourceTree = ""; }; + 8F98992918705244003F5893 /* cl_input.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cl_input.c; path = ../cl_input.c; sourceTree = ""; }; + 8F98992A18705244003F5893 /* cl_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cl_main.c; path = ../cl_main.c; sourceTree = ""; }; + 8F98992B18705244003F5893 /* cl_parse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cl_parse.c; path = ../cl_parse.c; sourceTree = ""; }; + 8F98992C18705244003F5893 /* cl_tent.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cl_tent.c; path = ../cl_tent.c; sourceTree = ""; }; + 8F98992D18705244003F5893 /* cmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmd.c; path = ../cmd.c; sourceTree = ""; }; + 8F98992E18705244003F5893 /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = common.c; path = ../common.c; sourceTree = ""; }; + 8F98992F18705244003F5893 /* conproc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = conproc.c; path = ../conproc.c; sourceTree = ""; }; + 8F98993018705244003F5893 /* console.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = console.c; path = ../console.c; sourceTree = ""; }; + 8F98993118705244003F5893 /* crc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = crc.c; path = ../crc.c; sourceTree = ""; }; + 8F98993218705244003F5893 /* cvar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cvar.c; path = ../cvar.c; sourceTree = ""; }; + 8F98993318705244003F5893 /* d_edge.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = d_edge.c; path = ../d_edge.c; sourceTree = ""; }; + 8F98993418705244003F5893 /* d_fill.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = d_fill.c; path = ../d_fill.c; sourceTree = ""; }; + 8F98993518705244003F5893 /* d_init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = d_init.c; path = ../d_init.c; sourceTree = ""; }; + 8F98993618705244003F5893 /* d_modech.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = d_modech.c; path = ../d_modech.c; sourceTree = ""; }; + 8F98993718705244003F5893 /* d_part.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = d_part.c; path = ../d_part.c; sourceTree = ""; }; + 8F98993818705244003F5893 /* d_polyse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = d_polyse.c; path = ../d_polyse.c; sourceTree = ""; }; + 8F98993918705244003F5893 /* d_scan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = d_scan.c; path = ../d_scan.c; sourceTree = ""; }; + 8F98993A18705244003F5893 /* d_sky.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = d_sky.c; path = ../d_sky.c; sourceTree = ""; }; + 8F98993B18705244003F5893 /* d_sprite.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = d_sprite.c; path = ../d_sprite.c; sourceTree = ""; }; + 8F98993C18705244003F5893 /* d_surf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = d_surf.c; path = ../d_surf.c; sourceTree = ""; }; + 8F98993D18705244003F5893 /* d_vars.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = d_vars.c; path = ../d_vars.c; sourceTree = ""; }; + 8F98993E18705244003F5893 /* d_zpoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = d_zpoint.c; path = ../d_zpoint.c; sourceTree = ""; }; + 8F98993F18705244003F5893 /* dos_v2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dos_v2.c; path = ../dos_v2.c; sourceTree = ""; }; + 8F98994018705244003F5893 /* draw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = draw.c; path = ../draw.c; sourceTree = ""; }; + 8F98994118705244003F5893 /* gl_draw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_draw.c; path = ../gl_draw.c; sourceTree = ""; }; + 8F98994218705244003F5893 /* gl_mesh.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_mesh.c; path = ../gl_mesh.c; sourceTree = ""; }; + 8F98994318705244003F5893 /* gl_model.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_model.c; path = ../gl_model.c; sourceTree = ""; }; + 8F98994418705244003F5893 /* gl_refrag.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_refrag.c; path = ../gl_refrag.c; sourceTree = ""; }; + 8F98994518705244003F5893 /* gl_rlight.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_rlight.c; path = ../gl_rlight.c; sourceTree = ""; }; + 8F98994618705244003F5893 /* gl_rmain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_rmain.c; path = ../gl_rmain.c; sourceTree = ""; }; + 8F98994718705244003F5893 /* gl_rmisc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_rmisc.c; path = ../gl_rmisc.c; sourceTree = ""; }; + 8F98994818705244003F5893 /* gl_rsurf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_rsurf.c; path = ../gl_rsurf.c; sourceTree = ""; }; + 8F98994918705244003F5893 /* gl_screen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_screen.c; path = ../gl_screen.c; sourceTree = ""; }; + 8F98994A18705244003F5893 /* gl_test.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_test.c; path = ../gl_test.c; sourceTree = ""; }; + 8F98994B18705244003F5893 /* gl_vidlinux.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_vidlinux.c; path = ../gl_vidlinux.c; sourceTree = ""; }; + 8F98994C18705244003F5893 /* gl_vidlinuxglx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_vidlinuxglx.c; path = ../gl_vidlinuxglx.c; sourceTree = ""; }; + 8F98994D18705244003F5893 /* gl_vidnt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_vidnt.c; path = ../gl_vidnt.c; sourceTree = ""; }; + 8F98994E18705244003F5893 /* gl_warp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_warp.c; path = ../gl_warp.c; sourceTree = ""; }; + 8F98994F18705244003F5893 /* host_cmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = host_cmd.c; path = ../host_cmd.c; sourceTree = ""; }; + 8F98995018705244003F5893 /* host.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = host.c; path = ../host.c; sourceTree = ""; }; + 8F98995118705244003F5893 /* in_dos.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = in_dos.c; path = ../in_dos.c; sourceTree = ""; }; + 8F98995218705244003F5893 /* in_null.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = in_null.c; path = ../in_null.c; sourceTree = ""; }; + 8F98995318705244003F5893 /* in_sun.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = in_sun.c; path = ../in_sun.c; sourceTree = ""; }; + 8F98995518705244003F5893 /* keys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = keys.c; path = ../keys.c; sourceTree = ""; }; + 8F98995618705244003F5893 /* mathlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mathlib.c; path = ../mathlib.c; sourceTree = ""; }; + 8F98995718705244003F5893 /* menu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = menu.c; path = ../menu.c; sourceTree = ""; }; + 8F98995818705244003F5893 /* model.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = model.c; path = ../model.c; sourceTree = ""; }; + 8F98995918705244003F5893 /* mplib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mplib.c; path = ../mplib.c; sourceTree = ""; }; + 8F98995A18705244003F5893 /* mplpc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mplpc.c; path = ../mplpc.c; sourceTree = ""; }; + 8F98995B18705244003F5893 /* net_bsd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_bsd.c; path = ../net_bsd.c; sourceTree = ""; }; + 8F98995C18705244003F5893 /* net_bw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_bw.c; path = ../net_bw.c; sourceTree = ""; }; + 8F98995D18705244003F5893 /* net_comx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_comx.c; path = ../net_comx.c; sourceTree = ""; }; + 8F98995E18705244003F5893 /* net_dgrm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_dgrm.c; path = ../net_dgrm.c; sourceTree = ""; }; + 8F98995F18705244003F5893 /* net_dos.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_dos.c; path = ../net_dos.c; sourceTree = ""; }; + 8F98996018705244003F5893 /* net_ipx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_ipx.c; path = ../net_ipx.c; sourceTree = ""; }; + 8F98996118705244003F5893 /* net_loop.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_loop.c; path = ../net_loop.c; sourceTree = ""; }; + 8F98996218705244003F5893 /* net_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_main.c; path = ../net_main.c; sourceTree = ""; }; + 8F98996318705244003F5893 /* net_mp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_mp.c; path = ../net_mp.c; sourceTree = ""; }; + 8F98996418705244003F5893 /* net_none.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_none.c; path = ../net_none.c; sourceTree = ""; }; + 8F98996518705244003F5893 /* net_ser.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_ser.c; path = ../net_ser.c; sourceTree = ""; }; + 8F98996618705244003F5893 /* net_udp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_udp.c; path = ../net_udp.c; sourceTree = ""; }; + 8F98996718705244003F5893 /* net_vcr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_vcr.c; path = ../net_vcr.c; sourceTree = ""; }; + 8F98996918705244003F5893 /* net_wins.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_wins.c; path = ../net_wins.c; sourceTree = ""; }; + 8F98996A18705244003F5893 /* net_wipx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_wipx.c; path = ../net_wipx.c; sourceTree = ""; }; + 8F98996B18705244003F5893 /* net_wso.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_wso.c; path = ../net_wso.c; sourceTree = ""; }; + 8F98996C18705244003F5893 /* nonintel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nonintel.c; path = ../nonintel.c; sourceTree = ""; }; + 8F98996D18705244003F5893 /* pr_cmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pr_cmds.c; path = ../pr_cmds.c; sourceTree = ""; }; + 8F98996E18705244003F5893 /* pr_edict.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pr_edict.c; path = ../pr_edict.c; sourceTree = ""; }; + 8F98996F18705244003F5893 /* pr_exec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pr_exec.c; path = ../pr_exec.c; sourceTree = ""; }; + 8F98997018705244003F5893 /* r_aclip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_aclip.c; path = ../r_aclip.c; sourceTree = ""; }; + 8F98997118705244003F5893 /* r_alias.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_alias.c; path = ../r_alias.c; sourceTree = ""; }; + 8F98997218705244003F5893 /* r_bsp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_bsp.c; path = ../r_bsp.c; sourceTree = ""; }; + 8F98997318705244003F5893 /* r_draw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_draw.c; path = ../r_draw.c; sourceTree = ""; }; + 8F98997418705244003F5893 /* r_edge.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_edge.c; path = ../r_edge.c; sourceTree = ""; }; + 8F98997518705244003F5893 /* r_efrag.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_efrag.c; path = ../r_efrag.c; sourceTree = ""; }; + 8F98997618705244003F5893 /* r_light.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_light.c; path = ../r_light.c; sourceTree = ""; }; + 8F98997718705244003F5893 /* r_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_main.c; path = ../r_main.c; sourceTree = ""; }; + 8F98997818705244003F5893 /* r_misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_misc.c; path = ../r_misc.c; sourceTree = ""; }; + 8F98997918705244003F5893 /* r_part.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_part.c; path = ../r_part.c; sourceTree = ""; }; + 8F98997A18705244003F5893 /* r_sky.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_sky.c; path = ../r_sky.c; sourceTree = ""; }; + 8F98997B18705244003F5893 /* r_sprite.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_sprite.c; path = ../r_sprite.c; sourceTree = ""; }; + 8F98997C18705244003F5893 /* r_surf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_surf.c; path = ../r_surf.c; sourceTree = ""; }; + 8F98997D18705244003F5893 /* r_vars.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r_vars.c; path = ../r_vars.c; sourceTree = ""; }; + 8F98997E18705244003F5893 /* sbar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sbar.c; path = ../sbar.c; sourceTree = ""; }; + 8F9899DE187052ED003F5893 /* cd_win.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cd_win.c; path = ../cd_win.c; sourceTree = ""; }; + 8F9899DF187052ED003F5893 /* in_win.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = in_win.c; path = ../in_win.c; sourceTree = ""; }; + 8F9899E0187052ED003F5893 /* net_win.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net_win.c; path = ../net_win.c; sourceTree = ""; }; + 8F9899E1187052ED003F5893 /* snd_dos.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_dos.c; path = ../snd_dos.c; sourceTree = ""; }; + 8F9899E2187052ED003F5893 /* sys_win.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sys_win.c; path = ../sys_win.c; sourceTree = ""; }; + 8F9899E3187052ED003F5893 /* vid_win.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vid_win.c; path = ../vid_win.c; sourceTree = ""; }; + 8F9899F418705AAD003F5893 /* adivtab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = adivtab.h; path = ../adivtab.h; sourceTree = ""; }; + 8F9899F518705AAD003F5893 /* anorm_dots.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = anorm_dots.h; path = ../anorm_dots.h; sourceTree = ""; }; + 8F9899F618705AAD003F5893 /* anorms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = anorms.h; path = ../anorms.h; sourceTree = ""; }; + 8F9899F718705AAD003F5893 /* asm_draw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = asm_draw.h; path = ../asm_draw.h; sourceTree = ""; }; + 8F9899F818705AAD003F5893 /* asm_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = asm_i386.h; path = ../asm_i386.h; sourceTree = ""; }; + 8F9899F918705AAD003F5893 /* block8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = block8.h; path = ../block8.h; sourceTree = ""; }; + 8F9899FA18705AAD003F5893 /* block16.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = block16.h; path = ../block16.h; sourceTree = ""; }; + 8F9899FB18705AAD003F5893 /* bspfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bspfile.h; path = ../bspfile.h; sourceTree = ""; }; + 8F9899FC18705AAD003F5893 /* cdaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cdaudio.h; path = ../cdaudio.h; sourceTree = ""; }; + 8F9899FD18705AAD003F5893 /* client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = client.h; path = ../client.h; sourceTree = ""; }; + 8F9899FE18705AAD003F5893 /* cmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cmd.h; path = ../cmd.h; sourceTree = ""; }; + 8F9899FF18705AAD003F5893 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../common.h; sourceTree = ""; }; + 8F989A0018705AAD003F5893 /* conproc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = conproc.h; path = ../conproc.h; sourceTree = ""; }; + 8F989A0118705AAD003F5893 /* console.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = console.h; path = ../console.h; sourceTree = ""; }; + 8F989A0218705AAD003F5893 /* crc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = crc.h; path = ../crc.h; sourceTree = ""; }; + 8F989A0318705AAD003F5893 /* cvar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cvar.h; path = ../cvar.h; sourceTree = ""; }; + 8F989A0418705AAD003F5893 /* d_iface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = d_iface.h; path = ../d_iface.h; sourceTree = ""; }; + 8F989A0518705AAD003F5893 /* d_ifacea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = d_ifacea.h; path = ../d_ifacea.h; sourceTree = ""; }; + 8F989A0618705AAD003F5893 /* d_local.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = d_local.h; path = ../d_local.h; sourceTree = ""; }; + 8F989A0718705AAD003F5893 /* dosisms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dosisms.h; path = ../dosisms.h; sourceTree = ""; }; + 8F989A0818705AAD003F5893 /* draw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = draw.h; path = ../draw.h; sourceTree = ""; }; + 8F989A0918705AAD003F5893 /* gl_model.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gl_model.h; path = ../gl_model.h; sourceTree = ""; }; + 8F989A0A18705AAD003F5893 /* gl_warp_sin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gl_warp_sin.h; path = ../gl_warp_sin.h; sourceTree = ""; }; + 8F989A0B18705AAD003F5893 /* glquake.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glquake.h; path = ../glquake.h; sourceTree = ""; }; + 8F989A0C18705AAD003F5893 /* glquake2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glquake2.h; path = ../glquake2.h; sourceTree = ""; }; + 8F989A0D18705AAD003F5893 /* input.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = input.h; path = ../input.h; sourceTree = ""; }; + 8F989A0E18705AAD003F5893 /* keys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = keys.h; path = ../keys.h; sourceTree = ""; }; + 8F989A0F18705AAD003F5893 /* mathlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mathlib.h; path = ../mathlib.h; sourceTree = ""; }; + 8F989A1018705AAD003F5893 /* menu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = menu.h; path = ../menu.h; sourceTree = ""; }; + 8F989A1118705AAD003F5893 /* model.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = model.h; path = ../model.h; sourceTree = ""; }; + 8F989A1218705AAD003F5893 /* modelgen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = modelgen.h; path = ../modelgen.h; sourceTree = ""; }; + 8F989A1318705AAD003F5893 /* mpdosock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mpdosock.h; path = ../mpdosock.h; sourceTree = ""; }; + 8F989A1418705AAD003F5893 /* net_bw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = net_bw.h; path = ../net_bw.h; sourceTree = ""; }; + 8F989A1518705AAD003F5893 /* net_dgrm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = net_dgrm.h; path = ../net_dgrm.h; sourceTree = ""; }; + 8F989A1618705AAD003F5893 /* net_ipx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = net_ipx.h; path = ../net_ipx.h; sourceTree = ""; }; + 8F989A1718705AAD003F5893 /* net_loop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = net_loop.h; path = ../net_loop.h; sourceTree = ""; }; + 8F989A1818705AAD003F5893 /* net_mp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = net_mp.h; path = ../net_mp.h; sourceTree = ""; }; + 8F989A1918705AAD003F5893 /* net_ser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = net_ser.h; path = ../net_ser.h; sourceTree = ""; }; + 8F989A1A18705AAD003F5893 /* net_udp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = net_udp.h; path = ../net_udp.h; sourceTree = ""; }; + 8F989A1B18705AAD003F5893 /* net_vcr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = net_vcr.h; path = ../net_vcr.h; sourceTree = ""; }; + 8F989A1C18705AAD003F5893 /* net_wins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = net_wins.h; path = ../net_wins.h; sourceTree = ""; }; + 8F989A1D18705AAD003F5893 /* net_wipx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = net_wipx.h; path = ../net_wipx.h; sourceTree = ""; }; + 8F989A1E18705AAD003F5893 /* net.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = net.h; path = ../net.h; sourceTree = ""; }; + 8F989A1F18705AAD003F5893 /* pr_comp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pr_comp.h; path = ../pr_comp.h; sourceTree = ""; }; + 8F989A2018705AAD003F5893 /* progdefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = progdefs.h; path = ../progdefs.h; sourceTree = ""; }; + 8F989A2118705AAD003F5893 /* progs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = progs.h; path = ../progs.h; sourceTree = ""; }; + 8F989A2218705AAD003F5893 /* protocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = protocol.h; path = ../protocol.h; sourceTree = ""; }; + 8F989A2318705AAD003F5893 /* quakeasm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = quakeasm.h; path = ../quakeasm.h; sourceTree = ""; }; + 8F989A2418705AAD003F5893 /* quakedef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = quakedef.h; path = ../quakedef.h; sourceTree = ""; }; + 8F989A2518705AAD003F5893 /* r_local.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = r_local.h; path = ../r_local.h; sourceTree = ""; }; + 8F989A2618705AAD003F5893 /* r_shared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = r_shared.h; path = ../r_shared.h; sourceTree = ""; }; + 8F989A2718705AAD003F5893 /* render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = render.h; path = ../render.h; sourceTree = ""; }; + 8F989A2818705AAD003F5893 /* resource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = resource.h; path = ../resource.h; sourceTree = ""; }; + 8F989A2918705AAD003F5893 /* sbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sbar.h; path = ../sbar.h; sourceTree = ""; }; + 8F989A2A18705AAD003F5893 /* screen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = screen.h; path = ../screen.h; sourceTree = ""; }; + 8F989A2B18705AAD003F5893 /* server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = server.h; path = ../server.h; sourceTree = ""; }; + 8F989A2C18705AAD003F5893 /* sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sound.h; path = ../sound.h; sourceTree = ""; }; + 8F989A2D18705AAD003F5893 /* spritegn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spritegn.h; path = ../spritegn.h; sourceTree = ""; }; + 8F989A2E18705AAD003F5893 /* sys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sys.h; path = ../sys.h; sourceTree = ""; }; + 8F989A2F18705AAD003F5893 /* vgamodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vgamodes.h; path = ../vgamodes.h; sourceTree = ""; }; + 8F989A3018705AAD003F5893 /* vid_dos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vid_dos.h; path = ../vid_dos.h; sourceTree = ""; }; + 8F989A3118705AAD003F5893 /* vid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vid.h; path = ../vid.h; sourceTree = ""; }; + 8F989A3218705AAD003F5893 /* view.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = view.h; path = ../view.h; sourceTree = ""; }; + 8F989A3318705AAD003F5893 /* vregset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vregset.h; path = ../vregset.h; sourceTree = ""; }; + 8F989A3418705AAD003F5893 /* wad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wad.h; path = ../wad.h; sourceTree = ""; }; + 8F989A3518705AAD003F5893 /* winquake.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = winquake.h; path = ../winquake.h; sourceTree = ""; }; + 8F989A3618705AAD003F5893 /* world.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = world.h; path = ../world.h; sourceTree = ""; }; + 8F989A3718705AAD003F5893 /* zone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = zone.h; path = ../zone.h; sourceTree = ""; }; + 8F989A381870669E003F5893 /* gl_vidglfw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_vidglfw.c; path = ../gl_vidglfw.c; sourceTree = ""; }; + 8F989A3A18706842003F5893 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + 8F989A3D1870868C003F5893 /* libglfw3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw3.dylib; path = ../../../../../../usr/local/lib/libglfw3.dylib; sourceTree = ""; }; + 8F989A3F1870A096003F5893 /* sys_bsd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sys_bsd.c; path = ../sys_bsd.c; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8F9898CE18704F81003F5893 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 490F86CD1D7B895600ED1162 /* libfmodL.dylib in Frameworks */, + 49FA5CAD1876C878007C0DDE /* OpenAL.framework in Frameworks */, + 8F989A3E1870868C003F5893 /* libglfw3.dylib in Frameworks */, + 8F989A3B18706842003F5893 /* OpenGL.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 8F9898C818704F81003F5893 = { + isa = PBXGroup; + children = ( + 490F86C31D7B546F00ED1162 /* libfmod.dylib */, + 490F86C01D7B53D800ED1162 /* libfmodL.dylib */, + 490F86BE1D7B53B200ED1162 /* api */, + 8F9899EC1870531D003F5893 /* cd */, + 8F9899EB18705311003F5893 /* cl */, + 8F9899DD187052B8003F5893 /* d */, + 8F9899DC1870529A003F5893 /* gl */, + 8F9899F2187053E6003F5893 /* in */, + 8F9899EA187052F4003F5893 /* net */, + 8F9898D318704F81003F5893 /* osx */, + 8F9899F0187053A9003F5893 /* pr */, + 8F9898D218704F81003F5893 /* Products */, + 8F9899ED1870533A003F5893 /* r */, + 8F9899EF18705380003F5893 /* snd */, + 8F9899F3187053F7003F5893 /* sv */, + 8F9899F1187053C9003F5893 /* sys */, + 8F9899EE1870535B003F5893 /* vid */, + 8F98992718705244003F5893 /* chase.c */, + 8F98992D18705244003F5893 /* cmd.c */, + 8F98992E18705244003F5893 /* common.c */, + 8F98992F18705244003F5893 /* conproc.c */, + 8F98993018705244003F5893 /* console.c */, + 8F98993118705244003F5893 /* crc.c */, + 8F98993218705244003F5893 /* cvar.c */, + 8F98993F18705244003F5893 /* dos_v2.c */, + 8F98994018705244003F5893 /* draw.c */, + 8F98995018705244003F5893 /* host.c */, + 8F98994F18705244003F5893 /* host_cmd.c */, + 8F98995518705244003F5893 /* keys.c */, + 8F98995618705244003F5893 /* mathlib.c */, + 8F98995718705244003F5893 /* menu.c */, + 8F98995818705244003F5893 /* model.c */, + 8F98995918705244003F5893 /* mplib.c */, + 8F98995A18705244003F5893 /* mplpc.c */, + 8F98996C18705244003F5893 /* nonintel.c */, + 8F98997E18705244003F5893 /* sbar.c */, + 8F9898DD18705138003F5893 /* screen.c */, + 8F9898FB18705138003F5893 /* view.c */, + 8F9898FC18705138003F5893 /* vregset.c */, + 8F9898FD18705138003F5893 /* wad.c */, + 8F9898FE18705138003F5893 /* world.c */, + 8F9898FF18705138003F5893 /* zone.c */, + 8F9899F418705AAD003F5893 /* adivtab.h */, + 8F9899F518705AAD003F5893 /* anorm_dots.h */, + 8F9899F618705AAD003F5893 /* anorms.h */, + 8F9899F718705AAD003F5893 /* asm_draw.h */, + 8F9899F818705AAD003F5893 /* asm_i386.h */, + 8F9899FA18705AAD003F5893 /* block16.h */, + 8F9899F918705AAD003F5893 /* block8.h */, + 8F9899FB18705AAD003F5893 /* bspfile.h */, + 8F9899FC18705AAD003F5893 /* cdaudio.h */, + 8F9899FE18705AAD003F5893 /* cmd.h */, + 8F9899FF18705AAD003F5893 /* common.h */, + 8F989A0018705AAD003F5893 /* conproc.h */, + 8F989A0118705AAD003F5893 /* console.h */, + 8F989A0218705AAD003F5893 /* crc.h */, + 8F989A0318705AAD003F5893 /* cvar.h */, + 8F989A0718705AAD003F5893 /* dosisms.h */, + 8F989A0818705AAD003F5893 /* draw.h */, + 8F989A0E18705AAD003F5893 /* keys.h */, + 8F989A0F18705AAD003F5893 /* mathlib.h */, + 8F989A1018705AAD003F5893 /* menu.h */, + 8F989A1118705AAD003F5893 /* model.h */, + 8F989A1218705AAD003F5893 /* modelgen.h */, + 8F989A1318705AAD003F5893 /* mpdosock.h */, + 8F989A1F18705AAD003F5893 /* pr_comp.h */, + 8F989A2018705AAD003F5893 /* progdefs.h */, + 8F989A2118705AAD003F5893 /* progs.h */, + 8F989A2218705AAD003F5893 /* protocol.h */, + 8F989A2318705AAD003F5893 /* quakeasm.h */, + 8F989A2418705AAD003F5893 /* quakedef.h */, + 8F989A2818705AAD003F5893 /* resource.h */, + 8F989A2918705AAD003F5893 /* sbar.h */, + 8F989A2A18705AAD003F5893 /* screen.h */, + 8F989A2B18705AAD003F5893 /* server.h */, + 8F989A2D18705AAD003F5893 /* spritegn.h */, + 8F989A2F18705AAD003F5893 /* vgamodes.h */, + 8F989A3218705AAD003F5893 /* view.h */, + 8F989A3318705AAD003F5893 /* vregset.h */, + 8F989A3418705AAD003F5893 /* wad.h */, + 8F989A3518705AAD003F5893 /* winquake.h */, + 8F989A3618705AAD003F5893 /* world.h */, + 8F989A3718705AAD003F5893 /* zone.h */, + 8F989A3D1870868C003F5893 /* libglfw3.dylib */, + 49FA5CAC1876C878007C0DDE /* OpenAL.framework */, + 8F989A3A18706842003F5893 /* OpenGL.framework */, + ); + sourceTree = ""; + }; + 8F9898D218704F81003F5893 /* Products */ = { + isa = PBXGroup; + children = ( + 8F9898D118704F81003F5893 /* osx */, + ); + name = Products; + sourceTree = ""; + }; + 8F9898D318704F81003F5893 /* osx */ = { + isa = PBXGroup; + children = ( + 8F9898D618704F81003F5893 /* osx.1 */, + ); + path = osx; + sourceTree = ""; + }; + 8F9899DC1870529A003F5893 /* gl */ = { + isa = PBXGroup; + children = ( + 8F989A0B18705AAD003F5893 /* glquake.h */, + 8F989A0C18705AAD003F5893 /* glquake2.h */, + 8F989A381870669E003F5893 /* gl_vidglfw.c */, + 8F989A0918705AAD003F5893 /* gl_model.h */, + 8F989A0A18705AAD003F5893 /* gl_warp_sin.h */, + 8F98994118705244003F5893 /* gl_draw.c */, + 8F98994218705244003F5893 /* gl_mesh.c */, + 8F98994318705244003F5893 /* gl_model.c */, + 8F98994418705244003F5893 /* gl_refrag.c */, + 8F98994518705244003F5893 /* gl_rlight.c */, + 8F98994618705244003F5893 /* gl_rmain.c */, + 8F98994718705244003F5893 /* gl_rmisc.c */, + 8F98994818705244003F5893 /* gl_rsurf.c */, + 8F98994918705244003F5893 /* gl_screen.c */, + 8F98994A18705244003F5893 /* gl_test.c */, + 8F98994B18705244003F5893 /* gl_vidlinux.c */, + 8F98994C18705244003F5893 /* gl_vidlinuxglx.c */, + 8F98994D18705244003F5893 /* gl_vidnt.c */, + 8F98994E18705244003F5893 /* gl_warp.c */, + ); + name = gl; + sourceTree = ""; + }; + 8F9899DD187052B8003F5893 /* d */ = { + isa = PBXGroup; + children = ( + 8F989A0418705AAD003F5893 /* d_iface.h */, + 8F989A0518705AAD003F5893 /* d_ifacea.h */, + 8F989A0618705AAD003F5893 /* d_local.h */, + 8F98993318705244003F5893 /* d_edge.c */, + 8F98993418705244003F5893 /* d_fill.c */, + 8F98993518705244003F5893 /* d_init.c */, + 8F98993618705244003F5893 /* d_modech.c */, + 8F98993718705244003F5893 /* d_part.c */, + 8F98993818705244003F5893 /* d_polyse.c */, + 8F98993918705244003F5893 /* d_scan.c */, + 8F98993A18705244003F5893 /* d_sky.c */, + 8F98993B18705244003F5893 /* d_sprite.c */, + 8F98993C18705244003F5893 /* d_surf.c */, + 8F98993D18705244003F5893 /* d_vars.c */, + 8F98993E18705244003F5893 /* d_zpoint.c */, + ); + name = d; + sourceTree = ""; + }; + 8F9899EA187052F4003F5893 /* net */ = { + isa = PBXGroup; + children = ( + 8F989A1418705AAD003F5893 /* net_bw.h */, + 8F989A1518705AAD003F5893 /* net_dgrm.h */, + 8F989A1618705AAD003F5893 /* net_ipx.h */, + 8F989A1718705AAD003F5893 /* net_loop.h */, + 8F989A1818705AAD003F5893 /* net_mp.h */, + 8F989A1918705AAD003F5893 /* net_ser.h */, + 8F989A1A18705AAD003F5893 /* net_udp.h */, + 8F989A1B18705AAD003F5893 /* net_vcr.h */, + 8F989A1C18705AAD003F5893 /* net_wins.h */, + 8F989A1D18705AAD003F5893 /* net_wipx.h */, + 8F989A1E18705AAD003F5893 /* net.h */, + 8F9899E0187052ED003F5893 /* net_win.c */, + 8F98995B18705244003F5893 /* net_bsd.c */, + 8F98995C18705244003F5893 /* net_bw.c */, + 8F98995D18705244003F5893 /* net_comx.c */, + 8F98995E18705244003F5893 /* net_dgrm.c */, + 8F98995F18705244003F5893 /* net_dos.c */, + 8F98996018705244003F5893 /* net_ipx.c */, + 8F98996118705244003F5893 /* net_loop.c */, + 8F98996218705244003F5893 /* net_main.c */, + 8F98996318705244003F5893 /* net_mp.c */, + 8F98996418705244003F5893 /* net_none.c */, + 8F98996518705244003F5893 /* net_ser.c */, + 8F98996618705244003F5893 /* net_udp.c */, + 8F98996718705244003F5893 /* net_vcr.c */, + 8F98996918705244003F5893 /* net_wins.c */, + 8F98996A18705244003F5893 /* net_wipx.c */, + 8F98996B18705244003F5893 /* net_wso.c */, + ); + name = net; + sourceTree = ""; + }; + 8F9899EB18705311003F5893 /* cl */ = { + isa = PBXGroup; + children = ( + 8F9899FD18705AAD003F5893 /* client.h */, + 8F98992818705244003F5893 /* cl_demo.c */, + 8F98992918705244003F5893 /* cl_input.c */, + 8F98992A18705244003F5893 /* cl_main.c */, + 8F98992B18705244003F5893 /* cl_parse.c */, + 8F98992C18705244003F5893 /* cl_tent.c */, + ); + name = cl; + sourceTree = ""; + }; + 8F9899EC1870531D003F5893 /* cd */ = { + isa = PBXGroup; + children = ( + 8F9899DE187052ED003F5893 /* cd_win.c */, + 8F98992318705244003F5893 /* cd_audio.c */, + 8F98992418705244003F5893 /* cd_linux.c */, + 8F98992518705244003F5893 /* cd_null.c */, + ); + name = cd; + sourceTree = ""; + }; + 8F9899ED1870533A003F5893 /* r */ = { + isa = PBXGroup; + children = ( + 8F989A2718705AAD003F5893 /* render.h */, + 8F989A2518705AAD003F5893 /* r_local.h */, + 8F989A2618705AAD003F5893 /* r_shared.h */, + 8F98997018705244003F5893 /* r_aclip.c */, + 8F98997118705244003F5893 /* r_alias.c */, + 8F98997218705244003F5893 /* r_bsp.c */, + 8F98997318705244003F5893 /* r_draw.c */, + 8F98997418705244003F5893 /* r_edge.c */, + 8F98997518705244003F5893 /* r_efrag.c */, + 8F98997618705244003F5893 /* r_light.c */, + 8F98997718705244003F5893 /* r_main.c */, + 8F98997818705244003F5893 /* r_misc.c */, + 8F98997918705244003F5893 /* r_part.c */, + 8F98997A18705244003F5893 /* r_sky.c */, + 8F98997B18705244003F5893 /* r_sprite.c */, + 8F98997C18705244003F5893 /* r_surf.c */, + 8F98997D18705244003F5893 /* r_vars.c */, + ); + name = r; + sourceTree = ""; + }; + 8F9899EE1870535B003F5893 /* vid */ = { + isa = PBXGroup; + children = ( + 8F989A3018705AAD003F5893 /* vid_dos.h */, + 8F989A3118705AAD003F5893 /* vid.h */, + 8F9898F218705138003F5893 /* vid_dos.c */, + 8F9898F318705138003F5893 /* vid_ext.c */, + 8F9898F418705138003F5893 /* vid_null.c */, + 8F9898F518705138003F5893 /* vid_sunx.c */, + 8F9898F618705138003F5893 /* vid_sunxil.c */, + 8F9898F718705138003F5893 /* vid_svgalib.c */, + 8F9898F818705138003F5893 /* vid_vga.c */, + 8F9898FA18705138003F5893 /* vid_x.c */, + 8F9899E3187052ED003F5893 /* vid_win.c */, + ); + name = vid; + sourceTree = ""; + }; + 8F9899EF18705380003F5893 /* snd */ = { + isa = PBXGroup; + children = ( + 8F989A2C18705AAD003F5893 /* sound.h */, + 49FA5CAA1876C779007C0DDE /* snd_openal.c */, + 8F9899E1187052ED003F5893 /* snd_dos.c */, + 8F9898DE18705138003F5893 /* snd_dma.c */, + 8F9898E018705138003F5893 /* snd_gus.c */, + 8F9898E118705138003F5893 /* snd_linux.c */, + 8F9898E218705138003F5893 /* snd_mem.c */, + 8F9898E318705138003F5893 /* snd_mix.c */, + 8F9898E418705138003F5893 /* snd_next.c */, + 8F9898E518705138003F5893 /* snd_null.c */, + 8F9898E618705138003F5893 /* snd_sun.c */, + 8F9898E718705138003F5893 /* snd_win.c */, + ); + name = snd; + sourceTree = ""; + }; + 8F9899F0187053A9003F5893 /* pr */ = { + isa = PBXGroup; + children = ( + 8F98996D18705244003F5893 /* pr_cmds.c */, + 8F98996E18705244003F5893 /* pr_edict.c */, + 8F98996F18705244003F5893 /* pr_exec.c */, + ); + name = pr; + sourceTree = ""; + }; + 8F9899F1187053C9003F5893 /* sys */ = { + isa = PBXGroup; + children = ( + 8F989A2E18705AAD003F5893 /* sys.h */, + 8F989A3F1870A096003F5893 /* sys_bsd.c */, + 8F9898EC18705138003F5893 /* sys_dos.c */, + 8F9898ED18705138003F5893 /* sys_linux.c */, + 8F9898EE18705138003F5893 /* sys_null.c */, + 8F9898EF18705138003F5893 /* sys_sun.c */, + 8F9898F118705138003F5893 /* sys_wind.c */, + 8F9899E2187052ED003F5893 /* sys_win.c */, + ); + name = sys; + sourceTree = ""; + }; + 8F9899F2187053E6003F5893 /* in */ = { + isa = PBXGroup; + children = ( + 8F989A0D18705AAD003F5893 /* input.h */, + 8F98995118705244003F5893 /* in_dos.c */, + 8F98995218705244003F5893 /* in_null.c */, + 8F98995318705244003F5893 /* in_sun.c */, + 8F9899DF187052ED003F5893 /* in_win.c */, + ); + name = in; + sourceTree = ""; + }; + 8F9899F3187053F7003F5893 /* sv */ = { + isa = PBXGroup; + children = ( + 8F9898E818705138003F5893 /* sv_main.c */, + 8F9898E918705138003F5893 /* sv_move.c */, + 8F9898EA18705138003F5893 /* sv_phys.c */, + 8F9898EB18705138003F5893 /* sv_user.c */, + ); + name = sv; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8F9898D018704F81003F5893 /* osx */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8F9898DA18704F81003F5893 /* Build configuration list for PBXNativeTarget "osx" */; + buildPhases = ( + 8F9898CD18704F81003F5893 /* Sources */, + 8F9898CE18704F81003F5893 /* Frameworks */, + 8F9898CF18704F81003F5893 /* Copy Files */, + 490F86C81D7B54E100ED1162 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = osx; + productName = osx; + productReference = 8F9898D118704F81003F5893 /* osx */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 8F9898C918704F81003F5893 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + }; + buildConfigurationList = 8F9898CC18704F81003F5893 /* Build configuration list for PBXProject "osx" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 8F9898C818704F81003F5893; + productRefGroup = 8F9898D218704F81003F5893 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8F9898D018704F81003F5893 /* osx */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8F9898CD18704F81003F5893 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8FB0B68C187B77E700677F13 /* snd_mem.c in Sources */, + 8F989A3C18706878003F5893 /* r_part.c in Sources */, + 8F9899C718705244003F5893 /* net_wso.c in Sources */, + 8F98992018705138003F5893 /* wad.c in Sources */, + 8F9899B718705244003F5893 /* net_bsd.c in Sources */, + 8F9899CB18705244003F5893 /* pr_exec.c in Sources */, + 8F98999E18705244003F5893 /* gl_mesh.c in Sources */, + 8F9899AC18705244003F5893 /* host.c in Sources */, + 8F9899A118705244003F5893 /* gl_rlight.c in Sources */, + 8F98998518705244003F5893 /* cl_input.c in Sources */, + 8F98991E18705138003F5893 /* view.c in Sources */, + 8F98998818705244003F5893 /* cl_tent.c in Sources */, + 8F9899BA18705244003F5893 /* net_dgrm.c in Sources */, + 8F98992118705138003F5893 /* world.c in Sources */, + 8F98998618705244003F5893 /* cl_main.c in Sources */, + 8F9899C318705244003F5893 /* net_vcr.c in Sources */, + 8F9899A418705244003F5893 /* gl_rsurf.c in Sources */, + 8F98998318705244003F5893 /* chase.c in Sources */, + 8F98998D18705244003F5893 /* crc.c in Sources */, + 8F9899A518705244003F5893 /* gl_screen.c in Sources */, + 8F98998118705244003F5893 /* cd_null.c in Sources */, + 8F9899C918705244003F5893 /* pr_cmds.c in Sources */, + 8F9899A218705244003F5893 /* gl_rmain.c in Sources */, + 8F98998A18705244003F5893 /* common.c in Sources */, + 8F9899B218705244003F5893 /* mathlib.c in Sources */, + 8F9899B118705244003F5893 /* keys.c in Sources */, + 8F98998918705244003F5893 /* cmd.c in Sources */, + 8F989A391870669E003F5893 /* gl_vidglfw.c in Sources */, + 8F9899BE18705244003F5893 /* net_main.c in Sources */, + 8F98990D18705138003F5893 /* sv_phys.c in Sources */, + 8F98990E18705138003F5893 /* sv_user.c in Sources */, + 8F9899DA18705244003F5893 /* sbar.c in Sources */, + 8F9899CA18705244003F5893 /* pr_edict.c in Sources */, + 8F9899B318705244003F5893 /* menu.c in Sources */, + 8F9899A618705244003F5893 /* gl_test.c in Sources */, + 8F9899BD18705244003F5893 /* net_loop.c in Sources */, + 8F98998718705244003F5893 /* cl_parse.c in Sources */, + 8F98999F18705244003F5893 /* gl_model.c in Sources */, + 8F98990B18705138003F5893 /* sv_main.c in Sources */, + 8F9899A318705244003F5893 /* gl_rmisc.c in Sources */, + 8F98999D18705244003F5893 /* gl_draw.c in Sources */, + 8F98998E18705244003F5893 /* cvar.c in Sources */, + 8F9899C218705244003F5893 /* net_udp.c in Sources */, + 8F98990C18705138003F5893 /* sv_move.c in Sources */, + 49FA5CAB1876C779007C0DDE /* snd_openal.c in Sources */, + 8F989A401870A096003F5893 /* sys_bsd.c in Sources */, + 8F98992218705138003F5893 /* zone.c in Sources */, + 8F9899AB18705244003F5893 /* host_cmd.c in Sources */, + 8F98998418705244003F5893 /* cl_demo.c in Sources */, + 8F98998C18705244003F5893 /* console.c in Sources */, + 8F9899AA18705244003F5893 /* gl_warp.c in Sources */, + 8F9899A018705244003F5893 /* gl_refrag.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 8F9898D818704F81003F5893 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "GLQUAKE=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.9; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 8F9898D918704F81003F5893 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PREPROCESSOR_DEFINITIONS = "GLQUAKE=1"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.9; + SDKROOT = macosx; + }; + name = Release; + }; + 8F9898DB18704F81003F5893 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; + CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; + CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; + GCC_WARN_UNUSED_PARAMETER = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + /usr/local/include, + "../fmod//api/lowlevel/inc", + ); + LIBRARY_SEARCH_PATHS = ( + /usr/local/lib, + ../fmod/api/lowlevel/lib, + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 8F9898DC18704F81003F5893 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; + CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; + CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_UNUSED_PARAMETER = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + /usr/local/include, + "../fmod//api/lowlevel/inc", + ); + LIBRARY_SEARCH_PATHS = ( + /usr/local/lib, + ../fmod/api/lowlevel/lib, + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 8F9898CC18704F81003F5893 /* Build configuration list for PBXProject "osx" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8F9898D818704F81003F5893 /* Debug */, + 8F9898D918704F81003F5893 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8F9898DA18704F81003F5893 /* Build configuration list for PBXNativeTarget "osx" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8F9898DB18704F81003F5893 /* Debug */, + 8F9898DC18704F81003F5893 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 8F9898C918704F81003F5893 /* Project object */; +} diff --git a/WinQuake/osx/osx.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/WinQuake/osx/osx.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..3a735051a --- /dev/null +++ b/WinQuake/osx/osx.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/WinQuake/osx/osx.xcodeproj/project.xcworkspace/xcshareddata/osx.xccheckout b/WinQuake/osx/osx.xcodeproj/project.xcworkspace/xcshareddata/osx.xccheckout new file mode 100644 index 000000000..c5727ee2c --- /dev/null +++ b/WinQuake/osx/osx.xcodeproj/project.xcworkspace/xcshareddata/osx.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + D849CAEC-1124-4A92-AD54-9FB499DB8F0E + IDESourceControlProjectName + osx + IDESourceControlProjectOriginsDictionary + + 372C7207-49BF-4943-8EB8-65497F37DA4B + ssh://github.com/marcomorain/Quake.git + + IDESourceControlProjectPath + WinQuake/osx/osx.xcodeproj/project.xcworkspace + IDESourceControlProjectRelativeInstallPathDictionary + + 372C7207-49BF-4943-8EB8-65497F37DA4B + ../../../.. + + IDESourceControlProjectURL + ssh://github.com/marcomorain/Quake.git + IDESourceControlProjectVersion + 110 + IDESourceControlProjectWCCIdentifier + 372C7207-49BF-4943-8EB8-65497F37DA4B + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + 372C7207-49BF-4943-8EB8-65497F37DA4B + IDESourceControlWCCName + Quake + + + + diff --git a/WinQuake/osx/osx.xcodeproj/xcshareddata/xcschemes/osx.xcscheme b/WinQuake/osx/osx.xcodeproj/xcshareddata/xcschemes/osx.xcscheme new file mode 100644 index 000000000..83bd75429 --- /dev/null +++ b/WinQuake/osx/osx.xcodeproj/xcshareddata/xcschemes/osx.xcscheme @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WinQuake/osx/osx/osx.1 b/WinQuake/osx/osx/osx.1 new file mode 100644 index 000000000..75211ea6a --- /dev/null +++ b/WinQuake/osx/osx/osx.1 @@ -0,0 +1,79 @@ +.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples. +.\"See Also: +.\"man mdoc.samples for a complete listing of options +.\"man mdoc for the short list of editing options +.\"/usr/share/misc/mdoc.template +.Dd 29/12/2013 \" DATE +.Dt osx 1 \" Program name and manual section number +.Os Darwin +.Sh NAME \" Section Header - required - don't modify +.Nm osx, +.\" The following lines are read in generating the apropos(man -k) database. Use only key +.\" words here as the database is built based on the words here and in the .ND line. +.Nm Other_name_for_same_program(), +.Nm Yet another name for the same program. +.\" Use .Nm macro to designate other names for the documented program. +.Nd This line parsed for whatis database. +.Sh SYNOPSIS \" Section Header - required - don't modify +.Nm +.Op Fl abcd \" [-abcd] +.Op Fl a Ar path \" [-a path] +.Op Ar file \" [file] +.Op Ar \" [file ...] +.Ar arg0 \" Underlined argument - use .Ar anywhere to underline +arg2 ... \" Arguments +.Sh DESCRIPTION \" Section Header - required - don't modify +Use the .Nm macro to refer to your program throughout the man page like such: +.Nm +Underlining is accomplished with the .Ar macro like this: +.Ar underlined text . +.Pp \" Inserts a space +A list of items with descriptions: +.Bl -tag -width -indent \" Begins a tagged list +.It item a \" Each item preceded by .It macro +Description of item a +.It item b +Description of item b +.El \" Ends the list +.Pp +A list of flags and their descriptions: +.Bl -tag -width -indent \" Differs from above in tag removed +.It Fl a \"-a flag as a list item +Description of -a flag +.It Fl b +Description of -b flag +.El \" Ends the list +.Pp +.\" .Sh ENVIRONMENT \" May not be needed +.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1 +.\" .It Ev ENV_VAR_1 +.\" Description of ENV_VAR_1 +.\" .It Ev ENV_VAR_2 +.\" Description of ENV_VAR_2 +.\" .El +.Sh FILES \" File used or created by the topic of the man page +.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact +.It Pa /usr/share/file_name +FILE_1 description +.It Pa /Users/joeuser/Library/really_long_file_name +FILE_2 description +.El \" Ends the list +.\" .Sh DIAGNOSTICS \" May not be needed +.\" .Bl -diag +.\" .It Diagnostic Tag +.\" Diagnostic informtion here. +.\" .It Diagnostic Tag +.\" Diagnostic informtion here. +.\" .El +.Sh SEE ALSO +.\" List links in ascending order by section, alphabetically within a section. +.\" Please do not reference files that do not exist without filing a bug report +.Xr a 1 , +.Xr b 1 , +.Xr c 1 , +.Xr a 2 , +.Xr b 2 , +.Xr a 3 , +.Xr b 3 +.\" .Sh BUGS \" Document known, unremedied bugs +.\" .Sh HISTORY \" Document history if command behaves in a unique manner \ No newline at end of file diff --git a/WinQuake/snd_mem.c b/WinQuake/snd_mem.c index 71e32aa05..0bc50aa0f 100644 --- a/WinQuake/snd_mem.c +++ b/WinQuake/snd_mem.c @@ -21,7 +21,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" -int cache_full_cycle; +struct Todo { + int speed; +}; + +static struct Todo data = {11025}; +struct Todo* shm = &data; + + byte *S_Alloc (int size); @@ -94,7 +101,7 @@ void ResampleSfx (sfx_t *sfx, int inrate, int inwidth, byte *data) S_LoadSound ============== */ -sfxcache_t *S_LoadSound (sfx_t *s) +sfxcache_t *S_LoadSound (const sfx_t *s) { char namebuffer[256]; byte *data; @@ -114,7 +121,7 @@ sfxcache_t *S_LoadSound (sfx_t *s) Q_strcpy(namebuffer, "sound/"); Q_strcat(namebuffer, s->name); -// Con_Printf ("loading %s\n",namebuffer); + //Con_Printf ("loading %s\n",namebuffer); data = COM_LoadStackFile(namebuffer, stackbuf, sizeof(stackbuf)); @@ -148,7 +155,8 @@ sfxcache_t *S_LoadSound (sfx_t *s) ResampleSfx (s, sc->speed, sc->width, data + info.dataofs); - return sc; + + return sc; } diff --git a/WinQuake/snd_openal.c b/WinQuake/snd_openal.c new file mode 100644 index 000000000..124ae7098 --- /dev/null +++ b/WinQuake/snd_openal.c @@ -0,0 +1,664 @@ +/* +Copyright (C) 1996-1997 Id Software, Inc. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "quakedef.h" +#include "assert.h" +#include "fmod.h" + +enum { + MAX_SFX = 512, +}; + +struct Sound { + FMOD_SYSTEM* system; + int num_sfx; + sfx_t known_sfx[MAX_SFX]; + sfx_t ambient_sfx[NUM_AMBIENTS]; +}; + +// From SND DMA +channel_t channels[MAX_CHANNELS] = {}; // TODO: heap allocate? +int total_channels; +vec_t sound_nominal_clip_dist=1000.0; +int paintedtime; // sample PAIRS +vec3_t listener_origin; +vec3_t listener_forward; +vec3_t listener_right; +vec3_t listener_up; + +static qboolean snd_ambient = 1; +static struct Sound sound = {}; + +cvar_t bgmvolume = {"bgmvolume", "1", true}; +cvar_t volume = {"volume", "0.7", true}; +cvar_t nosound = {"nosound", "0"}; +cvar_t precache = {"precache", "1"}; +cvar_t loadas8bit = {"loadas8bit", "0"}; + + +static float INCHES_PER_METER = 39.3701f; + +static void check_error(FMOD_RESULT result); + +static inline FMOD_VECTOR FromVec3(const vec3_t v) { + + FMOD_VECTOR result; + result.x = v[0]; + result.y = v[1]; + result.z = v[2]; + return result; +} + +void S_Init (void) +{ + + Cvar_RegisterVariable(&nosound); + Cvar_RegisterVariable(&volume); + Cvar_RegisterVariable(&bgmvolume); + Cvar_RegisterVariable(&precache); + Cvar_RegisterVariable(&loadas8bit); + + FMOD_RESULT result = FMOD_System_Create(&sound.system); + + if (result != FMOD_OK) { + Con_SafePrintf("Error opening FMOD device.\n"); + } + + // TODO: extra driver data + result = FMOD_System_Init(sound.system, MAX_SFX, FMOD_INIT_NORMAL, NULL); + check_error(result); + + + // TODO: test FMOD to inches + result = FMOD_System_Set3DSettings(sound.system, 1.0, INCHES_PER_METER, 1.0f); + check_error(result); + + + sound.num_sfx = 0; +} + +void S_AmbientOff (void) +{ + snd_ambient = 0; +} + +void S_AmbientOn (void) +{ + snd_ambient = 1; +} + +void S_Shutdown (void) +{ + FMOD_RESULT result; + result = FMOD_System_Close(sound.system); + result = FMOD_System_Release(sound.system); + + // TODO: check results + + memset(&sound, 0, sizeof(struct Sound)); +} + +void S_TouchSound (char *sample) +{ +} + +void S_ClearBuffer (void) +{ +} + +static void play(const sfx_t* sfx, channel_t* channel, const vec3_t position) +{ + // TODO: play + + FMOD_CHANNEL* channelOut = NULL; + + FMOD_RESULT result; + result = FMOD_System_PlaySound(sound.system, sfx->fmod_sound, 0, true, &channelOut); + + check_error(result); + channel->channel = channelOut; + + //const int sid = channel->openal_source; + //alSourcei(sid, AL_BUFFER, channel->sfx->openal_buffer); + //check_error(); + + result = FMOD_Channel_SetVolume(channelOut, channel->master_vol/255.0f); + check_error(result); + + + + //alSourcef(sid, AL_GAIN, channel->master_vol/255.0f); + //check_error(); + + FMOD_VECTOR pos = FromVec3(position); + FMOD_Channel_Set3DAttributes(channelOut, &pos, 0, 0); + + FMOD_Channel_SetVolumeRamp(channelOut, false); + check_error(result); + FMOD_Channel_SetPaused(channelOut, false); + check_error(result); + + + //alSourcei(sid, AL_SAMPLE_OFFSET, channel->pos); + //alSourcefv(sid, AL_POSITION, position_metric); + //check_error(); + //alSourcePlay(sid); + //check_error(); + +} + +/* +================= +S_StaticSound +================= +*/ +void S_StaticSound (sfx_t *sfx, vec3_t origin, float vol, float attenuation) +{ + return; // TODO - don't return + + channel_t *ss; + sfxcache_t *sc; + + if (!sfx) + return; + + if (total_channels == MAX_CHANNELS) + { + Con_Printf ("total_channels == MAX_CHANNELS\n"); + return; + } + + ss = &channels[total_channels]; + total_channels++; + + sc = S_LoadSound (sfx); + if (!sc) + return; + + if (sc->loopstart == -1) + { + Con_Printf ("Sound %s not looped\n", sfx->name); + return; + } + + ss->sfx = sfx; + VectorCopy (origin, ss->origin); + ss->master_vol = vol; + ss->dist_mult = (attenuation/64) / sound_nominal_clip_dist; + ss->end = paintedtime + sc->length; + + play(sfx, ss, origin); +} + + +void S_StartSound (int entnum, int entchannel, const sfx_t *sfx, vec3_t origin, float fvol, float attenuation) { + + if (!sound.system) { + return; + } + + if (!sfx) { + return; + } + + if (nosound.value) { + return; + } + + const int vol = fvol*255; + + + // pick a channel to play on + channel_t* target_chan = SND_PickChannel(entnum, entchannel); + if (!target_chan) { + return; + } + + + //const int openal_source = target_chan->openal_source; + + // spatialize + memset (target_chan, 0, sizeof(*target_chan)); + VectorCopy(origin, target_chan->origin); + target_chan->dist_mult = attenuation / sound_nominal_clip_dist; + target_chan->master_vol = vol; + target_chan->entnum = entnum; + target_chan->entchannel = entchannel; + //target_chan->openal_source = openal_source; + + // TODO: put this in + //if (!target_chan->leftvol && !target_chan->rightvol) + // return; // not audible at all + + // new channel + sfxcache_t* sc = S_LoadSound (sfx); + if (!sc) + { + target_chan->sfx = NULL; + return; // couldn't load the sound's data + } + + target_chan->sfx = sfx; + target_chan->pos = 0.0; + target_chan->end = paintedtime + sc->length; + + // if an identical sound has also been started this frame, offset the pos + // a bit to keep it from just making the first one louder + channel_t* check = &channels[NUM_AMBIENTS]; + + for (int ch_idx=NUM_AMBIENTS ; ch_idx < NUM_AMBIENTS + MAX_DYNAMIC_CHANNELS ; ch_idx++, check++) + { + if (check == target_chan) + continue; + if (check->sfx == sfx && !check->pos) + { + const int speed = 11025; + int skip = rand () % (int)(0.1*speed); + if (skip >= target_chan->end) + skip = target_chan->end - 1; + // TODO: skip for sounds that collide + //target_chan->pos += skip; + //target_chan->end -= skip; + break; + } + + } + + // TODO: remove channels and use FMOD instead + + play(sfx, target_chan, origin); +} + +void S_StopSound(int entnum, int entchannel) +{ + for (int i=0 ; i= MAX_QPATH) + Sys_Error ("Sound name too long: %s", name); + + // see if already loaded + int i; + for (i=0 ; i < s->num_sfx ; i++) + if (!Q_strcmp(s->known_sfx[i].name, name)) + return &s->known_sfx[i]; + + if (s->num_sfx == MAX_SFX) + Sys_Error ("S_FindName: out of sfx_t"); + + // Not found - set the filename and return + // some memory to load the sound into. + sfx_t* result = s->known_sfx + i; + strcpy(result->name, name); +// Con_Printf("Precache sound [%d] %s\n", i, name); + s->num_sfx++; + return result; +} + + +static const char *FMOD_ErrorString(FMOD_RESULT errcode) +{ + switch (errcode) + { + /*$ preserve end $*/ + case FMOD_OK: return "No errors."; + case FMOD_ERR_BADCOMMAND: return "Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound)."; + case FMOD_ERR_CHANNEL_ALLOC: return "Error trying to allocate a channel."; + case FMOD_ERR_CHANNEL_STOLEN: return "The specified channel has been reused to play another sound."; + case FMOD_ERR_DMA: return "DMA Failure. See debug output for more information."; + case FMOD_ERR_DSP_CONNECTION: return "DSP connection error. Connection possibly caused a cyclic dependency or connected dsps with incompatible buffer counts."; + case FMOD_ERR_DSP_DONTPROCESS: return "DSP return code from a DSP process query callback. Tells mixer not to call the process callback and therefore not consume CPU. Use this to optimize the DSP graph."; + case FMOD_ERR_DSP_FORMAT: return "DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format, or a matrix may have been set with the wrong size if the target unit has a specified channel map."; + case FMOD_ERR_DSP_INUSE: return "DSP is already in the mixer's DSP network. It must be removed before being reinserted or released."; + case FMOD_ERR_DSP_NOTFOUND: return "DSP connection error. Couldn't find the DSP unit specified."; + case FMOD_ERR_DSP_RESERVED: return "DSP operation error. Cannot perform operation on this DSP as it is reserved by the system."; + case FMOD_ERR_DSP_SILENCE: return "DSP return code from a DSP process query callback. Tells mixer silence would be produced from read, so go idle and not consume CPU. Use this to optimize the DSP graph."; + case FMOD_ERR_DSP_TYPE: return "DSP operation cannot be performed on a DSP of this type."; + case FMOD_ERR_FILE_BAD: return "Error loading file."; + case FMOD_ERR_FILE_COULDNOTSEEK: return "Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format."; + case FMOD_ERR_FILE_DISKEJECTED: return "Media was ejected while reading."; + case FMOD_ERR_FILE_EOF: return "End of file unexpectedly reached while trying to read essential data (truncated?)."; + case FMOD_ERR_FILE_ENDOFDATA: return "End of current chunk reached while trying to read data."; + case FMOD_ERR_FILE_NOTFOUND: return "File not found."; + case FMOD_ERR_FORMAT: return "Unsupported file or audio format."; + case FMOD_ERR_HEADER_MISMATCH: return "There is a version mismatch between the FMOD header and either the FMOD Studio library or the FMOD Low Level library."; + case FMOD_ERR_HTTP: return "A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere."; + case FMOD_ERR_HTTP_ACCESS: return "The specified resource requires authentication or is forbidden."; + case FMOD_ERR_HTTP_PROXY_AUTH: return "Proxy authentication is required to access the specified resource."; + case FMOD_ERR_HTTP_SERVER_ERROR: return "A HTTP server error occurred."; + case FMOD_ERR_HTTP_TIMEOUT: return "The HTTP request timed out."; + case FMOD_ERR_INITIALIZATION: return "FMOD was not initialized correctly to support this function."; + case FMOD_ERR_INITIALIZED: return "Cannot call this command after System::init."; + case FMOD_ERR_INTERNAL: return "An error occurred that wasn't supposed to. Contact support."; + case FMOD_ERR_INVALID_FLOAT: return "Value passed in was a NaN, Inf or denormalized float."; + case FMOD_ERR_INVALID_HANDLE: return "An invalid object handle was used."; + case FMOD_ERR_INVALID_PARAM: return "An invalid parameter was passed to this function."; + case FMOD_ERR_INVALID_POSITION: return "An invalid seek position was passed to this function."; + case FMOD_ERR_INVALID_SPEAKER: return "An invalid speaker was passed to this function based on the current speaker mode."; + case FMOD_ERR_INVALID_SYNCPOINT: return "The syncpoint did not come from this sound handle."; + case FMOD_ERR_INVALID_THREAD: return "Tried to call a function on a thread that is not supported."; + case FMOD_ERR_INVALID_VECTOR: return "The vectors passed in are not unit length, or perpendicular."; + case FMOD_ERR_MAXAUDIBLE: return "Reached maximum audible playback count for this sound's soundgroup."; + case FMOD_ERR_MEMORY: return "Not enough memory or resources."; + case FMOD_ERR_MEMORY_CANTPOINT: return "Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used."; + case FMOD_ERR_NEEDS3D: return "Tried to call a command on a 2d sound when the command was meant for 3d sound."; + case FMOD_ERR_NEEDSHARDWARE: return "Tried to use a feature that requires hardware support."; + case FMOD_ERR_NET_CONNECT: return "Couldn't connect to the specified host."; + case FMOD_ERR_NET_SOCKET_ERROR: return "A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere."; + case FMOD_ERR_NET_URL: return "The specified URL couldn't be resolved."; + case FMOD_ERR_NET_WOULD_BLOCK: return "Operation on a non-blocking socket could not complete immediately."; + case FMOD_ERR_NOTREADY: return "Operation could not be performed because specified sound/DSP connection is not ready."; + case FMOD_ERR_OUTPUT_ALLOCATED: return "Error initializing output device, but more specifically, the output device is already in use and cannot be reused."; + case FMOD_ERR_OUTPUT_CREATEBUFFER: return "Error creating hardware sound buffer."; + case FMOD_ERR_OUTPUT_DRIVERCALL: return "A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted."; + case FMOD_ERR_OUTPUT_FORMAT: return "Soundcard does not support the specified format."; + case FMOD_ERR_OUTPUT_INIT: return "Error initializing output device."; + case FMOD_ERR_OUTPUT_NODRIVERS: return "The output device has no drivers installed. If pre-init, FMOD_OUTPUT_NOSOUND is selected as the output mode. If post-init, the function just fails."; + case FMOD_ERR_PLUGIN: return "An unspecified error has been returned from a plugin."; + case FMOD_ERR_PLUGIN_MISSING: return "A requested output, dsp unit type or codec was not available."; + case FMOD_ERR_PLUGIN_RESOURCE: return "A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback)"; + case FMOD_ERR_PLUGIN_VERSION: return "A plugin was built with an unsupported SDK version."; + case FMOD_ERR_RECORD: return "An error occurred trying to initialize the recording device."; + case FMOD_ERR_REVERB_CHANNELGROUP: return "Reverb properties cannot be set on this channel because a parent channelgroup owns the reverb connection."; + case FMOD_ERR_REVERB_INSTANCE: return "Specified instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number or the reverb doesn't exist."; + case FMOD_ERR_SUBSOUNDS: return "The error occurred because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have. The operation may also not be able to be performed on a parent sound."; + case FMOD_ERR_SUBSOUND_ALLOCATED: return "This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent's entry first."; + case FMOD_ERR_SUBSOUND_CANTMOVE: return "Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file."; + case FMOD_ERR_TAGNOTFOUND: return "The specified tag could not be found or there are no tags."; + case FMOD_ERR_TOOMANYCHANNELS: return "The sound created exceeds the allowable input channel count. This can be increased using the 'maxinputchannels' parameter in System::setSoftwareFormat."; + case FMOD_ERR_TRUNCATED: return "The retrieved string is too long to fit in the supplied buffer and has been truncated."; + case FMOD_ERR_UNIMPLEMENTED: return "Something in FMOD hasn't been implemented when it should be! contact support!"; + case FMOD_ERR_UNINITIALIZED: return "This command failed because System::init or System::setDriver was not called."; + case FMOD_ERR_UNSUPPORTED: return "A command issued was not supported by this object. Possibly a plugin without certain callbacks specified."; + case FMOD_ERR_VERSION: return "The version number of this file format is not supported."; + case FMOD_ERR_EVENT_ALREADY_LOADED: return "The specified bank has already been loaded."; + case FMOD_ERR_EVENT_LIVEUPDATE_BUSY: return "The live update connection failed due to the game already being connected."; + case FMOD_ERR_EVENT_LIVEUPDATE_MISMATCH: return "The live update connection failed due to the game data being out of sync with the tool."; + case FMOD_ERR_EVENT_LIVEUPDATE_TIMEOUT: return "The live update connection timed out."; + case FMOD_ERR_EVENT_NOTFOUND: return "The requested event, bus or vca could not be found."; + case FMOD_ERR_STUDIO_UNINITIALIZED: return "The Studio::System object is not yet initialized."; + case FMOD_ERR_STUDIO_NOT_LOADED: return "The specified resource is not loaded, so it can't be unloaded."; + case FMOD_ERR_INVALID_STRING: return "An invalid string was passed to this function."; + case FMOD_ERR_ALREADY_LOCKED: return "The specified resource is already locked."; + case FMOD_ERR_NOT_LOCKED: return "The specified resource is not locked, so it can't be unlocked."; + case FMOD_ERR_RECORD_DISCONNECTED: return "The specified recording driver has been disconnected."; + case FMOD_ERR_TOOMANYSAMPLES: return "The length provided exceeds the allowable limit."; + default : return "Unknown error."; + }; +} + + + +static void check_error(FMOD_RESULT result) { + if (result != FMOD_OK) { + Con_Printf("FMOD error %d - %s", result, FMOD_ErrorString(result)); + assert(0); + } +} + +static void load(const char* name, sfx_t* dest) +{ + + if (!sound.system) { + return; + } + + S_LoadSound(dest); + + sfxcache_t* cached = dest->cache.data; + + FMOD_RESULT result; + FMOD_MODE mode = FMOD_OPENMEMORY_POINT | FMOD_OPENRAW | FMOD_3D; + + FMOD_CREATESOUNDEXINFO e = {}; // init to zero. + + e.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); + e.length = cached->length; + e.numchannels = 1; + e.defaultfrequency = cached->speed; + + switch (cached->width) { + case 1: + e.format = FMOD_SOUND_FORMAT_PCM8; + break; + + case 2: + e.format = FMOD_SOUND_FORMAT_PCM16; + break; + + default: + assert(0); + } + + + + + + + FMOD_SOUND* newSound = NULL; + + result = FMOD_System_CreateSound(sound.system, cached->data, mode, &e, &newSound); + check_error(result); + + result = FMOD_Sound_Set3DMinMaxDistance(newSound, 0.5f * INCHES_PER_METER, 5000.0f * INCHES_PER_METER); + check_error(result); + + dest->fmod_sound = newSound; + + /*const int format = AL_FORMAT_MONO16; + + ALuint buffer = 0; + alGenBuffers(1, &buffer); + check_error(); + dest->openal_buffer = buffer; + alBufferData(buffer, format, cached->data, cached->length, cached->speed / 2); + check_error(); + */ + + // TODO: load sample + + printf("loading %s\n", name); +} + + +/* + ================= + SND_PickChannel + ================= + */ +channel_t *SND_PickChannel(int entnum, int entchannel) +{ + int ch_idx; + int first_to_die; + int life_left; + + // Check for replacement sound, or find the best one to replace + first_to_die = -1; + life_left = 0x7fffffff; + for (ch_idx=NUM_AMBIENTS ; ch_idx < NUM_AMBIENTS + MAX_DYNAMIC_CHANNELS ; ch_idx++) + { + if (entchannel != 0 // channel 0 never overrides + && channels[ch_idx].entnum == entnum + && (channels[ch_idx].entchannel == entchannel || entchannel == -1) ) + { // allways override sound from same entity + first_to_die = ch_idx; + break; + } + + // don't let monster sounds override player sounds + if (channels[ch_idx].entnum == cl.viewentity && entnum != cl.viewentity && channels[ch_idx].sfx) + continue; + + if (channels[ch_idx].end - paintedtime < life_left) + { + life_left = channels[ch_idx].end - paintedtime; + first_to_die = ch_idx; + } + } + + if (first_to_die == -1) + return NULL; + + if (channels[first_to_die].sfx) + channels[first_to_die].sfx = NULL; + + return &channels[first_to_die]; +} + +/* + ================== + S_PrecacheSound + + ================== + */ +sfx_t *S_PrecacheSound (char *name) +{ + assert(sound.system); + + sfx_t* result = S_FindName(&sound, name); + if (precache.value) { + load(name, result); + } + return result; +} + +void S_ClearPrecache (void) +{ +} + + +void S_Update (vec3_t origin, vec3_t forward, vec3_t right, vec3_t up) +{ + VectorCopy(origin, listener_origin); + VectorCopy(forward, listener_forward); + VectorCopy(right, listener_right); + VectorCopy(up, listener_up); + + FMOD_VECTOR fmpos = FromVec3(origin); + FMOD_VECTOR fmvel = {}; + FMOD_VECTOR fmforward = FromVec3(forward); + FMOD_VECTOR fmup = FromVec3(up); + + FMOD_RESULT result; + result = FMOD_System_Set3DListenerAttributes(sound.system, 0, &fmpos, &fmvel, &fmforward, &fmup); + + check_error(result); + + float orientation[6]; + for (int i=0; i<3; i++) { + orientation[i] = forward[i]; + orientation[i+3] = up[i]; + } + + // alListenerfv(AL_POSITION, origin); + // alListenerfv(AL_ORIENTATION, orientation); + + result = FMOD_System_Update(sound.system); + check_error(result); + + // TODO: FMOD_SYSTEM_CALLBACK +} + +void S_StopAllSounds (qboolean clear) +{ + if (!sound.system) + return; + + total_channels = MAX_DYNAMIC_CHANNELS + NUM_AMBIENTS; // no statics + + for (int i=0; iopenal_buffer); +// check_error(); + + + // TODO: destroy sound + FMOD_RESULT result = FMOD_Sound_Release(sfx->fmod_sound); + check_error(result); + sfx->fmod_sound = NULL; + } + sound.num_sfx = 0; +} + +void S_BeginPrecaching (void) +{ +} + +void S_EndPrecaching (void) +{ +} + +void S_ExtraUpdate (void) +{ +} + +void S_LocalSound (char *name) +{ + if (nosound.value) + return; + + if (!sound.system) + return; + + const sfx_t* sfx = S_PrecacheSound (name); + if (!sfx) + { + Con_Printf ("S_LocalSound: can't cache %s\n", sound); + return; + } + S_StartSound (cl.viewentity, -1, sfx, vec3_origin, 1, 1); +} + diff --git a/WinQuake/sound.h b/WinQuake/sound.h index 1ba08d3f6..6e34b9476 100644 --- a/WinQuake/sound.h +++ b/WinQuake/sound.h @@ -32,10 +32,14 @@ typedef struct int right; } portable_samplepair_t; + +struct FMOD_SOUND; + typedef struct sfx_s { char name[MAX_QPATH]; cache_user_t cache; + struct FMOD_SOUND* fmod_sound; } sfx_t; // !!! if this is changed, it much be changed in asm_i386.h too !!! @@ -63,12 +67,14 @@ typedef struct unsigned char *buffer; } dma_t; + +struct FMOD_CHANNEL; // !!! if this is changed, it much be changed in asm_i386.h too !!! typedef struct { sfx_t *sfx; // sfx number - int leftvol; // 0-255 volume - int rightvol; // 0-255 volume +// int leftvol; // 0-255 volume +// int rightvol; // 0-255 volume int end; // end time in global paintsamples int pos; // sample position in sfx int looping; // where to loop, -1 = no looping @@ -77,6 +83,9 @@ typedef struct vec3_t origin; // origin of sound effect vec_t dist_mult; // distance multiplier (attenuation/clipK) int master_vol; // 0-255 master volume + + // OpenAL + struct FMOD_CHANNEL* channel; } channel_t; typedef struct @@ -92,7 +101,7 @@ typedef struct void S_Init (void); void S_Startup (void); void S_Shutdown (void); -void S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation); +void S_StartSound (int entnum, int entchannel, const sfx_t *sfx, vec3_t origin, float fvol, float attenuation); void S_StaticSound (sfx_t *sfx, vec3_t origin, float vol, float attenuation); void S_StopSound (int entnum, int entchannel); void S_StopAllSounds(qboolean clear); @@ -151,7 +160,7 @@ extern vec3_t listener_origin; extern vec3_t listener_forward; extern vec3_t listener_right; extern vec3_t listener_up; -extern volatile dma_t *shm; +//extern volatile dma_t *shm; TODO: put this back extern volatile dma_t sn; extern vec_t sound_nominal_clip_dist; @@ -164,7 +173,7 @@ extern qboolean snd_initialized; extern int snd_blocked; void S_LocalSound (char *s); -sfxcache_t *S_LoadSound (sfx_t *s); +sfxcache_t *S_LoadSound (const sfx_t *s); wavinfo_t GetWavinfo (char *name, byte *wav, int wavlength); diff --git a/WinQuake/sys.h b/WinQuake/sys.h index c5d61a7f7..5d508a42c 100644 --- a/WinQuake/sys.h +++ b/WinQuake/sys.h @@ -46,7 +46,7 @@ void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length); // void Sys_DebugLog(char *file, char *fmt, ...); -void Sys_Error (char *error, ...); +void Sys_Error (char *error, ...) __attribute__((__noreturn__)); // an error will cause the entire program to exit void Sys_Printf (char *fmt, ...); diff --git a/WinQuake/sys_bsd.c b/WinQuake/sys_bsd.c new file mode 100644 index 000000000..d277b2229 --- /dev/null +++ b/WinQuake/sys_bsd.c @@ -0,0 +1,445 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "quakedef.h" + +qboolean isDedicated; + +int nostdout = 0; + +char *basedir = "."; +char *cachedir = "/tmp"; + +cvar_t sys_linerefresh = {"sys_linerefresh","0"};// set for entity display + +// ======================================================================= +// General routines +// ======================================================================= + +void Sys_DebugNumber(int y, int val) +{ +} + +/* +void Sys_Printf (char *fmt, ...) +{ + va_list argptr; + char text[1024]; + + va_start (argptr,fmt); + vsprintf (text,fmt,argptr); + va_end (argptr); + fprintf(stderr, "%s", text); + + Con_Print (text); +} + +void Sys_Printf (char *fmt, ...) +{ + + va_list argptr; + char text[1024], *t_p; + int l, r; + + if (nostdout) + return; + + va_start (argptr,fmt); + vsprintf (text,fmt,argptr); + va_end (argptr); + + l = strlen(text); + t_p = text; + +// make sure everything goes through, even though we are non-blocking + while (l) + { + r = write (1, text, l); + if (r != l) + sleep (0); + if (r > 0) + { + t_p += r; + l -= r; + } + } + +} +*/ + +void Sys_Printf (char *fmt, ...) +{ + va_list argptr; + char text[1024]; + unsigned char *p; + + va_start (argptr,fmt); + vsnprintf(text,1024, fmt,argptr); + va_end (argptr); + + if (strlen(text) > sizeof(text)) { + Sys_Error("memory overwrite in Sys_Printf"); + } + + if (nostdout) + return; + + for (p = (unsigned char *)text; *p; p++) { + *p &= 0x7f; + if ((*p > 128 || *p < 32) && *p != 10 && *p != 13 && *p != 9) + printf("[%02x]", *p); + else + putc(*p, stdout); + } +} + +void Sys_Quit (void) +{ + Host_Shutdown(); + fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY); + fflush(stdout); + exit(0); +} + +void Sys_Init(void) +{ +#if id386 + Sys_SetFPCW(); +#endif +} + +void Sys_Error (char *error, ...) +{ + va_list argptr; + char string[1024]; + +// change stdin to non blocking + fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY); + + va_start (argptr,error); + vsprintf (string,error,argptr); + va_end (argptr); + fprintf(stderr, "Error: %s\n", string); + + Host_Shutdown (); + exit (1); + +} + +void Sys_Warn (char *warning, ...) +{ + va_list argptr; + char string[1024]; + + va_start (argptr,warning); + vsprintf (string,warning,argptr); + va_end (argptr); + fprintf(stderr, "Warning: %s", string); +} + +/* +============ +Sys_FileTime + +returns -1 if not present +============ +*/ +int Sys_FileTime (char *path) +{ + struct stat buf; + + if (stat (path,&buf) == -1) + return -1; + + return buf.st_mtime; +} + + +void Sys_mkdir (char *path) +{ + mkdir (path, 0777); +} + +int Sys_FileOpenRead (char *path, int *handle) +{ + int h; + struct stat fileinfo; + + + h = open (path, O_RDONLY, 0666); + *handle = h; + if (h == -1) + return -1; + + if (fstat (h,&fileinfo) == -1) + Sys_Error ("Error fstating %s", path); + + return fileinfo.st_size; +} + +int Sys_FileOpenWrite (char *path) +{ + int handle; + + umask (0); + + handle = open(path,O_RDWR | O_CREAT | O_TRUNC + , 0666); + + if (handle == -1) + Sys_Error ("Error opening %s: %s", path,strerror(errno)); + + return handle; +} + +int Sys_FileWrite (int handle, void *src, int count) +{ + return write (handle, src, count); +} + +void Sys_FileClose (int handle) +{ + close (handle); +} + +void Sys_FileSeek (int handle, int position) +{ + lseek (handle, position, SEEK_SET); +} + +int Sys_FileRead (int handle, void *dest, int count) +{ + return read (handle, dest, count); +} + +void Sys_DebugLog(char *file, char *fmt, ...) +{ + va_list argptr; + static char data[1024]; + int fd; + + va_start(argptr, fmt); + vsprintf(data, fmt, argptr); + va_end(argptr); +// fd = open(file, O_WRONLY | O_BINARY | O_CREAT | O_APPEND, 0666); + fd = open(file, O_WRONLY | O_CREAT | O_APPEND, 0666); + write(fd, data, strlen(data)); + close(fd); +} + +void Sys_EditFile(char *filename) +{ + + char cmd[256]; + char *term; + char *editor; + + term = getenv("TERM"); + if (term && !strcmp(term, "xterm")) + { + editor = getenv("VISUAL"); + if (!editor) + editor = getenv("EDITOR"); + if (!editor) + editor = getenv("EDIT"); + if (!editor) + editor = "vi"; + sprintf(cmd, "xterm -e %s %s", editor, filename); + system(cmd); + } + +} + +double Sys_FloatTime (void) +{ + struct timeval tp; + struct timezone tzp; + static int secbase; + + gettimeofday(&tp, &tzp); + + if (!secbase) + { + secbase = tp.tv_sec; + return tp.tv_usec/1000000.0; + } + + return (tp.tv_sec - secbase) + tp.tv_usec/1000000.0; +} + +// ======================================================================= +// Sleeps for microseconds +// ======================================================================= + +static volatile int oktogo; + +void alarm_handler(int x) +{ + oktogo=1; +} + +void Sys_LineRefresh(void) +{ +} + +void floating_point_exception_handler(int whatever) +{ +// Sys_Warn("floating point exception\n"); + signal(SIGFPE, floating_point_exception_handler); +} + +char *Sys_ConsoleInput(void) +{ + static char text[256]; + int len; + fd_set fdset; + struct timeval timeout; + + if (cls.state == ca_dedicated) { + FD_ZERO(&fdset); + FD_SET(0, &fdset); // stdin + timeout.tv_sec = 0; + timeout.tv_usec = 0; + if (select (1, &fdset, NULL, NULL, &timeout) == -1 || !FD_ISSET(0, &fdset)) + return NULL; + + len = read (0, text, sizeof(text)); + if (len < 1) + return NULL; + text[len-1] = 0; // rip off the /n and terminate + + return text; + } + return NULL; +} + +#if !id386 +void Sys_HighFPPrecision (void) +{ +} + +void Sys_LowFPPrecision (void) +{ +} +#endif + +int main (int c, char **v) +{ + + double time, oldtime, newtime; + quakeparms_t parms; + extern int vcrFile; + extern int recording; + int j; + +// static char cwd[1024]; + +// signal(SIGFPE, floating_point_exception_handler); + signal(SIGFPE, SIG_IGN); + + memset(&parms, 0, sizeof(parms)); + + COM_InitArgv(c, v); + parms.argc = com_argc; + parms.argv = com_argv; + +#ifdef GLQUAKE + parms.memsize = 16*1024*1024; +#else + parms.memsize = 8*1024*1024; +#endif + + j = COM_CheckParm("-mem"); + if (j) + parms.memsize = (int) (Q_atof(com_argv[j+1]) * 1024 * 1024); + parms.membase = malloc (parms.memsize); + + parms.basedir = basedir; +// caching is disabled by default, use -cachedir to enable +// parms.cachedir = cachedir; + + fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY); + + Host_Init(&parms); + + Sys_Init(); + + if (COM_CheckParm("-nostdout")) + nostdout = 1; + else { + fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY); + printf ("Linux Quake -- Version %0.3f\n", LINUX_VERSION); + } + + oldtime = Sys_FloatTime () - 0.1; + while (1) + { +// find time spent rendering last frame + newtime = Sys_FloatTime (); + time = newtime - oldtime; + + if (cls.state == ca_dedicated) + { // play vcrfiles at max speed + if (time < sys_ticrate.value && (vcrFile == -1 || recording) ) + { + usleep(1); + continue; // not time to run a server only tic yet + } + time = sys_ticrate.value; + } + + if (time > sys_ticrate.value*2) + oldtime = newtime; + else + oldtime += time; + + Host_Frame (time); + +// graphic debugging aids + if (sys_linerefresh.value) + Sys_LineRefresh (); + } + +} + + +/* +================ +Sys_MakeCodeWriteable +================ +*/ +void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length) +{ + + int r; + unsigned long addr; + int psize = getpagesize(); + + addr = (startaddr & ~(psize-1)) - psize; + +// fprintf(stderr, "writable code %lx(%lx)-%lx, length=%lx\n", startaddr, +// addr, startaddr+length, length); + + r = mprotect((char*)addr, length + startaddr - addr + psize, 7); + + if (r < 0) + Sys_Error("Protection change failed\n"); + +} + diff --git a/WinQuake/sys_null.c b/WinQuake/sys_null.c index 057d61de7..cbc4886da 100644 --- a/WinQuake/sys_null.c +++ b/WinQuake/sys_null.c @@ -22,6 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" #include "errno.h" +qboolean isDedicated = false; + /* ===============================================================================