aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon
diff options
context:
space:
mode:
authoricculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-26 07:46:21 +0000
committericculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-26 07:46:21 +0000
commit441c7633e0aa67faa91dc5896ee83e6c29de0ba6 (patch)
treeed6f97f0be5940123e9e3f244ae91a475787ff64 /code/qcommon
parentb0c6a473e2a34000db73c75bc0ff43bba45fddb2 (diff)
downloadioquake3-aero-441c7633e0aa67faa91dc5896ee83e6c29de0ba6.tar.gz
ioquake3-aero-441c7633e0aa67faa91dc5896ee83e6c29de0ba6.zip
Mac OS X work...lots of little changes that touch a lot of random places.
Still work to be done, but this at least matches the PowerPC Linux status now. MacOS-specific directory (and XCode project) is gone...this now uses SDL, OpenAL, and the Unix Makefiles. --ryan. git-svn-id: svn://svn.icculus.org/quake3/trunk@373 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon')
-rw-r--r--code/qcommon/common.c9
-rw-r--r--code/qcommon/q_platform.h6
-rw-r--r--code/qcommon/vm_ppc_new.c2
3 files changed, 15 insertions, 2 deletions
diff --git a/code/qcommon/common.c b/code/qcommon/common.c
index 5676daa..690d5bd 100644
--- a/code/qcommon/common.c
+++ b/code/qcommon/common.c
@@ -66,6 +66,7 @@ cvar_t *com_fixedtime;
cvar_t *com_dropsim; // 0.0 to 1.0, simulated packet drops
cvar_t *com_journal;
cvar_t *com_maxfps;
+cvar_t *com_altivec;
cvar_t *com_timedemo;
cvar_t *com_sv_running;
cvar_t *com_cl_running;
@@ -2425,6 +2426,7 @@ void Com_Init( char *commandLine ) {
//
// init commands and vars
//
+ com_altivec = Cvar_Get ("com_altivec", "1", CVAR_ARCHIVE);
com_maxfps = Cvar_Get ("com_maxfps", "85", CVAR_ARCHIVE);
com_blood = Cvar_Get ("com_blood", "1", CVAR_ARCHIVE);
@@ -2507,7 +2509,12 @@ void Com_Init( char *commandLine ) {
Cvar_Set("ui_singlePlayerActive", "0");
com_fullyInitialized = qtrue;
- Com_Printf ("--- Common Initialization Complete ---\n");
+
+ #if idppc_altivec
+ Com_Printf ("Altivec support is %s\n", com_altivec->integer ? "enabled" : "disabled");
+ #endif
+
+ Com_Printf ("--- Common Initialization Complete ---\n");
}
//==================================================================
diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h
index 870a4cc..f68676f 100644
--- a/code/qcommon/q_platform.h
+++ b/code/qcommon/q_platform.h
@@ -51,6 +51,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define idppc_altivec 0
#endif
+#if (MACOS_X) // Apple's GCC does this differently than the FSF.
+ #define VECCONST_UINT8(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) (vector unsigned char) (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)
+#else
+ #define VECCONST_UINT8(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) (vector unsigned char) {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}
+#endif
+
#endif
#ifndef __ASM_I386__ // don't include the C bits if included from qasm.h
diff --git a/code/qcommon/vm_ppc_new.c b/code/qcommon/vm_ppc_new.c
index 955b136..17cc405 100644
--- a/code/qcommon/vm_ppc_new.c
+++ b/code/qcommon/vm_ppc_new.c
@@ -1820,7 +1820,7 @@ asm (
#if defined(MACOS_X) && defined(__OPTIMIZE__)
// On Mac OS X, gcc doesn't push a frame when we are optimized, so trying to tear it down results in grave disorder.
-#warning Mac OS X optimization on, not popping GCC AsmCall frame
+//#warning Mac OS X optimization on, not popping GCC AsmCall frame
#else
// Mac OS X Server and unoptimized compiles include a GCC AsmCall frame
asm (