]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/picomodel/picomodel.c
picomodel: white default color of fm, md2 (was one white and rest black)
[xonotic/netradiant.git] / libs / picomodel / picomodel.c
index 311f6de760c7791bb9e94f717d481a192c46dfdc..79655ce842689a4eaf7b4db4a746184f7e57ae60 100644 (file)
@@ -991,7 +991,7 @@ void PicoSetSurfaceST( picoSurface_t *surface, int array, int num, picoVec2_t st
 
 
 
-void PicoSetSurfaceColor( picoSurface_t *surface, int array, int num, picoColor_t color ){
+void PicoSetSurfaceColor( picoSurface_t *surface, int array, int num, const picoColor_t color ){
        if ( surface == NULL || num < 0 || color == NULL ) {
                return;
        }
@@ -1603,7 +1603,7 @@ picoVertexCombinationHash_t *PicoAddVertexCombinationToHashTable( picoVertexComb
    fixme: needs non-naive algorithm
  */
 
-int PicoFindSurfaceVertexNum( picoSurface_t *surface, picoVec3_t xyz, picoVec3_t normal, int numSTs, picoVec2_t *st, int numColors, picoColor_t *color, picoIndex_t smoothingGroup ){
+int PicoFindSurfaceVertexNum( picoSurface_t *surface, picoVec3_t xyz, picoVec3_t normal, int numSTs, picoVec2_t *st, int numColors, const picoColor_t *color, picoIndex_t smoothingGroup ){
        int i, j;
 
 
@@ -1647,7 +1647,7 @@ int PicoFindSurfaceVertexNum( picoSurface_t *surface, picoVec3_t xyz, picoVec3_t
                if ( numColors > 0 && color != NULL ) {
                        for ( j = 0; j < numSTs; j++ )
                        {
-                               if ( *( (int*) surface->color[ j ] ) != *( (int*) color[ j ] ) ) {
+                               if ( *( (const int*) surface->color[ j ] ) != *( (const int*) color[ j ] ) ) {
                                        break;
                                }
                        }
@@ -2248,7 +2248,7 @@ int PicoRemapModel( picoModel_t *model, char *remapFile ){
  */
 
 void PicoAddTriangleToModel( picoModel_t *model, picoVec3_t** xyz, picoVec3_t** normals,
-                                                        int numSTs, picoVec2_t **st, int numColors, picoColor_t **colors,
+                                                        int numSTs, picoVec2_t **st, int numColors, const picoColor_t **colors,
                                                         picoShader_t* shader, const char *name, picoIndex_t* smoothingGroup ){
        int i,j;
        int vertDataIndex;