when is use onboardc242 to compile my project .
I got one alert for Source Error "unknown
identifier 't000',line 201",then I click button OK ,palm
crashed. And same as i tested in Simulator,it
throws "Run68K.c, Line:2306, Invalid write to
00000008".
I check my source file .
there is not any words "t000" in my suource file. the
code should be all right.
the "Source Error" occur on such a express:
"if (me->v[i]->z > clipZ)" , compare a float to a foat.
in such a method:
----------------------------------------------------
typedef struct{
float x;
float y;
float z;
}Vector3D;
typedef struct{
Vector3D **v;
int numVertices;
Vector3D normal;
} Polygon3D;
void PolInsertVertexF(Polygon3D *,int ,float,float,folat);
void PolDeleteVertex(Polygon3D *,int );
Boolean /**/PolClip(Polygon3D *me,float clipZ) {
Boolean isCompletelyHidden = true;
for (int i=0; i<me->numVertices; i++) {
int next = (i + 1) % (me->numVertices);
Vector3D *v1 = me->v[i];
Vector3D *v2 = me->v[next];
if (v1->z < clipZ) {
isCompletelyHidden = false;
}
if (v1->z > v2->z) {
Vector3D *temp = v1;
v1 = v2;
v2 = temp;
}
if (v1->z < clipZ && v2->z > clipZ) {
float scale = (clipZ-v1->z) / (v2->z - v1-
>z);
PolInsertVertexF(me,next,
v1->x + scale * (v2->x - v1->x) ,
v1->y + scale * (v2->y - v1->y),
clipZ);
// skip the vertex we just created
i++;
}
}
if (isCompletelyHidden) {
return false;
}
for (int i=me->numVertices-1; i>=0; i--)
{
//--!!!-------------> the Source error line 201--->
if (me->v[i]->z > clipZ)
//------------------^^
{
PolDeleteVertex(me,i);
}
}
return (me->numVertices >= 3);
}
------------------------------------------------------
Logged In: NO
I am the bugs reporter.
very glad to use Onboardc in my Zire71,thanks for all the
developers.
my hotmail / msn: liujing_lj@hotmail.com