dungeon_crawler

diff prototype/src/material.cc @ 31:ddb68dc4ba07

OBJ hack
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 27 Aug 2012 04:14:04 +0300
parents 67ae9fcb802c
children d0e93b4d9ec9
line diff
     1.1 --- a/prototype/src/material.cc	Mon Aug 27 04:03:22 2012 +0300
     1.2 +++ b/prototype/src/material.cc	Mon Aug 27 04:14:04 2012 +0300
     1.3 @@ -4,6 +4,8 @@
     1.4  #include "opengl.h"
     1.5  #include "material.h"
     1.6  
     1.7 +extern bool ass_obj_hack;
     1.8 +
     1.9  Material::Material()
    1.10  	: kd(1.0, 1.0, 1.0), ks(0.0, 0.0, 0.0)
    1.11  {
    1.12 @@ -24,11 +26,10 @@
    1.13  	unsigned int sz = 1;
    1.14  	val = 60.0;
    1.15  	aiGetMaterialFloatArray(assmat, AI_MATKEY_SHININESS, &val, &sz);
    1.16 -	if(val > 127) {
    1.17 -		fprintf(stderr, "Warning: shininess %f... setting to 127\n", val);
    1.18 -		val = 127;
    1.19 +	if(ass_obj_hack) {
    1.20 +		val /= 4.0;
    1.21  	}
    1.22 -	shin = val;
    1.23 +	shin = val > 127 ? 127 : val;
    1.24  
    1.25  	sz = 1;
    1.26  	val = 1.0;