X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=libs%2Fpicomodel%2Fpm_terrain.c;h=fb8cd89d6a4616634cb58319c59d99c9b2f6b012;hb=51a70e4a2854dd00a8d48661b2dbf98b6168872f;hp=93b79840f7b0722ae17705e74871b92b0baf86d9;hpb=62d99f889c0e98be65f779d3983109c84ce58cec;p=xonotic%2Fnetradiant.git diff --git a/libs/picomodel/pm_terrain.c b/libs/picomodel/pm_terrain.c index 93b79840..fb8cd89d 100644 --- a/libs/picomodel/pm_terrain.c +++ b/libs/picomodel/pm_terrain.c @@ -32,13 +32,6 @@ ----------------------------------------------------------------------------- */ - - -/* 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 );