* (Windows) Running "dink.exe c:\temp\ACoolDMOD.dmod" from the command line will now install it, then run it. (original dmod file won't be deleted) Just seemed weird that this didn't exist so added it
* DMOD installer progress now switches to showing MB instead of K if the size is big * BUGFIX: Fixed map loading bug that could crash the game (I added this one recently trying to clean up code to use more consts rather than magic #s, but there is always the risk I stupidely break something!) * load_tile no longer instantly takes effect but requires a draw_screen or moving screens, this matches how 1.08 worked. Loading a save state or resizing the window will cause it to happen early, but hey, close enough * BUGFIX: Fixed extra nasty bug where logic on certain things like charging your magic would pause the amount of time you used TAB to skip time git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1517 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
parent
7b57f6f277
commit
36a414e12a
12 changed files with 96 additions and 52 deletions
|
@ -25,7 +25,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.8.5</string>
|
||||
<string>1.8.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.8.5</string>
|
||||
<string>1.8.6</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.8.5</string>
|
||||
<string>1.8.6</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSMainNibFile</key>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.rtsoft.rtdink"
|
||||
android:versionCode="9"
|
||||
android:versionName="1.8.5"
|
||||
android:versionName="1.8.6"
|
||||
android:installLocation="preferExternal"
|
||||
>
|
||||
|
||||
|
|
|
@ -252,3 +252,13 @@ a specific speed, but by choosing rather snappy speed hopefully mystery island a
|
|||
------ Change log for 1.8.5 ----------
|
||||
|
||||
* Tweaked speed a bit, sort of aligned it so the cutscenes in Initiation play right
|
||||
|
||||
------ Change log for 1.8.6 ----------
|
||||
|
||||
* (Windows) Running "dink.exe c:\temp\ACoolDMOD.dmod" from the command line will now install it, then run it. (original dmod file won't be deleted) Just seemed weird that this didn't exist so added it
|
||||
* DMOD installer progress now switches to showing MB instead of K if the size is big
|
||||
* BUGFIX: Fixed map loading bug that could crash the game (I added this one recently trying to clean up code to use more consts rather than magic #s, but there is always the risk I stupidely break something!)
|
||||
* load_tile no longer instantly takes effect but requires a draw_screen or moving screens, this matches how 1.08 worked. Loading a save state or resizing the window will cause it to happen early, but hey, close enough
|
||||
* BUGFIX: Fixed extra nasty bug where logic on certain things like charging your magic would pause the amount of time you used TAB to skip time
|
||||
|
||||
- Note: Just to be safe, save state version has changed, so old save states won't load
|
||||
|
|
|
@ -184,8 +184,8 @@ App::App()
|
|||
m_bDidPostInit = false;
|
||||
m_bHasDMODSupport = true;
|
||||
//for mobiles
|
||||
m_version = 1.85f;
|
||||
m_versionString = "V1.8.5";
|
||||
m_version = 1.86f;
|
||||
m_versionString = "V1.8.6";
|
||||
m_build = 1;
|
||||
m_bCheatsEnabled = false;
|
||||
|
||||
|
@ -282,7 +282,7 @@ bool App::Init()
|
|||
int scaleToX = 480;
|
||||
int scaleToY = 320;
|
||||
|
||||
if (IsTabletSize() || IsDesktop())
|
||||
//if (IsTabletSize() || IsDesktop())
|
||||
{
|
||||
scaleToX = 1024;
|
||||
scaleToY = 768;
|
||||
|
@ -694,7 +694,7 @@ void App::AddDroidKeyboardKeys()
|
|||
AddKeyBinding(pComp, "KeyboardAltMagic", 8, VIRTUAL_KEY_GAME_MAGIC);
|
||||
|
||||
AddKeyBinding(pComp, "KeyboardInventory", 'I', VIRTUAL_KEY_GAME_INVENTORY);
|
||||
AddKeyBinding(pComp, "KeyboardAltTalk", 13, VIRTUAL_KEY_GAME_TALK);
|
||||
//AddKeyBinding(pComp, "KeyboardAltTalk", 13, VIRTUAL_KEY_GAME_TALK); //not sure what this was for, special android key? It caused ineventory to open AND dink to talk so was bad I think
|
||||
AddKeyBinding(pComp, "KeyboardFire", VIRTUAL_KEY_DIR_CENTER, VIRTUAL_KEY_GAME_FIRE);
|
||||
AddKeyBinding(pComp, "KeyboardFire2", 'X', VIRTUAL_KEY_GAME_FIRE);
|
||||
// AddKeyBinding(pComp, "KeyboardAltFire", VIRTUAL_KEY_SHIFT, VIRTUAL_KEY_GAME_FIRE);
|
||||
|
|
|
@ -92,6 +92,9 @@ public:
|
|||
bool GetGhostMode() {return m_bGhostMode;}
|
||||
void SetGhostMode(bool bNew) { m_bGhostMode = bNew; }
|
||||
bool UseClassicEscapeMenu();
|
||||
vector<string> * GetReferenceToCommandLineParms() { return &m_commandLineParms; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
AdManager m_adManager;
|
||||
|
|
|
@ -36,6 +36,7 @@ void InventoryComponent::OnAdd(Entity *pEnt)
|
|||
void InventoryComponent::OnRemove()
|
||||
{
|
||||
EntityComponent::OnRemove();
|
||||
|
||||
}
|
||||
|
||||
void InventoryComponent::OnUpdatePos(CL_Vec2f vPos)
|
||||
|
|
|
@ -216,7 +216,14 @@ void OnDMODUnpackStatusUpdate(VariantList *pVList)
|
|||
float progress = float( (curBytes%barSize)) /float(barSize);
|
||||
|
||||
//LogMsg("prog: %.2f", progress);
|
||||
DMODInstallUpdateStatus(NULL, "Writing "+toString(curBytes/1024)+"K");
|
||||
int installSize = curBytes / 1024;
|
||||
string sizeType = "K";
|
||||
if (installSize > 10000)
|
||||
{
|
||||
installSize /= 1024;
|
||||
sizeType = "MB";
|
||||
}
|
||||
DMODInstallUpdateStatus(NULL, "Writing "+toString(installSize)+ " "+sizeType);
|
||||
DMODInstallSetProgressBar(progress);
|
||||
}
|
||||
|
||||
|
@ -249,8 +256,9 @@ void OnDMODInstallHTTPFinish(VariantList *pVList)
|
|||
DMODSetTitleLabel(pMenu, string("Installing ")+pMenu->GetVar("originalFileName")->GetString()+"...");
|
||||
EntityComponent *pUnpack = pMenu->AddComponent(new UnpackArchiveComponent);
|
||||
pUnpack->GetVar("sourceFileName")->Set(pMenu->GetVar("tempFileName")->GetString());
|
||||
bool bDeleteOnFinish = pMenu->GetVar("deleteOnFinish")->GetUINT32();
|
||||
|
||||
pUnpack->GetVar("deleteSourceOnFinish")->Set(uint32(1));
|
||||
pUnpack->GetVar("deleteSourceOnFinish")->Set(uint32(bDeleteOnFinish));
|
||||
|
||||
pUnpack->GetVar("destDirectory")->Set(pMenu->GetVar("installDirectory")->GetString());
|
||||
DMODInstallSetProgressBar(0);
|
||||
|
@ -310,7 +318,7 @@ void InitNetStuff(VariantList *pVList)
|
|||
}
|
||||
|
||||
|
||||
Entity * DMODInstallMenuCreate(Entity *pParentEnt, string dmodURL, string installDirectory, string sourceFileName, bool bFromBrowseMenu, string dmodName)
|
||||
Entity * DMODInstallMenuCreate(Entity *pParentEnt, string dmodURL, string installDirectory, string sourceFileName, bool bFromBrowseMenu, string dmodName, bool bDeleteOnFinish)
|
||||
{
|
||||
|
||||
Entity *pBG = CreateOverlayEntity(pParentEnt, "DMODInstall", ReplaceWithDeviceNameInFileName("interface/iphone/bkgd_stone.rttex"), 0,0);
|
||||
|
@ -331,11 +339,12 @@ Entity * DMODInstallMenuCreate(Entity *pParentEnt, string dmodURL, string instal
|
|||
pBG->GetVar("tempFileName")->Set(GetDMODRootPath()+"temp.dmod");
|
||||
pBG->GetVar("originalFileName")->Set(GetFileNameFromString(dmodURL));
|
||||
pBG->GetVar("fromBrowseMenu")->Set(uint32(bFromBrowseMenu));
|
||||
|
||||
pBG->GetVar("deleteOnFinish")->Set(uint32(bDeleteOnFinish));
|
||||
if (IsLargeScreen())
|
||||
{
|
||||
//SetupTextEntity(pTitleLabel, FONT_LARGE);
|
||||
}
|
||||
|
||||
//SetAlignmentEntity(pTitleLabel, ALIGNMENT_CENTER);
|
||||
|
||||
EntityComponent *pTyper = pTitleLabel->AddComponent(new TyperComponent);
|
||||
|
@ -370,6 +379,11 @@ Entity * DMODInstallMenuCreate(Entity *pParentEnt, string dmodURL, string instal
|
|||
pBG->GetVar("exitto")->Set("browse");
|
||||
|
||||
}
|
||||
if (!bDeleteOnFinish)
|
||||
{
|
||||
pBG->GetVar("autoplay")->Set(uint32(1));
|
||||
}
|
||||
|
||||
|
||||
if (!sourceFileName.empty())
|
||||
{
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
|
||||
#include "App.h"
|
||||
|
||||
Entity * DMODInstallMenuCreate(Entity *pParentEnt, string dmodURL, string installDirectory, string sourceFileName = "", bool bFromBrowseMenu = false, string dmodName = "");
|
||||
Entity * DMODInstallMenuCreate(Entity *pParentEnt, string dmodURL, string installDirectory, string sourceFileName = "", bool bFromBrowseMenu = false, string dmodName = "", bool bDeleteOnFinish = true);
|
||||
#endif // DMODInstallMenu_h__
|
|
@ -209,10 +209,30 @@ void MainMenuOnSelect(VariantList *pVList) //0=vec2 point of click, 1=entity sen
|
|||
}
|
||||
|
||||
|
||||
string GetNextDMODToInstall()
|
||||
string GetNextDMODToInstall(bool &bIsCommandLineInstall, const bool bDeleteCommandLineParms)
|
||||
{
|
||||
//if (!GetApp()->CanDownloadDMODS()) return ""; //ignore it
|
||||
|
||||
if (IsDesktop())
|
||||
{
|
||||
vector<string> parms = GetApp()->GetCommandLineParms();
|
||||
|
||||
for (int i = 0; i < parms.size(); i++)
|
||||
{
|
||||
StringReplace("\"", "", parms[i]);
|
||||
if (IsInString(ToLowerCaseString(parms[i]), ".dmod"))
|
||||
{
|
||||
bIsCommandLineInstall = true;
|
||||
|
||||
//dmod sent via commandline, install it
|
||||
if (bDeleteCommandLineParms)
|
||||
GetApp()->GetReferenceToCommandLineParms()[i].clear(); //don't want to install the same dmod twice
|
||||
return parms[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
vector<string> files = GetFilesAtPath(GetSavePath());
|
||||
|
||||
//LogMsg("listing files");
|
||||
|
@ -240,10 +260,13 @@ void MainOnStartLoading(VariantList *pVList)
|
|||
GetMessageManager()->CallEntityFunction(pBG, 500, "OnDelete", NULL);
|
||||
pBG->SetName("MainMenuDelete");
|
||||
|
||||
string fName = GetNextDMODToInstall();
|
||||
bool bIsCommandLineInstall = true;
|
||||
|
||||
string fName = GetNextDMODToInstall(bIsCommandLineInstall, true);
|
||||
|
||||
if (!fName.empty())
|
||||
{
|
||||
DMODInstallMenuCreate(pBG->GetParent(), "", GetDMODRootPath(), GetSavePath()+fName);
|
||||
DMODInstallMenuCreate(pBG->GetParent(), "", GetDMODRootPath(), GetSavePath()+fName, false, "", !bIsCommandLineInstall);
|
||||
} else
|
||||
{
|
||||
GameCreate(pBG->GetParent(), 0, fileName, "Continuing last game...");
|
||||
|
@ -606,9 +629,10 @@ Entity * MainMenuCreate( Entity *pParentEnt, bool bFadeIn )
|
|||
}
|
||||
}
|
||||
|
||||
bool bIsCommandLineInstall = false;
|
||||
|
||||
|
||||
if ( ! GetNextDMODToInstall().empty())
|
||||
if ( ! GetNextDMODToInstall(bIsCommandLineInstall, false).empty())
|
||||
{
|
||||
pBG->GetFunction("OnStartLoading")->sig_function.connect(&MainOnStartLoading);
|
||||
VariantList vList(pBG, string(""));
|
||||
|
|
|
@ -16,7 +16,7 @@ bool pre_figure_out(const char *line, int load_seq, bool bLoadSpriteOnly);
|
|||
|
||||
#define C_DINK_SCREEN_TRANSITION_TIME_MS 400
|
||||
|
||||
const float SAVE_FORMAT_VERSION = 2.9f;
|
||||
const float SAVE_FORMAT_VERSION = 3.0f;
|
||||
const int C_DINK_FADE_TIME_MS = 300;
|
||||
|
||||
const float G_TRANSITION_SCALE_TRICK = 1.01f;
|
||||
|
@ -1245,7 +1245,7 @@ bool load_game(int num)
|
|||
g_dglos.time_start = 0;
|
||||
}
|
||||
//g_dglos.time_start = GetBaseApp()->GetGameTick();
|
||||
|
||||
g_dglos.g_dinkTick = GetTick(TIMER_GAME);
|
||||
g_sprite[1].base_idle = g_dglos.g_playerInfo.base_idle;
|
||||
g_sprite[1].base_walk = g_dglos.g_playerInfo.base_walk;
|
||||
g_sprite[1].base_hit = g_dglos.g_playerInfo.base_hit;
|
||||
|
@ -1525,6 +1525,7 @@ bool load_hard(void)
|
|||
|
||||
void blit_background(void)
|
||||
{
|
||||
|
||||
rtRect32 rcRect( 0,0,C_DINK_SCREENSIZE_X,C_DINK_SCREENSIZE_Y);
|
||||
lpDDSBack->BltFast( 0, 0, lpDDSBackGround,
|
||||
&rcRect, DDBLTFAST_NOCOLORKEY);
|
||||
|
@ -4106,6 +4107,10 @@ bool check_seq_status(int seq, int frame)
|
|||
{
|
||||
|
||||
if (seq == 0) return true;
|
||||
if (seq < 0 || seq >= C_MAX_SEQUENCES)
|
||||
{
|
||||
assert(!"Illegal sequence!");
|
||||
}
|
||||
if (g_dglos.g_seq[seq].active == false)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
|
@ -5595,7 +5600,7 @@ void place_sprites_game(bool bBackgroundOnly )
|
|||
highest_sprite = 20000; //more than it could ever be
|
||||
rank[r1] = 0;
|
||||
|
||||
for (int h1 = 1; h1 < C_MAX_SPRITES_AT_ONCE; h1++)
|
||||
for (int h1 = 1; h1 < 100; h1++)
|
||||
{
|
||||
if (bs[h1] == false)
|
||||
{
|
||||
|
@ -6404,7 +6409,7 @@ restart:
|
|||
if (!bFullRebuild) return; //don't mess with the game tick stuff or initscripts
|
||||
//if script for overall screen, run it
|
||||
|
||||
g_dglos.g_dinkTick = GetBaseApp()->GetGameTick();
|
||||
//g_dglos.g_dinkTick = GetBaseApp()->GetGameTick();
|
||||
init_scripts();
|
||||
}
|
||||
|
||||
|
@ -9881,7 +9886,9 @@ LogMsg("%d scripts used", g_dglos.g_returnint);
|
|||
|
||||
//remember this change
|
||||
strncpy(g_dglos.g_playerInfo.tile[tileIndex].file, fName.c_str(), 50); //this 50 is hardcoded in the player data
|
||||
g_forceBuildBackgroundFromScratch = true;
|
||||
|
||||
//don't force it right now?
|
||||
//g_forceBuildBackgroundFromScratch = true;
|
||||
//BuildScreenBackground(true); //trigger full rebuild, this could be optimized by setting a flag and only doing it once...
|
||||
}
|
||||
|
||||
|
@ -12831,10 +12838,8 @@ void BlitSecondTransitionScreen()
|
|||
//without normal antialiasing we don't need to do much, but this does fix tiny black artifacts during the screen transition
|
||||
dstOffset = rtRectf(-0.05, -0.05f, 0.05f, 0.05);
|
||||
srcOffset = rtRectf(0.4, 0.4, -0.4, -0.4);
|
||||
|
||||
}
|
||||
|
||||
|
||||
dstRect.AdjustPosition( ( -g_dglo.m_transitionOffsetNative.x*g_dglo.m_transitionProgress),
|
||||
( -g_dglo.m_transitionOffsetNative.y*g_dglo.m_transitionProgress));
|
||||
|
||||
|
@ -16099,6 +16104,8 @@ LastWindowsTimer = GetTickCount();
|
|||
|
||||
g_dglos.mbase_count++;
|
||||
|
||||
|
||||
|
||||
if (g_dglos.g_dinkTick > g_dglos.g_DinkUpdateTimerMS+100)
|
||||
{
|
||||
// g_dglos.mbase_timing = (g_dglos.mbase_count / 100);
|
||||
|
@ -16203,24 +16210,15 @@ LastWindowsTimer = GetTickCount();
|
|||
|
||||
//Blit from Two, which holds the base scene.
|
||||
|
||||
// lpDDSBack->BltFast( 0, 0, lpDDSBackGround, &rcRect, DDBLTFAST_NOCOLORKEY);
|
||||
//this doesn't really make much sense to me but it works so not screwing with it
|
||||
if (g_dglo.m_curView == DinkGlobals::VIEW_ZOOMED)
|
||||
{
|
||||
|
||||
// rtRect32 rcRectGameArea(g_dglo.m_gameArea.left, g_dglo.m_gameArea.top, g_dglo.m_gameArea.right, g_dglo.m_gameArea.bottom);
|
||||
|
||||
//rtRect32 rcRectGameArea(g_dglo.m_nativeGameArea.left, g_dglo.m_nativeGameArea.top, g_dglo.m_nativeGameArea.right, g_dglo.m_nativeGameArea.bottom);
|
||||
|
||||
//rtRect32 rcRectGameArea(g_dglo.m_orthoRenderRect.left, g_dglo.m_nativeGameArea.top, g_dglo.m_nativeGameArea.right, g_dglo.m_nativeGameArea.bottom);
|
||||
|
||||
// lpDDSBack->BltFast(g_dglo.m_gameArea.left, g_dglo.m_gameArea.top, lpDDSBackGround,
|
||||
// &rcRectGameArea, DDBLTFAST_NOCOLORKEY);
|
||||
|
||||
|
||||
lpDDSBack->BltFast(0, 0, lpDDSBackGround,
|
||||
&g_dglo.m_orthoRenderRect, DDBLTFAST_NOCOLORKEY);
|
||||
|
||||
lpDDSBack->BltFast(g_dglo.m_gameArea.left, g_dglo.m_gameArea.top, lpDDSBackGround, &g_dglo.m_orthoRenderRect, DDBLTFAST_NOCOLORKEY);
|
||||
}
|
||||
else
|
||||
{
|
||||
lpDDSBack->BltFast(0,0, lpDDSBackGround, &g_dglo.m_orthoRenderRect, DDBLTFAST_NOCOLORKEY);
|
||||
}
|
||||
|
||||
|
||||
g_dglo.m_bgSpriteMan.Render(lpDDSBack); //blit sprites that have been shoved into the bg, too slow to actually add them, so we fake it until the screen is rebuilt
|
||||
|
||||
|
@ -16518,6 +16516,7 @@ void SetDefaultVars(bool bFullClear)
|
|||
g_dglos.g_curPicIndex = 1;
|
||||
//GetBaseApp()->SetGameTick(0); //can cause problems .. don't do it here
|
||||
g_dglos.time_start = GetBaseApp()->GetGameTick();
|
||||
g_dglos.g_dinkTick = GetTick(TIMER_GAME);
|
||||
g_dglos.g_playerInfo.minutes = 0;
|
||||
}
|
||||
}
|
||||
|
@ -16877,15 +16876,8 @@ void DinkGlobals::SetView( eView view )
|
|||
switch (view)
|
||||
{
|
||||
case VIEW_ZOOMED:
|
||||
if (GetFakePrimaryScreenSizeX() != 0)
|
||||
{
|
||||
// g_dglo.m_nativeGameArea = rtRectf(0,0,GetPrimaryGLX(),GetPrimaryGLY());
|
||||
g_dglo.m_nativeGameArea = rtRectf(0,0,GetScreenSizeX(),GetScreenSizeY());
|
||||
} else
|
||||
{
|
||||
g_dglo.m_nativeGameArea = rtRectf(0,0,GetScreenSizeX(),GetScreenSizeY());
|
||||
}
|
||||
|
||||
g_dglo.m_nativeGameArea = rtRectf(0,0,GetScreenSizeX(),GetScreenSizeY());
|
||||
g_dglo.m_gameArea = rtRect32 (20, 0, 620, 400);
|
||||
g_dglo.m_orthoRenderRect = rtRect32 (20, 0, 620, 400);
|
||||
break;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug GL|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>-game dmods/init</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerCommandArguments>-game dmods/revolut</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Common Debug|Win32'">
|
||||
<LocalDebuggerCommandArguments>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue