* Timing fixes, some Android work

git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1515 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
seth 2017-09-29 22:57:00 +00:00
parent 4174db5427
commit 63adc575a8
11 changed files with 135 additions and 19 deletions

View file

@ -184,8 +184,8 @@ App::App()
m_bDidPostInit = false;
m_bHasDMODSupport = true;
//for mobiles
m_version = 1.84f;
m_versionString = "V1.8.4";
m_version = 1.85f;
m_versionString = "V1.8.5";
m_build = 1;
m_bCheatsEnabled = false;
@ -876,6 +876,11 @@ void App::UpdateVideoSettings()
{
eVideoFPS v = (eVideoFPS)GetApp()->GetVarWithDefault("fpsLimit", Variant(uint32(VIDEO_FPS_LIMIT_OFF)))->GetUINT32();
SetFPSLimit(60);
#ifdef _DEBUG
//SetFPSLimit(20);
#endif
//SetFPSLimit(v);
};
@ -1042,6 +1047,7 @@ void App::AddTextToLog(const char *tex, const char *filename)
}
#ifdef WINAPI
//our custom LogMsg that isn't slow as shit
void LogMsg(const char* traceStr, ...)
{
@ -1072,3 +1078,5 @@ void LogMsg(const char* traceStr, ...)
}
}
#endif

View file

@ -463,7 +463,7 @@ void DMODMenuAddScrollContent(Entity *pParent)
|| EndsWith(entries[i].m_files, "/develop")
)continue;
#else
if (IsInString(files[i],"/Snapshot") || IsInString(files[i], "/Snapshots")) continue;
if (IsInString(entries[i].m_files,"/Snapshot") || IsInString(entries[i].m_files, "/Snapshots")) continue;
#endif
GetParsedDMODInfo(entries[i].m_files, entries[i].dmodName, entries[i].version, entries[i].dmodCopyright, entries[i].dmodwebsite, entries[i].description );

View file

@ -1035,9 +1035,6 @@ void OnGameMenuRender(VariantList *pVList)
//apply scale offset
ApplyAspectRatioGLMatrix();
updateFrame();
if (DinkGetSpeedUpMode())
@ -1045,7 +1042,7 @@ void OnGameMenuRender(VariantList *pVList)
//3x speed
for (int i = 0; i < 2; i++)
{
GetApp()->SetGameTick(GetApp()->GetGameTick() + GetApp()->GetDeltaTick() * 3);
//GetApp()->SetGameTick(GetApp()->GetGameTick() + GetApp()->GetDeltaTick() * 3);
//GetApp()->GetGameTimer()->Update();
glClearColor(0, 0, 0, 1);
@ -1054,6 +1051,9 @@ void OnGameMenuRender(VariantList *pVList)
}
}
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
//remove matrix

View file

@ -482,7 +482,7 @@ void OptionsMenuAddScrollContent(Entity *pParent)
y += GetSize2DEntity(pEnt).y;
y += spacerY;
/*
//fps limit
pEnt = CreateTextLabelEntity(pBG, "", startX, y, "Lock to 30 FPS:");
SetupTextEntity(pEnt,fontID);
@ -499,7 +499,8 @@ void OptionsMenuAddScrollContent(Entity *pParent)
uint32 videoFPS = GetApp()->GetVar("fpsLimit")->GetUINT32();
SetupLightBarSelect(pBG, "fps_limit_", videoFPS, MAKE_RGBA(190, 0, 35, 255));
*/
if (GetPlatformID() != PLATFORM_ID_IOS)
{
y += spacerY;

View file

@ -11330,7 +11330,7 @@ int autoreverse_diag(int j)
}
#ifdef _DEBUG
LogMsg("Auto Reverse Diag was sent a dir %d sprite, base %d walk.",g_sprite[j].dir, g_sprite[j].base_walk);
//LogMsg("Auto Reverse Diag was sent a dir %d sprite, base %d walk.",g_sprite[j].dir, g_sprite[j].base_walk);
#endif
return(0);
}
@ -16007,7 +16007,8 @@ LastWindowsTimer = GetTickCount();
g_dglos.lastTickCount = g_dglos.g_dinkTick;
g_dglos.g_dinkTick = GetBaseApp()->GetGameTick();
//g_dglos.g_dinkTick = GetBaseApp()->GetGameTick();
g_dglos.g_dinkTick += (1000.0f / 60.0f); //FPS lock at 60 fps
/*
int fps_final = g_dglos.g_dinkTick - g_dglos.lastTickCount;
@ -16044,7 +16045,7 @@ LastWindowsTimer = GetTickCount();
//assume we're locked at 60 fps
g_dglos.base_timing = 18;
g_dglos.base_timing = 7;
float junk3 = 1;
/*
if (g_dglos.dinkspeed <= 0)
@ -16068,7 +16069,7 @@ LastWindowsTimer = GetTickCount();
//g_sprite[1].speed = (g_dglos.base_timing / 4);
//g_sprite[1].speed = 5;
bool bSpeedUp = false;
g_sprite[1].speed = (int)junk3*1.35f;
g_sprite[1].speed = (int)junk3*1.0f;
if (DinkGetSpeedUpMode())
{
bSpeedUp = true;
@ -16100,9 +16101,13 @@ LastWindowsTimer = GetTickCount();
if (g_dglos.g_dinkTick > g_dglos.g_DinkUpdateTimerMS+100)
{
g_dglos.mbase_timing = (g_dglos.mbase_count / 100);
// g_dglos.mbase_timing = (g_dglos.mbase_count / 100);
g_dglos.mbase_timing = 135; //hardcoded now to avoid fluctuations
g_dglos.g_DinkUpdateTimerMS = g_dglos.g_dinkTick;
if (g_dglos.g_bowStatus.active) g_dglos.g_bowStatus.hitme = true;
if (*pupdate_status == 1) update_status_all();
update_sound();