]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/picomodel/pm_terrain.c
Merge branch 'NateEag-master-patch-12920' into 'master'
[xonotic/netradiant.git] / libs / picomodel / pm_terrain.c
index 93b79840f7b0722ae17705e74871b92b0baf86d9..fb8cd89d6a4616634cb58319c59d99c9b2f6b012 100644 (file)
 
    ----------------------------------------------------------------------------- */
 
-
-
-/* marker */
-#define PM_TERRAIN_C
-
-
-
 /* dependencies */
 #include "picointernal.h"
 
@@ -62,7 +55,7 @@ tga_t;
    fixme: replace/clean this function
  */
 
-void _terrain_load_tga_buffer( unsigned char *buffer, unsigned char **pic, int *width, int *height ){
+void _terrain_load_tga_buffer( unsigned char *buffer, unsigned char **pic, int *width, int *height ) {
        int row, column;
        int columns, rows, numPixels;
        unsigned char   *pixbuf;
@@ -298,7 +291,7 @@ breakOut:;
    validates a picoterrain file
  */
 
-static int _terrain_canload( PM_PARAMS_CANLOAD ){
+static int _terrain_canload( PM_PARAMS_CANLOAD ) {
        picoParser_t    *p;
 
 
@@ -333,7 +326,7 @@ static int _terrain_canload( PM_PARAMS_CANLOAD ){
    loads a picoterrain file
  */
 
-static picoModel_t *_terrain_load( PM_PARAMS_LOAD ){
+static picoModel_t *_terrain_load( PM_PARAMS_LOAD ) {
        int i, j, v, pw[ 5 ], r;
        picoParser_t    *p;
 
@@ -502,7 +495,7 @@ static picoModel_t *_terrain_load( PM_PARAMS_LOAD ){
        }
 
        /* detox and set shader name */
-       _pico_setfext( shader, "" );
+       _pico_setfext( shader, NULL );
        _pico_unixify( shader );
        PicoSetShaderName( picoShader, shader );
        _pico_free( shader );
@@ -544,7 +537,7 @@ static picoModel_t *_terrain_load( PM_PARAMS_LOAD ){
                                _pico_set_color( color, colorPixel[ 0 ], colorPixel[ 1 ], colorPixel[ 2 ], colorPixel[ 3 ] );
                        }
                        else{
-                               _pico_set_color( color, 255, 255, 255, 255 );
+                               _pico_copy_color( picoColor_white, color );
                        }
                        PicoSetSurfaceColor( picoSurface, 0, v, color );