Removed Watcom Compiler support.
This commit is contained in:
parent
02db356511
commit
c948a59391
20 changed files with 19 additions and 1480 deletions
|
@ -7,7 +7,7 @@
|
|||
#ifndef _missions
|
||||
#define _missions 1
|
||||
|
||||
#if ( defined( __WATCOMC__ ) || defined( _MSC_VER ) )
|
||||
#if defined( _MSC_VER )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#ifndef _consbind_hpp
|
||||
#define _consbind_hpp 1
|
||||
|
||||
#if ( defined( __WATCOMC__ ) || defined( _MSC_VER ) )
|
||||
#if defined( _MSC_VER )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#ifndef _consbtch
|
||||
#define _consbtch 1
|
||||
|
||||
#if ( defined( __WATCOMC__ ) || defined( _MSC_VER ) )
|
||||
#if defined( _MSC_VER )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#ifndef _dcontext
|
||||
#define _dcontext 1
|
||||
|
||||
#if ( defined( __WATCOMC__ ) || defined( _MSC_VER ) )
|
||||
#if defined( _MSC_VER )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#ifndef _reflist_hpp
|
||||
#define _reflist_hpp 1
|
||||
|
||||
#if ( defined( __WATCOMC__ ) || defined( _MSC_VER ) )
|
||||
#if defined( _MSC_VER )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef _tallfont
|
||||
#define _tallfont 1
|
||||
|
||||
#if ( defined( __WATCOMC__ ) || defined( _MSC_VER ) )
|
||||
#if defined( _MSC_VER )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#ifndef _wrapstr_hpp
|
||||
#define _wrapstr_hpp 1
|
||||
|
||||
#if ( defined( __WATCOMC__ ) || defined( _MSC_VER ) )
|
||||
#if defined( _MSC_VER )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef _conscmnd
|
||||
#define _conscmnd 1
|
||||
|
||||
#if ( defined( __WATCOMC__ ) || defined( _MSC_VER ) )
|
||||
#if defined( _MSC_VER )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#ifndef _conssym_hpp
|
||||
#define _conssym_hpp 1
|
||||
|
||||
#if ( defined( __WATCOMC__ ) || defined( _MSC_VER ) )
|
||||
#if defined( _MSC_VER )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#ifndef _consvar_hpp
|
||||
#define _consvar_hpp 1
|
||||
|
||||
#if ( defined( __WATCOMC__ ) || defined( _MSC_VER ) )
|
||||
#if defined( _MSC_VER )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
|
|
@ -98,12 +98,6 @@ static unsigned char DefaultD3DTextureFilterMax;
|
|||
|
||||
#if SuppressWarnings
|
||||
static int* itemptr_tmp;
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#pragma warning 389 5
|
||||
#pragma message("Note: Disabled Warning W389 'Integral value may be truncated...'")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -278,11 +278,7 @@ D3DAppErrorToString(HRESULT error)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#define LOGFILE_NAME "dx_error.log"
|
||||
#else
|
||||
#define LOGFILE_NAME "dx_errorM.log"
|
||||
#endif
|
||||
#define LOGFILE_NAME "dx_errorM.log"
|
||||
|
||||
static LOGFILE * dxlog = 0;
|
||||
static int closed_once = 0;
|
||||
|
|
|
@ -839,17 +839,8 @@ template <class TYPE> class HashTable;
|
|||
#define HT_WATCOM_DEFINE_FOR_SIMPLE_TYPE(TYPE) \
|
||||
class HashTable<TYPE> HT_DEFINITION(TYPE,TYPE,TYPE)
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
|
||||
//watcom generartes errors if template<> is added to the start of the line - Richard.
|
||||
#define HT_DEFINE_FOR_SIMPLE_TYPE(SIMPLE_TYPE) HT_WATCOM_DEFINE_FOR_SIMPLE_TYPE(SIMPLE_TYPE)
|
||||
|
||||
#else
|
||||
|
||||
#define HT_DEFINE_FOR_SIMPLE_TYPE(SIMPLE_TYPE) template<> HT_WATCOM_DEFINE_FOR_SIMPLE_TYPE(SIMPLE_TYPE)
|
||||
|
||||
#endif
|
||||
|
||||
HT_DEFINE_FOR_SIMPLE_TYPE(unsigned long)
|
||||
HT_DEFINE_FOR_SIMPLE_TYPE(signed long)
|
||||
HT_DEFINE_FOR_SIMPLE_TYPE(unsigned)
|
||||
|
|
1276
src/win95/inline.h
1276
src/win95/inline.h
File diff suppressed because it is too large
Load diff
|
@ -100,24 +100,16 @@ struct List_Member_Base
|
|||
union
|
||||
{
|
||||
List_Member_Base<T> *prev;
|
||||
#ifndef __WATCOMC__
|
||||
List_Member<T> *prev_debug; // encourage the debugger to display the list members data
|
||||
#endif // hopefully casting from base to derived class would not
|
||||
// hopefully casting from base to derived class would not
|
||||
// cause the actual value of the ptr to change, so the debugger
|
||||
// will display the information correctly, and this union
|
||||
// won't cause any kind of performance hit
|
||||
|
||||
//watcom doesn't appear to like this, unfortunately.
|
||||
|
||||
|
||||
|
||||
};
|
||||
union
|
||||
{
|
||||
List_Member_Base<T> *next;
|
||||
#ifndef __WATCOMC__
|
||||
List_Member<T> *next_debug;
|
||||
#endif
|
||||
};
|
||||
virtual ~List_Member_Base() {}
|
||||
};
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
#ifndef _INCLUDED_MEDIA_HPP_
|
||||
#define _INCLUDED_MEDIA_HPP_
|
||||
|
||||
//#if defined(_WIN32) || defined(WIN32) || defined(WINDOWS) || defined(_WINDOWS)
|
||||
// #define _MEDIA_WIN_TARGET
|
||||
// #include <windows.h>
|
||||
//#endif // WIN32 || _WIN32 || WINDOWS || _WINDOWS
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
@ -29,10 +23,6 @@ void MediaRead(MediaMedium * pThis, TYPE * p);
|
|||
template <class TYPE>
|
||||
void MediaWrite(MediaMedium * pThis, TYPE d);
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
template <class TYPE> class _Media_CompilerHack;
|
||||
#endif
|
||||
|
||||
class MediaMedium
|
||||
{
|
||||
protected:
|
||||
|
@ -284,15 +274,10 @@ class MediaMedium
|
|||
friend class _Media_CompilerHack;
|
||||
};
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
template <class TYPE>
|
||||
#endif
|
||||
class _Media_CompilerHack
|
||||
{
|
||||
public:
|
||||
#ifndef __WATCOMC__
|
||||
template <class TYPE>
|
||||
#endif
|
||||
static inline void MediaRead(MediaMedium * pThis, TYPE * p)
|
||||
{
|
||||
if (pThis->m_nReadBufPos + sizeof(TYPE) <= pThis->m_nBufSize)
|
||||
|
@ -317,9 +302,7 @@ class _Media_CompilerHack
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef __WATCOMC__
|
||||
template <class TYPE>
|
||||
#endif
|
||||
static inline void MediaWrite(MediaMedium * pThis, TYPE d)
|
||||
{
|
||||
if (pThis->m_nWriteBufPos + sizeof(TYPE) <= pThis->m_nBufSize)
|
||||
|
@ -353,11 +336,7 @@ class _Media_CompilerHack
|
|||
template <class TYPE>
|
||||
inline void MediaRead(MediaMedium * pThis, TYPE * p)
|
||||
{
|
||||
_Media_CompilerHack
|
||||
#ifdef __WATCOMC__
|
||||
<TYPE>
|
||||
#endif
|
||||
::MediaRead(pThis,p);
|
||||
_Media_CompilerHack::MediaRead(pThis,p);
|
||||
}
|
||||
|
||||
// use this to write simple data types
|
||||
|
@ -368,11 +347,7 @@ inline void MediaRead(MediaMedium * pThis, TYPE * p)
|
|||
template <class TYPE>
|
||||
inline void MediaWrite(MediaMedium * pThis, TYPE d)
|
||||
{
|
||||
_Media_CompilerHack
|
||||
#ifdef __WATCOMC__
|
||||
<TYPE>
|
||||
#endif
|
||||
::MediaWrite(pThis,d);
|
||||
_Media_CompilerHack::MediaWrite(pThis,d);
|
||||
}
|
||||
|
||||
#ifdef _MEDIA_WIN_TARGET
|
||||
|
|
|
@ -87,16 +87,7 @@ extern void MMXAsm_VectorDot(void);
|
|||
extern void MMXAsm_VectorDot16(void);
|
||||
|
||||
/* inline calls to MMX functions with correct parameters set */
|
||||
#ifdef __WATCOMC__
|
||||
|
||||
#pragma aux MMX_VectorTransform = "call MMXAsm_VectorTransform" parm [eax] [edx];
|
||||
#pragma aux MMX_VectorTransformed = "call MMXAsm_VectorTransformed" parm [eax] [edx] [ecx];
|
||||
#pragma aux MMX_VectorTransformAndAdd = "call MMXAsm_VectorTransformAndAdd" parm [eax] [edx] [ecx];
|
||||
#pragma aux MMX_VectorTransformedAndAdd = "call MMXAsm_VectorTransformedAndAdd" parm [eax] [edx] [ecx] [ebx];
|
||||
#pragma aux MMX_VectorDot = "call MMXAsm_VectorDot" parm [eax] [edx] value [eax];
|
||||
#pragma aux MMX_VectorDot16 = "call MMXAsm_VectorDot16" parm [eax] [edx] value [eax];
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
_asmcall void MMX_VectorTransform(struct vectorch * vector, struct matrixch const * matrix)
|
||||
{
|
||||
|
@ -187,119 +178,7 @@ extern int use_mmx_math;
|
|||
extern const __int64 mmx_sign_mask;
|
||||
extern const __int64 mmx_one_fixed_h;
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
|
||||
#pragma aux MMXInline_VectorDot = \
|
||||
\
|
||||
" movq mm0,[edx]" \
|
||||
\
|
||||
" movd mm2,[edx+08h]" \
|
||||
" movq mm4,mm0" \
|
||||
\
|
||||
" pand mm4,mmx_sign_mask" \
|
||||
" movq mm6,mm2" \
|
||||
\
|
||||
" movq mm1,[eax]" \
|
||||
" paddd mm4,mm4" \
|
||||
\
|
||||
" movd mm3,[eax+08h]" \
|
||||
" movq mm5,mm1" \
|
||||
\
|
||||
" pand mm6,mmx_sign_mask" \
|
||||
" movq mm7,mm3" \
|
||||
\
|
||||
" pand mm5,mmx_sign_mask" \
|
||||
" paddd mm6,mm6" \
|
||||
\
|
||||
" pand mm7,mmx_sign_mask" \
|
||||
" paddd mm5,mm5" \
|
||||
\
|
||||
" paddd mm0,mm4" \
|
||||
" paddd mm2,mm6" \
|
||||
\
|
||||
" paddd mm7,mm7" \
|
||||
" movq mm4,mm2" \
|
||||
\
|
||||
" punpcklwd mm4,mm0" \
|
||||
" paddd mm1,mm5" \
|
||||
\
|
||||
" punpckhwd mm2,mm0" \
|
||||
" paddd mm3,mm7" \
|
||||
\
|
||||
" movq mm5,mm3" \
|
||||
" punpckhwd mm3,mm1" \
|
||||
\
|
||||
" punpcklwd mm5,mm1" \
|
||||
" movq mm0,mm2" \
|
||||
\
|
||||
" movq mm1,mm4" \
|
||||
" pmaddwd mm0,mm3" \
|
||||
\
|
||||
" movq mm6,mm3" \
|
||||
" psrlq mm3,32" \
|
||||
\
|
||||
" movq mm7,mm5" \
|
||||
" punpckldq mm3,mm6" \
|
||||
\
|
||||
" pmaddwd mm1,mm5" \
|
||||
" psrlq mm5,32" \
|
||||
\
|
||||
" punpckldq mm5,mm7" \
|
||||
" pmaddwd mm2,mm3" \
|
||||
\
|
||||
" pmaddwd mm4,mm5" \
|
||||
" movq mm3,mm0" \
|
||||
\
|
||||
" punpckldq mm0,mm1" \
|
||||
\
|
||||
" psubd mm0,mmx_one_fixed_h" \
|
||||
" punpckhdq mm1,mm3" \
|
||||
\
|
||||
" psrad mm0,16" \
|
||||
" paddd mm2,mm4" \
|
||||
\
|
||||
" pslld mm1,16" \
|
||||
" paddd mm2,mm0" \
|
||||
\
|
||||
" paddd mm2,mm1" \
|
||||
\
|
||||
" movq mm1,mm2" \
|
||||
" psrlq mm2,32" \
|
||||
\
|
||||
" paddd mm1,mm2" \
|
||||
\
|
||||
" movd eax,mm1" \
|
||||
\
|
||||
" emms" \
|
||||
\
|
||||
" inc eax" \
|
||||
\
|
||||
parm [eax] [edx] value [eax];
|
||||
|
||||
#pragma aux MMXInline_VectorDot16 = \
|
||||
\
|
||||
" movd mm0,[edx+08h]" \
|
||||
\
|
||||
" packssdw mm0,[edx]" \
|
||||
\
|
||||
" movd mm1,[eax+08h]" \
|
||||
\
|
||||
" packssdw mm1,[eax]" \
|
||||
\
|
||||
" pmaddwd mm0,mm1" \
|
||||
\
|
||||
" movq mm1,mm0" \
|
||||
" psrlq mm0,32" \
|
||||
\
|
||||
" paddd mm0,mm1" \
|
||||
\
|
||||
" movd eax,mm0" \
|
||||
\
|
||||
" emms" \
|
||||
\
|
||||
parm [eax] [edx] value [eax];
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
_asminline signed MMXInline_VectorDot(struct vectorch const * v1, struct vectorch const * v2)
|
||||
{
|
||||
|
|
|
@ -486,8 +486,6 @@ void ShapePointsInstr(SHAPEINSTR *shapeinstrptr)
|
|||
together, divides the summed product with another integer and then returns
|
||||
the result of that divide, which is also an integer.
|
||||
|
||||
It is not inlined for Watcom C, although the functions it calls ARE.
|
||||
|
||||
*/
|
||||
|
||||
int WideMul2NarrowDiv(int a, int b, int c, int d, int e)
|
||||
|
@ -1109,9 +1107,6 @@ void MaxLONGLONGCH(LONGLONGCH *llarrayptr, int llarraysize, LONGLONGCH *llmax)
|
|||
|
||||
Some operators derived from the 64-bit CMP function.
|
||||
|
||||
These were first defined for pcwatcom\plspecfn.h and transferred as and
|
||||
when needed to other platforms.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
#ifndef _included_string_hpp_
|
||||
#define _included_string_hpp_
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#include <string.hpp>
|
||||
#else
|
||||
|
||||
#ifndef __cplusplus
|
||||
#error "string.hpp requires C++ compilation"
|
||||
#endif
|
||||
|
@ -179,5 +175,3 @@ inline int valid(String const & str)
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -253,12 +253,7 @@ BOOL WaitForRasterThread()
|
|||
mssetup api
|
||||
*/
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
|
||||
unsigned int GetCPUId(void);
|
||||
#pragma aux GetCPUId = "mov eax,1" "cpuid" value [edx] modify [eax ebx ecx];
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
static unsigned int GetCPUId(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue