01.06.2011, 16:37 
	
	
	
		Does anyone still have the SAmin.hmap file or is there another plugin like this which uses less memory space? I tried to convert the SAfull.hmap to SAmin.hmap myself but I failed (I get wrong values - not just inaccurate, I even get 9.0 when I'm at 30.0 - when using my SAmin.hmap with Y Less' minimal version). I'd use the NOCACHE with SAfull as well, but I can't upload a 70mb file to my host >.>
Or maybe you can find out what I'm doing wrong when converting:
Thanks, Blay09
	
	
	
	
Or maybe you can find out what I'm doing wrong when converting:
Код:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv)
{
    FILE* fileInput = fopen("SAfull.hmap", "rb");
    FILE* fileOutput = fopen("SAmin.hmap", "wb");
    for(int x = 0; x < 6000; x += 3)
    {
        for(int y = 0; y < 6000; y += 3)
        {
            int iGridX = x + 3000;
            int iGridY = (y - 3000) * -1;
            int iDataPos = ((iGridY * 6000) + iGridX) * 2;
            unsigned short PointData;
            fseek(fileInput, iDataPos, SEEK_SET);
            fread(&PointData, 1, sizeof(unsigned short), fileInput);
            fwrite(&PointData, 1, sizeof(unsigned short), fileOutput);
        }
    }
    fclose(fileOutput);
    fclose(fileInput);
}





 
	 
	 
	

 a?
a?




