* Changed release compiling a bit to enable C7 compatible debug info, may help with stack traces

* Oops, turned max sprites back up to 300 from 100, don't ask me how I managed that one
* (DinkC) A line of over 200 characters won't corrupt memory (new limit is 512) - this fixed a crash in Grasp of Darkness
* (DinkC) external commands no longer generate bogus errors in the log.txt due to how 1.08 added weird overloading stuff
* Now shows the dmod's splash.bmp during loading
* Fixed issue where music might not play on the title screen
* Raised "memory of dead background sprites" to 300 from 100 for Windows, up to 200 for mobile
* Doubled memory Dink is allowed to use before uncaching graphics not used recently (could probably be disabled entirely for Windows but whatever)

git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1510 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
seth 2017-09-27 07:51:59 +00:00
parent ac152e940e
commit 821e5f1651
8 changed files with 115 additions and 37 deletions

View file

@ -13,6 +13,7 @@
#include "QuickTipMenu.h"
#include "Entity/SelectButtonWithCustomInputComponent.h"
#include "Entity/ArcadeInputComponent.h"
#include "Renderer/SoftSurface.h"
#ifdef _DEBUG
#define AUTO_SAVE_MS (1000*8)
@ -1442,14 +1443,58 @@ Entity * GameCreate(Entity *pParentEnt, int gameIDToLoad, string stateToLoad, st
{
Entity *pBG = pParentEnt->AddEntity(new Entity("GameMenu"));
AddFocusIfNeeded(pBG);
Entity *pLoading = CreateOverlayEntity(pBG, "game_loading", ReplaceWithDeviceNameInFileName("interface/iphone/bkgd_stone.rttex"), 0, 0);
Entity *pLoading = CreateOverlayEntity(pBG, "game_loading", ReplaceWithDeviceNameInFileName("interface/iphone/bkgd_stone.rttex"), 0,0);
//setup the splash too
string splashBmp;
if (!g_dglo.m_dmodGamePathWithDir.empty() && FileExists(g_dglo.m_dmodGamePathWithDir + "tiles\\splash.bmp"))
{
splashBmp = g_dglo.m_dmodGamePathWithDir + "tiles\\splash.bmp";
}
else
{
splashBmp = g_dglo.m_gamePathWithDir + "tiles\\splash.bmp";
}
SoftSurface s8bit;
if (!s8bit.LoadFile(splashBmp, SoftSurface::COLOR_KEY_NONE, false))
{
//give uop
}
else
{
//if it was 8bit, this will convert it to 32
SoftSurface s;
s.Init(s8bit.GetWidth(), s8bit.GetHeight(), SoftSurface::SURFACE_RGBA);
s.Blit(0, 0, &s8bit);
s.FlipY();
SurfaceAnim *pSurf;
pSurf = new SurfaceAnim;
pSurf->SetTextureType(Surface::TYPE_DEFAULT); //insure no mipmaps are created
pSurf->InitBlankSurface(s.GetWidth(), s.GetHeight());
pSurf->UpdateSurfaceRect(rtRect(0, 0, s.GetWidth(), s.GetHeight()), s.GetPixelData());
//add the icon
Entity *pEnt = CreateOverlayEntity(pLoading, "icon", "", GetScreenSizeXf()/2, GetScreenSizeYf()/2);
OverlayRenderComponent *pOverlay = (OverlayRenderComponent*)pEnt->GetComponentByName("OverlayRender");
pOverlay->SetSurface(pSurf, true);
SetAlignmentEntity(pEnt, ALIGNMENT_CENTER);
//EntitySetScaleBySize(pEnt, GetDMODBarIconSize());
}
//*********************
if (msgToShow.empty())
{
msgToShow = "Loading...";
}
Entity *pLabel = CreateTextLabelEntity(pLoading, "load_label", GetScreenSizeXf()/2, GetScreenSizeYf()/2, msgToShow);
Entity *pLabel = CreateTextLabelEntity(pLoading, "load_label", GetScreenSizeXf()/2, GetScreenSizeYf()-30, msgToShow);
SetupTextEntity(pLabel, FONT_LARGE);
SetAlignmentEntity(pLabel, ALIGNMENT_CENTER);
pBG->GetFunction("GameLoadPiece")->sig_function.connect(&GameLoadPiece);
@ -1459,7 +1504,7 @@ Entity * GameCreate(Entity *pParentEnt, int gameIDToLoad, string stateToLoad, st
Entity *pProgressBar = pLoading->AddEntity(new Entity("bar"));
EntityComponent *pBar = pProgressBar->AddComponent(new ProgressBarComponent);
pProgressBar->GetVar("pos2d")->Set(CL_Vec2f(iPhoneMapX(80),iPhoneMapY(120)));
pProgressBar->GetVar("pos2d")->Set(CL_Vec2f(iPhoneMapX(80),iPhoneMapY(280)));
pProgressBar->GetVar("size2d")->Set(CL_Vec2f(iPhoneMapX(310),iPhoneMapY(15)));
pProgressBar->GetVar("color")->Set(MAKE_RGBA(200,200,0,60));
pBar->GetVar("interpolationTimeMS")->Set(uint32(1)); //update faster