Пример #1
0
VOID HandleINI()
{
    CHAR szBuffer[MAX_STRING] = {0};
    WritePrivateProfileString(HUDSection,"Last",HUDNames,INIFileName);
    SkipParse = GetPrivateProfileInt(HUDSection,"SkipParse",1,INIFileName);
    SkipParse = SkipParse < 1 ? 1 : SkipParse;
    CheckINI = GetPrivateProfileInt(HUDSection,"CheckINI",10,INIFileName);
    CheckINI = CheckINI < 10 ? 10 : CheckINI;
    GetPrivateProfileString(HUDSection,"UpdateInBackground","on",szBuffer,MAX_STRING,INIFileName);
    bBGUpdate = _strnicmp(szBuffer,"on",2)?false:true;
    GetPrivateProfileString(HUDSection,"ClassHUD","on",szBuffer,MAX_STRING,INIFileName);
    bClassHUD = _strnicmp(szBuffer,"on",2)?false:true;
    GetPrivateProfileString(HUDSection,"ZoneHUD","on",szBuffer,MAX_STRING,INIFileName);
    bZoneHUD = _strnicmp(szBuffer,"on",2)?false:true;
    GetPrivateProfileString("MQ2HUD","UseFontSize","off",szBuffer,MAX_STRING,INIFileName);
    bUseFontSize = _strnicmp(szBuffer,"on",2)?false:true;
    // Write the SkipParse and CheckINI section, in case they didn't have one
    WritePrivateProfileString(HUDSection,"SkipParse",SafeItoa(SkipParse,szBuffer,10),INIFileName);
    WritePrivateProfileString(HUDSection,"CheckINI",SafeItoa(CheckINI,szBuffer,10),INIFileName);
    WritePrivateProfileString(HUDSection,"UpdateInBackground",bBGUpdate?"on":"off",INIFileName);
    WritePrivateProfileString(HUDSection,"ClassHUD",bClassHUD?"on":"off",INIFileName);
    WritePrivateProfileString(HUDSection,"ZoneHUD",bZoneHUD?"on":"off",INIFileName);
    WritePrivateProfileString("MQ2HUD","UseFontSize",bUseFontSize?"on":"off",INIFileName);

    LoadElements();
}
Пример #2
0
void ServerLBA1ModelClass::LoadModel(unsigned char* bodyPtr)
{
	bodyHeaderPtr = (unsigned char*)malloc(26);
	for(int a=0; a<26; a++)
		*(bodyHeaderPtr+a) = *(bodyPtr+a);

    Points=LoadPoints(bodyPtr);
	Elements=LoadElements(bodyPtr);
	Shades=LoadShades(bodyPtr);
	Polygons=LoadPolys(bodyPtr);
	Lines=LoadLines(bodyPtr);
	Spheres=LoadSpheres(bodyPtr);
}