19 themes/skins available for your browsing pleasure. A variety of looks, 6 AC2 exclusives - Featuring SMACX, Civ6 Firaxis, and two CivII themes.[new Theme Select Box, bottom right sidebar - works for lurkers, too]
0 Members and 1 Guest are viewing this topic.
0A F5 ????? A = 10. F5 = 245 10+245 = 255 For reading in the values, I had to move 10 forward before starting to count. 245 for 245 values used? zz F5 00 00 00 FC 00 FC FC 00 FC FC 00 FC FC 00 FC FC 00 FC FC 00 FC FC 00 FC FC 00 FC FC 00 FC.... zz F5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 AC 80 50 A0 7C .... Yeah.... Ok. I've learned this: zz*3 (usually 1*3 or 10*3) tells how far to right to being start counting up from 0 for color numbers. F5 (245) is the length of this sections data. so values greater than 245 - zz. are fetched by some other method. Colors are stored as R G B values. 1 byte each.
Opps. I meant 246. The problem is that 255 - 10 = 245. And then they go ahead and use 247-255 as a reference number on some of the voxels.
pos=pos + 1 + CVRfile[pos-1]*3 #10 was the right number for ACP which had 145 for its number. 155-145 = 10# Color is wrong on select for the knob parts... as well as the drill arm# It isn't getting the right colors when it is # 145 or higherinttmp = pos + 3*(245-CVRfile[pos-1]-1) #it won't be reading in the right values for 155-x... yeah.colorcount = 0;#TODO: I think this might be where it is adding one color to many sometimes.... I'm gonna have to pin it down sometime.while pos <= inttmp:
pos=pos + 1 inttmp = pos + 3*255colorcount = 0;while pos <= inttmp:
# Palette colors pos += 16 logging.debug("palette num" + str(CVRfile[pos-1])) pos += 1 # Physical Palette inttmp = pos + 3 * 255 colorcount = 0; while pos <= inttmp: self.physical_palette[colorcount] = str(CVRfile[pos]) + "," + str(CVRfile[pos+1]) +"," + str(CVRfile[pos+2]) colorcount+=1 pos+=3 # Shader Palette # 12 below is the shade level: 0 = dark 23 = light pos += 12 * 256 inttmp = pos + 255 colorcount = 0; while pos <= inttmp: self.dict_colors[colorcount] = self.physical_palette[CVRfile[pos]] colorcount += 1 pos += 1 # Body Parts 3D data...
void DecodeNormal(DWORD n, double* x, double* y, double* z){ // A1(0-23)*89+A2(0-88) // Normally the highest number would be 23 * 89 + 88 = 2136, // but because in the case of A1=0, we know Y=1.0, so X=Z=0.0, so A2 = 0, // we compressed the range 0-88 down to 0 // In the case of A1=0, sin(A1)=0, so x & y will be 0 for any value // from 0 to 88 below n = n + 88; // extract the original angles // Angle1 = Z to X-axis // Angle2 = Y to X-axis DWORD dwAngle1 = 88 - n % 89; DWORD dwAngle2 = n / 89; // convert the angles to radians double dAngle1 = dwAngle1 / 88.0 * 2.0 * PI; double dAngle2 = dwAngle2 / 23.0 * PI / 2.0; // convert the angles to coords in the range [0, -1] // Using standard 3d axes, for cavier axes reorder to x, y, z below *z = sin(dAngle1) * sin(dAngle2); *x = cos(dAngle1) * sin(dAngle2); *y = cos(dAngle2);}