void CGameOptions::EnsureSettings() { SetScreenBrightness(x48_screenBrightness, true); SetGamma(m_gamma, true); SetScreenPositionX(x4c_screenXOffset, true); SetScreenPositionY(x50_screenYOffset, true); SetScreenStretch(x54_screenStretch, true); SetSfxVolume(x58_sfxVol, true); SetMusicVolume(x5c_musicVol, true); SetSurroundMode(int(x44_soundMode), true); SetHelmetAlpha(x64_helmetAlpha); SetHUDLag(x68_24_hudLag); SetInvertYAxis(x68_25_invertY); SetIsRumbleEnabled(x68_26_rumble); SetIsHintSystemEnabled(x68_28_hintSystem); SetSwapBeamControls(x68_27_swapBeamsControls); }
bool __CALLOUT InitializeShell() { Clear(BLUE); const char* str = "PRICE of HONOR!"; DrawTextString(40,60,str,Length(str),RED,BLUE); GetBatteryLevel(); SetScreenBrightness(100); char buff[200]; int res = snprintf(buff,sizeof(buff),"test %d",0); DrawPixel(1,1,WHITE); DoVibroAndBeep(500); ubyte_t l = GetLustraId(); SendRadioPacket(NULL,0); uword_t a = GetArmletId(); FILE log; OpenFile(&log, "log.txt", true); char* s = "log test"; WriteFile(&log, s, Length(s)); /* //int i = 0; //Color area[100]; //for (i=0; i<100; i++) area[i] = 0xF0F; //DrawArea(5,5,area,100,10,10); //WriteFile(&log, (char*)area, 100); //for (i=0; i<100; i++) area[i] = 0x0; //ReadFile(&log, (char*)area, 100); //AppendFile(&log, (char*)area, 100); //DrawArea(5,5,area,100,10,10); */ RequestTimer(TimerProc,100); int up = GetUpTime(); int rnd = GetRandom(50); //SetCureName is checked in AppMainThread //WritePill is checked in AppMainThread //StartThread(AppMainThread,NULL); return true; //TODO }
void SetScreenBrightness(double brightness) { AssertMainThread(); PROXY_IF_SANDBOXED(SetScreenBrightness(clamped(brightness, 0.0, 1.0))); }