mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2026-10-10 20:03:08 +08:00
This fixes the mathlib build, at least for me. I didn't bother to fix code in e.g. raytrace or vgui_controls, so things are almost certainly still broken in there.
This commit is contained in:
@@ -46,7 +46,7 @@ void ColorQuantize(uint8 const *Image,
|
||||
val1+=PIXEL(x,y,c)*ExtraValueXForms[i*3+c];
|
||||
val1>>=8;
|
||||
NthSample(s,y*Width+x,N_DIMENSIONS)->Value[c]=(uint8)
|
||||
(min(255,max(0,val1)));
|
||||
(V_min(255,V_max(0,val1)));
|
||||
}
|
||||
}
|
||||
struct QuantizedValue *q=Quantize(s,Width*Height,N_DIMENSIONS,
|
||||
@@ -76,7 +76,7 @@ void ColorQuantize(uint8 const *Image,
|
||||
tryc+=Error[x][c][ErrorUse];
|
||||
Error[x][c][ErrorUse]=0;
|
||||
}
|
||||
samp[c]=(uint8) min(255,max(0,tryc));
|
||||
samp[c]=(uint8) V_min(255,V_max(0,tryc));
|
||||
}
|
||||
struct QuantizedValue *f=FindMatch(samp,3,Weights,q);
|
||||
out_pixels[Width*y+x]=(uint8) (f->value);
|
||||
|
||||
Reference in New Issue
Block a user