From f1bf68da44a776bcd687a8aee0c606870d51bc02 Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 18 Oct 2017 07:15:53 +0000 Subject: [PATCH] * Another bugfix in the .dmod decompresser, fixes issue with Attack of the veggies * (Windows) Holding Shift in addition to Tab will cause "super turbo" mode, speeding up the game faster than just holding Tab. (Secret tip: If you really want to see speed, hold down the Control key too) git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1525 353e56fe-9613-0410-8469-b96ad8e6f29c --- OSX/Info.plist | 4 +- RTDink.xcodeproj/project.pbxproj | 8 +- android/AndroidManifest.xml | 2 +- script/win_installer/readme.txt | 8 ++ source/App.cpp | 4 +- source/GUI/AboutMenu.cpp | 2 +- source/GUI/BrowseMenu.cpp | 9 +- source/GUI/GameMenu.cpp | 18 +++- source/dink/dink.cpp | 14 +++- source/video_gl.cpp | 5 ++ windows_vs2017/winRTDink.vcxproj | 116 +++++++++++++++++++++++++- windows_vs2017/winRTDink.vcxproj.user | 3 +- 12 files changed, 176 insertions(+), 17 deletions(-) diff --git a/OSX/Info.plist b/OSX/Info.plist index 02b7617..301f946 100644 --- a/OSX/Info.plist +++ b/OSX/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.8.8 + 1.89 CFBundleSignature ???? CFBundleVersion - 1.8.8 + 10 LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSMainNibFile diff --git a/RTDink.xcodeproj/project.pbxproj b/RTDink.xcodeproj/project.pbxproj index 8c6f654..715dacb 100644 --- a/RTDink.xcodeproj/project.pbxproj +++ b/RTDink.xcodeproj/project.pbxproj @@ -198,7 +198,7 @@ 5DD8783A1261BEC500EB4365 /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 5DD878371261BEC500EB4365 /* ioapi.c */; }; 5DDA4DEF1F8609EF0079D738 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5DDA4DEE1F8609EE0079D738 /* Default-568h@2x.png */; }; 5DDA4DF21F862F3F0079D738 /* RenderScissorComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DDA4DF01F862F3E0079D738 /* RenderScissorComponent.cpp */; }; - 5DDA5C781F8642080079D738 /* dmods_include in Resources */ = {isa = PBXBuildFile; fileRef = 5DDA5C771F8642080079D738 /* dmods_include */; }; + 5DDA5C7A1F9619E60079D738 /* dmods in Resources */ = {isa = PBXBuildFile; fileRef = 5DDA5C791F9619E60079D738 /* dmods */; }; 5DDEC25F1294E63200C42C5E /* ExpiredMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DDEC25E1294E63200C42C5E /* ExpiredMenu.cpp */; }; 5DE39F1114C3F9B300163EA1 /* dink in Resources */ = {isa = PBXBuildFile; fileRef = 5DE39F1014C3F9B300163EA1 /* dink */; }; 5DE5068310EC800400CEAA3C /* FFReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE5068110EC800400CEAA3C /* FFReader.cpp */; }; @@ -548,7 +548,7 @@ 5DDA4DEE1F8609EE0079D738 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 5DDA4DF01F862F3E0079D738 /* RenderScissorComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderScissorComponent.cpp; path = Entity/RenderScissorComponent.cpp; sourceTree = ""; }; 5DDA4DF11F862F3F0079D738 /* RenderScissorComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderScissorComponent.h; path = Entity/RenderScissorComponent.h; sourceTree = ""; }; - 5DDA5C771F8642080079D738 /* dmods_include */ = {isa = PBXFileReference; lastKnownFileType = folder; name = dmods_include; path = bin/dmods_include; sourceTree = ""; }; + 5DDA5C791F9619E60079D738 /* dmods */ = {isa = PBXFileReference; lastKnownFileType = folder; name = dmods; path = bin/dmods; sourceTree = ""; }; 5DDEC25D1294E63200C42C5E /* ExpiredMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExpiredMenu.h; path = source/GUI/ExpiredMenu.h; sourceTree = ""; }; 5DDEC25E1294E63200C42C5E /* ExpiredMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExpiredMenu.cpp; path = source/GUI/ExpiredMenu.cpp; sourceTree = ""; }; 5DE39F1014C3F9B300163EA1 /* dink */ = {isa = PBXFileReference; lastKnownFileType = folder; name = dink; path = bin/dink; sourceTree = ""; }; @@ -646,7 +646,6 @@ 29B97315FDCFA39411CA2CEA /* Source */ = { isa = PBXGroup; children = ( - 5DDA5C771F8642080079D738 /* dmods_include */, 5D7AB8F010CF3ED000398F0F /* Dink */, 5DF1D5771045019100826147 /* Component */, 5D4760860FBB1D04008400E3 /* GUI */, @@ -660,6 +659,7 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + 5DDA5C791F9619E60079D738 /* dmods */, 5DE39F1014C3F9B300163EA1 /* dink */, 5D10469D1224D9E700BFC249 /* Icon-72.png */, 5D6E8C18121A75F2008F1D26 /* icon@2x.png */, @@ -1300,6 +1300,7 @@ 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 5DC6D63F0EA47C0E001482E0 /* interface in Resources */, 5DC6D77D0EA4B397001482E0 /* Default.png in Resources */, + 5DDA5C7A1F9619E60079D738 /* dmods in Resources */, 5DC6D77E0EA4B397001482E0 /* icon.png in Resources */, 5D8272910FA9DEE00097DE6A /* Entitlements.plist in Resources */, 5D82C8C50FF4C1500082EBE7 /* audio in Resources */, @@ -1310,7 +1311,6 @@ 5D6E8C1D121A75F2008F1D26 /* Default@2x.png in Resources */, 5D6E8C1F121A765F008F1D26 /* Default-Landscape.png in Resources */, 5D10469E1224D9E700BFC249 /* Icon-72.png in Resources */, - 5DDA5C781F8642080079D738 /* dmods_include in Resources */, 5DE39F1114C3F9B300163EA1 /* dink in Resources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index e0a5373..fbeb3cc 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -2,7 +2,7 @@ diff --git a/script/win_installer/readme.txt b/script/win_installer/readme.txt index dcb38ea..2cfe9e8 100644 --- a/script/win_installer/readme.txt +++ b/script/win_installer/readme.txt @@ -19,6 +19,8 @@ Shift - Magic Escape - Bring up classic dink escape menu F1 - Bring up Dink HD escape menu Drag on window borders - scale the play area (when windowed) +(Hold) Tab - Turbo mode, entire game runs 3x speed +(Hold) Shift + Tab - Super Turbo mode, entire game runs up to 6x speed NOTE: If you have a controller (like an xbox 360 pad) plugged in when you start the game, you can use that instead of keyboard, but you still need to use the mouse to navigate the initial menus to start the game @@ -286,3 +288,9 @@ use timing (Myster island camera sequence for example) easier though, not sure. * (Windows) Key binding changes: F1 now brings up the Dink Menu (Shift-Escape was .. weird..) and quicksave was moved to F4 - Note: Save state version has changed, old save states won't load! + +------ Change log for 1.89 ---------- + + * Added Dan Walma's .png support (untested) + * Another bugfix in the .dmod decompresser, fixes issue with Attack of the veggies + * (Windows) Holding Shift in addition to Tab will cause "super turbo" mode, speeding up the game faster than just holding Tab. (Secret tip: If you really want to see speed, hold down the Control key too) \ No newline at end of file diff --git a/source/App.cpp b/source/App.cpp index b779328..3248d20 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -184,8 +184,8 @@ App::App() m_bDidPostInit = false; m_bHasDMODSupport = true; //for mobiles - m_version = 1.88f; - m_versionString = "V1.8.8"; + m_version = 1.89f; + m_versionString = "V1.89"; m_build = 1; m_bCheatsEnabled = false; diff --git a/source/GUI/AboutMenu.cpp b/source/GUI/AboutMenu.cpp index 14cb359..24d72f6 100644 --- a/source/GUI/AboutMenu.cpp +++ b/source/GUI/AboutMenu.cpp @@ -98,7 +98,7 @@ void AboutMenuOnSelect(VariantList *pVList) //0=vec2 point of click, 1=entity se } if (pEntClicked->GetName() == "dinknetwork") { - PopUpCreate(pEntClicked->GetParent()->GetParent()->GetParent(), "Would you like to check out `wThe Dink Network``?", "http://www.dinknetwork.com?device="+toString(GetEmulatedPlatformID()), + PopUpCreate(pEntClicked->GetParent()->GetParent()->GetParent(), "Would you like to check out `wThe Dink Network``?", "http://www.dinknetwork.com?platform="+toString(GetEmulatedPlatformID()), "cancel", "`wCancel", "url", "`wLaunch", true); return; } diff --git a/source/GUI/BrowseMenu.cpp b/source/GUI/BrowseMenu.cpp index 5e750bc..8c45aed 100644 --- a/source/GUI/BrowseMenu.cpp +++ b/source/GUI/BrowseMenu.cpp @@ -451,13 +451,16 @@ void DownloadDMODList(Entity *pMenu) VariantList v; - string url = "www.dinknetwork.com"; uint32 port = 80; //GetApp()->GetServerInfo(url, port); - v.m_variant[0].Set(url); + string host = "www.dinknetwork.com"; + string url = "api"; + + + v.m_variant[0].Set(host); v.m_variant[1].Set(port); - v.m_variant[2].Set("api"); + v.m_variant[2].Set(url); v.m_variant[3].Set(uint32(NetHTTP::END_OF_DATA_SIGNAL_HTTP)); //need this for it to detect a disconnect instead of the weird RTsoft symbol pComp->GetFunction("Init")->sig_function(&v); pComp->GetFunction("OnError")->sig_function.connect(&OnDownloadError); diff --git a/source/GUI/GameMenu.cpp b/source/GUI/GameMenu.cpp index 55a4bf9..7aadde6 100644 --- a/source/GUI/GameMenu.cpp +++ b/source/GUI/GameMenu.cpp @@ -1065,7 +1065,23 @@ void OnGameMenuRender(VariantList *pVList) if (DinkGetSpeedUpMode()) { //3x speed - for (int i = 0; i < 2; i++) + + + int speedup = 2; + +#ifdef WINAPI + + if (GetKeyState(VK_SHIFT) & 0xfe) + { + speedup = 8; //super turbo mode + if (GetKeyState(VK_CONTROL) & 0xfe) + { + speedup *= 3; //super turbo mode + } + } + +#endif + for (int i = 0; i < speedup; i++) { //GetApp()->SetGameTick(GetApp()->GetGameTick() + GetApp()->GetDeltaTick() * 3); //GetApp()->GetGameTimer()->Update(); diff --git a/source/dink/dink.cpp b/source/dink/dink.cpp index f6d5de5..026c2da 100644 --- a/source/dink/dink.cpp +++ b/source/dink/dink.cpp @@ -671,9 +671,21 @@ void fill_whole_hard(void) { for (int y = 0; y < 50; y++) { - g_dglos.g_hitmap.x[offx +x].y[offy+y] = g_hmap.tile[ realhard(til) ].x[x].y[y]; + int tileToWrite = realhard(til); + if (tileToWrite >= 0 && tileToWrite < 800) + { + g_dglos.g_hitmap.x[offx + x].y[offy + y] = g_hmap.tile[tileToWrite].x[x].y[y]; + } + else + { + LogMsg("Avoiding crash, it tried to write hardness data to block %d from illegal tile %d",til, tileToWrite); + goto skip; + } } } + + skip:; + } } diff --git a/source/video_gl.cpp b/source/video_gl.cpp index 6c8c755..8273fed 100644 --- a/source/video_gl.cpp +++ b/source/video_gl.cpp @@ -324,6 +324,11 @@ void IDirectDrawSurface::UpdateShadowSurface() assert(m_pSurf); assert(m_pGLSurf); assert(m_pSurf->GetSurfaceType() == SoftSurface::SURFACE_RGBA); + + if (m_pSurf->GetSurfaceType() != SoftSurface::SURFACE_RGBA) + { + LogMsg("Don't know how to deal with surface type %d", m_pSurf->GetSurfaceType()); + } //m_pSurf->FillColor(glColorBytes(0,0,0,0)); if (m_pSurf->GetPixelData()) { diff --git a/windows_vs2017/winRTDink.vcxproj b/windows_vs2017/winRTDink.vcxproj index d68e288..77bfb4e 100644 --- a/windows_vs2017/winRTDink.vcxproj +++ b/windows_vs2017/winRTDink.vcxproj @@ -410,7 +410,7 @@ Disabled ..\source;..\..\shared;..\..\shared\win\;..\..\shared\util\boost;..\..\shared\ClanLib-2.0\Sources;..\..\shared\win\include;..\..\shared\FliteTTS\include;..\..\shared\Irrlicht\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;BOOST_ALL_NO_LIB;C_GL_MODE;_HAS_ITERATOR_DEBUGGING=0;_SECURE_SCL=0;_NO_DEBUG_HEAP=1;RT_JPG_SUPPORT;RT_DONT_DO_MOVE_TIMER_TRICK;RT_RUNS_IN_BACKGROUND;RT_IPV6;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;BOOST_ALL_NO_LIB;C_GL_MODE;_HAS_ITERATOR_DEBUGGING=0;_SECURE_SCL=0;_NO_DEBUG_HEAP=1;RT_JPG_SUPPORT;RT_DONT_DO_MOVE_TIMER_TRICK;RT_RUNS_IN_BACKGROUND;RT_IPV6;RT_PNG_SUPPORT;RT_CUSTOM_LOGMSG;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug true @@ -2766,6 +2766,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2776,6 +2784,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2786,6 +2802,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2796,6 +2820,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2806,6 +2838,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2816,6 +2856,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2826,6 +2874,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2836,6 +2892,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2846,6 +2910,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2856,6 +2928,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2866,6 +2946,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2876,6 +2964,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2886,6 +2982,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing NotUsing @@ -2896,6 +3000,14 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing @@ -3589,6 +3701,7 @@ NotUsing NotUsing NotUsing + NotUsing NotUsing @@ -3599,6 +3712,7 @@ NotUsing NotUsing NotUsing + NotUsing diff --git a/windows_vs2017/winRTDink.vcxproj.user b/windows_vs2017/winRTDink.vcxproj.user index 771a4da..468a14e 100644 --- a/windows_vs2017/winRTDink.vcxproj.user +++ b/windows_vs2017/winRTDink.vcxproj.user @@ -7,7 +7,8 @@ $(OutDir) WindowsLocalDebugger - -game dmods/status + +