X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=libs%2Fpicomodel%2Fpm_ms3d.c;h=1472de549e0d128eb31c1152ea965a780acd0557;hb=d8d29a543f2928c2aef158b1c90b92d031826a8b;hp=535b7e22ceba57adac95157e8c6d9ff82a422825;hpb=b7e36c120eb1546a6c6f97f30e42ab7f9a559c61;p=xonotic%2Fnetradiant.git diff --git a/libs/picomodel/pm_ms3d.c b/libs/picomodel/pm_ms3d.c index 535b7e22..1472de54 100644 --- a/libs/picomodel/pm_ms3d.c +++ b/libs/picomodel/pm_ms3d.c @@ -32,16 +32,12 @@ ----------------------------------------------------------------------------- */ - - -/* marker */ -#define PM_MS3D_C - /* dependencies */ #include "picointernal.h" +#include "globaldefs.h" /* disable warnings */ -#ifdef WIN32 +#if GDEF_COMPILER_MSVC #pragma warning( disable:4100 ) /* unref param */ #endif @@ -55,22 +51,19 @@ #define DEBUG_PM_MS3D #define DEBUG_PM_MS3D_EX -/* plain white */ -static picoColor_t white = { 255,255,255,255 }; - /* ms3d limits */ -#define MS3D_MAX_VERTS 8192 -#define MS3D_MAX_TRIS 16384 -#define MS3D_MAX_GROUPS 128 -#define MS3D_MAX_MATERIALS 128 -#define MS3D_MAX_JOINTS 128 -#define MS3D_MAX_KEYFRAMES 216 +const int MS3D_MAX_VERTS = 8192; +const int MS3D_MAX_TRIS = 16384; +const int MS3D_MAX_GROUPS = 128; +const int MS3D_MAX_MATERIALS = 128; +const int MS3D_MAX_JOINTS = 128; +const int MS3D_MAX_KEYFRAMES = 216; /* ms3d flags */ -#define MS3D_SELECTED 1 -#define MS3D_HIDDEN 2 -#define MS3D_SELECTED2 4 -#define MS3D_DIRTY 8 +const int MS3D_SELECTED = 1; +const int MS3D_HIDDEN = 2; +const int MS3D_SELECTED2 = 4; +const int MS3D_DIRTY = 8; /* this freaky loader needs byte alignment */ #pragma pack(push, 1) @@ -355,7 +348,7 @@ static picoModel_t *_ms3d_load( PM_PARAMS_LOAD ){ PicoSetSurfaceXYZ( surface,vertexIndex,vertex->xyz ); /* store vertex color */ - PicoSetSurfaceColor( surface,0,vertexIndex,white ); + PicoSetSurfaceColor( surface, 0, vertexIndex, picoColor_white ); /* store vertex normal */ PicoSetSurfaceNormal( surface,vertexIndex,triangle->vertexNormals[ m ] );