void AssFile::GetResolution(int &sw, int &sh) const { sw = GetScriptInfoAsInt("PlayResX"); sh = GetScriptInfoAsInt("PlayResY"); // Gabest logic: default is 384x288, assume 1280x1024 if either height or // width are that, otherwise assume 4:3 if only heigh or width are set. // Why 1280x1024? Who the f**k knows. Clearly just Gabest trolling everyone. if (sw == 0 && sh == 0) { sw = 384; sh = 288; } else if (sw == 0) sw = sh == 1024 ? 1280 : sh * 4 / 3; else if (sh == 0) sh = sw == 1280 ? 1024 : sw * 3 / 4; }
void AssFile::GetResolution(int &sw,int &sh) const { sw = GetScriptInfoAsInt("PlayResX"); sh = GetScriptInfoAsInt("PlayResY"); // Gabest logic? if (sw == 0 && sh == 0) { sw = 384; sh = 288; } else if (sw == 0) { if (sh == 1024) sw = 1280; else sw = sh * 4 / 3; } else if (sh == 0) { // you are not crazy; this doesn't make any sense if (sw == 1280) sh = 1024; else sh = sw * 3 / 4; } }