1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
From: Morten Kjeldgaard <mok@bioxray.au.dk>
Subject: modification to source code
--- a/src/CgUtil.cpp
+++ b/src/CgUtil.cpp
@@ -33,7 +33,7 @@
return ((P_double_shadows) && (can_use_doubleshadow()));
}
-static char* FORMAT="void CgUtil::Set(int K){\nif (K==0){\n P_light_base = %f ;\n P_lighting = %f ;\n P_phong = %f ;\n P_phong_size = %f ;\n P_col_atoms_sat = %f ;\n P_col_atoms_bri = %f ;\n P_texture = %f ;\n P_border_inside = %f ;\n P_border_outside = %f ;\n P_depth_full = %f ;\n P_sem_effect = %d ;\n P_halo_size = %f ;\n P_halo_col = %f ;\n P_halo_str = %f ;\n P_halo_aware = %f ;\n P_fog = %f ;\n P_capping = %d ;\n P_shadowstrenght = %f ;\n P_bg_color_R = %f ;\n P_bg_color_G = %f ;\n P_bg_color_B = %f ;\n auto_normalize = %d ;\n P_double_shadows = %d ;\n P_border_fixed = %d ;\n}\n}";
+static char* FORMAT=(char *)"void CgUtil::Set(int K){\nif (K==0){\n P_light_base = %f ;\n P_lighting = %f ;\n P_phong = %f ;\n P_phong_size = %f ;\n P_col_atoms_sat = %f ;\n P_col_atoms_bri = %f ;\n P_texture = %f ;\n P_border_inside = %f ;\n P_border_outside = %f ;\n P_depth_full = %f ;\n P_sem_effect = %d ;\n P_halo_size = %f ;\n P_halo_col = %f ;\n P_halo_str = %f ;\n P_halo_aware = %f ;\n P_fog = %f ;\n P_capping = %d ;\n P_shadowstrenght = %f ;\n P_bg_color_R = %f ;\n P_bg_color_G = %f ;\n P_bg_color_B = %f ;\n auto_normalize = %d ;\n P_double_shadows = %d ;\n P_border_fixed = %d ;\n}\n}";
bool CgUtil::Load(const char* filename){
FILE *f=fopen(filename, "rt");
@@ -700,7 +700,7 @@
if ((!do_use_doubleshadow())&&(P_light_base>0)) {
sprintf(fp,"%s\n\
CMP t.z, lighting.z, 1, t.z; # if light<0, then in shadow \n\
-" ,fp,1.0-P_shadowstrenght);
+" ,fp); //,1.0-P_shadowstrenght); // error here
}
if (P_shadowstrenght<1) {
@@ -789,7 +789,7 @@
} else {
if (P_col_atoms_bri<1.0)
{
- sprintf(fp,"%s%s",fp,"MUL res, res, %5.3f;\n", P_col_atoms_bri );
+ sprintf(fp,"%s%s",fp,"MUL res, res, %5.3f;\n"); //, P_col_atoms_bri ); // error here
}
}
@@ -1499,7 +1499,7 @@
MAD t, t, 0.5, 0.5; \n\
MAD t, t, {%5.2f,%5.2f,0,0}, {%5.2f, %5.2f, 0,0}; \n\
MAD t, {%5.2f,%5.2f,0,0}, disp, t; \n\n",
- fp, CSIZE-gap*2.0, CSIZE-gap*2.0, gap, gap, CSIZE, CSIZE );
+ fp, CSIZE-gap*2.0, CSIZE-gap*2.0, gap, gap, (double)CSIZE, (double)CSIZE );
else sprintf(fp, "%s\n\n\
## TEXTURING OCTAMAP STYLE \n\
|