TA3D Week 3 Code Notes for Zuff

Everything related to the code /
Tout ce qui touche au code
Post Reply
User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

TA3D Week 3 Code Notes for Zuff

Post by Cire » Mon Nov 27, 2006 8:41 pm

I finally managed to Snyc my copy of the source code with yours, there are a number of issues with the win32 build code that needs to be addressed, i'll start with TA3D_Platform.h

Just about at the end of TA3D_Platform.h you have a number of functions that u stripped off the 'T' exteion, as well you used min/max functions under everything but windows, which boggles my mind since macro here would clearly be superior. Also the other template functions should be usueful in later builds and you might wana retain them. Your code looks something similar to this, to which I already fixed it to compile under my compiler...

Code: Select all

#ifdef TA3D_PLATFORM_WINDOWS

// Min/max macros.
// Normally #defined by a Win32 header file
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))


template<class T> static void Swap (T &a, T &b)
{
    T temp;
    temp = a;
    a = b;
    b = temp;
    return;
}


// bit field mask operation macros
template<class T> static void SetMask (T &var, T &mask)
{
    var |= mask;
    return;
}


template<class T> static void UnsetMask (T &var, T &mask)
{
    var |= ~mask;
    return;
}


// ordinal bit manipulation macros  (least significant bit = bit "0")
template<class T> static T Bit (T &bit)
{
    return (1 << bit);
}


template<class T> static void SetBit (T &var, T &bit)
{
    return (SetMask (var, Bit(bit)));
}


template<class T> static void UnsetBit (T &var, T &bit)
{
    return (UnsetMask (var, Bit(bit)));
}


// Returns -1/1/0 for sign of a variable
template<class T> static T Sign (T x)
{
    if (x > 0)
        return (1);
    else
    if ( x < 0)
        return (-1);
    //else   
    return (0);
}

#else

inline int min(int a,int b)
{
	return (a<b ? a : b);
}

inline float min(float a,float b)
{
	return (a<b ? a : b);
}

inline int max(int a,int b)
{
	return (a<b ? b : a);
}

inline float max(float a,float b)
{
	return (a<b ? b : a);
}

#endif
Seriously this does NOT need to be platform specific, I'd change it to something like.

Code: Select all

// Min/max macros.
// Normally #defined by a Win32 header file
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))


template<class T> static void Swap (T &a, T &b)
{
    T temp;
    temp = a;
    a = b;
    b = temp;
    return;
}


// bit field mask operation macros
template<class T> static void SetMask (T &var, T &mask)
{
    var |= mask;
    return;
}


template<class T> static void UnsetMask (T &var, T &mask)
{
    var |= ~mask;
    return;
}


// ordinal bit manipulation macros  (least significant bit = bit "0")
template<class T> static T Bit (T &bit)
{
    return (1 << bit);
}


template<class T> static void SetBit (T &var, T &bit)
{
    return (SetMask (var, Bit(bit)));
}


template<class T> static void UnsetBit (T &var, T &bit)
{
    return (UnsetMask (var, Bit(bit)));
}


// Returns -1/1/0 for sign of a variable
template<class T> static T Sign (T x)
{
    if (x > 0)
        return (1);
    else
    if ( x < 0)
        return (-1);
    //else   
    return (0);
}
If you insist on having min/max as functions, then use this.

Code: Select all

template<class T> static inline T max( T a, T b )
{
	return ( ((a) > (b)) ? a : b );
}

template<class T> static inline T min( T a, T b )
{
	return ( ((a) < (b)) ? a : b );
}
This should expand anywhere u min/max types such as float/int/double whatever. Its alot less code then writting various function overoads for differnt variables. It should even work for classes ect that have operators of the > and <.

++Cire.

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Mon Nov 27, 2006 8:55 pm

In The file stdafx.h, where it includes gl support you only have:

Code: Select all

// Cire:
//   Now to include allegro openGL support.
#include <alleggl.h>
Mine has an additional include so that it don't need to be include elsewhere in code, like so.

Code: Select all

// Cire:
//   Now to include allegro openGL support.
#include <alleggl.h>
#include <GL/glu.h>

In the constant area where it defines the min/max of variable types mine looks like...

Code: Select all

   // Now that the types are defined, create min/max constants
	const uint64 uint64max =  0xffffffffffffffff;
	const uint64 uint64min =                   0;
	const sint64 sint64max =  0x7fffffffffffffff;
	const sint64 sint64min = (-9223372036854775807i64 - 1);

	const uint32 uint32max =  0xffffffff;
	const uint32 uint32min =           0;
	const sint32 sint32max =  0x7fffffff;
	const sint32 sint32min = (-2147483647i32 - 1);

	const uint16 uint16max =  0xffff;
	const uint16 uint16min =       0;
	const sint16 sint16max =  0x7fff;
	const sint16 sint16min = -0x8000;

   const uint8  uint8max  =  0xff;
   const uint8  uint8min  =     0;
   const sint8  sint8max  =  0x7f;
   const sint8  sint8min  = -0x80;

   const uchar  ucharmax  =  0xff;
   const uchar  ucharmin  =     0;
   const schar  scharmax  =  0x7f;
   const schar  scharmin  = -0x80;
Now It seems to me that you were saying that linux does not support 8 bit variables, so we might wana drop 64's from our typedefs before someone unexpectantly uses them, if you opt to drop them please let me know so i can remove them from windows defs as well.

Finally you include the file TA3D_hpi.h in this file so that you can later place it as a external in the namespace TA3D:VARS, we really do NOT want to include project fiels that may change within stdafx.h. Since this file generates pch (Pre-Compiled Headers), and is really meant to compile things that may not change often, and will not recompile itself unless some file in includes changes. So I removed including of TA3D_hpi.h, as well as the namespace VARS (moved to ta3dbase.h

++Cire.
Last edited by Cire on Mon Nov 27, 2006 10:46 pm, edited 1 time in total.

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Mon Nov 27, 2006 9:09 pm

network.h and socketclass are throwing tons of compile issues, they include tons of includes that are not windows and thus the code needs to be fixed to be more platform safe, for now I commented out 'network.h' in ta3dbase.h

PLEASE INCLUDE "stdafx.h" as your first include in all cpp files!!!! All other .h files should pick up everything that is included within stdafx.h and its includes, there is NO reason to include any files that stdafx.h includes, in either your .h files or .cpp files!

++Cire.

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Mon Nov 27, 2006 9:21 pm

There are still issues tring to compile gaf.cpp, with dynamic arrays, in the function...read_gaf_img there is code like...

Code: Select all

	GAFFRAMEENTRY frame[entry.Frames];
This must be fixed to compile correctly.


In console.h, function StartRecording(char *file)

I changed the code slightly from...

Code: Select all

    log=fopen(file,"wb");
to...

Code: Select all

#if defined TA3D_PLATFORM_WINDOWS
      fopen_s( &log, file, "wb" );
#else
		log=fopen(file,"wb");		// Create the file
#endif
This is one of those damn depreciation functions, and I can't really find a macro for a work around. Yes I can disable deprecation, but I prefer to keep it active, it builds a more secure and stable application. The fopen_s function will throw a error_t if you want to check against errors.

++Cire.

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Mon Nov 27, 2006 9:42 pm

In ta3dbase.h i moved the following defines to stdafx.h in the TA3D Namespace.

Code: Select all

	#define TA3D_ENGINE_VERSION	"Version 0.2.4"
	#define DEBUG_MODE

The second include file in ta3dbase.h now includes TA3D_HPI.h, it also has a #pragma once at the start of the file.

The opeing code for ta3dbase.h now looks like.

Code: Select all

using namespace std;
using namespace TA3D;
using namespace TA3D::UTILS::HPI;

namespace TA3D
{
	namespace VARS
	{
		extern FONT *aglfont;
		extern RGB *pal;

		extern cHPIHandler *HPIManager;
	}
}

using namespace TA3D::VARS;
There are a bunch more definations, and variables that are located in ta3dbase.h that should be moved to the TA3D namespace as well, As a rule I suggest that we move constants to stdafx.h TA3D namespace, and variables into ta3dbase.h in VARS namespace.

Code: Select all

	enum TA3D_LANG
	{
		ENGLISH	= 0x0,
                                FRENCH	= 0x1,
                                GERMAN	= 0x2,
                                SPANISH	= 0x3,
                                ITALIAN	= 0x4
	};
Note that you don't even really need to assign values, and then set the Lang as TA3D_LANG instead of int, Though leaving it as int will sitll work with this enum, but wraps it more cleanly.

For cursors, it might be cleaner if you setup a enum as well with all the different cursor states, and then set cursors as a fixed array so rather then having a bunch of const ints you could do sint32 TA3D_Cursors[17];.

I would implemented most of these changes myself so you didn't have to and cleanup all the code so it was all changed in all files but i do not wish to signup to sourceforge, i'am htinking that perhaps we should exchange email addresses, on sunday you mail me the latest code,on friday I will email you back the code with a complete list of what I changed.

++Cire.

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Tue Nov 28, 2006 12:12 am

Complete error/warrning list under vs 2005

Error 1 error C2057: expected constant expression c:\ta3d\src\gaf.cpp 173
Error 2 error C2466: cannot allocate an array of constant size 0 c:\ta3d\src\gaf.cpp 173
Error 3 error C2133: 'frame' : unknown size c:\ta3d\src\gaf.cpp 173
Error 4 error C2057: expected constant expression c:\ta3d\src\ia.h 150
Error 5 error C2466: cannot allocate an array of constant size 0 c:\ta3d\src\ia.h 150
Error 6 error C2133: 'diff' : unknown size c:\ta3d\src\ia.h 150
Warning 7 warning C4267: 'initializing' : conversion from 'size_t' to 'byte', possible loss of data c:\ta3d\src\ia.h 592
Warning 8 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 867
Warning 9 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 868
Warning 10 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 869
Warning 11 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 870
Warning 12 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 882
Warning 13 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 883
Warning 14 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 886
Warning 15 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 889
Warning 16 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 897
Warning 17 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 898
Warning 18 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 903
Warning 19 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 904
Warning 20 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 904
Warning 21 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 905
Warning 22 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 905
Warning 23 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 906
Warning 24 warning C4018: '<' : signed/unsigned mismatch c:\ta3d\src\fbi.h 726
Warning 25 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2152
Warning 26 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2153
Warning 27 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2154
Warning 28 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2155
Warning 29 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2157
Warning 30 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2161
Warning 31 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2162
Warning 32 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2163
Warning 33 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2164
Warning 34 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2166
Warning 35 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2190
Warning 36 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2191
Warning 37 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2192
Warning 38 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2193
Warning 39 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2195
Warning 40 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2204
Warning 41 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2205
Warning 42 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2206
Warning 43 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2207
Warning 44 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2209
Warning 45 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2222
Warning 46 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2223
Warning 47 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2227
Warning 48 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2230
Warning 49 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2233
Warning 50 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2236
Warning 51 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2243
Warning 52 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2244
Warning 53 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2250
Warning 54 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2251
Warning 55 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2251
Warning 56 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2252
Warning 57 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2252
Warning 58 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2253
Warning 59 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2259
Warning 60 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2260
Warning 61 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2260
Warning 62 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2261
Warning 63 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2261
Warning 64 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2262
Warning 65 warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data c:\ta3d\src\script.h 939
Warning 66 warning C4018: '<' : signed/unsigned mismatch c:\ta3d\src\script.h 940
Warning 67 warning C4018: '>=' : signed/unsigned mismatch c:\ta3d\src\ta3d.h 265
Warning 68 warning C4018: '<' : signed/unsigned mismatch c:\ta3d\src\ta3d.h 282
Error 69 error C2872: 'aglfont' : ambiguous symbol c:\ta3d\src\ta3d.cpp 118
Error 70 fatal error C1017: invalid integer constant expression c:\ta3d\src\ta3d.cpp 141
Warning 71 warning C4018: '>=' : signed/unsigned mismatch c:\ta3d\src\ta3d_hpi.cpp 297
Warning 72 warning C4018: '>=' : signed/unsigned mismatch c:\ta3d\src\ta3d_hpi.cpp 297
Warning 73 warning C4018: '>=' : signed/unsigned mismatch c:\ta3d\src\ta3d_hpi.cpp 307
Error 74 error C2668: 'sqrt' : ambiguous call to overloaded function c:\ta3d\src\3do.cpp 574
Error 75 error C2668: 'fabs' : ambiguous call to overloaded function c:\ta3d\src\3do.cpp 579
Error 76 error C2668: 'fabs' : ambiguous call to overloaded function c:\ta3d\src\3do.cpp 580
Error 77 error C2057: expected constant expression c:\ta3d\src\ia.h 150
Error 78 error C2466: cannot allocate an array of constant size 0 c:\ta3d\src\ia.h 150
Error 79 error C2133: 'diff' : unknown size c:\ta3d\src\ia.h 150
Warning 80 warning C4267: 'initializing' : conversion from 'size_t' to 'byte', possible loss of data c:\ta3d\src\ia.h 592
Warning 81 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 867
Warning 82 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 868
Warning 83 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 869
Warning 84 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 870
Warning 85 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 882
Warning 86 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 883
Warning 87 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 886
Warning 88 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 889
Warning 89 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 897
Warning 90 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 898
Warning 91 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 903
Warning 92 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 904
Warning 93 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 904
Warning 94 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 905
Warning 95 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 905
Warning 96 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 906
Warning 97 warning C4018: '<' : signed/unsigned mismatch c:\ta3d\src\fbi.h 726
Warning 98 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2152
Warning 99 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2153
Warning 100 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2154
Warning 101 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2155
Warning 102 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2157
Warning 103 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2161
Warning 104 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2162
Warning 105 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2163
Warning 106 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2164
Warning 107 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2166
Warning 108 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2190
Warning 109 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2191
Warning 110 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2192
Warning 111 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2193
Warning 112 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2195
Warning 113 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2204
Warning 114 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2205
Warning 115 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2206
Warning 116 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2207
Warning 117 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2209
Warning 118 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2222
Warning 119 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2223
Warning 120 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2227
Warning 121 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2230
Warning 122 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2233
Warning 123 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2236
Warning 124 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2243
Warning 125 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2244
Warning 126 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2250
Warning 127 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2251
Warning 128 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2251
Warning 129 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2252
Warning 130 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2252
Warning 131 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2253
Warning 132 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2259
Warning 133 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2260
Warning 134 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2260
Warning 135 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2261
Warning 136 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2261
Warning 137 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2262
Warning 138 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.cpp 204
Warning 139 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.cpp 205
Error 140 error C2668: 'sqrt' : ambiguous call to overloaded function c:\ta3d\src\engineclass.cpp 280
Error 141 error C2668: 'sqrt' : ambiguous call to overloaded function c:\ta3d\src\engineclass.cpp 308
Error 142 error C2668: 'log' : ambiguous call to overloaded function c:\ta3d\src\engineclass.cpp 1271
Error 143 error C2668: 'sqrt' : ambiguous call to overloaded function c:\ta3d\src\engineclass.cpp 1362
Error 144 error C2668: 'sqrt' : ambiguous call to overloaded function c:\ta3d\src\engineclass.cpp 1863
Error 145 error C2668: 'sqrt' : ambiguous call to overloaded function c:\ta3d\src\engineclass.cpp 1870
Warning 146 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.cpp 2437
Warning 147 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.cpp 2438
Warning 148 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.cpp 3224
Warning 149 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.cpp 3862
Warning 150 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.cpp 3862
Warning 151 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.cpp 3862
Warning 152 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.cpp 3862
Error 153 error C2057: expected constant expression c:\ta3d\src\ia.h 150
Error 154 error C2466: cannot allocate an array of constant size 0 c:\ta3d\src\ia.h 150
Error 155 error C2133: 'diff' : unknown size c:\ta3d\src\ia.h 150
Warning 156 warning C4267: 'initializing' : conversion from 'size_t' to 'byte', possible loss of data c:\ta3d\src\ia.h 592
Warning 157 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 867
Warning 158 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 868
Warning 159 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 869
Warning 160 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 870
Warning 161 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 882
Warning 162 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 883
Warning 163 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 886
Warning 164 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 889
Warning 165 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 897
Warning 166 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 898
Warning 167 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 903
Warning 168 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 904
Warning 169 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 904
Warning 170 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 905
Warning 171 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 905
Warning 172 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 906
Warning 173 warning C4018: '<' : signed/unsigned mismatch c:\ta3d\src\fbi.h 726
Warning 174 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2152
Warning 175 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2153
Warning 176 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2154
Warning 177 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2155
Warning 178 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2157
Warning 179 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2161
Warning 180 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2162
Warning 181 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2163
Warning 182 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2164
Warning 183 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2166
Warning 184 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2190
Warning 185 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2191
Warning 186 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2192
Warning 187 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2193
Warning 188 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2195
Warning 189 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2204
Warning 190 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2205
Warning 191 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2206
Warning 192 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2207
Warning 193 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2209
Warning 194 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2222
Warning 195 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2223
Warning 196 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2227
Warning 197 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2230
Warning 198 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2233
Warning 199 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2236
Warning 200 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2243
Warning 201 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2244
Warning 202 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2250
Warning 203 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2251
Warning 204 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2251
Warning 205 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2252
Warning 206 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2252
Warning 207 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2253
Warning 208 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2259
Warning 209 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2260
Warning 210 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2260
Warning 211 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2261
Warning 212 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2261
Warning 213 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2262
Warning 214 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\fbi.cpp 45
Warning 215 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\fbi.cpp 46
Warning 216 warning C4800: 'double' : forcing value to bool 'true' or 'false' (performance warning) c:\ta3d\src\fbi.cpp 351
Warning 217 warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) c:\ta3d\src\fbi.cpp 357
Warning 218 warning C4018: '>=' : signed/unsigned mismatch c:\ta3d\src\fbi.cpp 405
Warning 219 warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data c:\ta3d\src\fbi.cpp 438
Warning 220 warning C4018: '<' : signed/unsigned mismatch c:\ta3d\src\fbi.cpp 633
Warning 221 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\fbi.cpp 675
Warning 222 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\fbi.cpp 675
Warning 223 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\fbi.cpp 684
Warning 224 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\fbi.cpp 684
Warning 225 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\fbi.cpp 686
Warning 226 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\fbi.cpp 686
Warning 227 warning C4018: '<' : signed/unsigned mismatch c:\ta3d\src\fbi.cpp 779
Warning 228 warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) c:\ta3d\src\glfunc.cpp 50
Warning 229 warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) c:\ta3d\src\glfunc.cpp 51
Warning 230 warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) c:\ta3d\src\glfunc.cpp 52
Warning 231 warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) c:\ta3d\src\glfunc.cpp 54
Warning 232 warning C4996: 'fopen' was declared deprecated c:\ta3d\src\glfunc.cpp 59
Warning 233 warning C4996: 'fopen' was declared deprecated c:\ta3d\src\glfunc.cpp 98
Warning 234 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 104
Warning 235 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 134
Warning 236 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 135
Warning 237 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 136
Warning 238 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 137
Warning 239 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 141
Warning 240 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 141
Warning 241 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 142
Warning 242 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 142
Warning 243 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 145
Warning 244 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 145
Warning 245 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 146
Warning 246 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 146
Warning 247 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\gui.cpp 172
Error 248 error C2057: expected constant expression c:\ta3d\src\ia.h 150
Error 249 error C2466: cannot allocate an array of constant size 0 c:\ta3d\src\ia.h 150
Error 250 error C2133: 'diff' : unknown size c:\ta3d\src\ia.h 150
Warning 251 warning C4267: 'initializing' : conversion from 'size_t' to 'byte', possible loss of data c:\ta3d\src\ia.h 592
Warning 252 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 867
Warning 253 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 868
Warning 254 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 869
Warning 255 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 870
Warning 256 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 882
Warning 257 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 883
Warning 258 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 886
Warning 259 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 889
Warning 260 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 897
Warning 261 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 898
Warning 262 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 903
Warning 263 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 904
Warning 264 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 904
Warning 265 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 905
Warning 266 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 905
Warning 267 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 906
Warning 268 warning C4018: '<' : signed/unsigned mismatch c:\ta3d\src\fbi.h 726
Warning 269 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2152
Warning 270 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2153
Warning 271 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2154
Warning 272 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2155
Warning 273 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2157
Warning 274 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2161
Warning 275 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2162
Warning 276 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2163
Warning 277 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2164
Warning 278 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2166
Warning 279 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2190
Warning 280 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2191
Warning 281 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2192
Warning 282 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2193
Warning 283 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2195
Warning 284 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2204
Warning 285 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2205
Warning 286 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2206
Warning 287 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2207
Warning 288 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2209
Warning 289 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2222
Warning 290 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2223
Warning 291 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2227
Warning 292 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2230
Warning 293 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2233
Warning 294 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2236
Warning 295 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2243
Warning 296 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2244
Warning 297 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2250
Warning 298 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2251
Warning 299 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2251
Warning 300 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2252
Warning 301 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2252
Warning 302 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2253
Warning 303 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2259
Warning 304 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2260
Warning 305 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2260
Warning 306 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2261
Warning 307 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2261
Warning 308 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2262
Warning 309 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\ia.cpp 154
Error 310 error C2668: 'sqrt' : ambiguous call to overloaded function c:\ta3d\src\ia.cpp 166
Error 311 error C2057: expected constant expression c:\ta3d\src\ia.cpp 313
Error 312 error C2466: cannot allocate an array of constant size 0 c:\ta3d\src\ia.cpp 313
Error 313 error C2133: 'bits' : unknown size c:\ta3d\src\ia.cpp 313
Warning 314 warning C4996: 'fopen' was declared deprecated c:\ta3d\src\intro.cpp 56
Warning 315 warning C4018: '<' : signed/unsigned mismatch c:\ta3d\src\intro.cpp 94
Warning 316 warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data c:\ta3d\src\intro.cpp 98
Error 317 error C2057: expected constant expression c:\ta3d\src\ia.h 150
Error 318 error C2466: cannot allocate an array of constant size 0 c:\ta3d\src\ia.h 150
Error 319 error C2133: 'diff' : unknown size c:\ta3d\src\ia.h 150
Warning 320 warning C4267: 'initializing' : conversion from 'size_t' to 'byte', possible loss of data c:\ta3d\src\ia.h 592
Warning 321 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 867
Warning 322 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 868
Warning 323 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 869
Warning 324 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 870
Warning 325 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 882
Warning 326 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 883
Warning 327 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 886
Warning 328 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 889
Warning 329 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 897
Warning 330 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 898
Warning 331 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 903
Warning 332 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 904
Warning 333 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 904
Warning 334 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 905
Warning 335 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 905
Warning 336 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 906
Warning 337 warning C4018: '<' : signed/unsigned mismatch c:\ta3d\src\fbi.h 726
Warning 338 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2152
Warning 339 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2153
Warning 340 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2154
Warning 341 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2155
Warning 342 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2157
Warning 343 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2161
Warning 344 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2162
Warning 345 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2163
Warning 346 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2164
Warning 347 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2166
Warning 348 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2190
Warning 349 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2191
Warning 350 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2192
Warning 351 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2193
Warning 352 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2195
Warning 353 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2204
Warning 354 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2205
Warning 355 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2206
Warning 356 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2207
Warning 357 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2209
Warning 358 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2222
Warning 359 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2223
Warning 360 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2227
Warning 361 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2230
Warning 362 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2233
Warning 363 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2236
Warning 364 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2243
Warning 365 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2244
Warning 366 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2250
Warning 367 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2251
Warning 368 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2251
Warning 369 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2252
Warning 370 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2252
Warning 371 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2253
Warning 372 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2259
Warning 373 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2260
Warning 374 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2260
Warning 375 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2261
Warning 376 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2261
Warning 377 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2262
Warning 378 warning C4018: '<' : signed/unsigned mismatch c:\ta3d\src\menu.cpp 279
Warning 379 warning C4018: '>=' : signed/unsigned mismatch c:\ta3d\src\menu.cpp 360
Warning 380 warning C4018: '>=' : signed/unsigned mismatch c:\ta3d\src\menu.cpp 387
Error 381 fatal error C1017: invalid integer constant expression c:\ta3d\src\music.cpp 36
Error 382 error C2668: 'pow' : ambiguous call to overloaded function c:\ta3d\src\particles.cpp 184
Error 383 error C2668: 'pow' : ambiguous call to overloaded function c:\ta3d\src\particles.cpp 229
Error 384 error C2057: expected constant expression c:\ta3d\src\ia.h 150
Error 385 error C2466: cannot allocate an array of constant size 0 c:\ta3d\src\ia.h 150
Error 386 error C2133: 'diff' : unknown size c:\ta3d\src\ia.h 150
Warning 387 warning C4267: 'initializing' : conversion from 'size_t' to 'byte', possible loss of data c:\ta3d\src\ia.h 592
Warning 388 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 867
Warning 389 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 868
Warning 390 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 869
Warning 391 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 870
Warning 392 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 882
Warning 393 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 883
Warning 394 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 886
Warning 395 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 889
Warning 396 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 897
Warning 397 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 898
Warning 398 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 903
Warning 399 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 904
Warning 400 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 904
Warning 401 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 905
Warning 402 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 905
Warning 403 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 906
Warning 404 warning C4018: '<' : signed/unsigned mismatch c:\ta3d\src\fbi.h 726
Warning 405 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2152
Warning 406 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2153
Warning 407 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2154
Warning 408 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2155
Warning 409 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2157
Warning 410 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2161
Warning 411 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2162
Warning 412 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2163
Warning 413 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2164
Warning 414 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2166
Warning 415 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2190
Warning 416 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2191
Warning 417 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2192
Warning 418 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2193
Warning 419 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2195
Warning 420 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2204
Warning 421 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2205
Warning 422 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2206
Warning 423 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2207
Warning 424 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2209
Warning 425 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2222
Warning 426 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2223
Warning 427 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2227
Warning 428 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2230
Warning 429 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2233
Warning 430 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2236
Warning 431 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2243
Warning 432 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2244
Warning 433 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2250
Warning 434 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2251
Warning 435 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2251
Warning 436 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2252
Warning 437 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2252
Warning 438 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2253
Warning 439 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2259
Warning 440 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2260
Warning 441 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2260
Warning 442 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2261
Warning 443 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2261
Warning 444 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 2262
Error 445 error C2668: 'sqrt' : ambiguous call to overloaded function c:\ta3d\src\pathfinding.cpp 486
Error 446 error C2057: expected constant expression c:\ta3d\src\ia.h 150
Error 447 error C2466: cannot allocate an array of constant size 0 c:\ta3d\src\ia.h 150
Error 448 error C2133: 'diff' : unknown size c:\ta3d\src\ia.h 150
Warning 449 warning C4267: 'initializing' : conversion from 'size_t' to 'byte', possible loss of data c:\ta3d\src\ia.h 592
Warning 450 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 867
Warning 451 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 868
Warning 452 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 869
Warning 453 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 870
Warning 454 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify precedence c:\ta3d\src\engineclass.h 882
Warning 455 warning C4554: '>>' : check operator precedence for possible error; use parentheses to clarify prece

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Thu Nov 30, 2006 11:28 am

Zuff, I noticed that in the game engine specifically where it does alot of the drawing, you might wana think about coming up with a 'screen' class, so to speak, in this you could declare a small array of vairous calculations, for example, what I see alot is...

x = some long formual + (screen width + 120 >> 2 );
ect...three are quite a few of these with various values for the plus, that you probably should calculate prior, doing this will elimate some 8 to 10 ops per calculation, i'd be willing to bet that you would see a oh 5 or more frame rate increase by doing 'precalculated' values, in fact I notice alot of places that it does this.

If setting up a class does not suit your fancy then try doing static variables, then calulcate them once and odn't need to worry about it ever again, of course u would need to do this every function.

Alternate you could declare these in the ta3d::vars namespace and precalculate.

I managed to fix nearly every compile issue under windows, but sadly when you return and start working on the code your version will override mine which is why we need to 'sync' between ourselves so when u leave on sunday i get the source and when u retrn on friday i update you with new source.

++Cire.

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Thu Nov 30, 2006 5:00 pm

Yeah, it could be very usefull if Cire will work with code from Monday till Friday and Zuzuf - on holidays :)

P.S. Cire, there are many people on taspring forum, who think of you as very experienced c++ guy :) Well, seem like they`ll begin to worship both of you after 0.2.4. release :)

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Thu Nov 30, 2006 8:48 pm

Is that so, didn't think i had much of a following in respects to the TA community anymore at least that is to say from a programing point of view, thats very good to know.

I'am just your ordinary programer, that when driven by a goal can get remarkable results fast, but on the other hand once I reach a certain point i'll acutally overspend my time 'tweaking' parts just to get every opp I can get outa the system.

It is just too bad that spring decided to take a turn away form the TA community and more so to other areas that I'am not really concered with, I see things from my point of view and not really from anothers, lol some call me an ass for it, others respect me for it.

But thanks for the heads up, its good to see that we will have a following. I'd really like to get this project moving alittle faster but it is after all zuff's babby and I have to respect his decessions in the project. I'll do whatever he asks within the projects confounds and back him 100%. If he wants me to have the source or week days great, if not thats ok too, its his call and we should all respect him for it. The project i'am willing to bet is like a child to him and he wants to make sure its taken care of, and I can't blame him at all.

++Cire.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Fri Dec 01, 2006 8:59 pm

Since there is no need for us to use 64bits integers, I think we should remove defines for those types. I am fixing every dynamic allocation I find when I read my code, but if you find one let me know and I'll correct it.

I cannot use a enum for cursors since they aren't defined before we read the file which contains cursors, that's defined at run time only, we should respect this to allow mods to run.

I had disabled Swap, SetMask, ... functions for linux because they didn't build and they were not my priority at the moment, i will fix that soon.

Since I am back for a while (I should be home until 8 !!) I suggest you send me your current version of the code, and we will try to sync it through CVS or something else if it doesn't work.
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Fri Dec 01, 2006 9:09 pm

So your compiler don't recoginize tempates?

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Fri Dec 01, 2006 9:52 pm

I get this message:
TA3D_Platform.h:167: error: variable or field ‘Swap’ declared void
TA3D_Platform.h:167: error: template declaration of ‘int Swap’
TA3D_Platform.h:167: error: ‘T’ was not declared in this scope
TA3D_Platform.h:167: error: ‘a’ was not declared in this scope
TA3D_Platform.h:167: error: ‘T’ was not declared in this scope
TA3D_Platform.h:167: error: ‘b’ was not declared in this scope
TA3D_Platform.h:178: error: variable or field ‘SetMask’ declared void
TA3D_Platform.h:178: error: template declaration of ‘int SetMask’
TA3D_Platform.h:178: error: ‘T’ was not declared in this scope
TA3D_Platform.h:178: error: ‘var’ was not declared in this scope
TA3D_Platform.h:178: error: ‘T’ was not declared in this scope
TA3D_Platform.h:178: error: ‘mask’ was not declared in this scope
TA3D_Platform.h:185: error: variable or field ‘UnsetMask’ declared void
TA3D_Platform.h:185: error: template declaration of ‘int UnsetMask’
TA3D_Platform.h:185: error: ‘T’ was not declared in this scope
TA3D_Platform.h:185: error: ‘var’ was not declared in this scope
TA3D_Platform.h:185: error: ‘T’ was not declared in this scope
TA3D_Platform.h:185: error: ‘mask’ was not declared in this scope
TA3D_Platform.h:193: error: expected initializer before ‘Bit’
TA3D_Platform.h:199: error: variable or field ‘SetBit’ declared void
TA3D_Platform.h:199: error: template declaration of ‘int SetBit’
TA3D_Platform.h:199: error: ‘T’ was not declared in this scope
TA3D_Platform.h:199: error: ‘var’ was not declared in this scope
TA3D_Platform.h:199: error: ‘T’ was not declared in this scope
TA3D_Platform.h:199: error: ‘bit’ was not declared in this scope
TA3D_Platform.h:205: error: variable or field ‘UnsetBit’ declared void
TA3D_Platform.h:205: error: template declaration of ‘int UnsetBit’
TA3D_Platform.h:205: error: ‘T’ was not declared in this scope
TA3D_Platform.h:205: error: ‘var’ was not declared in this scope
TA3D_Platform.h:205: error: ‘T’ was not declared in this scope
TA3D_Platform.h:205: error: ‘bit’ was not declared in this scope
TA3D_Platform.h:212: error: expected initializer before ‘Sign’

g++ recognizes templates, but I don't know how to make it use them properly, I saw there are many options, I will see that later this week end
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Sat Dec 02, 2006 1:19 am

Yeah likely a compiler switch you need to turn on, as template should be standard throught C++, in fact imho its what makes c++ what it is.

Anyhow Dynamic arrays:
in gaf.cpp, function 'read_gaf_img', you have the code

Code: Select all

GAFFRAMEENTRY frame[entry.Frames];
in ai.h function 'learn' code...

Code: Select all

float diff[q];
in ai.cpp function 'think' in ai_player

Code: Select all

float bits[bits_needed];
int script.cpp, function compile

Code: Select all

	int index[i-first];	

in tnt.cpp function 'load_tnt_map'

Code: Select all

int TDF_index[header.tileanims];
also

Code: Select all

BITMAP *bmp_tex[n_bmp];
in weapons.cpp function 'move'

Code: Select all

int oidx[s*s+2*s+1];
You also have alot of code that looks like...

Code: Select all

#if USE_MP3
Console->AddEntry(translation_manager.get(5));
#endif

You need to change this to #if defined USE_MP3 as it stands now many compilers will whine about it being a invalid integer constant expression.

Nearly all sqrt/log/fabs function call passes int, however most function overoads for these do not support int, they want float/ or double, might wana cast this when calling.

There are alsoalog of signed/unsigned comparisons, and >> or << operator order not specified, as a rule in older compilers they could decide when to do shit operations, but now things are becoming more complaint, and so you should specify order by enclosing orders of operations in brakets especially when u want the shift op to occur.


Invalid.

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Sat Dec 02, 2006 4:39 am

zuzuf wrote:Since I am back for a while (I should be home until 8 !!) I suggest you send me your current version of the code, and we will try to sync it through CVS or something else if it doesn't work.
Well i'll let u do the changes I posted above plus try to fix all those warnings then I will sync my version with yours. I managed to get cvs working for another machine, sadly my dev machine will not allow me to use any outside tool to read/write .cpp/.h files, so unless I install another dev machine i will not be able to do it, and simply coping the files to another machine to upload/download is a pain in the ass.

If we can't find another soulation Ill have to keep posting changes to the site, which is gona take eaons for us to get anywhere. The only viaable soulation I can see is a zip that can be exchanged to each other via mail or ftp. Weekends and holidays we can simply transfer the zip via ftp from my server to each other or via email. I keep a pretty tight log of everything I change both in code and in an exteranal changelog file, so you can tell what I changed, but its upto you how you wana do it.

++Cire.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Dec 02, 2006 9:26 am

ok, I am fixing those dynamic allocations. We can sync by email, I think it's the fastest way to do so since I have a popup telling me when I receive a new mail.
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Sat Dec 02, 2006 2:01 pm

As soon as u have those fix'ed and all the above in place let me know and i'll resync my copy from forge.net and try to compile again.

There are a few things I wana change, one is to have it look at the registory and ready ta's path if its under windows, so that they don't need to copy ta's data files, rather then having to copy them to ta3d's dir.

++Cire.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Dec 02, 2006 2:28 pm

Ok, that's done, I uploaded my copy to CVS, here are main modifications I made after fixing dynamic allocations:

ugly bug fixed in weapons.cpp
=> lines 560-561 replaced 'hit_idx' by 't_idx'

weapons.cpp / weapons.h : added 'byte *fx_data' to the FX class to load 'fx.gaf' only once.

menu.cpp : in function select_map, moved 'o_sel=sel_index;' at end of loop and sel_index initialized to 0 in order to select first map by default
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Sat Dec 02, 2006 2:59 pm

Did u walk the thread and implement all the changes I requested as well?

++Cire.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Dec 02, 2006 3:39 pm

I implemented everything I could except the part of code which uses templates, it's still disabled for linux.
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Sat Dec 02, 2006 11:37 pm

hmm I think i know why your template functions are not compiling your code looks something like this...

Code: Select all

template<class> static void Swap (T &a, T &b)
....
for some reason you stripped off the T at the end of the class it should look like this...

Code: Select all

template<class T> static void Swap (T &a, T &b)
....
try that and see if it works.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Dec 03, 2006 12:58 am

You are right, it works now
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Sun Dec 03, 2006 2:21 am

We are getting very very close to it compiling under vs 2005, about 45 errors now, most are very very very minor.

a good 90% of them have to do with fabs, log, sqrt, ect. You are passing int to the function, it expects either float, double, or long double, you could simply search for these, and cast them as whatever parm u wanted to pass, ie... sqrt( (float)(....) );

I also need to get a few files in place so i don't need to worry about attaching them each time.

Finally there is a PILE of build warnings, mostly having to do with shift operations, but these can be addressed at a later date.

++Cire.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Dec 03, 2006 9:38 am

why does vs 2005 warn about using '<<' and '>>'?? these operators have a priority of 11, whereas +,-,*,/ have 12,12,13,13, so what's wrong with it??

I am currently fixing sqrt, log, fabs calls, I upload my copy as soon as I have finished.
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Sun Dec 03, 2006 9:56 am

I'am not sure why it is generating warnings on bitshifting there has to be a reason, and i'll do some reasearch. To my knowledge shifting should be done after all other math operations are carried out unless specified by brakets...but i'll dig around and see what i can come up with.

However the warnings arn't serious, and according to what I can see the only reason they are poping up is because i have it set to level 3 (high level warnings) and the compielr is telling me that I should arrange the code cleaner so that i am sure my shift operations are in the right place.

I also added this function in stdafx.h where it declares the max/mins for variables..

Code: Select all

	bool StartsWith( const String &a, const String &b )
	{
		String y = Lowercase( a );
		String z = Lowercase( b );
		uint16 ai, bi;
		
		ai = (uint16)y.length();
		bi = (uint16)z.length();
		
		if( ai > bi )
			return  ( (y.compare( 0, bi, z ) == 0 ) ? true : false );
		else
			return ( (z.compare( 0, ai, y ) == 0 ) ? true : false );
	}
it will mainly be replacing the functions strncmp in taconfig.h and should allow u to check to make sure that the two strings match upto the shortest level string. (untested)

++Cire

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Dec 03, 2006 10:29 am

I added your StartsWith function - it works. I replaced all strncmp in taconfig.cpp

I also changed the default view angle to TA view angle : 63.44 degrees
=>;-D Penguin Powered

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Dec 03, 2006 1:10 pm

I made a few modifications to the HPI handler. It now uses the new hash table module. I replaced the map with a hash table, this way there is no more bugs with HPI handler on Linux and it's faster!! (table size is 4096 while we only have less than 3000 files !!)
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Sun Dec 03, 2006 4:32 pm

There are a number of compile errors in script.cpp as well

Error 394 fatal error C1083: Cannot open include file: 'alogg/alogg.h': No such file or directory c:\ta3d\src\music.h 34
Error 397 error C2668: 'pow' : ambiguous call to overloaded function c:\ta3d\src\particles.cpp 181
Error 398 error C2668: 'pow' : ambiguous call to overloaded function c:\ta3d\src\particles.cpp 226
Error 556 error C2065: 'not' : undeclared identifier c:\ta3d\src\script.cpp 1559
Error 557 error C2146: syntax error : missing ')' before identifier 'v1' c:\ta3d\src\script.cpp 1559
Error 558 error C2059: syntax error : ')' c:\ta3d\src\script.cpp 1559
Error 559 error C2668: 'sqrt' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2143
Error 560 error C2668: 'exp' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2181
Error 561 error C2668: 'log' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2200
Error 562 error C2668: 'sqrt' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2219
Error 563 error C2668: 'cos' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2238
Error 564 error C2668: 'sin' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2257
Error 565 error C2668: 'tan' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2313
Error 566 error C2668: 'tan' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2332
Error 567 error C2668: 'cosh' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2351
Error 568 error C2668: 'sinh' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2370
Error 569 error C2668: 'acos' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2389
Error 570 error C2668: 'asin' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2408
Error 571 error C2668: 'atan' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2427
Error 572 error C2668: 'tanh' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2446
Error 573 error C2668: 'tanh' : ambiguous call to overloaded function c:\ta3d\src\script.cpp 2465
Error 574 error C3861: 'acosh': identifier not found c:\ta3d\src\script.cpp 2484
Error 575 error C3861: 'acosh': identifier not found c:\ta3d\src\script.cpp 2488
Error 576 error C3861: 'asinh': identifier not found c:\ta3d\src\script.cpp 2503
Error 577 error C3861: 'asinh': identifier not found c:\ta3d\src\script.cpp 2507
Error 578 error C3861: 'atanh': identifier not found c:\ta3d\src\script.cpp 2522
Error 579 error C3861: 'atanh': identifier not found c:\ta3d\src\script.cpp 2526
Error 589 fatal error C1017: invalid integer constant expression c:\ta3d\src\ta3d.cpp 25

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Dec 03, 2006 4:54 pm

okay, that's fixed
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Sun Dec 03, 2006 5:22 pm

ta3d also generates theses.

Error 85 error C2057: expected constant expression c:\ta3d\src\ta3d.cpp 1063
Error 86 error C2466: cannot allocate an array of constant size 0 c:\ta3d\src\ta3d.cpp 1063
Error 87 error C2133: 'sel_type' : unknown size c:\ta3d\src\ta3d.cpp 1063
Error 89 error C2668: 'log' : ambiguous call to overloaded function c:\ta3d\src\ta3d.cpp 1462
Error 90 error C2668: 'log' : ambiguous call to overloaded function c:\ta3d\src\ta3d.cpp 1463

The first 3 are a dynamic array, the other 2 are simplye casting fix's.

++Cire.

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Sun Dec 03, 2006 5:23 pm

please goto irc if u get a chance.

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Sun Dec 03, 2006 9:20 pm

Well with those modificaitons to preprocessor directivies its now building under vs 2005. I'am currently working on resolving some linking issues however, once that is done we will have a windows built version.

++Cire

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Mon Dec 04, 2006 8:13 am

Finally I got the damn thing to link, had to compile Allegro, as I thought it provided binaries, the same with allergogl, then ran into the problem that the project also used another extension to gl called glew, which I needed to compile as well, finally after screwing with inputs i got the bloody thing to compile in both release and debug mode, however I had to strip out allegro mp3 support since it also required a further library that woeuld need compiled and since fmod will be replacing it so for now i just undef'ed mp3/ogg.

I'am going to test the exe's and will keep everyone informed of any serious issues.

++Cire.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Mon Dec 04, 2006 1:01 pm

I managed to build TA3D with msvc 2005 in release mode, but when I run it it crashes, in debug mode it complains about an error with a dll for debugging.
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Mon Dec 04, 2006 10:31 pm

what dll's are u linking it against?

is it complaining about libc.lib? I had to specifically ignore this library.

There are acutally a number of crashers in here acutally, I'am still stepping and debugging the prgraom but need to point out simple stuff like this...

Code: Select all

void print_system_data(CONSOLE *console)
{
	char *str=new char[1000];

	memcpy(str,"Allegro ",9);
	strcat(str,ALLEGRO_VERSION_STR);
First thiere is no need in allocating an array here when a simple char[1000]; woulda done (Mine is now std::string) The second line copies a string to the allocated str, but the killer is the strcat this should at the very min throw an assert, if not crash the application. should be 'non null terminated'.

Theres actually quite a few minor issues like this that needs to be fixed, as they will as I mentioned at the very min throw an assert, i'll still stepping the program and working my way into it.

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Mon Dec 04, 2006 10:32 pm

While you are at it can u check to see if linux has the include file for <tchar.h>

++Cire.

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Mon Dec 04, 2006 11:35 pm

and stdarg.h

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Tue Dec 05, 2006 8:02 am

there is no tchar.h or stdarg.h in my include dir. If you need some advanced text functions I suggest you look at Allegro's doc.

I am going to fix the print_system_data function.
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Tue Dec 05, 2006 10:54 am

Look around and see if you support umm va_list, which i'am sure it must I just don't know what include file you would need...This is the funciton I wana add. I added it to the TA3D Namespace in stdafx.h (which we really need to change and work on.

Code: Select all

	static std::string format(const char *fmt, ...) 
	{
		if( !fmt ) 
			return "";

		int   result = -1, length = 256;
		char *buffer = 0;

		va_list args;
		va_start(args, fmt);

		while( result == -1 )
		{
			if( buffer )
				delete [] buffer;

			buffer = new char [length + 1];

			memset(buffer, 0, length + 1);

			result = _vsnprintf(buffer, length, fmt, args);

			length *= 2;
		}

		std::string s(buffer);
		delete [] buffer;

		va_end(args);

		return s;
	} 

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Tue Dec 05, 2006 4:41 pm

no need to include anything here, I use va_list and va_start in console.cpp in the AddEntry function, just be sure to introduce this function after the allegro include.
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Wed Dec 06, 2006 4:45 am

in 3do.cpp there are 2 lines of code

Code: Select all

tcoord[(y*16+x<<1)]=x/15.0f;
tcoord[(y*16+x<<1)+1]=y/15.0f;
I'am just curious on your order of operations here, are u tring to (y * 16) + (x << 2 ) or (y * 16 + x ) << 2?

also wouln't it be faster to do y << 4 ?

++Cire.

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Wed Dec 06, 2006 5:01 am

to expand on the previous post...

The function is.
void OBJECT::create_from_2d(BITMAP *bmp,float w,float h,float max_h) There is a loop in it that looks like.

Code: Select all

for(y=0;y<16;y++)
   for(x=0;x<16;x++) 
   {
      points[y*16+x].x=(x-7.5f)*w/7.5f*0.5f;
      points[y*16+x].z=(y-7.5f)*h/7.5f*0.5f;
      tcoord[(y*16+x<<1)]=x/15.0f;
      tcoord[(y*16+x<<1)+1]=y/15.0f;
   }
You could save some operations here:

Code: Select all

for(y=0;y<16;y++)
   for(x=0;x<16;x++) 
   {
      int yy = y << 4;
      points[yy+x].x=(x-7.5f)*w/7.5f*0.5f;
      points[yy+x].z=(y-7.5f)*h/7.5f*0.5f;
      tcoord[(yy+x<<1)]=x/15.0f;
      tcoord[(yy+x<<1)+1]=y/15.0f;
   }
It dont' look like much but u are saving 4 * 4 = 16 * 16 each time it runs this function, not much but every little bit counts, theres so much optomizations that we could do and we have to start looking at this stuff so that we can pump out as much frames as possible.

++Cire.

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Wed Dec 06, 2006 8:54 pm

I've made adjustements to the previous code snip to..

Code: Select all

		float ww = w / 7.5f*0.5f;
		float hh = h / 7.5f*0.5f;
		for(y=0;y<16;y++)			
			for(x=0;x<16;x++) {
				int yy = (y << 4)+x;
				points[yy].x=(x-7.5f)*ww;
				points[yy].z=(y-7.5f)*hh;
				tcoord[(yy<<1)]=x/15.0f;
				tcoord[(yy<<1)+1]=y/15.0f;
				}
Again it dont' look like much but figure this, 16 loops over 16 loops for a total of 256 itterations, I added 1 calculation to the equation in the looop adding 4 opps, I then removed a total of 4 operations on 4 instructions, as well as removed 8 ops on 2 other instructions adding it all together we get...

8 * 2 + 4 * 4 - 4 = 28 ops per loop = 7168 total operations saved. Granted the compiler probably would optomized this but we also need to look at the fact that it might not optomize it this well.

Anyhow we work thorugh the engine and tweak little things like this, it will have big big big results.

++Cire.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Wed Dec 06, 2006 9:54 pm

I modified it this way:

Code: Select all

		float ww = w * 0.0666666666667f;
		float hh = h * 0.0666666666667f;
		for(y=0;y<16;y++) {						// Maillage (sommets)
			uint16	seg = y<<4;
			float yy = y * 0.0666666666667f;
			for(x=0;x<16;x++) {
				uint16	offset = seg+x;
				points[offset].x=(x-7.5f)*ww;
				points[offset].z=(y-7.5f)*hh;
				tcoord[offset<<1]=x*0.0666666666667f;
				tcoord[(offset<<1)+1]=sy;
				}
			}
with x,y of type uint16 (no need to use more memory for calculations)
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Wed Dec 06, 2006 11:40 pm

exactly, now your thinking, and since this seems to be a commonly calculated variable, 'pre calculating this ahead of time and adjusting when width/height changes', would save further opps, as well you could calculate the 'yy<<1' since it occurs multiple times within the loop (2x) thus saving 32 c ops, and some 128 assembly instructions.

Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests