fix build issues on windows

This commit is contained in:
David Rose 2009-03-24 18:42:09 +00:00
parent 2060a57894
commit 4b48520ada
7 changed files with 2245 additions and 2183 deletions

View File

@ -77,6 +77,7 @@ ZTriangleStub = """
/* This file is generated code--do not edit. See ztriangle.py. */
#include <stdlib.h>
#include <stdio.h>
#include "pandabase.h"
#include "zbuffer.h"
/* Pick up all of the generated code references to ztriangle_two.h,
@ -178,6 +179,7 @@ print >> table_decl, ''
table_def = open('ztriangle_table.cxx', 'wb')
print >> table_def, '/* This file is generated code--do not edit. See ztriangle.py. */'
print >> table_def, ''
print >> table_def, '#include "pandabase.h"'
print >> table_def, '#include "zbuffer.h"'
print >> table_def, '#include "ztriangle_table.h"'
print >> table_def, ''
@ -189,7 +191,7 @@ def writeExterns(ops):
if i + 1 == len(FullOptions):
# The last level: write out the actual function names.
for j in range(numOps):
print >> table_def, 'extern ZB_fillTriangleFunc %s;' % (getFname(ops + [j]))
print >> table_def, 'extern "C" ZB_fillTriangleFunc %s;' % (getFname(ops + [j]))
else:
# Intermediate levels: recurse.
for j in range(numOps):

View File

@ -2,6 +2,7 @@
/* This file is generated code--do not edit. See ztriangle.py. */
#include <stdlib.h>
#include <stdio.h>
#include "pandabase.h"
#include "zbuffer.h"
/* Pick up all of the generated code references to ztriangle_two.h,

View File

@ -2,6 +2,7 @@
/* This file is generated code--do not edit. See ztriangle.py. */
#include <stdlib.h>
#include <stdio.h>
#include "pandabase.h"
#include "zbuffer.h"
/* Pick up all of the generated code references to ztriangle_two.h,

View File

@ -2,6 +2,7 @@
/* This file is generated code--do not edit. See ztriangle.py. */
#include <stdlib.h>
#include <stdio.h>
#include "pandabase.h"
#include "zbuffer.h"
/* Pick up all of the generated code references to ztriangle_two.h,

View File

@ -2,6 +2,7 @@
/* This file is generated code--do not edit. See ztriangle.py. */
#include <stdlib.h>
#include <stdio.h>
#include "pandabase.h"
#include "zbuffer.h"
/* Pick up all of the generated code references to ztriangle_two.h,

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,10 @@
void FNAME(white_untextured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
extern "C" void
FNAME(white_untextured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2);
void
FNAME(white_untextured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
{
#define INTERP_Z
@ -26,8 +31,13 @@ void FNAME(white_untextured) (ZBuffer *zb,
#include "ztriangle.h"
}
void FNAME(flat_untextured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
extern "C" void
FNAME(flat_untextured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2);
void
FNAME(flat_untextured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
{
int color;
int or0, og0, ob0, oa0;
@ -70,8 +80,13 @@ void FNAME(flat_untextured) (ZBuffer *zb,
* The code below is very tricky :)
*/
void FNAME(smooth_untextured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
extern "C" void
FNAME(smooth_untextured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2);
void
FNAME(smooth_untextured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
{
#define INTERP_Z
#define INTERP_RGB
@ -114,8 +129,13 @@ void FNAME(smooth_untextured) (ZBuffer *zb,
#include "ztriangle.h"
}
void FNAME(white_textured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
extern "C" void
FNAME(white_textured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2);
void
FNAME(white_textured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
{
ZTextureDef *texture_def;
@ -151,8 +171,13 @@ void FNAME(white_textured) (ZBuffer *zb,
#include "ztriangle.h"
}
void FNAME(flat_textured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
extern "C" void
FNAME(flat_textured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2);
void
FNAME(flat_textured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
{
ZTextureDef *texture_def;
int or0, og0, ob0, oa0;
@ -206,8 +231,13 @@ void FNAME(flat_textured) (ZBuffer *zb,
#include "ztriangle.h"
}
void FNAME(smooth_textured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
extern "C" void
FNAME(smooth_textured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2);
void
FNAME(smooth_textured) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
{
ZTextureDef *texture_def;
@ -276,8 +306,13 @@ void FNAME(smooth_textured) (ZBuffer *zb,
* We use the gradient method to make less divisions.
* TODO: pipeline the division
*/
void FNAME(white_perspective) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
extern "C" void
FNAME(white_perspective) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2);
void
FNAME(white_perspective) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
{
ZTextureDef *texture_def;
float fdzdx,fndzdx,ndszdx,ndtzdx;
@ -385,8 +420,13 @@ void FNAME(white_perspective) (ZBuffer *zb,
* Flat shaded triangle, with perspective-correct mapping.
*/
void FNAME(flat_perspective) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
extern "C" void
FNAME(flat_perspective) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2);
void
FNAME(flat_perspective) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
{
ZTextureDef *texture_def;
float fdzdx,fndzdx,ndszdx,ndtzdx;
@ -515,8 +555,13 @@ void FNAME(flat_perspective) (ZBuffer *zb,
* Smooth filled triangle, with perspective-correct mapping.
*/
void FNAME(smooth_perspective) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
extern "C" void
FNAME(smooth_perspective) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2);
void
FNAME(smooth_perspective) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
{
ZTextureDef *texture_def;
float fdzdx,fndzdx,ndszdx,ndtzdx;
@ -655,8 +700,13 @@ void FNAME(smooth_perspective) (ZBuffer *zb,
* stages of multitexture.
*/
void FNAME(smooth_multitex2) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
extern "C" void
FNAME(smooth_multitex2) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2);
void
FNAME(smooth_multitex2) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
{
float fdzdx,fndzdx,ndszdx,ndtzdx,ndszadx,ndtzadx;
@ -809,8 +859,13 @@ void FNAME(smooth_multitex2) (ZBuffer *zb,
* stages of multitexture.
*/
void FNAME(smooth_multitex3) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
extern "C" void
FNAME(smooth_multitex3) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2);
void
FNAME(smooth_multitex3) (ZBuffer *zb,
ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2)
{
float fdzdx,fndzdx,ndszdx,ndtzdx,ndszadx,ndtzadx,ndszbdx,ndtzbdx;