-#define AUTO_GROUPNAME(namebuf) \
- sprintf(namebuf, "__autogroup_%d", autoGroupNumber++)
-#define NEW_SURFACE(name) \
-{ \
- picoSurface_t *newSurface; \
- /* allocate a pico surface */ \
- newSurface = PicoNewSurface( model ); \
- if (newSurface == NULL) \
- _obj_error_return("Error allocating surface"); \
- /* reset face index for surface */ \
- curFace = 0; \
- /* if we can, assign the previous shader to this surface */ \
- if(curSurface) \
- PicoSetSurfaceShader(newSurface, curSurface->shader); \
- /* set ptr to current surface */ \
- curSurface = newSurface; \
- /* we use triangle meshes */ \
- PicoSetSurfaceType( newSurface,PICO_TRIANGLES ); \
- /* set surface name */ \
- PicoSetSurfaceName( newSurface,name ); \
-}
+#define AUTO_GROUPNAME( namebuf ) \
+ sprintf( namebuf, "__autogroup_%d", autoGroupNumber++ )
+#define NEW_SURFACE( name ) \
+ { \
+ picoSurface_t *newSurface; \
+ /* allocate a pico surface */ \
+ newSurface = PicoNewSurface( model ); \
+ if ( newSurface == NULL ) { \
+ _obj_error_return( "Error allocating surface" ); } \
+ /* reset face index and vertex index for surface */ \
+ curFace = 0; \
+ curVertex = 0; \
+ /* if we can, assign the previous shader to this surface */ \
+ if ( curSurface ) { \
+ PicoSetSurfaceShader( newSurface, curSurface->shader ); } \
+ /* set ptr to current surface */ \
+ curSurface = newSurface; \
+ /* we use triangle meshes */ \
+ PicoSetSurfaceType( newSurface,PICO_TRIANGLES ); \
+ /* set surface name */ \
+ PicoSetSurfaceName( newSurface,name ); \
+ }