Pouze v OpenUT: .cproject
Pouze v OpenUT: .project
diff -c -r OpenUT.orig/Core/Inc/UnGnuG.h OpenUT/Core/Inc/UnGnuG.h
*** OpenUT.orig/Core/Inc/UnGnuG.h	2000-01-05 20:07:03.000000000 +0100
--- OpenUT/Core/Inc/UnGnuG.h	2009-01-04 11:27:26.000000000 +0100
***************
*** 27,33 ****
  class __Context
  {
  public:
! 	__Context() { Last = Env; }
  	~__Context() { Env = Last; }
  	static void StaticInit();
  	static jmp_buf Env;
--- 27,33 ----
  class __Context
  {
  public:
! 	__Context() { Env = Last; }
  	~__Context() { Env = Last; }
  	static void StaticInit();
  	static jmp_buf Env;
***************
*** 224,230 ****
  	{
  		DWORD L,H;
  		asm("rdtsc" : "=a" (L), "=d" (H));
! 		
  		return ((DOUBLE)L +  4294967296.0 * (DOUBLE)H) * GSecondsPerCycle;
  	}
  	else return appSecondsSlow();
--- 224,230 ----
  	{
  		DWORD L,H;
  		asm("rdtsc" : "=a" (L), "=d" (H));
! 
  		return ((DOUBLE)L +  4294967296.0 * (DOUBLE)H) * GSecondsPerCycle;
  	}
  	else return appSecondsSlow();
***************
*** 236,259 ****
  #define DEFINED_appMemcpy 1
  inline void appMemcpy( void* Dest, const void* Src, INT Count )
  {
! 	asm volatile("
! 		pushl %%ebx;
! 		pushl %%ecx;
! 		pushl %%esi;
! 		pushl %%edi;
! 		mov %%ecx, %%ebx;
! 		shr $2, %%ecx;
! 		and $3, %%ebx;
! 		rep;
! 		movsl;
! 		mov %%ebx, %%ecx;
! 		rep;
! 		movsb;
! 		popl %%edi;
! 		popl %%esi;
! 		popl %%ecx;
! 		popl %%ebx;
! 	"
  	:
  	: "S" (Src),
  	  "D" (Dest),
--- 236,258 ----
  #define DEFINED_appMemcpy 1
  inline void appMemcpy( void* Dest, const void* Src, INT Count )
  {
! 	asm volatile(
! 		"pushl %%ebx;"
! 		"pushl %%ecx;"
! 		"pushl %%esi;"
! 		"pushl %%edi;"
! 		"mov %%ecx, %%ebx;"
! 		"shr $2, %%ecx;"
! 		"and $3, %%ebx;"
! 		"rep;"
! 		"movsl;"
! 		"mov %%ebx, %%ecx;"
! 		"rep;"
! 		"movsb;"
! 		"popl %%edi;"
! 		"popl %%esi;"
! 		"popl %%ecx;"
! 		"popl %%ebx;"
  	:
  	: "S" (Src),
  	  "D" (Dest),
***************
*** 283,289 ****
  	extern CORE_API UBOOL GIsKatmai;
  	extern CORE_API UBOOL GIsK6;
  	extern CORE_API UBOOL GIs3DNow;
! 	extern CORE_API UBOOL GTimestamp;
  }
  
  // Module name
--- 282,288 ----
  	extern CORE_API UBOOL GIsKatmai;
  	extern CORE_API UBOOL GIsK6;
  	extern CORE_API UBOOL GIs3DNow;
! //	extern CORE_API UBOOL GTimestamp;
  }
  
  // Module name
diff -c -r OpenUT.orig/Core/Inc/UnMath.h OpenUT/Core/Inc/UnMath.h
*** OpenUT.orig/Core/Inc/UnMath.h	2000-01-05 20:07:09.000000000 +0100
--- OpenUT/Core/Inc/UnMath.h	2009-01-04 11:27:26.000000000 +0100
***************
*** 985,998 ****
  #elif ASMLINUX
  inline void ASMTransformPoint(const FCoords &Coords, const FVector &InVector, FVector &OutVector)
  {
! 	__asm__ __volatile__ ("
! 		# Get source.
! 		flds	0(%%esi);			# x
! 		flds	4(%%esi);			# y x
! 		flds	8(%%esi);			# z y x
  		fxch	%%st(2);
  
! 		# Subtract origin.
  		fsubs	0(%1);
  		fxch	%%st(1);
  		fsubs	4(%1);
--- 985,998 ----
  #elif ASMLINUX
  inline void ASMTransformPoint(const FCoords &Coords, const FVector &InVector, FVector &OutVector)
  {
! 	__asm__ __volatile__ (
! 		//Get source.
! 		flds	0(%%esi);			// x
! 		flds	4(%%esi);			// y x
! 		flds	8(%%esi);			// z y x
  		fxch	%%st(2);
  
! 		//Subtract origin.
  		fsubs	0(%1);
  		fxch	%%st(1);
  		fsubs	4(%1);
***************
*** 1000,1006 ****
  		fsubs	8(%1);
  		fxch	%%st(1);
  
! 		# Triplicate X for transforming.
  		fld		%%st(0);
  		fmuls	12(%1);
  		fld		%%st(1);
--- 1000,1006 ----
  		fsubs	8(%1);
  		fxch	%%st(1);
  
! 		//Triplicate X for transforming.
  		fld		%%st(0);
  		fmuls	12(%1);
  		fld		%%st(1);
***************
*** 1038,1044 ****
  		fstps	0(%%edi);
  		fstps	4(%%edi);
  		fstps	8(%%edi);
- 	"
  	:
  	:	"S" (&InVector),
  		"q" (&Coords),
--- 1038,1043 ----
***************
*** 1109,1123 ****
  #if ASMLINUX
  inline void ASMTransformVector(const FCoords &Coords, const FVector &InVector, FVector &OutVector)
  {
! 	asm volatile("
! 		# Get source.
  		flds	0(%%esi);
  		flds	4(%%esi);
  		fxch	%%st(1);
  		flds	8(%%esi);
  		fxch	%%st(1);
  
! 		# Triplicate X for transforming.
  		fld		%%st(0);
  		fmuls	12(%1);
  		fld		%%st(1);
--- 1108,1122 ----
  #if ASMLINUX
  inline void ASMTransformVector(const FCoords &Coords, const FVector &InVector, FVector &OutVector)
  {
! 	asm volatile(
! 		// Get source.
  		flds	0(%%esi);
  		flds	4(%%esi);
  		fxch	%%st(1);
  		flds	8(%%esi);
  		fxch	%%st(1);
  
! 		// Triplicate X for transforming.
  		fld		%%st(0);
  		fmuls	12(%1);
  		fld		%%st(1);
***************
*** 1155,1161 ****
  		fstps	0(%%edi);
  		fstps	4(%%edi);
  		fstps	8(%%edi);
- 	"
  	:
  	: "S" (&InVector),
  	  "q" (&Coords),
--- 1154,1159 ----
diff -c -r OpenUT.orig/Core/Inc/UnTemplate.h OpenUT/Core/Inc/UnTemplate.h
*** OpenUT.orig/Core/Inc/UnTemplate.h	2000-01-05 20:07:24.000000000 +0100
--- OpenUT/Core/Inc/UnTemplate.h	2009-01-04 11:27:26.000000000 +0100
***************
*** 670,676 ****
  	{
  		guardSlow(TTransArray::Empty);
  		if( GUndo )
! 			GUndo->SaveArray( Owner, this, 0, ArrayNum, -1, sizeof(T), SerializeItem, DestructItem );
  		TArray<T>::Empty( Slack );
  		unguardSlow;
  	}
--- 670,676 ----
  	{
  		guardSlow(TTransArray::Empty);
  		if( GUndo )
! 			GUndo->SaveArray( Owner, this, 0, TTransArray::ArrayNum, -1, sizeof(T), SerializeItem, DestructItem );
  		TArray<T>::Empty( Slack );
  		unguardSlow;
  	}
***************
*** 707,713 ****
  	INT AddUniqueItem( const T& Item )
  	{
  		guardSlow(TTransArray::AddUniqueItem);
! 		for( INT Index=0; Index<ArrayNum; Index++ )
  			if( (*this)(Index)==Item )
  				return Index;
  		return AddItem( Item );
--- 707,713 ----
  	INT AddUniqueItem( const T& Item )
  	{
  		guardSlow(TTransArray::AddUniqueItem);
! 		for( INT Index=0; Index<TTransArray::ArrayNum; Index++ )
  			if( (*this)(Index)==Item )
  				return Index;
  		return AddItem( Item );
***************
*** 716,726 ****
  	INT RemoveItem( const T& Item )
  	{
  		guardSlow(TTransArray::RemoveItem);
! 		INT OriginalNum=ArrayNum;
! 		for( INT Index=0; Index<ArrayNum; Index++ )
  			if( (*this)(Index)==Item )
  				Remove( Index-- );
! 		return OriginalNum - ArrayNum;
  		unguardSlow;
  	}
  
--- 716,726 ----
  	INT RemoveItem( const T& Item )
  	{
  		guardSlow(TTransArray::RemoveItem);
! 		INT OriginalNum=TTransArray::ArrayNum;
! 		for( INT Index=0; Index<TTransArray::ArrayNum; Index++ )
  			if( (*this)(Index)==Item )
  				Remove( Index-- );
! 		return OriginalNum - TTransArray::ArrayNum;
  		unguardSlow;
  	}
  
***************
*** 740,746 ****
  	{
  		guardSlow(TTransArray::ModifyAllItems);
  		if( GUndo )
! 			GUndo->SaveArray( Owner, this, 0, Num(), 0, sizeof(T), SerializeItem, DestructItem );
  		unguardSlow;
  	}
  	friend FArchive& operator<<( FArchive& Ar, TTransArray& A )
--- 740,746 ----
  	{
  		guardSlow(TTransArray::ModifyAllItems);
  		if( GUndo )
! 			GUndo->SaveArray( Owner, this, 0, TTransArray::Num(), 0, sizeof(T), SerializeItem, DestructItem );
  		unguardSlow;
  	}
  	friend FArchive& operator<<( FArchive& Ar, TTransArray& A )
***************
*** 897,903 ****
  				INT SkipCount;
  				Ar << AR_INDEX(SkipCount);
  				SeekPos = Ar.Tell() + SkipCount*sizeof(T);
! 					
  			}
  			else
  			{
--- 897,903 ----
  				INT SkipCount;
  				Ar << AR_INDEX(SkipCount);
  				SeekPos = Ar.Tell() + SkipCount*sizeof(T);
! 
  			}
  			else
  			{
***************
*** 931,937 ****
  	 if( SavedPos<0 && GLazyLoad )
  	 {
  		// Unload it now.
! 		Empty();
  		SavedPos *= -1;
  	 }
  	 unguard;
--- 931,937 ----
  	 if( SavedPos<0 && GLazyLoad )
  	 {
  		// Unload it now.
! 		 TLazyArray::Empty();
  		SavedPos *= -1;
  	 }
  	 unguard;
***************
*** 998,1004 ****
  	}
  	~FString()
  	{
! 		TArray<TCHAR>::Empty();		
  	}
  	void Empty()
  	{
--- 998,1004 ----
  	}
  	~FString()
  	{
! 		TArray<TCHAR>::Empty();
  	}
  	void Empty()
  	{
***************
*** 1343,1349 ****
  		INT HashNext;
  		TK Key;
  		TI Value;
! 		TPair( TTypeInfo<TK>::ConstInitType InKey, TTypeInfo<TI>::ConstInitType InValue )
  		: Key( InKey ), Value( InValue )
  		{}
  		TPair()
--- 1343,1349 ----
  		INT HashNext;
  		TK Key;
  		TI Value;
! 		TPair( TTypeInfo<TK>.ConstInitType InKey, TTypeInfo<TI>.ConstInitType InValue )
  		: Key( InKey ), Value( InValue )
  		{}
  		TPair()
***************
*** 1358,1400 ****
  	void Rehash()
  	{
  		guardSlow(TMapBase::Rehash);
! 		checkSlow(!(HashCount&(HashCount-1)));
! 		checkSlow(HashCount>=8);
! 		INT* NewHash = new(TEXT("HashMapHash"))INT[HashCount];
! 		{for( INT i=0; i<HashCount; i++ )
  		{
  			NewHash[i] = INDEX_NONE;
  		}}
! 		{for( INT i=0; i<Pairs.Num(); i++ )
  		{
! 			TPair& Pair    = Pairs(i);
! 			INT    iHash   = (GetTypeHash(Pair.Key) & (HashCount-1));
  			Pair.HashNext  = NewHash[iHash];
  			NewHash[iHash] = i;
  		}}
! 		if( Hash )
! 			delete Hash;
! 		Hash = NewHash;
  		unguardSlow;
  	}
  	void Relax()
  	{
  		guardSlow(TMapBase::Relax);
! 		while( HashCount>Pairs.Num()*2+8 )
! 			HashCount /= 2;
  		Rehash();
  		unguardSlow;
  	}
  	TI& Add( TTypeInfo<TK>::ConstInitType InKey, TTypeInfo<TI>::ConstInitType InValue )
  	{
  		guardSlow(TMapBase::Add);
! 		TPair& Pair   = *new(Pairs)TPair( InKey, InValue );
! 		INT    iHash  = (GetTypeHash(Pair.Key) & (HashCount-1));
! 		Pair.HashNext = Hash[iHash];
! 		Hash[iHash]   = Pairs.Num()-1;
! 		if( HashCount*2+8 < Pairs.Num() )
  		{
! 			HashCount *= 2;
  			Rehash();
  		}
  		return Pair.Value;
--- 1358,1400 ----
  	void Rehash()
  	{
  		guardSlow(TMapBase::Rehash);
! 		checkSlow(!(TMapBase::HashCount&(TMapBase::HashCount-1)));
! 		checkSlow(TMapBase::HashCount>=8);
! 		INT* NewHash = new(TEXT("HashMapHash"))INT[TMapBase::HashCount];
! 		{for( INT i=0; i<TMapBase::HashCount; i++ )
  		{
  			NewHash[i] = INDEX_NONE;
  		}}
! 		{for( INT i=0; i<TMapBase::Pairs.Num(); i++ )
  		{
! 			TPair& Pair    = TMapBase::Pairs(i);
! 			INT    iHash   = (GetTypeHash(Pair.Key) & (TMapBase::HashCount-1));
  			Pair.HashNext  = NewHash[iHash];
  			NewHash[iHash] = i;
  		}}
! 		if( TMapBase::Hash )
! 			delete TMapBase::Hash;
! 		TMapBase::Hash = NewHash;
  		unguardSlow;
  	}
  	void Relax()
  	{
  		guardSlow(TMapBase::Relax);
! 		while( TMapBase::HashCount>TMapBase::Pairs.Num()*2+8 )
! 			TMapBase::HashCount /= 2;
  		Rehash();
  		unguardSlow;
  	}
  	TI& Add( TTypeInfo<TK>::ConstInitType InKey, TTypeInfo<TI>::ConstInitType InValue )
  	{
  		guardSlow(TMapBase::Add);
! 		TPair& Pair   = *new(TMapBase::Pairs)TPair( InKey, InValue );
! 		INT    iHash  = (GetTypeHash(Pair.Key) & (TMapBase::HashCount-1));
! 		Pair.HashNext = TMapBase::Hash[iHash];
! 		TMapBase::Hash[iHash]   = TMapBase::Pairs.Num()-1;
! 		if( TMapBase::HashCount*2+8 < TMapBase::Pairs.Num() )
  		{
! 			TMapBase::HashCount *= 2;
  			Rehash();
  		}
  		return Pair.Value;
***************
*** 1550,1556 ****
  		TMapBase<TK,TI>::operator=( Other );
  		return *this;
  	}
! 	void MultiFind( const TK& Key, TArray<TI>& Values ) 
  	{
  		guardSlow(TMap::MultiFind);
  		for( INT i=Hash[(GetTypeHash(Key) & (HashCount-1))]; i!=INDEX_NONE; i=Pairs(i).HashNext )
--- 1550,1556 ----
  		TMapBase<TK,TI>::operator=( Other );
  		return *this;
  	}
! 	void MultiFind( const TK& Key, TArray<TI>& Values )
  	{
  		guardSlow(TMap::MultiFind);
  		for( INT i=Hash[(GetTypeHash(Key) & (HashCount-1))]; i!=INDEX_NONE; i=Pairs(i).HashNext )
***************
*** 1597,1603 ****
  ----------------------------------------------------------------------------*/
  
  //
! // Sort elements. The sort is unstable, meaning that the ordering of equal 
  // items is not necessarily preserved.
  //
  template<class T> struct TStack
--- 1597,1603 ----
  ----------------------------------------------------------------------------*/
  
  //
! // Sort elements. The sort is unstable, meaning that the ordering of equal
  // items is not necessarily preserved.
  //
  template<class T> struct TStack
Pouze v OpenUT: Debug
