From: <sag...@us...> - 2010-02-25 08:09:12
|
Revision: 512 http://modplug.svn.sourceforge.net/modplug/?rev=512&view=rev Author: saga-games Date: 2010-02-25 08:09:05 +0000 (Thu, 25 Feb 2010) Log Message: ----------- [Imp] Installer: With the new version of InnoSetup, a "real" portable setup can now finally be created. [Ref] More verbose description of the new song length detection code Modified Paths: -------------- trunk/OpenMPT/installer/install.iss trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/installer/install.iss =================================================================== --- trunk/OpenMPT/installer/install.iss 2010-02-24 22:23:05 UTC (rev 511) +++ trunk/OpenMPT/installer/install.iss 2010-02-25 08:09:05 UTC (rev 512) @@ -21,14 +21,14 @@ SolidCompression=yes WizardImageFile=install-big.bmp WizardSmallImageFile=install-small.bmp +CreateUninstallRegKey=not IsTaskSelected('portable') ;LicenseFile=license.txt -;CreateUninstallRegKey=no [Tasks] ; icons and install mode Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked -Name: "portable"; Description: "Use program directory to store configuration in"; GroupDescription: "Options:"; Flags: unchecked +Name: "portable"; Description: "Portable mode (use program folder for storing settings, no registry changes)"; GroupDescription: "Options:"; Flags: unchecked Name: "vst_scan"; Description: "Scan for previously installed VST plugins"; GroupDescription: "Options:"; Flags: unchecked ; file associations - put this below all other [tasks]! #include "filetypes.iss" @@ -141,3 +141,4 @@ end; #include "vst_scan.iss" + Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-02-24 22:23:05 UTC (rev 511) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-02-25 08:09:05 UTC (rev 512) @@ -119,10 +119,10 @@ the song length (or found out that a given point of the module cannot be reached). The concept is actually very simple: Store a boolean value for every row for every possible orderlist item. To save some memory, I have decided to actually store 8 row flags in one uint8 item, to save some - space. - As the modplug engine already deals with pattern loops sufficiently, there's no problem with (infinite) loops + space. Hence, there's some funky bit-shifting here and there. + As the modplug engine already deals with pattern loops sufficiently, there's no problem with (infinite) pattern loops in this code. However, if you're going to use this idea somewhere else, bare in mind that rows inside pattern loops - should only be evaluated once, or else the algorithm will cancel! + should only be evaluated once, or else the algorithm will cancel too early! */ vector<vector<uint8> > visited_rows; visited_rows.resize(Order.GetLengthTailTrimmed()); @@ -136,7 +136,7 @@ // (f.e. if a pattern has 7 rows, we actually need another row so it's 8 rows = 1 byte - got it? ;) if(nSize & 7) nSize += 8; - nSize >>= 3; + nSize >>= 3; // 2^3 elements per vector unit! visited_rows[nOrd].resize(nSize, 0); } @@ -186,13 +186,13 @@ // Detect backward loop (or more general: if this row has been visited before) size_t row_slot = nRow >> 3; - uint8 row_value = 1 << (nRow & 7); + uint8 row_mask = 1 << (nRow & 7); // This should always be true - but who knows what different parts of the program could modify the patterns and orders while this test is running? if(nCurrentPattern < visited_rows.size() && row_slot < visited_rows[nCurrentPattern].size()) { - if((visited_rows[nCurrentPattern][row_slot] & row_value) != 0) - break; // we visited this row already - visited_rows[nCurrentPattern][row_slot] |= row_value; + if((visited_rows[nCurrentPattern][row_slot] & row_mask) != 0) + break; // we visited this row already - this module must be looping. + visited_rows[nCurrentPattern][row_slot] |= row_mask; } // Update next position This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |