You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(10) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(2) |
May
(10) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
| 2008 |
Jan
(6) |
Feb
(4) |
Mar
(5) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(4) |
Aug
(6) |
Sep
(2) |
Oct
(9) |
Nov
(1) |
Dec
(4) |
| 2009 |
Jan
(9) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(6) |
Jun
(18) |
Jul
(33) |
Aug
(39) |
Sep
(33) |
Oct
(24) |
Nov
(23) |
Dec
(22) |
| 2010 |
Jan
(29) |
Feb
(32) |
Mar
(51) |
Apr
(17) |
May
(31) |
Jun
(21) |
Jul
(32) |
Aug
(28) |
Sep
(35) |
Oct
(27) |
Nov
(11) |
Dec
(13) |
| 2011 |
Jan
(14) |
Feb
(13) |
Mar
(27) |
Apr
(27) |
May
(28) |
Jun
(20) |
Jul
(43) |
Aug
(52) |
Sep
(66) |
Oct
(61) |
Nov
(11) |
Dec
(8) |
| 2012 |
Jan
(20) |
Feb
(30) |
Mar
(38) |
Apr
(21) |
May
(33) |
Jun
(21) |
Jul
(25) |
Aug
(9) |
Sep
(24) |
Oct
(42) |
Nov
(27) |
Dec
(41) |
| 2013 |
Jan
(20) |
Feb
(35) |
Mar
(156) |
Apr
(298) |
May
(258) |
Jun
(201) |
Jul
(105) |
Aug
(60) |
Sep
(193) |
Oct
(245) |
Nov
(280) |
Dec
(194) |
| 2014 |
Jan
(63) |
Feb
(202) |
Mar
(200) |
Apr
(23) |
May
(53) |
Jun
(105) |
Jul
(18) |
Aug
(26) |
Sep
(110) |
Oct
(187) |
Nov
(97) |
Dec
(74) |
| 2015 |
Jan
(45) |
Feb
(55) |
Mar
(116) |
Apr
(116) |
May
(193) |
Jun
(164) |
Jul
(50) |
Aug
(111) |
Sep
(98) |
Oct
(71) |
Nov
(103) |
Dec
(63) |
| 2016 |
Jan
(33) |
Feb
(101) |
Mar
(182) |
Apr
(139) |
May
(140) |
Jun
(103) |
Jul
(165) |
Aug
(286) |
Sep
(208) |
Oct
(127) |
Nov
(97) |
Dec
(54) |
| 2017 |
Jan
(64) |
Feb
(335) |
Mar
(202) |
Apr
(212) |
May
(139) |
Jun
(127) |
Jul
(294) |
Aug
(154) |
Sep
(170) |
Oct
(152) |
Nov
(156) |
Dec
(62) |
| 2018 |
Jan
(168) |
Feb
(237) |
Mar
(196) |
Apr
(174) |
May
(174) |
Jun
(161) |
Jul
(127) |
Aug
(88) |
Sep
(149) |
Oct
(66) |
Nov
(52) |
Dec
(135) |
| 2019 |
Jan
(146) |
Feb
(126) |
Mar
(104) |
Apr
(58) |
May
(60) |
Jun
(28) |
Jul
(197) |
Aug
(129) |
Sep
(141) |
Oct
(148) |
Nov
(63) |
Dec
(100) |
| 2020 |
Jan
(74) |
Feb
(37) |
Mar
(59) |
Apr
(154) |
May
(194) |
Jun
(133) |
Jul
(313) |
Aug
(197) |
Sep
(49) |
Oct
(162) |
Nov
(143) |
Dec
(57) |
| 2021 |
Jan
(120) |
Feb
(107) |
Mar
(314) |
Apr
(157) |
May
(524) |
Jun
(169) |
Jul
(72) |
Aug
(133) |
Sep
(135) |
Oct
(146) |
Nov
(198) |
Dec
(325) |
| 2022 |
Jan
(409) |
Feb
(249) |
Mar
(138) |
Apr
(95) |
May
(102) |
Jun
(221) |
Jul
(66) |
Aug
(120) |
Sep
(192) |
Oct
(131) |
Nov
(53) |
Dec
(171) |
| 2023 |
Jan
(357) |
Feb
(82) |
Mar
(168) |
Apr
(218) |
May
(196) |
Jun
(86) |
Jul
(115) |
Aug
(49) |
Sep
(190) |
Oct
(102) |
Nov
(45) |
Dec
(76) |
| 2024 |
Jan
(86) |
Feb
(50) |
Mar
(324) |
Apr
(209) |
May
(197) |
Jun
(232) |
Jul
(194) |
Aug
(247) |
Sep
(219) |
Oct
(266) |
Nov
(328) |
Dec
(304) |
| 2025 |
Jan
(191) |
Feb
(115) |
Mar
(137) |
Apr
(32) |
May
(126) |
Jun
(403) |
Jul
(213) |
Aug
(203) |
Sep
(148) |
Oct
(109) |
Nov
(191) |
Dec
(209) |
| 2026 |
Jan
(127) |
Feb
(123) |
Mar
(160) |
Apr
(141) |
May
(45) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <sag...@us...> - 2010-05-21 21:01:38
|
Revision: 601
http://modplug.svn.sourceforge.net/modplug/?rev=601&view=rev
Author: saga-games
Date: 2010-05-21 21:01:28 +0000 (Fri, 21 May 2010)
Log Message:
-----------
- Rewrote history... Err... updated History.txt for current version.
- Unified history template, so the whole file makes use of the "new" [xyz] indicators instead of those weird special chars. :)
Modified Paths:
--------------
trunk/OpenMPT/packageTemplate/History.txt
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-05-21 18:17:35 UTC (rev 600)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-05-21 21:01:28 UTC (rev 601)
@@ -1,12 +1,12 @@
OpenMPT - Full Version History
------------------------------
-.: bug fix
-+: new feature
-^: Improvement
--: known issue / regression
-/: change
-?: other
+[Fix]: bug fix
+[New]: new feature
+[Imp]: Improvement
+[Reg]: known issue / regression
+[Mod]: change
+[Var]: other
(tx XYZ): thanks to XYZ for telling us about the bug
Changes from revisions [476, 599]
@@ -16,7 +16,7 @@
[Imp] <Jojo> Disabled tempo slider for MOD files (it was just confusing)
[Imp] <Jojo> Disabled global volume slider for MOD files, instead enabled the sample pre-amp slider (so it is also possible to make output louder)
[Fix] <Jojo> Moving a plugin in MOD/S3M files doesn't mark them as modified anymore. The channel fx dropdown lists are now also disabled for those module types.
- [Fix] <Jojo> If necessary (S3M), disable restart position edit control on general tab.
+ [Fix] <Jojo> The restart position edit control is disabled for S3M files.
[Fix] <coda> The background colour of the tabs in the channel configuration is now also correct when using WinXP Luna or Vista/Win7 Aero.
Sequence editor
@@ -29,12 +29,11 @@
[Imp] <Jojo> Overflow paste now only uses one undo step.
[Imp] <Jojo> Instead of simply ignoring note off/cut/fade when working with .MOD files, it is converted to C00.
[Fix] <rewbs> Effect visualizer is now aware of PC notes (bug 3836).
- [Fix] <rewbs> Context menu command "Change Plugin" for PC notes now works when the PC note has a blank plugin (instrument) field.
[Fix] <Jojo> When using MIDI record or split keyboard settings, volume data was writting into the volume column in MOD format.
[Fix] <Jojo> When converting PC Notes to MIDI Macros, the instrument index is now also cleaned as well. Noticable for example when pasting PC notes into an IT module.
[Fix] <Jojo> Now, plugin slot 100 can also be automated using PC Notes.
[Fix] <Jojo> When pasting pattern data that exactly reached the pattern end with overflow paste enabled, a redundant undo point was created.
- [Fix] <Jojo> Entered (volume) effects are now properly checked (makes a difference f.e. in MOD format where it was previously possible to enter effects like Hxx)
+ [Fix] <Jojo> Entered (volume) effects are now properly validated (makes a difference f.e. in MOD format where it was previously possible to enter effects like Hxx)
[Fix] <Jojo> Mix Paste: When in MPT behaviour mode, empty FX commands were not overwritten properly when there previously was an effect in that field but only the effect number (and not the param value) was reset.
[Reg] <Jojo> Creating a selection using the Shift key + Mouse click now only works if there was previously no selection made; This seems reasonable as the old shift-behaviour seems to be widely used.
@@ -47,10 +46,8 @@
[Fix] <Jojo> When working with multiple sequences, switching to the pattern editor for the first time automatically marked the document as modified.
Pattern tab::Note properties
- [Imp] <Jojo> Show a nice description for the new :xy effect.
[Imp] <Jojo> Don't allow values > 63 for "break to row" commands in MOD/S3M.
[Imp] <Jojo> Since the behaviour of sliding commands with both nibbles set varies from tracker to tracker, "undefined" is always shown in the note properties in such cases.
- [Fix] <Jojo> Vibrato and Tremolo were erroneously marked as commands with no effect memory.
[Fix] <Jojo> In the note properties, the Gxx effect for XM files was not limited properly.
[Fix] <Jojo> In Note Properties, the waveform display for S [345]x (and equivalent MOD/XM effeects) was not always fully visible ("continue" addition was cut off)
[Fix] <Jojo> Display "fine" / "extra fine" portamento effects properly (S3M/IT/MPTM), display SFx macro properly, display MOD effects with no memory properly.
@@ -63,9 +60,8 @@
[New] <Jojo> Shift+New = Clone sample slot
[New] <Jojo> Option to not ask for RAW import settings again (settings are remembered independently for all modules)
[Imp] <Jojo> Remember previous settings in RAW import dialog
- [Imp] <Jojo> When enabling (sustain) loop and no loop points are set yet, automatically set loop to full sample length.
- [Imp] <Jojo> Samplename and filename are now properly limited.
- [Imp] <Jojo> When enabling a sample loop and only parts of the sample are selected
+ [Imp] <Jojo> When enabling (sustain) loop and no loop points are set yet, automatically set loop to full sample length or the currently selected part of the sample.
+ [Imp] <Jojo> Sample name and filename are now properly limited in length.
[Fix] <Jojo> When applying time stretch / pitch shift to an 8-bit sample and selecting the sample partly lead to partial upsampling, instead of upsampling the whole sample.
[Fix] <Jojo> Sample Undo: If no custom value was set, the default value was set ridiculously high (tx Paul Legovitch)
[Fix] <Jojo> Sample Undo: Fixed another possible problem when undoing actions with very little memory left.
@@ -77,23 +73,22 @@
[New] <Jojo> Transpose Up/Down for sample map.
[New] <Jojo> VST/Instrument handling: The IT instrument note mapping is now also applied to VST instruments (before, it was just available for samples). This way, VST instruments can be transposed easily.
[Imp] <Jojo> When pasting an envelope, it's now also automatically enabled.
- [Imp] <Jojo> Instrumentname and filename are now properly limited.
+ [Imp] <Jojo> Instrument name and filename are now properly limited in length.
[Imp] <Jojo> "Scale envelope points" is now always available for scaling the values of the points (y axis).
[Fix] <Jojo> The panning spin button ranged from 0 to 256, however when saving to .IT, 256 was wrapping over to 0. Panning is now limited from 0 to 255.
[Fix] <Jojo> It was impossible to assign plugin slot 100 to an instrument.
Comments tab
[Fix] <Jojo> Correct C-5 frequency is now also shown if the module is an XM file.
- [Fix] <Jojo> When editing sample / instrument names, they are limited properly now.
+ [Fix] <Jojo> When editing sample / instrument names, they are limited properly in length now.
Treeview
- [New] <Jojo> Sequences can now be copied to other modules by simply dragging the sequence header into the the other module's sequence header. Does only work between two different modules, not within the same module.
+ [New] <Jojo> Sequences can now be copied to other modules by simply dragging the sequence header into the the other module's sequence header. Does only work between two different modules, not within the same module, and it will not copy the pattern contents.
[Imp] <Jojo> Display sequence index next to sequence names.
- [Imp] <Jojo> Improved order dragging; It is now also possible to drag an order into a non-MPT module. In that case, the old orderlist will be replaced.
+ [Imp] <Jojo> Improved order dragging; It is now also possible to drag an order into a non-MPTM module. In that case, the old orderlist will be replaced.
[Imp] <Jojo> J2B files were not shown in treeview.
- [Fix] <Jojo> If a sequence had no name, its name was not formatted properly.
[Fix] <Jojo> Soundfont samples were not playing correctly anymore. Note that soundfont samples in the MIDI library still don't work.
- [Fix] <Jojo> A crash could occour if the instrument library path was too long (f.e. because of malicious strings in the [Paths] section of the INI file)
+ [Fix] <Jojo> A crash could occour if the instrument library path was too long (f.e. because of malicious strings in the [Paths] section of the INI file)
[Fix] <Jojo> "Bypass" action for VSTs didn't set the document as modified.
[Fix] <Jojo> Right-Click on module -> Close didn't ask for confirmation when the document was modified.
[Fix] <Jojo> Insert/Duplicate sequence actions didn't set the document modified. Grey out those two actions if no additional sequences can be added.
@@ -108,13 +103,10 @@
[Fix] <re> Returned host CanDo-values were wrong (since pre RC1 era).
Mod conversion
- [Imp] <Jojo> Convert the :xy effect to a simple note delay effect when converting to anything that's not MPTM.
- [Imp] <Jojo> Don't show warning about restart position if it is actually not set (only applies to S3M format)
[Fix] <Jojo> When converting from MOD to S3M or IT, the Invert Loop effect was not removed.
- [Fix] <Jojo> When converting from MPTM to another format, the first sequence name is removed and the sequence is now sized properly when merging multiple sequences.
- [Fix] <Jojo> When converting between XM and IT, the sample autovibrato "sweep" factor is now fixed a bit.
- [Fix] <Jojo> When removing instruments from the treeview and converting the module to a different format which also supports instruments, OpenMPT crashed due to a null pointer exception.
- [Fix] <Jojo> When converting from MOD to S3M or IT, the Invert Loop effect was not removed.
+ [Fix] <Jojo> When converting from MPTM to another format, the first sequence name is removed and the sequence is now sized properly when merging multiple sequences (tx Skaven).
+ [Fix] <Jojo> When converting between XM and IT, the sample autovibrato "sweep" factor is now fixed a bit (since sweep = 0 equals "no sweep" in XM, and "no vibrato" in IT).
+ [Fix] <Jojo> When removing instruments from the treeview and converting the module to a different format which also supports instruments, OpenMPT crashed.
[Fix] <Jojo> When converting to MOD/S3M, the extended filter range flag was not deactivated.
[Fix] <Jojo> S00 (IT/S3M) does not equal E00 (MOD/XM), as Exx doesn't have effect memory. Trying to convert S00 to the last used value now.
[Fix] <Jojo> If necessary (S3M), reset restart position attribute when converting
@@ -122,16 +114,15 @@
IT
[Imp] <Jojo> IT Saver: Compatibility export saves stereo samples again, as other tracker like Schism also support this.
- [Fix] <Jojo> IT Saver: Set unused channels' panning positions to 0xA0 like IT does (appears to fix a problem in IT's GUI)
[Fix] <Jojo> IT Saver: Fixed IT sample flags which could potentionally cause IT to screw up on loading/saving MPT-made modules with samples that are not used by an instrument.
[Fix] <Jojo> IT Loader: ChibiTracker uses \n instead of \r in the IT comment text, which was not handled properly.
- [Fix] <Jojo> (fix from SchismTracker) IT Loader: Ignore stereo sample flag when loading old IT files (older than IT 2.14) since IT id not reset this flag when importing stereo samples back then.
+ [Fix] <Jojo> (fix from SchismTracker) IT Loader: Ignore stereo sample flag when loading old IT files (older than IT 2.14) since Impulse Tracker did not reset this flag when importing stereo samples back then.
[Fix] <Jojo> ITI/ITS Loader: Sample flags were not reset when a sample slot was overwritten when loading ITI or ITS files. That way, it was possible that f.e. the bidi loop flag was not disabled when loading a new sample that had a normal loop.
[Fix] <Jojo> S3M/IT compatibility: Note Cut really cuts notes and does not just mute them (so that following volume commands could restore the sample)
[Fix] <Jojo> IT Compatibility: Always reset autovibrato settings when there's an instrument number (fix from SchismTracker)
[Fix] <Jojo> IT Compatibility: S77 / S79/ S7B are supposed to pause the envelope, not disable it.
- [Fix] <Jojo> IT compatibility: ignore slide commands with both nibbles set (f.e. D55, PA1, ...)
- [Fix] <Jojo> IT Compatibility: Default Vibrato/Tremolo/Panbrello values to sine if out of range (e.g. S35)
+ [Fix] <Jojo> IT Compatibility: ignore slide commands with both nibbles set (f.e. D55, PA1, ...)
+ [Fix] <Jojo> IT Compatibility: Default Vibrato/Tremolo/Panbrello waveform values to sine waveform if out of range (e.g. S35)
IT/MPTM/ITP, Instrument extension handling:
[Fix] <Jojo> ITP Loader: Instruments flags in ITP files with embedded instrument headers were loaded wrong since revision 415.
@@ -144,30 +135,25 @@
[Fix] <Jojo> XM Loader: Early versions of Skale Tracker (R.I.P.) apparently did stupid things to XM instrument headers, so mpt failed to load such modules. Tested the fix with a few hundred XMs and apparently only one XM (IFULOVE.XM) that I have has a header size that is different from the struct size - and that's the one that caused problems.
[Fix] <Jojo> XM Compatibility: Volume column doesn't have an effect memory, most effects with param = 0 are useless. Those are ignored in compatibility mode playback and also when exporting the file in compatibility mode.
[Fix] <Jojo> XM Compatibility: Improved handling of the situation when a 3xx effect was used, but previously no note was playing.
- [Fix] <Jojo> XM compatibility: New instrument + tone portamento = ignore new instrument (fixes partytime.xm by cancer)
+ [Fix] <Jojo> XM Compatibility: New instrument + tone portamento = ignore new instrument (fixes partytime.xm by cancer)
MOD
- [Imp] <Jojo> Module creation: When creating a new .MOD, it has 31 samples by default.
- [Imp] <Jojo> Playback: When PT1x flag is activated, Amiga note range limits are automatically taken into account.
+ [Imp] <Jojo> Module creation: When creating a new .MOD, it has 31 sample slots by default.
+ [Imp] <Jojo> Playback: When the PT1x flag is activated, Amiga note range limits are automatically taken into account.
[Fix] <Jojo> MOD Saving: Samples were shifted badly if the sample size was odd. (wow, this is an OLD bug!)
- [Fix] <Jojo> Mod Saving: If a mod had loop points set, but loop disabled, they were still saved in the .MOD file, resulting in the loop being enabled automatically.
+ [Fix] <Jojo> MOD Saving: If a sample had loop points set, but loop disabled, they were still saved in the .MOD file, resulting in the loop being enabled automatically.
[Fix] <Jojo> MOD Loader: Very short loops (4-8 bytes long) are not ignored anymore. This fixes "Crew Generation" by Necros.
S3M
- [Fix] <Jojo> S3M Loader: Slightly improved the AdLib instrument detection.
[Imp] <Jojo> S3M Loader: Display a message if an S3M file contains Adlib instruments (rare).
- [Imp] <Jojo> S3M Compatibility: At least process samples on muted channels so that sync can be maintained.
[Fix] <Jojo> S3M Playback: In ST3, muted channels are completely ignored, not even effects are interpreted. Let's try this in MPT, too.
- [Fix] <Jojo> S3M compatibility: Slightly better handling of vibrato/tremolo waveform types (although the ST3 help screen says that continuous vibrato/tremolo is possible, it does actually not work.)
+ [Fix] <Jojo> S3M Compatibility: Slightly better handling of vibrato/tremolo waveform types (although the ST3 help screen says that continuous vibrato/tremolo is possible, it does actually not work.)
[Reg] <Jojo> Cannot create S3M files with more than 100 patterns anymore, because...
- [Fix] <Jojo> ... it was possible to create S3M files where the 256 parapointers were not enough.
- [Fix] <Jojo> S3M/IT compatibility: Note Cut really cuts notes and does not just mute them (so that following volume commands could restore the sample)
+ [Fix] <Jojo> ... it was possible to create S3M files where the 256 parapointers were not enough, resulting in incomplete/broken files.
+ [Fix] <Jojo> S3M/IT Compatibility: Note Cut really cuts notes and does not just mute them (so that following volume commands could restore the sample)
Other modules:
- [Imp] <Jojo> MT2 Loader: Make use of the "lines per beat" header field.
- [Fix] <Jojo> Slightly better MT2 (MadTracker) handling: Release node is not set anymore for each and every instrument envelope. MT2 files are now loaded as IT files by default (instead of XM) because of their extended instrument properties (NNAs, filters, etc) - I wonder what this breaks, but I don't bother because MT2 support was already 100% broken before this. :) Some MT example tunes sound a bit better now at least.
- [Imp] <Jojo> PSM Loader: Better handling of SC0 effect
- [Fix] <Jojo> GDM Loader: It would have actually helped to convert the format origin table correctly... Origin formats other than MOD are now loading correctly again.
+ [Imp] <Jojo> MT2 Loader (MadTracker): Make use of the "lines per beat" header field. Release node is not set anymore for each and every instrument envelope. MT2 files are now loaded as IT files by default (instead of XM) because of their extended instrument properties (NNAs, filters, etc) - I wonder what this breaks, but I don't bother much because MT2 support was already 100% broken before this. :) Some MT example tunes sound a bit better now at least.
[Fix] <Jojo> PTM Loader: Fixed an unhandled null pointer exception that occured when loading some unsupported RAR files.
[Fix] <Jojo> PSM16 Loader: Fix for note cut on tick 0 (warbot tune from Silverball)
[Fix] <Jojo> Threw out the old ULT loader in favor of Storlek's loader from SchismTracker (used with permission from the author himself). This is a lot more accurate than MPT's old loader.
@@ -176,26 +162,25 @@
[Fix] <Jojo> IMF Loader: Some fixes copied from Schism (copied from MikMod)
MPTM
- [New] <rewbs> Added combined note delay & note cut command for .mptm only (":xy" means delay until tick x and play for y ticks).
+ [New] <rewbs> Added combined note delay & note cut command for MPTM only (":xy" means delay until tick x and play for y ticks).
[New] <Jojo> MPTM command S7D explicitely enforces pitch envelope, S7E enforces filter envelope.
Module cleanup
[Imp] <Jojo> In the cleanup dialog, mutually exclusive items are now automatically unchecked, to avoid confusion.
- [Imp] <Jojo> Cleanup Dialog: Made it look a bit nicer.
- [Fix] <Jojo> Because of an error in GetNumPatterns(), the last pattern was checked when looking for unused samples which sometimes resulted in deleted samples (although they were actually used).
+ [Imp] <Jojo> Made the dialog look a bit nicer.
+ [Fix] <Jojo> Because of an error in pattern count retrival, the last pattern was not checked when looking for unused samples which sometimes resulted in deleted samples (although they were actually used).
[Fix] <re> Fixed a memory leak in pattern name handling.
Misc
- [New] <Jojo> INI Settings: When portable mode is enabled, the most common paths in mptrack.ini are now translated to relative paths (if possible). plugin path is not translated to relative paths (yet).
+ [New] <Jojo> INI Settings: When portable mode is enabled, the most common paths in mptrack.ini are now translated to relative paths (if possible). Plugin paths are not translated to relative paths (yet).
[New] <Jojo> Modules in gzip archives (single-file .gz archives) can now be imported, just to satisfy my laziness when downloading gzipped modules from Amiga Music Preservation. :-P
- [Imp] <Jojo> Mod Loaders: Instead of creating messageboxes in various places, errors are now written to the log.
+ [Imp] <Jojo> Mod Loaders: Instead of creating messageboxes in various places, errors are now written to the log and one messagebox is shown for each file.
[Imp] <Jojo> Binary files are now less often falsely recognized as early MOD files (15 samples without header): If the orderlist contains orderlist items > 128, loading is cancelled.
[Imp] <Jojo> Song Properties: Tooltips are shown for various controls.
[Mod] <Jojo> Options: Removed the "space bar repeats previous action" option, as it did not work anymore since the new keyhandler is used; in fact, this option can be achieved instead by using the "on key hold" for the "quick paste" key shortcut.
- [Mod] <rewbs> Removed old "velocity" volume command, which was experimental and unused.
+ [Reg] <rewbs> Removed old "velocity" volume command, which was experimental and unused.
[Mod] <Jojo> Replaced default VU-meter colours for the MPT scheme by more pleasant colours that were already used for the other themes.
[Mod] <Jojo> Updated internet links (ModPlug Central Forums link is now a permalink)
- [Fix] <Jojo> Length Calculation: If the first pattern was empty, OpenMPT was caught in an infinite loop.
[Fix] <Jojo> MPTM Saving: A missing null pointer check crashed OpenMPT when trying to access a deleted instrument slot.
[Fix] <Jojo> Multi window edit: When (un)muting a channel from the general tab in window 1, it was instantly shown in the pattern editor of window 2, but not vice versa.
[Fix] <Jojo> Channel Manager: When removing channels using the channel manager, their names were not cleared properly.
@@ -214,1390 +199,1485 @@
[Mod] <Jojo> Added OpenMPT 1.18 release notes document for package template
[Mod] <Jojo> Updated DE_jojo.mkb
[Mod] <Jojo> Updated Paul Legovitch's keymap (now also suitable for desktop keyboards); use this as the default "french" keymap in the installer.
- [Mod] <re> Updated default keybindings.
+ [Mod] <re> Updated default keybindings.
v1.18.00.00 (January 2010, revision 475)
----------------------------------------
General tab
- . <Jojo> Channel name input field was not limited properly.
+ [Fix] <Jojo> Channel name input field was not limited properly.
Sequence editor
- + <re> Can now copy/cut/paste order selections.
- ^ <Jojo> Using the keyboard manager for shortcuts. 0...9, + and - keys are now also configurable.
- ^ <Jojo> Duplicate / Create new pattern shortcuts do also work here now.
- ^ <Jojo> Show cut/copy/paste orders in context menu.
- ^ <Jojo> Middle click can now also be used for queuing patterns.
- . <Jojo> Pasting orders now removes "+++" items if they are not supported by the current format.
- . <Jojo> Fixed display error when selecting multiple orders, inserting them and clicking on another order (only first order of previous selection was un-highlighted).
+ [New] <re> Can now copy/cut/paste order selections.
+ [Imp] <Jojo> Using the keyboard manager for shortcuts. 0...9, + and - keys are now also configurable.
+ [Imp] <Jojo> Duplicate / Create new pattern shortcuts do also work here now.
+ [Imp] <Jojo> Show cut/copy/paste orders in context menu.
+ [Imp] <Jojo> Middle click can now also be used for queuing patterns.
+ [Fix] <Jojo> Pasting orders now removes "+++" items if they are not supported by the current format.
+ [Fix] <Jojo> Fixed display error when selecting multiple orders, inserting them and clicking on another order (only first order of previous selection was un-highlighted).
Pattern tab::Pattern editing
- + <Jojo> New paste mode "push forward paste", which resembles the default paste behaviour of Impulse Tracker. Includes new shortcut.
- + <Jojo> New paste mode "paste flood" pastes the clipboard content again and again until it hits the bottom of the pattern (overflow paste will be disabled automatically if paste flood is used, for obvious reasons).
- ^ <Jojo> When using the MPTM format, plugin param changes are written to the pattern as PC Notes (instead of smooth midi macros).
- ^ <Jojo> Assume that the clipboard pattern format is IT (instead of MOD) if no information about the format is available.
- ^ <Jojo> Pattern c&p: convert pasted commands if necessary.
- / <re> Pattern c&p: Mix paste shouldn't anymore trigger conversion on modcommands that weren't changed at all. Now, however, partial conversion will not be done so this still needs further fixing.
- . <Jojo> Pattern c&p: invalid commands are not pasted anymore.
- ^ <Jojo> If "record note off" is enabled and Note Off commands are not supported by the current format, try Note Cut and volume commands.
- / <Jojo> It is impossible to enter something into the volume column in MOD format now.
- / <Jojo> When interpolating PC notes, the plugin number and note type won't get overriden if the note type is already PC or PCs.
- . <re> Pattern c&p: Mix paste should behave better with parameter control notes.
- . <Jojo> Amplify acted VERY weird when it was applied on an instrument that's not assigned to any sample. Should be a bit better now.
- . <Jojo> Amplify doesn't use volume column in MOD format anymore.
- . <Jojo> When recording live from the keyboard, SDx shouldn't exceed the song speed anymore.
- . <Jojo> Got rid of possible redundant undo points.
- . <Jojo> PC notes are now deleted properly (last column).
- . <Jojo> Copying only the param column of PC notes overwrote the value column when pasting them.
- . <Jojo> Entering Note Fade notes didn't work the "old style" way.
+ [New] <Jojo> New paste mode "push forward paste", which resembles the default paste behaviour of Impulse Tracker. Includes new shortcut.
+ [New] <Jojo> New paste mode "paste flood" pastes the clipboard content again and again until it hits the bottom of the pattern (overflow paste will be disabled automatically if paste flood is used, for obvious reasons).
+ [Imp] <Jojo> When using the MPTM format, plugin param changes are written to the pattern as PC Notes (instead of smooth midi macros).
+ [Imp] <Jojo> Assume that the clipboard pattern format is IT (instead of MOD) if no information about the format is available.
+ [Imp] <Jojo> Pattern c&p: convert pasted commands if necessary.
+ [Mod] <re> Pattern c&p: Mix paste shouldn't anymore trigger conversion on modcommands that weren't changed at all. Now, however, partial conversion will not be done so this still needs further fixing.
+ [Fix] <Jojo> Pattern c&p: invalid commands are not pasted anymore.
+ [Imp] <Jojo> If "record note off" is enabled and Note Off commands are not supported by the current format, try Note Cut and volume commands.
+ [Mod] <Jojo> It is impossible to enter something into the volume column in MOD format now.
+ [Mod] <Jojo> When interpolating PC notes, the plugin number and note type won't get overriden if the note type is already PC or PCs.
+ [Fix] <re> Pattern c&p: Mix paste should behave better with parameter control notes.
+ [Fix] <Jojo> Amplify acted VERY weird when it was applied on an instrument that's not assigned to any sample. Should be a bit better now.
+ [Fix] <Jojo> Amplify doesn't use volume column in MOD format anymore.
+ [Fix] <Jojo> When recording live from the keyboard, SDx shouldn't exceed the song speed anymore.
+ [Fix] <Jojo> Got rid of possible redundant undo points.
+ [Fix] <Jojo> PC notes are now deleted properly (last column).
+ [Fix] <Jojo> Copying only the param column of PC notes overwrote the value column when pasting them.
+ [Fix] <Jojo> Entering Note Fade notes didn't work the "old style" way.
Pattern tab::GUI
- + <Jojo> Channel rename dialog in channel header context menu.
- ^ <Jojo> Tidied up the upper panel. It fits perfectly on a 1024x768 screen with treeview enabled and also works on 800x600 with treeview disabled. With the new layout, about 8 more pattern rows can be seen in comparison to the old, bloated 1.17.02.* interface.
- / <Jojo> Due to this cleanup, the "split keyboard" feature has been removed from the interface. The split keyboard settings dialog can now be accessed by using a shortcut, which should be even faster than the old method.
- ^ <re> If keyboard split is active, instrument drop list will show split instrument and split note.
- ^ <Jojo> Grey out pattern name input field when in MOD/S3M mode.
- ^ <Jojo> Added sequence selection edit control.
- / <Jojo> Instead of hiding the sequence name control, just disable it (looks better).
- . <Jojo> If the current pattern is the last possible pattern in the sequence, no "next pattern" is displayed.
+ [New] <Jojo> Channel rename dialog in channel header context menu.
+ [Imp] <Jojo> Tidied up the upper panel. It fits perfectly on a 1024x768 screen with treeview enabled and also works on 800x600 with treeview disabled. With the new layout, about 8 more pattern rows can be seen in comparison to the old, bloated 1.17.02.* interface.
+ [Mod] <Jojo> Due to this cleanup, the "split keyboard" feature has been removed from the interface. The split keyboard settings dialog can now be accessed by using a shortcut, which should be even faster than the old method.
+ [Imp] <re> If keyboard split is active, instrument drop list will show split instrument and split note.
+ [Imp] <Jojo> Grey out pattern name input field when in MOD/S3M mode.
+ [Imp] <Jojo> Added sequence selection edit control.
+ [Mod] <Jojo> Instead of hiding the sequence name control, just disable it (looks better).
+ [Fix] <Jojo> If the current pattern is the last possible pattern in the sequence, no "next pattern" is displayed.
Pattern tab::Note properties
- ^ <Jojo> Hopefully correct limitation and explanation of "Set * waveform" parameters...
- ^ <Jojo> Better explanation of "Invert Loop" parameter.
+ [Imp] <Jojo> Hopefully correct limitation and explanation of "Set * waveform" parameters...
+ [Imp] <Jojo> Better explanation of "Invert Loop" parameter.
Pattern tab::Find/replace
- ^ <Jojo> When using Find&Replace, "follow song" will be disabled, because it's pointless and unusable with "follow song" on.
- . <Jojo> Search&Replace didn't create an undo point.
+ [Imp] <Jojo> When using Find&Replace, "follow song" will be disabled, because it's pointless and unusable with "follow song" on.
+ [Fix] <Jojo> Search&Replace didn't create an undo point.
Pattern tab::Misc
- + <Jojo> New keyboard shortcut in pattern context: Duplicate pattern.
- . <Jojo> When in sample mode, samples were never stopped when in new-style note off mode, which lead to sample jam when using long/looped samples.
+ [New] <Jojo> New keyboard shortcut in pattern context: Duplicate pattern.
+ [Fix] <Jojo> When in sample mode, samples were never stopped when in new-style note off mode, which lead to sample jam when using long/looped samples.
Sample tab
- + <Jojo> Sample Undo. 100 steps per sample (independent), undo buffer is cut off at a tenth of physical memory (that would be 400 MB for a system with 4 GB of RAM). Cutoff size can be specified by setting UndoBufferSize (in Megabytes) in section [Sample Editor] of mptrack.ini.
- ^ <Jojo> When creating a new sample using "resize", sample loop is activated automatically.
- ^ <Jojo> When sample is 8-bit, it will automatically be converted to 16-bit when applying time stretching / pitch shifting.
- ^ <Jojo> Can now enter insanely high values into sample frequency input field (as they are supported by Impulse Tracker), allow only 65536 Hz for S3M files.
- / <Jojo> Removed time stretcher's / pitch shifter's preview function as it's unnecessary now.
- . <Jojo> Insert Silence: Loop points were not updated when adding silence at the beginning of the sample
- . <re> Actions such as time stretching and undo could trigger sample play.
+ [New] <Jojo> Sample Undo. 100 steps per sample (independent), undo buffer is cut off at a tenth of physical memory (that would be 400 MB for a system with 4 GB of RAM). Cutoff size can be specified by setting UndoBufferSize (in Megabytes) in section [Sample Editor] of mptrack.ini.
+ [Imp] <Jojo> When creating a new sample using "resize", sample loop is activated automatically.
+ [Imp] <Jojo> When sample is 8-bit, it will automatically be converted to 16-bit when applying time stretching / pitch shifting.
+ [Imp] <Jojo> Can now enter insanely high values into sample frequency input field (as they are supported by Impulse Tracker), allow only 65536 Hz for S3M files.
+ [Mod] <Jojo> Removed time stretcher's / pitch shifter's preview function as it's unnecessary now.
+ [Fix] <Jojo> Insert Silence: Loop points were not updated when adding silence at the beginning of the sample
+ [Fix] <re> Actions such as time stretching and undo could trigger sample play.
Instrument tab
- . <Jojo> When playing an instrument and disabling its envelopes at the same time, the toggled envelopes are stopped (prevents filter envelope from turning into a pitch envelope).
- . <re> Sample map was broken when dealing with sample indexes greater than 255.
- . <Jojo> Update plugin list properly when cleaning up plugins while being on the instrument tab (possibly also improves instrument tab behaviour when working with multiple windows).
+ [Fix] <Jojo> When playing an instrument and disabling its envelopes at the same time, the toggled envelopes are stopped (prevents filter envelope from turning into a pitch envelope).
+ [Fix] <re> Sample map was broken when dealing with sample indexes greater than 255.
+ [Fix] <Jojo> Update plugin list properly when cleaning up plugins while being on the instrument tab (possibly also improves instrument tab behaviour when working with multiple windows).
Instrument tab::Envelope editor
- + <Jojo> Envelopes can be edited using keyboard. Various keyboard shortcuts have been added to move and edit envelope points. This uses a common "drag and drop" node with mouse editing, so a point can first be clicked and the be moved with f.e. cursor keys.
- ^ <Jojo> When creating a new envelope, automatically enable it as well.
- ^ <Jojo> Mark currently selected envelope node yellow for better visibility when using keyboard editing.
- / <Jojo> Middle line is also shown for volume envelope.
+ [New] <Jojo> Envelopes can be edited using keyboard. Various keyboard shortcuts have been added to move and edit envelope points. This uses a common "drag and drop" node with mouse editing, so a point can first be clicked and the be moved with f.e. cursor keys.
+ [Imp] <Jojo> When creating a new envelope, automatically enable it as well.
+ [Imp] <Jojo> Mark currently selected envelope node yellow for better visibility when using keyboard editing.
+ [Mod] <Jojo> Middle line is also shown for volume envelope.
Comments tab
- ^ <Jojo> If sample size is < 1 KB, amount of bytes is shown instead of "0 KB".
- . <Jojo> The lower part of the tab was receiving update messages that were not even meaningful to this tab (f.e. speed changes), so it was updating quite often modules that have alternating speed and the toolbar was "blinking"... Only letting in important update messages now.
+ [Imp] <Jojo> If sample size is < 1 KB, amount of bytes is shown instead of "0 KB".
+ [Fix] <Jojo> The lower part of the tab was receiving update messages that were not even meaningful to this tab (f.e. speed changes), so it was updating quite often modules that have alternating speed and the toolbar was "blinking"... Only letting in important update messages now.
Treeview
- + <Jojo> Show sequences in song treeview. Sequences can be inserted, duplicated and deleted by right-clicking the sequence items.
- + <Jojo> Clicking on a mod item (i.e. a filename node) switches to the corresponding window.
- + <Jojo> Added right-click options for mod items.
- + <Jojo> Display playing samples / instruments (only those that are assigned to a sample) using green triangles. Can be enabled from setup screen.
- + <Jojo> Muted samples and instruments are shown with a different icon.
- ^ <Jojo> Can now dragondrop orders, even between sequences.
- ^ <Jojo> Double-clicking order items and pattern items should work now.
- ^ <Jojo> Show whole sequence (don't stop on first "---" item).
- ^ <Jojo> Switching between sequences should be easier now. There's a context menu entry for it and double-clicking on an empty sequence will switch to it (as there are no orderlist item to click on).
- ^ <Jojo> Different icons for VST effects / instruments
+ [New] <Jojo> Show sequences in song treeview. Sequences can be inserted, duplicated and deleted by right-clicking the sequence items.
+ [New] <Jojo> Clicking on a mod item (i.e. a filename node) switches to the corresponding window.
+ [New] <Jojo> Added right-click options for mod items.
+ [New] <Jojo> Display playing samples / instruments (only those that are assigned to a sample) using green triangles. Can be enabled from setup screen.
+ [New] <Jojo> Muted samples and instruments are shown with a different icon.
+ [Imp] <Jojo> Can now dragondrop orders, even between sequences.
+ [Imp] <Jojo> Double-clicking order items and pattern items should work now.
+ [Imp] <Jojo> Show whole sequence (don't stop on first "---" item).
+ [Imp] <Jojo> Switching between sequences should be easier now. There's a context menu entry for it and double-clicking on an empty sequence will switch to it (as there are no orderlist item to click on).
+ [Imp] <Jojo> Different icons for VST effects / instruments
VST / MIDI mapping
- ^ <Jojo> VST Selector: Different icons for effects / instruments.
- . <re/Jojo> When moving around plugins, param control notes are now also updated.
- . <re> MIDI mapping: Pattern record checkbox wasn't updated properly.
- . <re/Jojo> MIDI mapping: Shift key erroneously opened MIDI mapping dialog in some cases. However, it does not work properly with all plugins anymore (e.g. sliders in Synth1 are not shift-clickable anymore)
+ [Imp] <Jojo> VST Selector: Different icons for effects / instruments.
+ [Fix] <re/Jojo> When moving around plugins, param control notes are now also updated.
+ [Fix] <re> MIDI mapping: Pattern record checkbox wasn't updated properly.
+ [Fix] <re/Jojo> MIDI mapping: Shift key erroneously opened MIDI mapping dialog in some cases. However, it does not work properly with all plugins anymore (e.g. sliders in Synth1 are not shift-clickable anymore)
Mod conversion
- ^ <Jojo> When converting a song that has subsongs to MPTM format, the user is asked if those subsongs should be converted into multiple sequences.
- ^ <Jojo> If possible, all MPTM sequences will be merged into the first sequence. This also tries to fix patterns with Bxx effects.
- ^ <Jojo> Better conversion of MOD / XM E4x / E7x command.
- ^ <Jojo> Better conversion of note off commands when converting to .mod.
- ^ <Jojo> Removing channel features (pan/vol) in formats where they're not supported.
- ^ <Jojo> Insert pattern break commands when resizing patterns to 64 rows that were smaller.
- ^ <Jojo> Changing between MOD and XM format limits speed / tempo commands (Fxx) properly now.
- ^ <Jojo> Trim sequence if it's too long (f.e. in MOD format).
- ^ <Jojo> Remove sample vibrato and sustain loops for MOD / S3M.
+ [Imp] <Jojo> When converting a song that has subsongs to MPTM format, the user is asked if those subsongs should be converted into multiple sequences.
+ [Imp] <Jojo> If possible, all MPTM sequences will be merged into the first sequence. This also tries to fix patterns with Bxx effects.
+ [Imp] <Jojo> Better conversion of MOD / XM E4x / E7x command.
+ [Imp] <Jojo> Better conversion of note off commands when converting to .mod.
+ [Imp] <Jojo> Removing channel features (pan/vol) in formats where they're not supported.
+ [Imp] <Jojo> Insert pattern break commands when resizing patterns to 64 rows that were smaller.
+ [Imp] <Jojo> Changing between MOD and XM format limits speed / tempo commands (Fxx) properly now.
+ [Imp] <Jojo> Trim sequence if it's too long (f.e. in MOD format).
+ [Imp] <Jojo> Remove sample vibrato and sustain loops for MOD / S3M.
Playback (see also format-specific changes below)
- ^ <Jojo> Added some more standard playback frequencies (176KHz, 192KHz) to setup.
- . <Jojo> When jumping around in a module, high offset value is also memorized.
+ [Imp] <Jojo> Added some more standard playback frequencies (176KHz, 192KHz) to setup.
+ [Fix] <Jojo> When jumping around in a module, high offset value is also memorized.
IT::Saving
- . <Jojo> Original IT specs concerning max orders/patterns were wrong. IT can handle up to 257 orders (as the last order is always ---, so it's actually 256 accessible orders), so the saving routines were also updated a bit.
- . <Jojo> Save at least 2 order items.
- . <Jojo> IT files with empty sample slots made with MPT will now FINALLY save correctly in Impulse Tracker.
- . <Jojo> Compatibility Export: Don't store "extended filter range" flag.
+ [Fix] <Jojo> Original IT specs concerning max orders/patterns were wrong. IT can handle up to 257 orders (as the last order is always ---, so it's actually 256 accessible orders), so the saving routines were also updated a bit.
+ [Fix] <Jojo> Save at least 2 order items.
+ [Fix] <Jojo> IT files with empty sample slots made with MPT will now FINALLY save correctly in Impulse Tracker.
+ [Fix] <Jojo> Compatibility Export: Don't store "extended filter range" flag.
IT::Loading
- ^ <Jojo> Removed unnecessary / wrong pre-amp limits.
- . <Jojo> IT files with global volume 0 are now loaded correctly.
- . <Jojo> In some very rare (almost only theoretical) cases, the last IT instrument would not be loaded in previous versions. Use correct instrument header size (1.xx or 2.xx header) for comparison when loading instrument headers.
+ [Imp] <Jojo> Removed unnecessary / wrong pre-amp limits.
+ [Fix] <Jojo> IT files with global volume 0 are now loaded correctly.
+ [Fix] <Jojo> In some very rare (almost only theoretical) cases, the last IT instrument would not be loaded in previous versions. Use correct instrument header size (1.xx or 2.xx header) for comparison when loading instrument headers.
IT::Playback compatibility
- . <Jojo> Reset NNA actions on every note (tentative fix, fixes spx-farspacedance.it).
- . <Jojo> Fixes from SchismTracker: VolSwing, PanSwing, PPS.
- . <Jojo> Out of range offset command with Old FX on.
- . <Jojo> Impvored S3x / S4x / S5x handling.
+ [Fix] <Jojo> Reset NNA actions on every note (tentative fix, fixes spx-farspacedance.it).
+ [Fix] <Jojo> Fixes from SchismTracker: VolSwing, PanSwing, PPS.
+ [Fix] <Jojo> Out of range offset command with Old FX on.
+ [Fix] <Jojo> Impvored S3x / S4x / S5x handling.
S3M
- . <Jojo> ST3 compatibility: Only allow waveforms 0 to 3 for S3x / S4x / S5x.
- . <Jojo> The S3M format actually knows muted channels. This was not taken into account before.
+ [Fix] <Jojo> ST3 compatibility: Only allow waveforms 0 to 3 for S3x / S4x / S5x.
+ [Fix] <Jojo> The S3M format actually knows muted channels. This was not taken into account before.
XM::Loading
- ^ <Jojo> Allow to load modules with an empty order list (as they are, in fact, valid XM files).
+ [Imp] <Jojo> Allow to load modules with an empty order list (as they are, in fact, valid XM files).
XM::Playback compatibility
- . <Jojo> Almost perfect arpeggio emulation (only a few notes are still wrong). Thanks, Ian Luck!
- . <Jojo> Rogue note delays are now retriggering the instrument.
- . <Jojo> Perfect emulation of buggy Rxy behaviour. Thanks to Ian Luck for helping me with this.
- . <Jojo> Command X modplug extensions are now ignored in FT2 compat mode.
+ [Fix] <Jojo> Almost perfect arpeggio emulation (only a few notes are still wrong). Thanks, Ian Luck!
+ [Fix] <Jojo> Rogue note delays are now retriggering the instrument.
+ [Fix] <Jojo> Perfect emulation of buggy Rxy behaviour. Thanks to Ian Luck for helping me with this.
+ [Fix] <Jojo> Command X modplug extensions are now ignored in FT2 compat mode.
MOD
- ^ <Jojo> Mod Creation: Ensure that the order length fits the current mod specifications (this was problematic when creating .MOD files).
- . <Jojo> Mod Creation: MOD Panning scheme is set up correctly now.
- . <Jojo> MOD Loader: 8Chn Startrekker modules ("FLT8") are loaded correctly now.
+ [Imp] <Jojo> Mod Creation: Ensure that the order length fits the current mod specifications (this was problematic when creating .MOD files).
+ [Fix] <Jojo> Mod Creation: MOD Panning scheme is set up correctly now.
+ [Fix] <Jojo> MOD Loader: 8Chn Startrekker modules ("FLT8") are loaded correctly now.
MOD::Playback compatibility
- + <Jojo> Added song flag "PT 1.x Mode" (for .MOD files) that enabled on-the-fly sample swapping as ProTracker did it.
- + <Jojo> Support for the EFx command (Invert Loop). One has to pay attention when working with this command as it effictively trashes samples.
- ^ <Jojo> MOD Playback: if PT1.x playback flag is set, 8xx and E8x panning commands are now ignored.
+ [New] <Jojo> Added song flag "PT 1.x Mode" (for .MOD files) that enabled on-the-fly sample swapping as ProTracker did it.
+ [New] <Jojo> Support for the EFx command (Invert Loop). One has to pay attention when working with this command as it effictively trashes samples.
+ [Imp] <Jojo> MOD Playback: if PT1.x playback flag is set, 8xx and E8x panning commands are now ignored.
Module cleanup
- + <Jojo> New cleanup feature: Merge sequences.
- ^ <Jojo> Pattern Cleanup does now also work with multiple sequences.
- ^ <Jojo> Improved cleanup dialog, with new options (remove all *, optimize samples).
+ [New] <Jojo> New cleanup feature: Merge sequences.
+ [Imp] <Jojo> Pattern Cleanup does now also work with multiple sequences.
+ [Imp] <Jojo> Improved cleanup dialog, with new options (remove all *, optimize samples).
MP3/Wav export
- + <Jojo> Wave Convert: Normalization is back as experimental feature.
- + <Jojo> Wav/Mp3 export: Show estimated remaining time.
- ^ <Jojo> Mp3 export: Removed 60 minutes limit.
- . <Jojo> Mp3 export: Fixed possible issue with very long mod files (such as Skaven's "Beyond the Network").
- . <Jojo> Wave Convert: The wave convert dialog had two default buttons, one of them (the "default default button") didn't make sense.
+ [New] <Jojo> Wave Convert: Normalization is back as experimental feature.
+ [New] <Jojo> Wav/Mp3 export: Show estimated remaining time.
+ [Imp] <Jojo> Mp3 export: Removed 60 minutes limit.
+ [Fix] <Jojo> Mp3 export: Fixed possible issue with very long mod files (such as Skaven's "Beyond the Network").
+ [Fix] <Jojo> Wave Convert: The wave convert dialog had two default buttons, one of them (the "default default button") didn't make sense.
Colour setup
- + <Jojo> Channel separators can now have custom colors.
- + <Jojo> Can now specify the blend colour for prev/next patterns.
- / <Jojo> Renamed FT2 and IT presets to "Blue" and "Green", as they did not resemble FT2 and IT in any way.
- / <Jojo> Added VU Meter colours for the pattern colour presets.
- / <Jojo> Changed the "Buzz" colour scheme a bit.
- . <Jojo> When loading colour presets that have less colours are defined than required, the missing colours will be replaced by those from the "MPT" preset.
- . <Jojo> When no INI file was present, channel separators were completely black.
+ [New] <Jojo> Channel separators can now have custom colors.
+ [New] <Jojo> Can now specify the blend colour for prev/next patterns.
+ [Mod] <Jojo> Renamed FT2 and IT presets to "Blue" and "Green", as they did not resemble FT2 and IT in any way.
+ [Mod] <Jojo> Added VU Meter colours for the pattern colour presets.
+ [Mod] <Jojo> Changed the "Buzz" colour scheme a bit.
+ [Fix] <Jojo> When loading colour presets that have less colours are defined than required, the missing colours will be replaced by those from the "MPT" preset.
+ [Fix] <Jojo> When no INI file was present, channel separators were completely black.
Keymaps
- + <Jojo> Three new keymaps: French Laptop by Paul Legovitch, Norwegian MPT Classic by Rakib, US_mpt_classic_(snu).
- / <Jojo> Updated DE_jojo.mkb
- ^ <Jojo> When loading a keymap file and unrecognized lines are found, only one messagebox is shown.
- / <Jojo> All keymaps have been updated to version 1 and updated to contain the orderlist shortcuts.
- . <Jojo> Keymap files have a version number now (currently version 1). If keymap file doesn't have a version number (that's version 0), the orderlist keys will be added automatically so that orderlist remains usable in new builds.
+ [New] <Jojo> Three new keymaps: French Laptop by Paul Legovitch, Norwegian MPT Classic by Rakib, US_mpt_classic_(snu).
+ [Mod] <Jojo> Updated DE_jojo.mkb
+ [Imp] <Jojo> When loading a keymap file and unrecognized lines are found, only one messagebox is shown.
+ [Mod] <Jojo> All keymaps have been updated to version 1 and updated to contain the orderlist shortcuts.
+ [Fix] <Jojo> Keymap files have a version number now (currently version 1). If keymap file doesn't have a version number (that's version 0), the orderlist keys will be added automatically so that orderlist remains usable in new builds.
Tuning
- + <re> Can import scl-files. Upper limit for note count is 64.
- ^ <Jojo> Tuning dialog: Using the default tuning path as default path for Import/Export dialog
+ [New] <re> Can import scl-files. Upper limit for note count is 64.
+ [Imp] <Jojo> Tuning dialog: Using the default tuning path as default path for Import/Export dialog
Module format support
- + <Jojo> Can now import RIFF AM and RIFF AMFF files, as well as J2B (Jazz Jackrabbit 2 music) files, which are compressed AM(FF) files.
- + <Jojo> Can now import PSM16 files (Silverball, early versions of Epic Pinball).
- . <Jojo> MED Loader: Possible error when loading orderlist.
- . <Jojo> MDL Loader: Various fixes (taken from Schism Tracker).
- . <Jojo> IMF Loader: Slightly wrong instrument loader (this for once didn't break anything, though).
- . <Jojo> AMF Loader: Missing break command.
+ [New] <Jojo> Can now import RIFF AM and RIFF AMFF files, as well as J2B (Jazz Jackrabbit 2 music) files, which are compressed AM(FF) files.
+ [New] <Jojo> Can now import PSM16 files (Silverball, early versions of Epic Pinball).
+ [Fix] <Jojo> MED Loader: Possible error when loading orderlist.
+ [Fix] <Jojo> MDL Loader: Various fixes (taken from Schism Tracker).
+ [Fix] <Jojo> IMF Loader: Slightly wrong instrument loader (this for once didn't break anything, though).
+ [Fix] <Jojo> AMF Loader: Missing break command.
Misc
- ^ <Jojo> All Loaders: Fixed string handling to filter out all null chars in song/sample/instrument/etc. names. This avoids "empty" instrument names that occured in a couple of .IT files before.
- ^ <Jojo> Main window: Extended paste mechanisms (mix, flood, push forward) have been moved into a sub menu.
- ^ <Jojo> Main window: Improved accelerator keys in the edit menu.
- ^ <Jojo> Added "split keyboard settings" dialog to the "edit" menu and updated the shortcuts there (goto was missing).
- ^ <re> SoundTouch: Update to version 1.5.0.
- / <Jojo> Store configuration and tuning files in %APPDATA% if possible. Can be disabled by adding UseAppDataDirectory=0 to [Paths] in mptrack.ini ("portable mode").
- / <Jojo> Mod Creation: When clicking on the "new" button, the newly created module will be of the same type as the currently active document. Should probably be an option.
- / <Jojo> Made Graph and Pattern Randomizer shortcuts invisible, as they are usless.
- / <Jojo> Compatibility Export: Use module working directory in "save as" dialog.
- / <Jojo> Using MS Shell Dlg font instead of MS Sans Serif in resource file.
- / <re> Changed some "modplug tracker" strings to "OpenMPT".
- . <Jojo> When using a Load/Save dialog, MPT's key handler will be disabled so that common shortcuts like F2, Ctrl+C, Ctrl+V, Esc. etc. can still be used.
- . <Jojo> Mod Loaders: Very short sample sustain loops are now also accepted (fixes ckabsenc.it).
- . <Jojo> Mod Creation: Filling the whole mod title field with null bytes on creation to avoid funky characters in other programs.
- . <Jojo> When moving program files to %APPDATA%, take care of the keyboard settings path in the INI file.
- . <Jojo> Fixed possible issue with long (12 chars) instrument filenames.
- . <re> Autosave: 'Modified since last autosave'-flag wasn't always updated.
- . <re> Fixes to handling of 32 chars long instrument name.
+ [Imp] <Jojo> All Loaders: Fixed string handling to filter out all null chars in song/sample/instrument/etc. names. This avoids "empty" instrument names that occured in a couple of .IT files before.
+ [Imp] <Jojo> Main window: Extended paste mechanisms (mix, flood, push forward) have been moved into a sub menu.
+ [Imp] <Jojo> Main window: Improved accelerator keys in the edit menu.
+ [Imp] <Jojo> Added "split keyboard settings" dialog to the "edit" menu and updated the shortcuts there (goto was missing).
+ [Imp] <re> SoundTouch: Update to version 1.5.0.
+ [Mod] <Jojo> Store configuration and tuning files in %APPDATA% if possible. Can be disabled by adding UseAppDataDirectory=0 to [Paths] in mptrack.ini ("portable mode").
+ [Mod] <Jojo> Mod Creation: When clicking on the "new" button, the newly created module will be of the same type as the currently active document. Should probably be an option.
+ [Mod] <Jojo> Made Graph and Pattern Randomizer shortcuts invisible, as they are usless.
+ [Mod] <Jojo> Compatibility Export: Use module working directory in "save as" dialog.
+ [Mod] <Jojo> Using MS Shell Dlg font instead of MS Sans Serif in resource file.
+ [Mod] <re> Changed some "modplug tracker" strings to "OpenMPT".
+ [Fix] <Jojo> When using a Load/Save dialog, MPT's key handler will be disabled so that common shortcuts like F2, Ctrl+C, Ctrl+V, Esc. etc. can still be used.
+ [Fix] <Jojo> Mod Loaders: Very short sample sustain loops are now also accepted (fixes ckabsenc.it).
+ [Fix] <Jojo> Mod Creation: Filling the whole mod title field with null bytes on creation to avoid funky characters in other programs.
+ [Fix] <Jojo> When moving program files to %APPDATA%, take care of the keyboard settings path in the INI file.
+ [Fix] <Jojo> Fixed possible issue with long (12 chars) instrument filenames.
+ [Fix] <re> Autosave: 'Modified since last autosave'-flag wasn't always updated.
+ [Fix] <re> Fixes to handling of 32 chars long instrument name.
v1.17.03.02 (test build) (September 2009, revision 371)
-------------------------------------------------------
General tab
- ^ <Jojo> "Modtype" dialog will revert mod flags to previous values if user presses the Cancel button.
- ^ <Jojo> Modtype Dialog: Added suffixes "IT" and "S3M" to some mod flags for more clarity.
- . <Jojo> VSTi / Sample volume sliders only go up to 255 instead of 256.
- . <Jojo> Document will now be set modified when moving or inserting plugins.
+ [Imp] <Jojo> "Modtype" dialog will revert mod flags to previous values if user presses the Cancel button.
+ [Imp] <Jojo> Modtype Dialog: Added suffixes "IT" and "S3M" to some mod flags for more clarity.
+ [Fix] <Jojo> VSTi / Sample volume sliders only go up to 255 instead of 256.
+ [Fix] <Jojo> Document will now be set modified when moving or inserting plugins.
Sequence editor
- + <Jojo> Multiple orders can be selected in the pattern sequence. At the moment, it is possible to insert, delete, duplicate and dragondrop multiple orders.
- + <Jojo> Added context menu item "Render to wave", to render one or more patterns to wave.
+ [New] <Jojo> Multiple orders can be selected in the pattern sequence. At the moment, it is possible to insert, delete, duplicate and dragondrop multiple orders.
+ [New] <Jojo> Added context menu item "Render to wave", to render one or more patterns to wave.
Pattern tab
- + <Jojo> Paste will now optionally continue on next pattern (overflow paste).
- + <re> Channel reset(stops note, sets initial chn settings). Available from channel header context menu and new key binding.
- + <Jojo> When shift-clicking somewhere, a selection will be drawn from the previous cursor position to the new position.
- ^ <Jojo> Showing descriptions of "special" notes in the statusbar, like it's done for effects.
- ^ <Jojo> Shrinking patterns is now also possible with patterns < 32 rows.
- ^ <Jojo> Solo/Unmute context menu has a bit more dynamical transition menu points (experimental).
- ^ <re> Added some checks to prevent entering notes which are not supported by the module type.
- / <Jojo> Entering note with row spacing enabled can now move cursor to next pattern if continuous scroll is enabled.
- . <Jojo> Inserting a new pattern won't resize it to 32 rows anymore if the current pattern has less than 32 rows.
- . <Jojo> Show "offset" and "velocity" volume commands in default color instead of "pitch" color.
- . <Jojo> Fixed weird combination of context menu shortcut and "always center active row" being disabled (http://lpchip.com/modplug/viewtopic.php?t=3203).
- . <Jojo> Keyboard split note was off by one.
- . <Jojo> Set max. row spacing / skipping value to 64, visibly clamp values > 64 to 64 in the edit box.
+ [New] <Jojo> Paste will now optionally continue on next pattern (overflow paste).
+ [New] <re> Channel reset(stops note, sets initial chn settings). Available from channel header context menu and new key binding.
+ [New] <Jojo> When shift-clicking somewhere, a selection will be drawn from the previous cursor position to the new position.
+ [Imp] <Jojo> Showing descriptions of "special" notes in the statusbar, like it's done for effects.
+ [Imp] <Jojo> Shrinking patterns is now also possible with patterns < 32 rows.
+ [Imp] <Jojo> Solo/Unmute context menu has a bit more dynamical transition menu points (experimental).
+ [Imp] <re> Added some checks to prevent entering notes which are not supported by the module type.
+ [Mod] <Jojo> Entering note with row spacing enabled can now move cursor to next pattern if continuous scroll is enabled.
+ [Fix] <Jojo> Inserting a new pattern won't resize it to 32 rows anymore if the current pattern has less than 32 rows.
+ [Fix] <Jojo> Show "offset" and "velocity" volume commands in default color instead of "pitch" color.
+ [Fix] <Jojo> Fixed weird combination of context menu shortcut and "always center active row" being disabled (http://lpchip.com/modplug/viewtopic.php?t=3203).
+ [Fix] <Jojo> Keyboard split note was off by one.
+ [Fix] <Jojo> Set max. row spacing / skipping value to 64, visibly clamp values > 64 to 64 in the edit box.
Pattern tab::Note properties
- ^ <Jojo> Added description to high offset command in note properties dialog.
- ^ <Jojo> 8-Bit Panning slider also has the "Surround" state in S3M format now.
- ^ <Jojo> Proper display of Pxy effect in the note editor window.
- ^ <Jojo> Explanation for Tremor effect.
- ^ <Jojo> Completed descriptions for extended MOD/XM, fixed display of several effects.
- ^ <Jojo> Added description for S1x - Glissando Control.
- . <Jojo> When double-clicking on a note in the pattern editor, the noteMin offset was not taken into consideration, which lead to wrong information for some formats.
+ [Imp] <Jojo> Added description to high offset command in note properties dialog.
+ [Imp] <Jojo> 8-Bit Panning slider also has the "Surround" state in S3M format now.
+ [Imp] <Jojo> Proper display of Pxy effect in the note editor window.
+ [Imp] <Jojo> Explanation for Tremor effect.
+ [Imp] <Jojo> Completed descriptions for extended MOD/XM, fixed display of several effects.
+ [Imp] <Jojo> Added description for S1x - Glissando Control.
+ [Fix] <Jojo> When double-clicking on a note in the pattern editor, the noteMin offset was not taken into consideration, which lead to wrong information for some formats.
Pattern tab::Find/replace
- ^ <Jojo> Don't reset "replace all" flag after every search.
- / <Jojo> "Search in whole song" and "Replace all" are now enabled by default.
- . <Jojo> Replacing also works with high instrument numbers now. Also, empty instrument numbers won't be affected by "ins+1" anymore.
- . <Jojo> Notes that cannot be used in the given format are not shown in the dropdown combo.
- . <Jojo> Made comboboxes more convenient to use.
+ [Imp] <Jojo> Don't reset "replace all" flag after every search.
+ [Mod] <Jojo> "Search in whole song" and "Replace all" are now enabled by default.
+ [Fix] <Jojo> Replacing also works with high instrument numbers now. Also, empty instrument numbers won't be affected by "ins+1" anymore.
+ [Fix] <Jojo> No...
[truncated message content] |
|
From: <rel...@us...> - 2010-05-21 18:17:42
|
Revision: 600
http://modplug.svn.sourceforge.net/modplug/?rev=600&view=rev
Author: relabsoluness
Date: 2010-05-21 18:17:35 +0000 (Fri, 21 May 2010)
Log Message:
-----------
[Imp] Release package: Updated history.txt
Modified Paths:
--------------
trunk/OpenMPT/packageTemplate/History.txt
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-05-21 16:37:38 UTC (rev 599)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-05-21 18:17:35 UTC (rev 600)
@@ -9,10 +9,218 @@
?: other
(tx XYZ): thanks to XYZ for telling us about the bug
-v1.18 (January 2010, revision 467)
-----------------------------------
+Changes from revisions [476, 599]
+---------------------------------
General tab
+ [Imp] <Jojo> Disabled tempo slider for MOD files (it was just confusing)
+ [Imp] <Jojo> Disabled global volume slider for MOD files, instead enabled the sample pre-amp slider (so it is also possible to make output louder)
+ [Fix] <Jojo> Moving a plugin in MOD/S3M files doesn't mark them as modified anymore. The channel fx dropdown lists are now also disabled for those module types.
+ [Fix] <Jojo> If necessary (S3M), disable restart position edit control on general tab.
+ [Fix] <coda> The background colour of the tabs in the channel configuration is now also correct when using WinXP Luna or Vista/Win7 Aero.
+
+Sequence editor
+ [New] <Jojo> "Select All" shortcut also works here now.
+ [Imp] <Jojo> Sequence menu also allows to insert empty sequences now.
+
+Pattern tab::pattern editing
+ [New] <Jojo> Extended context menu for PC Notes
+ [New] <Jojo> Key shortcut + context menu entry for toggling the plugin editor of the PC note that's under the cursor.
+ [Imp] <Jojo> Overflow paste now only uses one undo step.
+ [Imp] <Jojo> Instead of simply ignoring note off/cut/fade when working with .MOD files, it is converted to C00.
+ [Fix] <rewbs> Effect visualizer is now aware of PC notes (bug 3836).
+ [Fix] <rewbs> Context menu command "Change Plugin" for PC notes now works when the PC note has a blank plugin (instrument) field.
+ [Fix] <Jojo> When using MIDI record or split keyboard settings, volume data was writting into the volume column in MOD format.
+ [Fix] <Jojo> When converting PC Notes to MIDI Macros, the instrument index is now also cleaned as well. Noticable for example when pasting PC notes into an IT module.
+ [Fix] <Jojo> Now, plugin slot 100 can also be automated using PC Notes.
+ [Fix] <Jojo> When pasting pattern data that exactly reached the pattern end with overflow paste enabled, a redundant undo point was created.
+ [Fix] <Jojo> Entered (volume) effects are now properly checked (makes a difference f.e. in MOD format where it was previously possible to enter effects like Hxx)
+ [Fix] <Jojo> Mix Paste: When in MPT behaviour mode, empty FX commands were not overwritten properly when there previously was an effect in that field but only the effect number (and not the param value) was reset.
+ [Reg] <Jojo> Creating a selection using the Shift key + Mouse click now only works if there was previously no selection made; This seems reasonable as the old shift-behaviour seems to be widely used.
+
+Pattern tab::GUI
+ [New] <Jojo> When the PT1x mode or the S3M "Amiga" flag are enabled, dodgy notes (i.e lower than C-4 or higher than B-6) are marked red.
+ [Imp] <Jojo> The status bar shows plugin and parameter names for PC notes now as well.
+ [Imp] <Jojo> Effect vis: Make use of song's own row highlighting variables instead of fixed global ones.
+ [Fix] <Jojo> The status bar ("Position x of y") only the showed order length for the first subtune if subtunes were separated by an "---" order item.
+ [Fix] <Jojo> Changing a channel plugin in MOD/S3M files doesn't mark them as modified anymore.
+ [Fix] <Jojo> When working with multiple sequences, switching to the pattern editor for the first time automatically marked the document as modified.
+
+Pattern tab::Note properties
+ [Imp] <Jojo> Show a nice description for the new :xy effect.
+ [Imp] <Jojo> Don't allow values > 63 for "break to row" commands in MOD/S3M.
+ [Imp] <Jojo> Since the behaviour of sliding commands with both nibbles set varies from tracker to tracker, "undefined" is always shown in the note properties in such cases.
+ [Fix] <Jojo> Vibrato and Tremolo were erroneously marked as commands with no effect memory.
+ [Fix] <Jojo> In the note properties, the Gxx effect for XM files was not limited properly.
+ [Fix] <Jojo> In Note Properties, the waveform display for S [345]x (and equivalent MOD/XM effeects) was not always fully visible ("continue" addition was cut off)
+ [Fix] <Jojo> Display "fine" / "extra fine" portamento effects properly (S3M/IT/MPTM), display SFx macro properly, display MOD effects with no memory properly.
+
+Pattern tab::Find/replace
+ [Fix] <Jojo> Find/Replace didn't work properly when replacing PC Notes with something that's not a PC Note.
+ [Fix] <Jojo> Instead of turning "Follow Song" off, the Find/Replace dialog toggled it.
+
+Sample tab
+ [New] <Jojo> Shift+New = Clone sample slot
+ [New] <Jojo> Option to not ask for RAW import settings again (settings are remembered independently for all modules)
+ [Imp] <Jojo> Remember previous settings in RAW import dialog
+ [Imp] <Jojo> When enabling (sustain) loop and no loop points are set yet, automatically set loop to full sample length.
+ [Imp] <Jojo> Samplename and filename are now properly limited.
+ [Imp] <Jojo> When enabling a sample loop and only parts of the sample are selected
+ [Fix] <Jojo> When applying time stretch / pitch shift to an 8-bit sample and selecting the sample partly lead to partial upsampling, instead of upsampling the whole sample.
+ [Fix] <Jojo> Sample Undo: If no custom value was set, the default value was set ridiculously high (tx Paul Legovitch)
+ [Fix] <Jojo> Sample Undo: Fixed another possible problem when undoing actions with very little memory left.
+ [Fix] <Jojo> It was not possible to create the last sample slot (i.e. pressing "new sample" with a MOD file that had 30 samples would result in an error, although MOD supports 31 samples).
+ [Fix] <Jojo> When loading an extremely short raw file (f.e. 1 byte) twice, it crashed OpenMPT.
+
+Instrument tab
+ [New] <Jojo> Envelope zooming. Might still look very weird (especially the first tick and around loop points). Includes two new keyboard shortcuts.
+ [New] <Jojo> Transpose Up/Down for sample map.
+ [New] <Jojo> VST/Instrument handling: The IT instrument note mapping is now also applied to VST instruments (before, it was just available for samples). This way, VST instruments can be transposed easily.
+ [Imp] <Jojo> When pasting an envelope, it's now also automatically enabled.
+ [Imp] <Jojo> Instrumentname and filename are now properly limited.
+ [Imp] <Jojo> "Scale envelope points" is now always available for scaling the values of the points (y axis).
+ [Fix] <Jojo> The panning spin button ranged from 0 to 256, however when saving to .IT, 256 was wrapping over to 0. Panning is now limited from 0 to 255.
+ [Fix] <Jojo> It was impossible to assign plugin slot 100 to an instrument.
+
+Comments tab
+ [Fix] <Jojo> Correct C-5 frequency is now also shown if the module is an XM file.
+ [Fix] <Jojo> When editing sample / instrument names, they are limited properly now.
+
+Treeview
+ [New] <Jojo> Sequences can now be copied to other modules by simply dragging the sequence header into the the other module's sequence header. Does only work between two different modules, not within the same module.
+ [Imp] <Jojo> Display sequence index next to sequence names.
+ [Imp] <Jojo> Improved order dragging; It is now also possible to drag an order into a non-MPT module. In that case, the old orderlist will be replaced.
+ [Imp] <Jojo> J2B files were not shown in treeview.
+ [Fix] <Jojo> If a sequence had no name, its name was not formatted properly.
+ [Fix] <Jojo> Soundfont samples were not playing correctly anymore. Note that soundfont samples in the MIDI library still don't work.
+ [Fix] <Jojo> A crash could occour if the instrument library path was too long (f.e. because of malicious strings in the [Paths] section of the INI file)
+ [Fix] <Jojo> "Bypass" action for VSTs didn't set the document as modified.
+ [Fix] <Jojo> Right-Click on module -> Close didn't ask for confirmation when the document was modified.
+ [Fix] <Jojo> Insert/Duplicate sequence actions didn't set the document modified. Grey out those two actions if no additional sequences can be added.
+
+VST
+ [New] <Jojo> VST/Instrument handling: The IT instrument note mapping is now also applied to VST instruments (before, it was just available for samples). This way, VST instruments can be transposed easily.
+ [Imp] <Jojo> VST Editor: Instead of just saying the user that the plugin has to be assigned to an instrument to play notes, they are queried now whether they want to automatically add an instrument.
+ [Imp] <Jojo> VST Editor: Added shortcuts for "toggle bypass", "pass keys to plug" and "record params to pattern"
+ [Mod] <Jojo> VST Editor: Changed number of patches per sub menu from 100 to 128. Now, one sub menu equals ones MIDI bank (more logical)
+ [Fix] <Jojo> VST Editor: Preset names starting with ' ' >= char > 'A' were cropped (i.e. "123ABC" was displayed as "ABC")
+ [Fix] <re> Some VSTs that previously wouldn't load might now load fine.
+ [Fix] <re> Returned host CanDo-values were wrong (since pre RC1 era).
+
+Mod conversion
+ [Imp] <Jojo> Convert the :xy effect to a simple note delay effect when converting to anything that's not MPTM.
+ [Imp] <Jojo> Don't show warning about restart position if it is actually not set (only applies to S3M format)
+ [Fix] <Jojo> When converting from MOD to S3M or IT, the Invert Loop effect was not removed.
+ [Fix] <Jojo> When converting from MPTM to another format, the first sequence name is removed and the sequence is now sized properly when merging multiple sequences.
+ [Fix] <Jojo> When converting between XM and IT, the sample autovibrato "sweep" factor is now fixed a bit.
+ [Fix] <Jojo> When removing instruments from the treeview and converting the module to a different format which also supports instruments, OpenMPT crashed due to a null pointer exception.
+ [Fix] <Jojo> When converting from MOD to S3M or IT, the Invert Loop effect was not removed.
+ [Fix] <Jojo> When converting to MOD/S3M, the extended filter range flag was not deactivated.
+ [Fix] <Jojo> S00 (IT/S3M) does not equal E00 (MOD/XM), as Exx doesn't have effect memory. Trying to convert S00 to the last used value now.
+ [Fix] <Jojo> If necessary (S3M), reset restart position attribute when converting
+ [Fix] <re> Merging multiple sequences didn't properly convert '---'/'+++' orders.
+
+IT
+ [Imp] <Jojo> IT Saver: Compatibility export saves stereo samples again, as other tracker like Schism also support this.
+ [Fix] <Jojo> IT Saver: Set unused channels' panning positions to 0xA0 like IT does (appears to fix a problem in IT's GUI)
+ [Fix] <Jojo> IT Saver: Fixed IT sample flags which could potentionally cause IT to screw up on loading/saving MPT-made modules with samples that are not used by an instrument.
+ [Fix] <Jojo> IT Loader: ChibiTracker uses \n instead of \r in the IT comment text, which was not handled properly.
+ [Fix] <Jojo> (fix from SchismTracker) IT Loader: Ignore stereo sample flag when loading old IT files (older than IT 2.14) since IT id not reset this flag when importing stereo samples back then.
+ [Fix] <Jojo> ITI/ITS Loader: Sample flags were not reset when a sample slot was overwritten when loading ITI or ITS files. That way, it was possible that f.e. the bidi loop flag was not disabled when loading a new sample that had a normal loop.
+ [Fix] <Jojo> S3M/IT compatibility: Note Cut really cuts notes and does not just mute them (so that following volume commands could restore the sample)
+ [Fix] <Jojo> IT Compatibility: Always reset autovibrato settings when there's an instrument number (fix from SchismTracker)
+ [Fix] <Jojo> IT Compatibility: S77 / S79/ S7B are supposed to pause the envelope, not disable it.
+ [Fix] <Jojo> IT compatibility: ignore slide commands with both nibbles set (f.e. D55, PA1, ...)
+ [Fix] <Jojo> IT Compatibility: Default Vibrato/Tremolo/Panbrello values to sine if out of range (e.g. S35)
+
+IT/MPTM/ITP, Instrument extension handling:
+ [Fix] <Jojo> ITP Loader: Instruments flags in ITP files with embedded instrument headers were loaded wrong since revision 415.
+ [Fix] <re> Fixes to instrument envelope flag handling (broken in 1.18.00.00).
+
+XM
+ [Imp] <Jojo> XM Loader: Improved detection of an old version of MPT.
+ [Fix] <Jojo> XM Loader: Some XMs not made with ModPlug were recognized as files made with MPT.
+ [Fix] <Jojo> XM Loader: The last XM instrument was not always loaded.
+ [Fix] <Jojo> XM Loader: Early versions of Skale Tracker (R.I.P.) apparently did stupid things to XM instrument headers, so mpt failed to load such modules. Tested the fix with a few hundred XMs and apparently only one XM (IFULOVE.XM) that I have has a header size that is different from the struct size - and that's the one that caused problems.
+ [Fix] <Jojo> XM Compatibility: Volume column doesn't have an effect memory, most effects with param = 0 are useless. Those are ignored in compatibility mode playback and also when exporting the file in compatibility mode.
+ [Fix] <Jojo> XM Compatibility: Improved handling of the situation when a 3xx effect was used, but previously no note was playing.
+ [Fix] <Jojo> XM compatibility: New instrument + tone portamento = ignore new instrument (fixes partytime.xm by cancer)
+
+MOD
+ [Imp] <Jojo> Module creation: When creating a new .MOD, it has 31 samples by default.
+ [Imp] <Jojo> Playback: When PT1x flag is activated, Amiga note range limits are automatically taken into account.
+ [Fix] <Jojo> MOD Saving: Samples were shifted badly if the sample size was odd. (wow, this is an OLD bug!)
+ [Fix] <Jojo> Mod Saving: If a mod had loop points set, but loop disabled, they were still saved in the .MOD file, resulting in the loop being enabled automatically.
+ [Fix] <Jojo> MOD Loader: Very short loops (4-8 bytes long) are not ignored anymore. This fixes "Crew Generation" by Necros.
+
+S3M
+ [Fix] <Jojo> S3M Loader: Slightly improved the AdLib instrument detection.
+ [Imp] <Jojo> S3M Loader: Display a message if an S3M file contains Adlib instruments (rare).
+ [Imp] <Jojo> S3M Compatibility: At least process samples on muted channels so that sync can be maintained.
+ [Fix] <Jojo> S3M Playback: In ST3, muted channels are completely ignored, not even effects are interpreted. Let's try this in MPT, too.
+ [Fix] <Jojo> S3M compatibility: Slightly better handling of vibrato/tremolo waveform types (although the ST3 help screen says that continuous vibrato/tremolo is possible, it does actually not work.)
+ [Reg] <Jojo> Cannot create S3M files with more than 100 patterns anymore, because...
+ [Fix] <Jojo> ... it was possible to create S3M files where the 256 parapointers were not enough.
+ [Fix] <Jojo> S3M/IT compatibility: Note Cut really cuts notes and does not just mute them (so that following volume commands could restore the sample)
+
+Other modules:
+ [Imp] <Jojo> MT2 Loader: Make use of the "lines per beat" header field.
+ [Fix] <Jojo> Slightly better MT2 (MadTracker) handling: Release node is not set anymore for each and every instrument envelope. MT2 files are now loaded as IT files by default (instead of XM) because of their extended instrument properties (NNAs, filters, etc) - I wonder what this breaks, but I don't bother because MT2 support was already 100% broken before this. :) Some MT example tunes sound a bit better now at least.
+ [Imp] <Jojo> PSM Loader: Better handling of SC0 effect
+ [Fix] <Jojo> GDM Loader: It would have actually helped to convert the format origin table correctly... Origin formats other than MOD are now loading correctly again.
+ [Fix] <Jojo> PTM Loader: Fixed an unhandled null pointer exception that occured when loading some unsupported RAR files.
+ [Fix] <Jojo> PSM16 Loader: Fix for note cut on tick 0 (warbot tune from Silverball)
+ [Fix] <Jojo> Threw out the old ULT loader in favor of Storlek's loader from SchismTracker (used with permission from the author himself). This is a lot more accurate than MPT's old loader.
+ [Fix] <Jojo> DBM Loader: Various fixes to increase import precision and an endianness fix
+ [Fix] <Jojo> AMF DSM Loader: Made some changes to the pattern reader, which elimiante the strange "vC7" commands in the pattern. I have found no hints on whether my fix is correct or not, apart from the fact that those AMF files that I have play a lot better now. And it makes kind of sense...
+ [Fix] <Jojo> IMF Loader: Some fixes copied from Schism (copied from MikMod)
+
+MPTM
+ [New] <rewbs> Added combined note delay & note cut command for .mptm only (":xy" means delay until tick x and play for y ticks).
+ [New] <Jojo> MPTM command S7D explicitely enforces pitch envelope, S7E enforces filter envelope.
+
+Module cleanup
+ [Imp] <Jojo> In the cleanup dialog, mutually exclusive items are now automatically unchecked, to avoid confusion.
+ [Imp] <Jojo> Cleanup Dialog: Made it look a bit nicer.
+ [Fix] <Jojo> Because of an error in GetNumPatterns(), the last pattern was checked when looking for unused samples which sometimes resulted in deleted samples (although they were actually used).
+ [Fix] <re> Fixed a memory leak in pattern name handling.
+
+Misc
+ [New] <Jojo> INI Settings: When portable mode is enabled, the most common paths in mptrack.ini are now translated to relative paths (if possible). plugin path is not translated to relative paths (yet).
+ [New] <Jojo> Modules in gzip archives (single-file .gz archives) can now be imported, just to satisfy my laziness when downloading gzipped modules from Amiga Music Preservation. :-P
+ [Imp] <Jojo> Mod Loaders: Instead of creating messageboxes in various places, errors are now written to the log.
+ [Imp] <Jojo> Binary files are now less often falsely recognized as early MOD files (15 samples without header): If the orderlist contains orderlist items > 128, loading is cancelled.
+ [Imp] <Jojo> Song Properties: Tooltips are shown for various controls.
+ [Mod] <Jojo> Options: Removed the "space bar repeats previous action" option, as it did not work anymore since the new keyhandler is used; in fact, this option can be achieved instead by using the "on key hold" for the "quick paste" key shortcut.
+ [Mod] <rewbs> Removed old "velocity" volume command, which was experimental and unused.
+ [Mod] <Jojo> Replaced default VU-meter colours for the MPT scheme by more pleasant colours that were already used for the other themes.
+ [Mod] <Jojo> Updated internet links (ModPlug Central Forums link is now a permalink)
+ [Fix] <Jojo> Length Calculation: If the first pattern was empty, OpenMPT was caught in an infinite loop.
+ [Fix] <Jojo> MPTM Saving: A missing null pointer check crashed OpenMPT when trying to access a deleted instrument slot.
+ [Fix] <Jojo> Multi window edit: When (un)muting a channel from the general tab in window 1, it was instantly shown in the pattern editor of window 2, but not vice versa.
+ [Fix] <Jojo> Channel Manager: When removing channels using the channel manager, their names were not cleared properly.
+ [Fix] <Jojo> Song Length Detection: *Much* more accurate song length detection!
+ [Fix] <Jojo/re> Instrument IO: Flags from old ITI/XI files should also be loaded correctly now (broken in 1.18.00.00)
+ [Fix] <Jojo> Plugin Editor: Changing a plugin parameter in MOD/S3M files doesn't mark them as modified anymore.
+ [Reg] <Jojo> Removed AutodetectITplaystyle option, since the tracker detection works reliably enough now. Tracker detection can not be ignored anymore now.
+
+Installer/release package
+ [New] <Jojo> Try to find out what keymap file suits the user best.
+ [New] <Jojo> Scan for previously installed VST Plugins
+ [Imp] <Jojo> Use DDE commands to open files.
+ [Imp] <Jojo> Copy config files from app's directory to appdata if necessary and possible.
+ [Imp] <Jojo> User is asked if they want to keep personal settings.
+ [Imp] <Jojo> With the new version of InnoSetup, a "real" portable setup can now finally be created.
+ [Mod] <Jojo> Added OpenMPT 1.18 release notes document for package template
+ [Mod] <Jojo> Updated DE_jojo.mkb
+ [Mod] <Jojo> Updated Paul Legovitch's keymap (now also suitable for desktop keyboards); use this as the default "french" keymap in the installer.
+ [Mod] <re> Updated default keybindings.
+
+
+v1.18.00.00 (January 2010, revision 475)
+----------------------------------------
+
+General tab
. <Jojo> Channel name input field was not limited properly.
Sequence editor
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2010-05-21 16:37:44
|
Revision: 599
http://modplug.svn.sourceforge.net/modplug/?rev=599&view=rev
Author: relabsoluness
Date: 2010-05-21 16:37:38 +0000 (Fri, 21 May 2010)
Log Message:
-----------
[Mod] Keybindings: Updated and slightly modified default keybindings.
[Fix] General: Fix to possible path handling related crash (occurred at least in VC03 build at startup).
[Fix] Internal: VC03 build fixes(e.g. added ungzip-project, updated zlib-project).
Modified Paths:
--------------
trunk/OpenMPT/mptrack/MPTRACK.sln
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/View_gen.cpp
trunk/OpenMPT/mptrack/mptrack.vcproj
trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb
trunk/OpenMPT/zlib/contrib/vstudio/vc7/zlibstat.vcproj
Added Paths:
-----------
trunk/OpenMPT/ungzip/ungzip.vcproj
Modified: trunk/OpenMPT/mptrack/MPTRACK.sln
===================================================================
--- trunk/OpenMPT/mptrack/MPTRACK.sln 2010-05-20 21:41:36 UTC (rev 598)
+++ trunk/OpenMPT/mptrack/MPTRACK.sln 2010-05-21 16:37:38 UTC (rev 599)
@@ -6,6 +6,7 @@
{71531076-78C7-488D-8FD6-9D841F20AADE} = {71531076-78C7-488D-8FD6-9D841F20AADE}
{CF3C2CA5-5D45-4635-BBA4-C1F435E10896} = {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}
{3C7281B0-D0E2-48ED-AE4D-A181FC77D8F7} = {3C7281B0-D0E2-48ED-AE4D-A181FC77D8F7}
+ {20BF96C8-0202-4251-80C9-6C62BE845DAE} = {20BF96C8-0202-4251-80C9-6C62BE845DAE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unlha", "..\unlha\unlha.vcproj", "{71531076-78C7-488D-8FD6-9D841F20AADE}"
@@ -32,6 +33,11 @@
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ungzip", "..\ungzip\ungzip.vcproj", "{20BF96C8-0202-4251-80C9-6C62BE845DAE}"
+ ProjectSection(ProjectDependencies) = postProject
+ {3F7D3110-B3DD-4DE1-B608-C3F491009625} = {3F7D3110-B3DD-4DE1-B608-C3F491009625}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@@ -92,12 +98,20 @@
{CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.ReleaseWithoutAsm.Build.0 = Release|Win32
{3F7D3110-B3DD-4DE1-B608-C3F491009625}.Debug.ActiveCfg = Debug|Win32
{3F7D3110-B3DD-4DE1-B608-C3F491009625}.Debug.Build.0 = Debug|Win32
- {3F7D3110-B3DD-4DE1-B608-C3F491009625}.Release.ActiveCfg = Release|Win32
- {3F7D3110-B3DD-4DE1-B608-C3F491009625}.Release.Build.0 = Release|Win32
+ {3F7D3110-B3DD-4DE1-B608-C3F491009625}.Release.ActiveCfg = ReleaseWithoutAsm|Win32
+ {3F7D3110-B3DD-4DE1-B608-C3F491009625}.Release.Build.0 = ReleaseWithoutAsm|Win32
{3F7D3110-B3DD-4DE1-B608-C3F491009625}.ReleaseAxp.ActiveCfg = ReleaseAxp|Win32
{3F7D3110-B3DD-4DE1-B608-C3F491009625}.ReleaseAxp.Build.0 = ReleaseAxp|Win32
{3F7D3110-B3DD-4DE1-B608-C3F491009625}.ReleaseWithoutAsm.ActiveCfg = ReleaseWithoutAsm|Win32
{3F7D3110-B3DD-4DE1-B608-C3F491009625}.ReleaseWithoutAsm.Build.0 = ReleaseWithoutAsm|Win32
+ {20BF96C8-0202-4251-80C9-6C62BE845DAE}.Debug.ActiveCfg = Debug|Win32
+ {20BF96C8-0202-4251-80C9-6C62BE845DAE}.Debug.Build.0 = Debug|Win32
+ {20BF96C8-0202-4251-80C9-6C62BE845DAE}.Release.ActiveCfg = Release|Win32
+ {20BF96C8-0202-4251-80C9-6C62BE845DAE}.Release.Build.0 = Release|Win32
+ {20BF96C8-0202-4251-80C9-6C62BE845DAE}.ReleaseAxp.ActiveCfg = Release|Win32
+ {20BF96C8-0202-4251-80C9-6C62BE845DAE}.ReleaseAxp.Build.0 = Release|Win32
+ {20BF96C8-0202-4251-80C9-6C62BE845DAE}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
+ {20BF96C8-0202-4251-80C9-6C62BE845DAE}.ReleaseWithoutAsm.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-05-20 21:41:36 UTC (rev 598)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-05-21 16:37:38 UTC (rev 599)
@@ -3176,14 +3176,14 @@
return;
const size_t nStrLength = nLength - 1; // "usable" length, i.e. not including the null char.
- TCHAR szExePath[nLength], szTempPath[nLength];
+ TCHAR szExePath[nLength], szTempPath[nLength] = _T("");
_tcsncpy(szExePath, theApp.GetAppDirPath(), nStrLength);
SetNullTerminator(szExePath);
// Path is on the same drive as OpenMPT ("\Somepath\" => "C:\Somepath\")
if(!_tcsncicmp(szPath, _T("\\"), 1))
{
- _tcsncpy(szTempPath, szExePath, 2); // "C:"
+ _tcsncat(szTempPath, szExePath, 2); // "C:"
_tcsncat(szTempPath, szPath, nStrLength - 2); // "\Somepath\"
_tcscpy(szPath, szTempPath);
} else
Modified: trunk/OpenMPT/mptrack/View_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_gen.cpp 2010-05-20 21:41:36 UTC (rev 598)
+++ trunk/OpenMPT/mptrack/View_gen.cpp 2010-05-21 16:37:38 UTC (rev 599)
@@ -1488,6 +1488,7 @@
// This is used for retrieving the correct background colour for the
// frames on the general tab when using WinXP Luna or Vista/Win7 Aero.
typedef HRESULT (__stdcall * ETDT)(HWND, DWORD);
+#include <uxtheme.h>
HBRUSH CViewGlobals::OnCtlColor(CDC *pDC, CWnd* pWnd, UINT nCtlColor)
//-------------------------------------------------------------------
@@ -1497,7 +1498,7 @@
if(!bUxInited)
{
- HMODULE uxlib = LoadLibrary("uxtheme.dll");
+ HMODULE uxlib = LoadLibrary(_T("uxtheme.dll"));
if(uxlib)
hETDT = (ETDT)GetProcAddress(uxlib, "EnableThemeDialogTexture");
bUxInited = true;
Modified: trunk/OpenMPT/mptrack/mptrack.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.vcproj 2010-05-20 21:41:36 UTC (rev 598)
+++ trunk/OpenMPT/mptrack/mptrack.vcproj 2010-05-21 16:37:38 UTC (rev 599)
@@ -698,6 +698,9 @@
RelativePath=".\res\view_pat.bmp">
</File>
<File
+ RelativePath=".\res\vispcnode.bmp">
+ </File>
+ <File
RelativePath=".\res\vumeters.bmp">
</File>
</Filter>
Modified: trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb
===================================================================
--- trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb 2010-05-20 21:41:36 UTC (rev 598)
+++ trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb 2010-05-21 16:37:38 UTC (rev 599)
@@ -23,6 +23,7 @@
0:1362:1:45:1 //Paste: Shift+INSERT (KeyDown)
0:1363:3:86:1 //Mix Paste: Shift+Ctrl+V (KeyDown)
0:1793:1:86:5 //Paste Flood: Shift+V (KeyDown|KeyHold)
+0:1820:6:86:1 //Push Forward Paste: Ctrl+Alt+V (KeyDown)
0:1364:2:53:1 //SelectAll: Ctrl+5 (KeyDown)
0:1365:2:70:1 //Find: Ctrl+F (KeyDown)
0:1366:0:114:1 //Find Next: F3 (KeyDown)
@@ -79,11 +80,13 @@
2:1317:4:18:1 //Set row jump on note entry: Alt (KeyDown)
2:1685:2:9:1 //Switch to order list: Ctrl+TAB (KeyDown)
2:1806:2:68:1 //Duplicate pattern: Ctrl+D (KeyDown)
+2:1836:2:191:1 //Edit plugin assigned to PC note: Ctrl+/ (KeyDown)
2:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown)
2:1062:0:93:1 //Show note properties: Application (KeyDown)
2:1772:5:80:1 //Show pattern properties window: Shift+Alt+P (KeyDown)
2:1819:2:69:1 //Split Keyboard Settings dialog: Ctrl+E (KeyDown)
-2:1780:2:80:1 //Show playback time at current row: Ctrl+P (KeyDown)
+2:1776:1:122:1 //Toggle loop pattern: Shift+F11 (KeyDown)
+2:1780:2:84:1 //Show playback time at current row: Ctrl+T (KeyDown)
2:1005:0:121:1 //Mute current channel: F10 (KeyDown)
2:1006:2:121:1 //Solo current channel: Ctrl+F10 (KeyDown)
2:1771:6:121:1 //Unmute all channels: Ctrl+Alt+F10 (KeyDown)
@@ -134,7 +137,7 @@
3:1083:0:75:1 //Base octave +1 G: K (KeyDown)
3:1084:0:76:1 //Base octave +1 G#: L (KeyDown)
3:1085:0:186:1 //Base octave +1 A: ; (KeyDown)
-3:1086:0:222:1 //Base octave +1 A#: ' (KeyDown)
+3:1086:0:222:1 //Base octave +1 A#: # (KeyDown)
3:1087:0:220:1 //Base octave +1 B: \ (KeyDown)
3:1088:0:90:1 //Base octave +2 C: Z (KeyDown)
3:1089:0:88:1 //Base octave +2 C#: X (KeyDown)
@@ -167,11 +170,11 @@
3:1221:0:57:1 //Set octave 9: 9 (KeyDown)
3:1221:0:105:1 //Set octave 9: NUM 9 (KeyDown)
3:1316:1:16:1 //Chord Modifier: Shift (KeyDown)
-3:1200:0:192:1 //Note Cut: ` (KeyDown)
+3:1200:0:192:1 //Note Cut: ' (KeyDown)
3:1201:0:187:1 //Note Off: = (KeyDown)
3:1791:1:187:1 //Note Fade: Shift+= (KeyDown)
-3:1788:0:189:1 //Parameter control(MPTm only): - (KeyDown)
-3:1789:1:189:1 //Parameter control(smooth)(MPTm only): Shift+- (KeyDown)
+3:1788:1:189:1 //Parameter control(MPTm only): Shift+- (KeyDown)
+3:1789:0:189:1 //Parameter control(smooth)(MPTm only): - (KeyDown)
//----( Pattern Context [bottom] - Ins Col (4) )------------
4:1202:0:96:1 //Set instrument digit 0: NUM 0 (KeyDown)
@@ -229,14 +232,12 @@
5:1242:0:71:1 //Vol command - Portamento: G (KeyDown)
5:1243:0:70:1 //Vol command - Portamento Up: F (KeyDown)
5:1244:0:69:1 //Vol command - Portamento Down: E (KeyDown)
-5:1245:0:186:1 //Vol command - (unused): ; (KeyDown)
-5:1245:1:186:1 //Vol command - (unused): Shift+; (KeyDown)
5:1246:0:79:1 //Vol command - Offset: O (KeyDown)
//----( Pattern Context [bottom] - FX Col (6) )------------
6:1294:0:220:1 //FX midi macro slide: \ (KeyDown)
-6:1295:1:186:1 //FX combined note cute and note delay: Shift+; (KeyDown)
-6:1295:0:186:1 //FX combined note cute and note delay: ; (KeyDown)
+6:1295:1:186:1 //FX combined note delay and note cut: Shift+; (KeyDown)
+6:1295:0:186:1 //FX combined note delay and note cut: ; (KeyDown)
6:1666:0:191:1 //FX parameter extension command: / (KeyDown)
//----( Pattern Context [bottom] - Param Col (7) )------------
@@ -282,6 +283,8 @@
8:1790:2:68:1 //Remove DC Offset: Ctrl+D (KeyDown)
//----( Instrument Context [bottom] (9) )------------
+9:1837:0:107:5 //Zoom In: NUM PLUS (KeyDown|KeyHold)
+9:1838:0:109:5 //Zoom Out: NUM SUB (KeyDown|KeyHold)
9:1825:1:9:5 //Select previous envelope point: Shift+TAB (KeyDown|KeyHold)
9:1826:0:9:5 //Select next envelope point: TAB (KeyDown|KeyHold)
9:1821:0:37:5 //Move envelope point left: LEFT (KeyDown|KeyHold)
@@ -306,11 +309,14 @@
//----( Unknown Context (12) )------------
//----( Plugin GUI Context (13) )------------
-13:1763:0:37:5 //Previous plugin preset: LEFT (KeyDown|KeyHold)
-13:1764:0:39:5 //Next plugin preset: RIGHT (KeyDown|KeyHold)
-13:1782:0:38:5 //Plugin preset backward jump: UP (KeyDown|KeyHold)
-13:1783:0:40:5 //Plugin preset forward jump: DOWN (KeyDown|KeyHold)
-13:1765:2:82:1 //Randomize plugin parameters: Ctrl+R (KeyDown)
+13:1763:0:109:5 //Previous plugin preset: NUM SUB (KeyDown|KeyHold)
+13:1764:0:107:5 //Next plugin preset: NUM PLUS (KeyDown|KeyHold)
+13:1782:2:109:5 //Plugin preset backward jump: Ctrl+NUM SUB (KeyDown|KeyHold)
+13:1783:2:107:5 //Plugin preset forward jump: Ctrl+NUM PLUS (KeyDown|KeyHold)
+13:1765:3:68:1 //Randomize plugin parameters: Shift+Ctrl+D (KeyDown)
+13:1839:2:82:1 //Toggle parameter recording: Ctrl+R (KeyDown)
+13:1840:2:75:1 //Pass key presses to plugin: Ctrl+K (KeyDown)
+13:1841:2:66:1 //Bypass plugin: Ctrl+B (KeyDown)
//----( General Context [top] (14) )------------
Added: trunk/OpenMPT/ungzip/ungzip.vcproj
===================================================================
--- trunk/OpenMPT/ungzip/ungzip.vcproj (rev 0)
+++ trunk/OpenMPT/ungzip/ungzip.vcproj 2010-05-21 16:37:38 UTC (rev 599)
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="ungzip"
+ ProjectGUID="{20BF96C8-0202-4251-80C9-6C62BE845DAE}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="4"
+ CharacterSet="0">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;ZLIB_WINAPI"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/ungzip.lib"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="4"
+ CharacterSet="0">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/O2"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;ZLIB_WINAPI"
+ RuntimeLibrary="0"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/ungzip.lib"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\ungzip.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\ungzip.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: trunk/OpenMPT/zlib/contrib/vstudio/vc7/zlibstat.vcproj
===================================================================
--- trunk/OpenMPT/zlib/contrib/vstudio/vc7/zlibstat.vcproj 2010-05-20 21:41:36 UTC (rev 598)
+++ trunk/OpenMPT/zlib/contrib/vstudio/vc7/zlibstat.vcproj 2010-05-21 16:37:38 UTC (rev 599)
@@ -135,7 +135,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
- AdditionalOptions="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj /NODEFAULTLIB "
+ AdditionalOptions="/NODEFAULTLIB "
OutputFile=".\zlibstat\zlibstat.lib"
SuppressStartupBanner="TRUE"/>
<Tool
@@ -173,7 +173,7 @@
PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
StringPooling="TRUE"
ExceptionHandling="FALSE"
- RuntimeLibrary="4"
+ RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\zlibstat/zlibstat.pch"
AssemblerListingLocation=".\zlibstatWithoutAsm/"
@@ -228,9 +228,6 @@
RelativePath="..\..\..\deflate.c">
</File>
<File
- RelativePath="..\..\masmx86\gvmat32c.c">
- </File>
- <File
RelativePath="..\..\..\infback.c">
</File>
<File
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-20 21:41:42
|
Revision: 598
http://modplug.svn.sourceforge.net/modplug/?rev=598&view=rev
Author: saga-games
Date: 2010-05-20 21:41:36 +0000 (Thu, 20 May 2010)
Log Message:
-----------
[Fix] Sample Editor: When loading an extremely short raw file (f.e. 1 byte) twice, it crashed OpenMPT.
[Imp] XM Loader: Improved detection of an old version of MPT.
[Ref] Some rewriting of the CRawSampleDlg code.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_smp.cpp
trunk/OpenMPT/mptrack/Mpdlgs.cpp
trunk/OpenMPT/mptrack/Mpdlgs.h
trunk/OpenMPT/soundlib/Load_mod.cpp
trunk/OpenMPT/soundlib/Load_xm.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2010-05-15 20:26:56 UTC (rev 597)
+++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2010-05-20 21:41:36 UTC (rev 598)
@@ -716,14 +716,14 @@
CRawSampleDlg dlg(this);
if(m_nPreviousRawFormat != 0)
{
- dlg.m_nFormat = m_nPreviousRawFormat;
- dlg.m_bRememberFormat = true;
+ dlg.SetSampleFormat(m_nPreviousRawFormat);
+ dlg.SetRememberFormat(true);
}
EndWaitCursor();
if ((m_nPreviousRawFormat != 0) || (dlg.DoModal() == IDOK))
{
- m_nPreviousRawFormat = ((dlg.m_bRememberFormat)) ? dlg.m_nFormat : 0;
+ m_nPreviousRawFormat = ((dlg.GetRemeberFormat())) ? dlg.GetSampleFormat() : 0;
BeginWaitCursor();
UINT flags = 0;
@@ -732,25 +732,19 @@
m_pSndFile->DestroySample(m_nSample);
pSmp->nLength = len;
pSmp->uFlags = RS_PCM8S;
- pSmp->nGlobalVol = 64;
- pSmp->nVolume = 256;
- pSmp->nPan = 128;
- pSmp->filename[0] = 0;
- if (!pSmp->nC5Speed) pSmp->nC5Speed = 22050;
- if (dlg.m_nFormat & 1)
+
+ if (dlg.GetSampleFormat() & ER_16BIT)
{
pSmp->nLength >>= 1;
- pSmp->uFlags |= CHN_16BIT;
flags = RS_PCM16S;
}
- if (!(dlg.m_nFormat & 2))
+ if (dlg.GetSampleFormat() & ER_UNSIGNED)
{
flags++;
}
// Interleaved Stereo Sample
- if (dlg.m_nFormat & 4)
+ if (dlg.GetSampleFormat() & ER_STEREO)
{
- pSmp->uFlags |= CHN_STEREO;
pSmp->nLength >>= 1;
flags |= 0x40|RSF_STEREO;
}
@@ -764,6 +758,15 @@
if (m_pSndFile->ReadSample(pSmp, flags, p16, l16))
{
bOk = true;
+
+ pSmp->nGlobalVol = 64;
+ pSmp->nVolume = 256;
+ pSmp->nPan = 128;
+ pSmp->filename[0] = 0;
+ if (!pSmp->nC5Speed) pSmp->nC5Speed = 22050;
+ } else
+ {
+ m_pModDoc->GetSampleUndo()->Undo(m_nSample);
}
END_CRITICAL();
} else
Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2010-05-15 20:26:56 UTC (rev 597)
+++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2010-05-20 21:41:36 UTC (rev 598)
@@ -1056,10 +1056,8 @@
//////////////////////////////////////////////////////////////
// CRawSampleDlg
+UINT CRawSampleDlg::m_nFormat = ER_8BIT | ER_UNSIGNED | ER_MONO;
-UINT CRawSampleDlg::m_nFormat = 0;
-
-
BOOL CRawSampleDlg::OnInitDialog()
//--------------------------------
{
@@ -1073,9 +1071,12 @@
//------------------------
{
m_nFormat = 0;
- if (IsDlgButtonChecked(IDC_RADIO2)) m_nFormat |= 1;
- if (IsDlgButtonChecked(IDC_RADIO4)) m_nFormat |= 2;
- if (IsDlgButtonChecked(IDC_RADIO6)) m_nFormat |= 4;
+ if(IsDlgButtonChecked(IDC_RADIO1)) m_nFormat |= ER_8BIT;
+ if(IsDlgButtonChecked(IDC_RADIO2)) m_nFormat |= ER_16BIT;
+ if(IsDlgButtonChecked(IDC_RADIO3)) m_nFormat |= ER_UNSIGNED;
+ if(IsDlgButtonChecked(IDC_RADIO4)) m_nFormat |= ER_SIGNED;
+ if(IsDlgButtonChecked(IDC_RADIO5)) m_nFormat |= ER_MONO;
+ if(IsDlgButtonChecked(IDC_RADIO6)) m_nFormat |= ER_STEREO;
m_bRememberFormat = IsDlgButtonChecked(IDC_CHK_REMEMBERSETTINGS) ? true : false;
CDialog::OnOK();
}
@@ -1084,9 +1085,9 @@
void CRawSampleDlg::UpdateDialog()
//--------------------------------
{
- CheckRadioButton(IDC_RADIO1, IDC_RADIO2, (m_nFormat & 1) ? IDC_RADIO2 : IDC_RADIO1);
- CheckRadioButton(IDC_RADIO3, IDC_RADIO4, (m_nFormat & 2) ? IDC_RADIO4 : IDC_RADIO3);
- CheckRadioButton(IDC_RADIO5, IDC_RADIO6, (m_nFormat & 4) ? IDC_RADIO6 : IDC_RADIO5);
+ CheckRadioButton(IDC_RADIO1, IDC_RADIO2, (m_nFormat & ER_8BIT) ? IDC_RADIO1 : IDC_RADIO2 );
+ CheckRadioButton(IDC_RADIO3, IDC_RADIO4, (m_nFormat & ER_UNSIGNED) ? IDC_RADIO3 : IDC_RADIO4);
+ CheckRadioButton(IDC_RADIO5, IDC_RADIO6, (m_nFormat & ER_MONO) ? IDC_RADIO5 : IDC_RADIO6);
CheckDlgButton(IDC_CHK_REMEMBERSETTINGS, (m_bRememberFormat) ? MF_CHECKED : MF_UNCHECKED);
}
Modified: trunk/OpenMPT/mptrack/Mpdlgs.h
===================================================================
--- trunk/OpenMPT/mptrack/Mpdlgs.h 2010-05-15 20:26:56 UTC (rev 597)
+++ trunk/OpenMPT/mptrack/Mpdlgs.h 2010-05-20 21:41:36 UTC (rev 598)
@@ -129,18 +129,32 @@
};
+#define ER_8BIT 0x01
+#define ER_16BIT 0x02
+
+#define ER_SIGNED 0x10
+#define ER_UNSIGNED 0x20
+
+#define ER_MONO 0x0100
+#define ER_STEREO 0x0200
+
//=================================
class CRawSampleDlg: public CDialog
//=================================
{
-public:
+protected:
static UINT m_nFormat;
bool m_bRememberFormat;
public:
+ static const UINT GetSampleFormat() { return m_nFormat; }
+ static void SetSampleFormat(UINT nFormat) { m_nFormat = nFormat; }
+ const bool GetRemeberFormat() { return m_bRememberFormat; };
+ void SetRememberFormat(bool bRemember) { m_bRememberFormat = bRemember; };
+
+public:
CRawSampleDlg(CWnd *parent = NULL):CDialog(IDD_LOADRAWSAMPLE, parent)
{
- //m_nFormat = 0;
m_bRememberFormat = false;
}
Modified: trunk/OpenMPT/soundlib/Load_mod.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mod.cpp 2010-05-15 20:26:56 UTC (rev 597)
+++ trunk/OpenMPT/soundlib/Load_mod.cpp 2010-05-20 21:41:36 UTC (rev 598)
@@ -55,7 +55,7 @@
case 'X' - 55: command = CMD_XFINEPORTAUPDOWN; break;
case 'Y' - 55: command = CMD_PANBRELLO; break; //34
case 'Z' - 55: command = CMD_MIDI; break; //35
- case '\\' - 56: command = CMD_SMOOTHMIDI; break; //rewbs.smoothVST: 36
+ case '\\' - 56: command = CMD_SMOOTHMIDI; break; //rewbs.smoothVST: 36 - note: this is actually displayed as "-" in FT2, but seems to be doing nothing.
//case ':' - 21: command = CMD_DELAYCUT; break; //37
case '#' + 3: command = CMD_XPARAM; break; //rewbs.XMfixes - XParam is 38
default: command = 0;
Modified: trunk/OpenMPT/soundlib/Load_xm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_xm.cpp 2010-05-15 20:26:56 UTC (rev 597)
+++ trunk/OpenMPT/soundlib/Load_xm.cpp 2010-05-20 21:41:36 UTC (rev 598)
@@ -245,7 +245,7 @@
BYTE samples_used[(MAX_SAMPLES + 7) / 8]; // for removing unused samples
UINT unused_samples; // dito
- bool bMadeWithModPlug = false, bProbablyMadeWithModPlug = false, bIsFT2 = false;
+ bool bMadeWithModPlug = false, bProbablyMadeWithModPlug = false, bProbablyMPT109 = false, bIsFT2 = false;
// set this here already because XMs compressed with BoobieSqueezer will exit the function early
SetModFlag(MSF_COMPATIBLE_PLAY, true);
@@ -561,6 +561,9 @@
pSmp->nVibRate = xmsh.vibrate;
memcpy(pSmp->filename, xmss.name, 22);
SpaceToNullStringFixed(pSmp->filename, 21);
+
+ if ((xmss.type & 3) == 3) // MPT 1.09 and maybe newer / older versions set both flags for bidi loops
+ bProbablyMPT109 = true;
}
#if 0
if ((xmsh.reserved2 > nsamples) && (xmsh.reserved2 <= 16))
@@ -683,7 +686,6 @@
if (!memcmp((LPCSTR)lpStream + 0x26, "OpenMPT ", 8))
{
- //bMadeWithModPlug = true; // Don't set it - it's also used by compatibility export
CHAR sVersion[13];
memcpy(sVersion, lpStream + 0x26 + 8, 12);
sVersion[12] = 0;
@@ -693,7 +695,13 @@
if(bMadeWithModPlug)
{
SetModFlag(MSF_COMPATIBLE_PLAY, false);
- if(!m_dwLastSavedWithVersion) m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 16, 00, 00);
+ if(!m_dwLastSavedWithVersion)
+ {
+ if(bProbablyMPT109)
+ m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 09, 00, 00);
+ else
+ m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 16, 00, 00);
+ }
}
// -> CODE#0027
@@ -712,6 +720,9 @@
if(bInterpretOpenMPTMade && m_dwLastSavedWithVersion < MAKE_VERSION_NUMERIC(1, 17, 2, 50))
SetModFlag(MSF_MIDICC_BUGEMULATION, true);
+ if(bInterpretOpenMPTMade && m_dwLastSavedWithVersion == 0)
+ m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 17, 01, 00); // early versions of OpenMPT had no version indication.
+
return true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-15 20:27:02
|
Revision: 597
http://modplug.svn.sourceforge.net/modplug/?rev=597&view=rev
Author: saga-games
Date: 2010-05-15 20:26:56 +0000 (Sat, 15 May 2010)
Log Message:
-----------
[Ref] J2B Loader: Removed AM pattern loader from CSoundFile.
[Imp] J2B Loader: Added some security checks for possible malicious files where the patterns could be the first chunks, so that m_nChannels is not set yet.
[Imp] MOD/XM Loader: Don't load effect 37 as DelayCut anymore, since we cannot save it in MOD/XM files anyway...
[Ref] A bit more refactoring.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_mod.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/load_j2b.cpp
Modified: trunk/OpenMPT/soundlib/Load_mod.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mod.cpp 2010-05-14 16:37:15 UTC (rev 596)
+++ trunk/OpenMPT/soundlib/Load_mod.cpp 2010-05-15 20:26:56 UTC (rev 597)
@@ -56,7 +56,7 @@
case 'Y' - 55: command = CMD_PANBRELLO; break; //34
case 'Z' - 55: command = CMD_MIDI; break; //35
case '\\' - 56: command = CMD_SMOOTHMIDI; break; //rewbs.smoothVST: 36
- case ':' - 21: command = CMD_DELAYCUT; break; //37
+ //case ':' - 21: command = CMD_DELAYCUT; break; //37
case '#' + 3: command = CMD_XPARAM; break; //rewbs.XMfixes - XParam is 38
default: command = 0;
}
@@ -450,7 +450,6 @@
#ifndef MODPLUG_NO_FILESAVE
-#pragma warning(disable:4100)
bool CSoundFile::SaveMod(LPCSTR lpszFileName, UINT nPacking, const bool bCompatibilityExport)
//-------------------------------------------------------------------------------------------
@@ -581,8 +580,10 @@
} //end for all patterns
//Check for unsaved patterns
- for (UINT ipat=nbp; ipat<MAX_PATTERNS; ipat++) {
- if (Patterns[ipat]) {
+ for (UINT ipat=nbp; ipat<MAX_PATTERNS; ipat++)
+ {
+ if (Patterns[ipat])
+ {
AfxMessageBox("Warning: this track contains at least 1 pattern after the highest pattern number referred to in the sequence.\r\nSuch patterns will not be saved in the .mod format.");
break;
}
@@ -620,5 +621,4 @@
return true;
}
-#pragma warning(default:4100)
#endif // MODPLUG_NO_FILESAVE
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-05-14 16:37:15 UTC (rev 596)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-05-15 20:26:56 UTC (rev 597)
@@ -3134,14 +3134,15 @@
return *p;
}
-/* Try to write an (volume) effect in a given channel or any channel of a pattern in a specific row.
+
+/* Try to write an (volume column) effect in a given channel or any channel of a pattern in a specific row.
Usage: nPat - Pattern that should be modified
nRow - Row that should be modified
nEffect - (Volume) Effect that should be written
nParam - Effect that should be written
- bIsVolumeEffect - Indicates whether the given effect is a volume effect or not
+ bIsVolumeEffect - Indicates whether the given effect is a volume column effect or not
nChn - Channel that should be modified - use CHANNELINDEX_INVALID to allow all channels of the given row
- bAllowMultipleEffects - If false, No effect will be written if an effect of the same type is already present in the channel(s)
+ bAllowMultipleEffects - If false, No effect will be written if an effect of the same type is already present in the channel(s). Useful for f.e. tempo effects.
bAllowNextRow - Indicates whether it is allowed to use the next row if there's no space for the effect
bRetry - For internal use only. Indicates whether an effect "rewrite" has already taken place (for recursive calls)
*/
@@ -3160,7 +3161,7 @@
}
// Scan channel(s) for same effect type - if an effect of the same type is already present, exit.
- if(bAllowMultipleEffects == false)
+ if(!bAllowMultipleEffects)
{
for(CHANNELINDEX i = nScanChnMin; i <= nScanChnMax; i++)
{
@@ -3191,7 +3192,8 @@
}
// Ok, apparently there's no space. If we haven't tried already, try to map it to the volume column or effect column instead.
- if(bRetry == true) {
+ if(bRetry)
+ {
// Move some effects that also work in the volume column, so there's place for our new effect.
if(!bIsVolumeEffect)
{
@@ -3285,22 +3287,24 @@
}
+// Set up channel panning and volume suitable for MOD + similar files. If the current mod type is not MOD, bForceSetup has to be set to true.
void CSoundFile::SetupMODPanning(bool bForceSetup)
//------------------------------------------------
{
// Setup LRRL panning, max channel volume
if((m_nType & MOD_TYPE_MOD) == 0 && bForceSetup == false) return;
- for (CHANNELINDEX nChn = 0; nChn < MAX_BASECHANNELS; nChn++)
+ for(CHANNELINDEX nChn = 0; nChn < MAX_BASECHANNELS; nChn++)
{
ChnSettings[nChn].nVolume = 64;
- if (gdwSoundSetup & SNDMIX_MAXDEFAULTPAN)
+ if(gdwSoundSetup & SNDMIX_MAXDEFAULTPAN)
ChnSettings[nChn].nPan = (((nChn & 3) == 1) || ((nChn & 3) == 2)) ? 256 : 0;
else
ChnSettings[nChn].nPan = (((nChn & 3) == 1) || ((nChn & 3) == 2)) ? 0xC0 : 0x40;
}
}
+
// Convert an Exx command (MOD) to Sxx command (S3M)
void CSoundFile::MODExx2S3MSxx(MODCOMMAND *m)
//-------------------------------------------
@@ -3323,6 +3327,7 @@
}
}
+
// Convert an Sxx command (S3M) to Exx command (MOD)
void CSoundFile::S3MSxx2MODExx(MODCOMMAND *m)
//-------------------------------------------
@@ -3345,6 +3350,7 @@
}
}
+
// Convert a mod command from one format to another.
void CSoundFile::ConvertCommand(MODCOMMAND *m, MODTYPE nOldType, MODTYPE nNewType)
//--------------------------------------------------------------------------------
@@ -3545,7 +3551,7 @@
///////////////////////
// Convert IT to S3M
- else if (oldTypeIsIT_MPT && newTypeIsS3M)
+ else if(oldTypeIsIT_MPT && newTypeIsS3M)
{
if(m->note == NOTE_KEYOFF || m->note == NOTE_FADE)
m->note = NOTE_NOTECUT;
@@ -3631,68 +3637,68 @@
if(m->command) switch(m->command)
{
- case CMD_RETRIG: // MOD only has E9x
- m->command = CMD_MODCMDEX;
- m->param = 0x90 | (m->param & 0x0F);
- break;
- case CMD_MODCMDEX: // This would turn into "Invert Loop", so let's better remove it
- if((m->param & 0xF0) == 0xF0) m->command = CMD_NONE;
- break;
+ case CMD_RETRIG: // MOD only has E9x
+ m->command = CMD_MODCMDEX;
+ m->param = 0x90 | (m->param & 0x0F);
+ break;
+ case CMD_MODCMDEX: // This would turn into "Invert Loop", so let's better remove it
+ if((m->param & 0xF0) == 0xF0) m->command = CMD_NONE;
+ break;
}
else switch(m->volcmd)
{
- case VOLCMD_VOLUME:
- m->command = CMD_VOLUME;
- m->param = m->vol;
- break;
- case VOLCMD_PANNING:
- m->command = CMD_PANNING8;
- m->param = CLAMP(m->vol << 2, 0, 0xFF);
- break;
- case VOLCMD_VOLSLIDEDOWN:
- m->command = CMD_VOLUMESLIDE;
- m->param = m->vol;
- break;
- case VOLCMD_VOLSLIDEUP:
- m->command = CMD_VOLUMESLIDE;
- m->param = m->vol << 4;
- break;
- case VOLCMD_FINEVOLDOWN:
- m->command = CMD_MODCMDEX;
- m->param = 0xB0 | m->vol;
- break;
- case VOLCMD_FINEVOLUP:
- m->command = CMD_MODCMDEX;
- m->param = 0xA0 | m->vol;
- break;
- case VOLCMD_PORTADOWN:
- m->command = CMD_PORTAMENTODOWN;
- m->param = m->vol << 2;
- break;
- case VOLCMD_PORTAUP:
- m->command = CMD_PORTAMENTOUP;
- m->param = m->vol << 2;
- break;
- case VOLCMD_TONEPORTAMENTO:
- m->command = CMD_TONEPORTAMENTO;
- m->param = m->vol << 2;
- break;
- case VOLCMD_VIBRATODEPTH:
- m->command = CMD_VIBRATO;
- m->param = m->vol;
- break;
- case VOLCMD_VIBRATOSPEED:
- m->command = CMD_VIBRATO;
- m->param = m->vol << 4;
- break;
- // OpenMPT-specific commands
- case VOLCMD_OFFSET:
- m->command = CMD_OFFSET;
- m->param = m->vol << 3;
- break;
- default:
- break;
+ case VOLCMD_VOLUME:
+ m->command = CMD_VOLUME;
+ m->param = m->vol;
+ break;
+ case VOLCMD_PANNING:
+ m->command = CMD_PANNING8;
+ m->param = CLAMP(m->vol << 2, 0, 0xFF);
+ break;
+ case VOLCMD_VOLSLIDEDOWN:
+ m->command = CMD_VOLUMESLIDE;
+ m->param = m->vol;
+ break;
+ case VOLCMD_VOLSLIDEUP:
+ m->command = CMD_VOLUMESLIDE;
+ m->param = m->vol << 4;
+ break;
+ case VOLCMD_FINEVOLDOWN:
+ m->command = CMD_MODCMDEX;
+ m->param = 0xB0 | m->vol;
+ break;
+ case VOLCMD_FINEVOLUP:
+ m->command = CMD_MODCMDEX;
+ m->param = 0xA0 | m->vol;
+ break;
+ case VOLCMD_PORTADOWN:
+ m->command = CMD_PORTAMENTODOWN;
+ m->param = m->vol << 2;
+ break;
+ case VOLCMD_PORTAUP:
+ m->command = CMD_PORTAMENTOUP;
+ m->param = m->vol << 2;
+ break;
+ case VOLCMD_TONEPORTAMENTO:
+ m->command = CMD_TONEPORTAMENTO;
+ m->param = m->vol << 2;
+ break;
+ case VOLCMD_VIBRATODEPTH:
+ m->command = CMD_VIBRATO;
+ m->param = m->vol;
+ break;
+ case VOLCMD_VIBRATOSPEED:
+ m->command = CMD_VIBRATO;
+ m->param = m->vol << 4;
+ break;
+ // OpenMPT-specific commands
+ case VOLCMD_OFFSET:
+ m->command = CMD_OFFSET;
+ m->param = m->vol << 3;
+ break;
+ default:
+ break;
}
m->volcmd = CMD_NONE;
} // End if (newTypeIsMOD)
@@ -3703,69 +3709,69 @@
{
if(!m->command) switch(m->volcmd)
{
- case VOLCMD_VOLSLIDEDOWN:
- m->command = CMD_VOLUMESLIDE;
- m->param = m->vol;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_VOLSLIDEUP:
- m->command = CMD_VOLUMESLIDE;
- m->param = m->vol << 4;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_FINEVOLDOWN:
- m->command = CMD_VOLUMESLIDE;
- m->param = 0xF0 | m->vol;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_FINEVOLUP:
- m->command = CMD_VOLUMESLIDE;
- m->param = (m->vol << 4) | 0x0F;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_PORTADOWN:
- m->command = CMD_PORTAMENTODOWN;
- m->param = m->vol << 2;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_PORTAUP:
- m->command = CMD_PORTAMENTOUP;
- m->param = m->vol << 2;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_TONEPORTAMENTO:
- m->command = CMD_TONEPORTAMENTO;
- m->param = m->vol << 2;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_VIBRATODEPTH:
- m->command = CMD_VIBRATO;
- m->param = m->vol;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_VIBRATOSPEED:
- m->command = CMD_VIBRATO;
- m->param = m->vol << 4;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_PANSLIDELEFT:
- m->command = CMD_PANNINGSLIDE;
- m->param = m->vol << 4;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_PANSLIDERIGHT:
- m->command = CMD_PANNINGSLIDE;
- m->param = m->vol;
- m->volcmd = CMD_NONE;
- break;
- // OpenMPT-specific commands
- case VOLCMD_OFFSET:
- m->command = CMD_OFFSET;
- m->param = m->vol << 3;
- m->volcmd = CMD_NONE;
- break;
- default:
- break;
+ case VOLCMD_VOLSLIDEDOWN:
+ m->command = CMD_VOLUMESLIDE;
+ m->param = m->vol;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_VOLSLIDEUP:
+ m->command = CMD_VOLUMESLIDE;
+ m->param = m->vol << 4;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_FINEVOLDOWN:
+ m->command = CMD_VOLUMESLIDE;
+ m->param = 0xF0 | m->vol;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_FINEVOLUP:
+ m->command = CMD_VOLUMESLIDE;
+ m->param = (m->vol << 4) | 0x0F;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_PORTADOWN:
+ m->command = CMD_PORTAMENTODOWN;
+ m->param = m->vol << 2;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_PORTAUP:
+ m->command = CMD_PORTAMENTOUP;
+ m->param = m->vol << 2;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_TONEPORTAMENTO:
+ m->command = CMD_TONEPORTAMENTO;
+ m->param = m->vol << 2;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_VIBRATODEPTH:
+ m->command = CMD_VIBRATO;
+ m->param = m->vol;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_VIBRATOSPEED:
+ m->command = CMD_VIBRATO;
+ m->param = m->vol << 4;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_PANSLIDELEFT:
+ m->command = CMD_PANNINGSLIDE;
+ m->param = m->vol << 4;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_PANSLIDERIGHT:
+ m->command = CMD_PANNINGSLIDE;
+ m->param = m->vol;
+ m->volcmd = CMD_NONE;
+ break;
+ // OpenMPT-specific commands
+ case VOLCMD_OFFSET:
+ m->command = CMD_OFFSET;
+ m->param = m->vol << 3;
+ m->volcmd = CMD_NONE;
+ break;
+ default:
+ break;
}
} // End if (newTypeIsS3M)
@@ -3775,24 +3781,24 @@
{
if(!m->command) switch(m->volcmd)
{
- case VOLCMD_PORTADOWN:
- m->command = CMD_PORTAMENTODOWN;
- m->param = m->vol << 2;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_PORTAUP:
- m->command = CMD_PORTAMENTOUP;
- m->param = m->vol << 2;
- m->volcmd = CMD_NONE;
- break;
- // OpenMPT-specific commands
- case VOLCMD_OFFSET:
- m->command = CMD_OFFSET;
- m->param = m->vol << 3;
- m->volcmd = CMD_NONE;
- break;
- default:
- break;
+ case VOLCMD_PORTADOWN:
+ m->command = CMD_PORTAMENTODOWN;
+ m->param = m->vol << 2;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_PORTAUP:
+ m->command = CMD_PORTAMENTOUP;
+ m->param = m->vol << 2;
+ m->volcmd = CMD_NONE;
+ break;
+ // OpenMPT-specific commands
+ case VOLCMD_OFFSET:
+ m->command = CMD_OFFSET;
+ m->param = m->vol << 3;
+ m->volcmd = CMD_NONE;
+ break;
+ default:
+ break;
}
} // End if (newTypeIsXM)
@@ -3802,35 +3808,35 @@
{
if(!m->command) switch(m->volcmd)
{
- case VOLCMD_VOLSLIDEDOWN:
- case VOLCMD_VOLSLIDEUP:
- case VOLCMD_FINEVOLDOWN:
- case VOLCMD_FINEVOLUP:
- case VOLCMD_PORTADOWN:
- case VOLCMD_PORTAUP:
- case VOLCMD_TONEPORTAMENTO:
- case VOLCMD_VIBRATODEPTH:
- // OpenMPT-specific commands
- case VOLCMD_OFFSET:
- m->vol = min(m->vol, 9);
- break;
- case VOLCMD_PANSLIDELEFT:
- m->command = CMD_PANNINGSLIDE;
- m->param = m->vol << 4;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_PANSLIDERIGHT:
- m->command = CMD_PANNINGSLIDE;
- m->param = m->vol;
- m->volcmd = CMD_NONE;
- break;
- case VOLCMD_VIBRATOSPEED:
- m->command = CMD_VIBRATO;
- m->param = m->vol << 4;
- m->volcmd = CMD_NONE;
- break;
- default:
- break;
+ case VOLCMD_VOLSLIDEDOWN:
+ case VOLCMD_VOLSLIDEUP:
+ case VOLCMD_FINEVOLDOWN:
+ case VOLCMD_FINEVOLUP:
+ case VOLCMD_PORTADOWN:
+ case VOLCMD_PORTAUP:
+ case VOLCMD_TONEPORTAMENTO:
+ case VOLCMD_VIBRATODEPTH:
+ // OpenMPT-specific commands
+ case VOLCMD_OFFSET:
+ m->vol = min(m->vol, 9);
+ break;
+ case VOLCMD_PANSLIDELEFT:
+ m->command = CMD_PANNINGSLIDE;
+ m->param = m->vol << 4;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_PANSLIDERIGHT:
+ m->command = CMD_PANNINGSLIDE;
+ m->param = m->vol;
+ m->volcmd = CMD_NONE;
+ break;
+ case VOLCMD_VIBRATOSPEED:
+ m->command = CMD_VIBRATO;
+ m->param = m->vol << 4;
+ m->volcmd = CMD_NONE;
+ break;
+ default:
+ break;
}
} // End if (newTypeIsIT)
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-05-14 16:37:15 UTC (rev 596)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-05-15 20:26:56 UTC (rev 597)
@@ -719,9 +719,6 @@
bool ReadJ2B(const LPCBYTE lpStream, const DWORD dwMemLength);
bool ReadMID(LPCBYTE lpStream, DWORD dwMemLength);
- void SetupMODPanning(bool bForceSetup = false); // Setup LRRL panning, max channel volume
- bool Convert_RIFF_AM_Pattern(PATTERNINDEX nPat, const LPCBYTE lpStream, DWORD dwMemLength, bool bIsAM); // used by ReadAM(...) to convert AM(FF) patterns
-
// Save Functions
#ifndef MODPLUG_NO_FILESAVE
UINT WriteSample(FILE *f, MODSAMPLE *pSmp, UINT nFlags, UINT nMaxLen=0);
@@ -754,6 +751,7 @@
static void ConvertCommand(MODCOMMAND *m, MODTYPE nOldType, MODTYPE nNewType); // Convert a complete MODCOMMAND item from one format to another
static void MODExx2S3MSxx(MODCOMMAND *m); // Convert Exx to Sxx
static void S3MSxx2MODExx(MODCOMMAND *m); // Convert Sxx to Exx
+ void SetupMODPanning(bool bForceSetup = false); // Setup LRRL panning, max channel volume
public:
// Real-time sound functions
Modified: trunk/OpenMPT/soundlib/load_j2b.cpp
===================================================================
--- trunk/OpenMPT/soundlib/load_j2b.cpp 2010-05-14 16:37:15 UTC (rev 596)
+++ trunk/OpenMPT/soundlib/load_j2b.cpp 2010-05-15 20:26:56 UTC (rev 597)
@@ -1,6 +1,8 @@
/*
+ * load_j2b.cpp
+ * ------------
* Purpose: Load RIFF AM and RIFF AMFF modules (Galaxy Sound System).
- * Note: J2B is a compressed variant of RIFF AM and RIFF AMFF files used in Jazz Jackrabbit 2.
+ * Notes : J2B is a compressed variant of RIFF AM and RIFF AMFF files used in Jazz Jackrabbit 2.
* It seems like no other game used the AM(FF) format.
* Authors: Johannes Schultz (OpenMPT port)
* Chris Moeller (foo_dumb - this is almost a complete port of his code, thanks)
@@ -107,8 +109,8 @@
CMD_TREMOR, CMD_XFINEPORTAUPDOWN,
};
-bool CSoundFile::Convert_RIFF_AM_Pattern(PATTERNINDEX nPat, const LPCBYTE lpStream, DWORD dwMemLength, bool bIsAM)
-//----------------------------------------------------------------------------------------------------------------
+bool Convert_RIFF_AM_Pattern(PATTERNINDEX nPat, const LPCBYTE lpStream, DWORD dwMemLength, bool bIsAM, CSoundFile *pSndFile)
+//--------------------------------------------------------------------------------------------------------------------------
{
// version false = AMFF, true = AM
#define ASSERT_CAN_READ(x) \
@@ -120,12 +122,16 @@
ROWINDEX nRows = lpStream[0] + 1;
- if(Patterns.Insert(nPat, nRows))
+ if(pSndFile == nullptr || pSndFile->Patterns.Insert(nPat, nRows))
return false;
dwMemPos++;
- MODCOMMAND *mrow = Patterns[nPat];
+ const CHANNELINDEX nChannels = pSndFile->GetNumChannels();
+ if(nChannels == 0)
+ return false;
+
+ MODCOMMAND *mrow = pSndFile->Patterns[nPat];
MODCOMMAND *m = mrow;
ROWINDEX nRow = 0;
uint8 flags;
@@ -138,11 +144,11 @@
if (flags == 0)
{
nRow++;
- m = mrow = Patterns[nPat] + nRow * m_nChannels;
+ m = mrow = pSndFile->Patterns[nPat] + nRow * nChannels;
continue;
}
- m = mrow + min((flags & 0x1F), m_nChannels - 1);
+ m = mrow + min((flags & 0x1F), nChannels - 1);
if(flags & 0xE0)
{
@@ -179,7 +185,7 @@
m->param = ((m->param >> 4) * 10) + (m->param & 0x0F);
break;
case CMD_MODCMDEX:
- MODExx2S3MSxx(m);
+ pSndFile->MODExx2S3MSxx(m);
break;
case CMD_TEMPO:
if(m->param <= 0x1F) m->command = CMD_SPEED;
@@ -205,7 +211,7 @@
wsprintf(s, "J2B: Unknown command: 0x%X, param 0x%X", m->command, m->param);
Log(s);
}
-#endif
+#endif // DEBUG
m->command = CMD_NONE;
}
}
@@ -263,6 +269,7 @@
else if(LittleEndian(*(uint32 *)(lpStream + dwMemPos)) == 0x20204D41) bIsAM = true; // "AM "
else return false;
dwMemPos += 4;
+ m_nChannels = 0;
// go through all chunks now
while(dwMemPos < dwMemLength)
@@ -330,7 +337,7 @@
case 0x54544150: // "PATT" - Pattern data for one pattern
ASSERT_CAN_READ_CHUNK(5);
- Convert_RIFF_AM_Pattern(lpStream[dwMemPos], (LPCBYTE)(lpStream + dwMemPos + 5), LittleEndian(*(DWORD *)(lpStream + dwMemPos + 1)), bIsAM);
+ Convert_RIFF_AM_Pattern(lpStream[dwMemPos], (LPCBYTE)(lpStream + dwMemPos + 5), LittleEndian(*(DWORD *)(lpStream + dwMemPos + 1)), bIsAM, this);
break;
case 0x54534E49: // "INST" - Instrument (only in RIFF AMFF)
@@ -365,16 +372,17 @@
Samples[nSmp].nLoopEnd = LittleEndian(smpchunk->loopend);
Samples[nSmp].nC5Speed = LittleEndian(smpchunk->samplerate);
- if(LittleEndianW(smpchunk->flags) & 0x04)
+ uint16 flags = LittleEndianW(smpchunk->flags);
+ if(flags & 0x04)
Samples[nSmp].uFlags |= CHN_16BIT;
- if(LittleEndianW(smpchunk->flags) & 0x08)
+ if(flags & 0x08)
Samples[nSmp].uFlags |= CHN_LOOP;
- if(LittleEndianW(smpchunk->flags) & 0x10)
+ if(flags & 0x10)
Samples[nSmp].uFlags |= CHN_PINGPONGLOOP;
- if(LittleEndianW(smpchunk->flags) & 0x20)
+ if(flags & 0x20)
Samples[nSmp].uFlags |= CHN_PANNING;
- dwMemPos += ReadSample(&Samples[nSmp], (LittleEndianW(smpchunk->flags) & 0x04) ? RS_PCM16S : RS_PCM8S, (LPCSTR)(lpStream + dwMemPos), dwMemLength - dwMemPos);
+ dwMemPos += ReadSample(&Samples[nSmp], (flags & 0x04) ? RS_PCM16S : RS_PCM8S, (LPCSTR)(lpStream + dwMemPos), dwMemLength - dwMemPos);
}
break;
@@ -436,24 +444,26 @@
Samples[nSmp].nLoopEnd = LittleEndian(smpchunk->loopend);
Samples[nSmp].nC5Speed = LittleEndian(smpchunk->samplerate);
- if(LittleEndianW(smpchunk->flags) & 0x04)
+ uint16 flags = LittleEndianW(smpchunk->flags);
+ if(flags & 0x04)
Samples[nSmp].uFlags |= CHN_16BIT;
- if(LittleEndianW(smpchunk->flags) & 0x08)
+ if(flags & 0x08)
Samples[nSmp].uFlags |= CHN_LOOP;
- if(LittleEndianW(smpchunk->flags) & 0x10)
+ if(flags & 0x10)
Samples[nSmp].uFlags |= CHN_PINGPONGLOOP;
- if(LittleEndianW(smpchunk->flags) & 0x20)
+ if(flags & 0x20)
Samples[nSmp].uFlags |= CHN_PANNING;
dwMemPos += LittleEndian(smpchunk->headsize) + 12; // doesn't include the 3 first DWORDs
- dwMemPos += ReadSample(&Samples[nSmp], (LittleEndianW(smpchunk->flags) & 0x04) ? RS_PCM16S : RS_PCM8S, (LPCSTR)(lpStream + dwMemPos), dwMemLength - dwMemPos);
+ dwMemPos += ReadSample(&Samples[nSmp], (flags & 0x04) ? RS_PCM16S : RS_PCM8S, (LPCSTR)(lpStream + dwMemPos), dwMemLength - dwMemPos);
}
break;
}
dwMemPos = dwChunkEnd;
- // RIFF AM has a padding byte
- if(bIsAM && (LittleEndian(chunkheader->chunksize) & 1)) dwMemPos++;
+ // RIFF AM has a padding byte so that all chunks have an even size.
+ if(bIsAM && (LittleEndian(chunkheader->chunksize) & 1))
+ dwMemPos++;
}
return true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-14 16:37:22
|
Revision: 596
http://modplug.svn.sourceforge.net/modplug/?rev=596&view=rev
Author: saga-games
Date: 2010-05-14 16:37:15 +0000 (Fri, 14 May 2010)
Log Message:
-----------
[Mod] Updated installer / readme URLs and instructions.
Modified Paths:
--------------
trunk/OpenMPT/installer/install.iss
trunk/OpenMPT/installer/packageTemplate/readme.txt
trunk/OpenMPT/packageTemplate/readme.txt
Modified: trunk/OpenMPT/installer/install.iss
===================================================================
--- trunk/OpenMPT/installer/install.iss 2010-05-14 15:27:19 UTC (rev 595)
+++ trunk/OpenMPT/installer/install.iss 2010-05-14 16:37:15 UTC (rev 596)
@@ -6,12 +6,12 @@
[Setup]
AppId={{67903736-E9BB-4664-B148-F62BCAB4FA42}
AppVerName=OpenMPT 1.18
-AppVersion=1.18.00.00
+AppVersion=1.18.01.00
AppName=OpenMPT
AppPublisher=OpenMPT Devs / Olivier Lapicque
-AppPublisherURL=http://www.openmpt.com/
-AppSupportURL=http://www.openmpt.com/
-AppUpdatesURL=http://www.openmpt.com/
+AppPublisherURL=http://openmpt.com/
+AppSupportURL=http://openmpt.com/forum/
+AppUpdatesURL=http://openmpt.com/
DefaultDirName={pf}\OpenMPT
DefaultGroupName=OpenMPT
AllowNoIcons=yes
@@ -240,5 +240,3 @@
end;
end;
-
-
Modified: trunk/OpenMPT/installer/packageTemplate/readme.txt
===================================================================
--- trunk/OpenMPT/installer/packageTemplate/readme.txt 2010-05-14 15:27:19 UTC (rev 595)
+++ trunk/OpenMPT/installer/packageTemplate/readme.txt 2010-05-14 16:37:15 UTC (rev 596)
@@ -6,16 +6,16 @@
Migrating from OpenMPT 1.17
---------------------------
-If you have an existing installation of OpenMPT 1.17 and wish to re-use its
-settings, copy your mptrack.ini and plugin.cache to %appdata%\OpenMPT (or the
-directory into which you installed OpenMPT if you used portable mode).
+Unless you install OpenMPT in portable mode, all settings are now stored in
+%appdata%\OpenMPT. The installer will automatically try to move all settings
+to the new folder - Migration is done automatically.
Uninstallation
--------------
An uninstaller is provided. Don't worry, it will ask you if you want to keep
-your personal settings, nothing will automatically be deleted.
+your personal settings, none of these will be deleted automatically.
Changes
@@ -27,7 +27,7 @@
Questions, comments, bug reports...
-----------------------------------
-See forums at http://modplug.sourceforge.net/.
+See forums at http://openmpt.com/forum/.
Release package contents:
@@ -36,13 +36,14 @@
available in several flavours (including MPT classic, FastTracker and
Impulse Tracker) and country-specific layouts.
soundtouch(folder): SoundTouch readme and copying.txt
+ReleaseNotesImages(folder): Images using in the release notes document.
history.txt: Version history.
mptrack.exe: Main executable.
-open_settings_folder.bat: Opens settings folder.
OpenMPT_SoundTouch_i16.dll: Slightly customized SoundTouch library used in time
stretching feature.
-readme.txt:
+readme.txt: this document
unmo3.dll: Used in MO3-file import.
+OMPT_1.18_ReleaseNotes.html: Release notes for this version.
Misc:
-----
Modified: trunk/OpenMPT/packageTemplate/readme.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/readme.txt 2010-05-14 15:27:19 UTC (rev 595)
+++ trunk/OpenMPT/packageTemplate/readme.txt 2010-05-14 16:37:15 UTC (rev 596)
@@ -38,20 +38,22 @@
Questions, comments, bug reports...
-----------------------------------
-See forums at http://modplug.sourceforge.net/.
+See forums at http://openmpt.com/forum/.
Release package contents:
-------------------------
extraKeymaps(folder):
soundtouch(folder): SoundTouch readme and copying.txt
+ReleaseNotesImages(folder): Images using in the release notes document.
history.txt: Version history.
mptrack.exe: Main executable.
open_settings_folder.bat: Opens settings folder.
OpenMPT_SoundTouch_i16.dll: Slightly customized SoundTouch library used in time
stretching feature.
-readme.txt:
+readme.txt: this document
unmo3.dll: Used in MO3-file import.
+OMPT_1.18_ReleaseNotes.html: Release notes for this version.
Misc:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-14 15:27:29
|
Revision: 595
http://modplug.svn.sourceforge.net/modplug/?rev=595&view=rev
Author: saga-games
Date: 2010-05-14 15:27:19 +0000 (Fri, 14 May 2010)
Log Message:
-----------
[Reg] Removed AutodetectITplaystyle option, since the tracker detection works reliably enough now. Tracker detection can not be ignored anymore now.
[Mod] Changes some error messages to be more verbose.
[Mod] More error messages are now added to the log instead of showing messageboxes.
[Mod] Updated internet links (ModPlug Central Forums link is now a permalink)
[Ref] Removed unfinished, possibly confusing code from CMainFrame.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mainfrm.h
trunk/OpenMPT/soundlib/IT_DEFS.H
trunk/OpenMPT/soundlib/Load_it.cpp
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-05-13 21:06:48 UTC (rev 594)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-05-14 15:27:19 UTC (rev 595)
@@ -1825,13 +1825,6 @@
}
-UINT CMainFrame::GetCurrentInstrument()
-//-------------------------------------
-{
- return 0;
-}
-
-
void CMainFrame::SetPreAmp(UINT n)
//--------------------------------
{
@@ -2245,7 +2238,7 @@
BOOL CMainFrame::SetupDirectories(LPCTSTR szModDir, LPCTSTR szSampleDir, LPCTSTR szInstrDir, LPCTSTR szVstDir, LPCTSTR szPresetDir)
-//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------------------------------------------------------------
{
// will also set working directory
SetDefaultDirectory(szModDir, DIR_MODS);
@@ -2760,8 +2753,8 @@
// case ID_NETLINK_OSMUSIC: pszURL = "http://www.osmusic.net/"; break;
// case ID_NETLINK_HANDBOOK: pszURL = "http://www.modplug.com/mods/handbook/handbook.htm"; break;
case ID_NETLINK_MPTFR: pszURL = "http://mpt.new.fr/"; break;
- case ID_NETLINK_FORUMS: pszURL = "http://www.lpchip.com/modplug"; break;
- case ID_NETLINK_PLUGINS: pszURL = "http://www.kvraudio.com"; break;
+ case ID_NETLINK_FORUMS: pszURL = "http://openmpt.com/forum/"; break;
+ case ID_NETLINK_PLUGINS: pszURL = "http://www.kvraudio.com/"; break;
case ID_NETLINK_MODARCHIVE: pszURL = "http://modarchive.org/"; break;
case ID_NETLINK_OPENMPTWIKI_GERMAN: pszURL = "http://sagamusix.de/openmpt/Hauptseite"; break;
}
Modified: trunk/OpenMPT/mptrack/Mainfrm.h
===================================================================
--- trunk/OpenMPT/mptrack/Mainfrm.h 2010-05-13 21:06:48 UTC (rev 594)
+++ trunk/OpenMPT/mptrack/Mainfrm.h 2010-05-14 15:27:19 UTC (rev 595)
@@ -562,7 +562,6 @@
VOID SetXInfoText(LPCSTR lpszText); //rewbs.xinfo
VOID SetHelpText(LPCSTR lpszText);
UINT GetBaseOctave();
- UINT GetCurrentInstrument();
CModDoc *GetActiveDoc();
CView *GetActiveView(); //rewbs.customKeys
CImageList *GetImageList() { return &m_ImageList; }
Modified: trunk/OpenMPT/soundlib/IT_DEFS.H
===================================================================
--- trunk/OpenMPT/soundlib/IT_DEFS.H 2010-05-13 21:06:48 UTC (rev 594)
+++ trunk/OpenMPT/soundlib/IT_DEFS.H 2010-05-14 15:27:19 UTC (rev 595)
@@ -143,8 +143,10 @@
#define ITP_VERSION 0x00000102 // v1.02
#define ITP_FILE_ID 0x2e697470 // .itp ASCII
-enum IT_ReaderBitMasks {
+#define IT_CHBI 0x49424843 // "CHBI" magic bytes in the IT header to identify ChibiTracker
+enum IT_ReaderBitMasks
+{
// pattern row parsing, the channel data is read to obtain
// number of channels active in the pattern. These bit masks are
// to blank out sections of the byte of data being read.
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-05-13 21:06:48 UTC (rev 594)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-05-14 15:27:19 UTC (rev 595)
@@ -196,10 +196,14 @@
if(iter == notFoundTunings.end())
{
notFoundTunings.push_back(str);
- string erm = string("Tuning ") + str + string(" used by the module was not found.");
- MessageBox(0, erm.c_str(), 0, MB_ICONINFORMATION);
- if(csf.GetpModDoc()) //The tuning is changed so the modified flag is set.
- csf.GetpModDoc()->SetModified();
+#ifdef MODPLUG_TRACKER
+ if(csf.GetpModDoc() != nullptr)
+ {
+ string erm = string("Tuning ") + str + string(" used by the module was not found.");
+ csf.GetpModDoc()->AddToLog(erm.c_str());
+ csf.GetpModDoc()->SetModified(); //The tuning is changed so the modified flag is set.
+ }
+#endif // MODPLUG_TRACKER
}
csf.Instruments[i]->pTuning = csf.Instruments[i]->s_DefaultTuning;
@@ -767,7 +771,8 @@
if(streamPos >= dwMemLength || len > dwMemLength - streamPos) return false;
// Copy sample struct data
- if(pis.id == 0x53504D49){
+ if(pis.id == 0x53504D49)
+ {
MODSAMPLE *pSmp = &Samples[nsmp];
memcpy(pSmp->filename, pis.filename, 12);
pSmp->uFlags = 0;
@@ -873,7 +878,8 @@
//HACK: if we fail on i <= m_nInstruments above, arrive here without having set fcode as appropriate,
// hence the code duplication.
- if ( (uintptr_t)(ptr - lpStream) <= dwMemLength - 4 ) {
+ if ( (uintptr_t)(ptr - lpStream) <= dwMemLength - 4 )
+ {
fcode = (*((__int32 *)ptr));
}
@@ -1031,7 +1037,7 @@
memcpy(m_lpszSongComments, lpStream+pifh->msgoffset, pifh->msglength);
m_lpszSongComments[pifh->msglength] = 0;
// ChibiTracker uses \n instead of \r.
- if(pifh->cwtv == 0x0214 && pifh->cmwt == 0x0214 && LittleEndian(pifh->reserved) == 0x49424843)
+ if(pifh->cwtv == 0x0214 && pifh->cmwt == 0x0214 && LittleEndian(pifh->reserved) == IT_CHBI)
{
for(size_t i = 0; i < pifh->msglength; i++)
{
@@ -1053,9 +1059,11 @@
{
if(nordsize > GetModSpecifications().ordersMax)
{
+#ifdef MODPLUG_TRACKER
CString str;
str.Format(str_SequenceTruncationNote, nordsize, GetModSpecifications().ordersMax);
- CMainFrame::GetMainFrame()->MessageBox(str, 0, MB_ICONWARNING);
+ if(GetpModDoc() != nullptr) GetpModDoc()->AddToLog(str);
+#endif // MODPLUG_TRACKER
nordsize = GetModSpecifications().ordersMax;
}
@@ -1090,9 +1098,14 @@
if(patpossize > GetModSpecifications().patternsMax)
{
// Hack: Note user here if file contains more patterns than what can be read.
- CString str;
- str.Format(str_PatternSetTruncationNote, patpossize, GetModSpecifications().patternsMax);
- CMainFrame::GetMainFrame()->MessageBox(str, 0, MB_ICONWARNING);
+#ifdef MODPLUG_TRACKER
+ if(GetpModDoc() != nullptr)
+ {
+ CString str;
+ str.Format(str_PatternSetTruncationNote, patpossize, GetModSpecifications().patternsMax);
+ GetpModDoc()->AddToLog(str);
+ }
+#endif // MODPLUG_TRACKER
patpossize = GetModSpecifications().patternsMax;
}
@@ -1357,8 +1370,8 @@
#ifdef MODPLUG_TRACKER
CString s;
s.Format(TEXT("Allocating patterns failed starting from pattern %u"), npat);
- if(m_pModDoc != nullptr) m_pModDoc->AddToLog(s);
-#endif
+ if(GetpModDoc() != nullptr) GetpModDoc()->AddToLog(s);
+#endif // MODPLUG_TRACKER
break;
}
continue;
@@ -1473,7 +1486,7 @@
// 203-212: Vibrato depth
if ((vol >= 203) && (vol <= 212)) {
m[ch].volcmd = VOLCMD_VIBRATODEPTH; m[ch].vol = vol - 203;
- // Old versions of ModPlug seemed to save this as vibrato speed instead so let's fix that
+ // Old versions of ModPlug saved this as vibrato speed instead, so let's fix that
if(m_dwLastSavedWithVersion <= MAKE_VERSION_NUMERIC(1, 17, 02, 54) && interpretModplugmade)
m[ch].volcmd = VOLCMD_VIBRATOSPEED;
} else
@@ -1511,24 +1524,15 @@
SetModFlag(MSF_OLDVOLSWING, true);
}
- static char autodetectITplaymode = -1;
if(GetType() == MOD_TYPE_IT)
{
-#ifdef MODPLUG_TRACKER
- if(autodetectITplaymode == -1)
- autodetectITplaymode = CMainFrame::GetPrivateProfileLong("Misc", "AutodetectITplaystyle", 1, theApp.GetConfigFileName());
-#endif
-
- if(autodetectITplaymode)
+ // Set appropriate mod flags if the file was not made with MPT.
+ if(!interpretModplugmade)
{
- if(!interpretModplugmade)
- {
- SetModFlag(MSF_MIDICC_BUGEMULATION, false);
- SetModFlag(MSF_OLDVOLSWING, false);
- SetModFlag(MSF_COMPATIBLE_PLAY, true);
- }
+ SetModFlag(MSF_MIDICC_BUGEMULATION, false);
+ SetModFlag(MSF_OLDVOLSWING, false);
+ SetModFlag(MSF_COMPATIBLE_PLAY, true);
}
- return true;
}
else
{
@@ -1551,14 +1555,24 @@
ssb.ReadItem(Order, FileIdSequences, strlen(FileIdSequences), &ReadModSequences);
if (ssb.m_Status & srlztn::SNT_FAILURE)
- AfxMessageBox("Unknown error occured.", MB_ICONERROR);
+ {
+#ifdef MODPLUG_TRACKER
+ if(GetpModDoc() != nullptr) GetpModDoc()->AddToLog(_T("Unknown error occured while deserializing file."));
+#endif // MODPLUG_TRACKER
+ }
}
else //Loading for older files.
{
if(GetTuneSpecificTunings().Deserialize(iStrm))
- MessageBox(0, "Error occured - loading failed while trying to load tune specific tunings.", "", MB_ICONERROR);
+ {
+#ifdef MODPLUG_TRACKER
+ if(GetpModDoc() != nullptr) GetpModDoc()->AddToLog(_T("Error occured - loading failed while trying to load tune specific tunings."));
+#endif // MODPLUG_TRACKER
+ }
else
+ {
ReadTuningMap(iStrm, *this);
+ }
}
} //version condition(MPT)
}
@@ -2422,7 +2436,7 @@
ssb.FinishWrite();
if (ssb.m_Status & srlztn::SNT_FAILURE)
- AfxMessageBox("Error occured in writing.", MB_ICONERROR);
+ AfxMessageBox("Error occured in writing MPTM extensions.", MB_ICONERROR);
//Last 4 bytes should tell where the hack mpt things begin.
if(!fout.good())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-13 21:06:55
|
Revision: 594
http://modplug.svn.sourceforge.net/modplug/?rev=594&view=rev
Author: saga-games
Date: 2010-05-13 21:06:48 +0000 (Thu, 13 May 2010)
Log Message:
-----------
ungzip.cpp was lost in the last commit, dunno how that could happen!
[Mod] Updated file selection filter to display .gz files.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mptrack.cpp
Added Paths:
-----------
trunk/OpenMPT/ungzip/ungzip.cpp
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2010-05-13 19:57:06 UTC (rev 593)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2010-05-13 21:06:48 UTC (rev 594)
@@ -1457,12 +1457,11 @@
#ifndef NO_MO3_SUPPORT
";*.mo3"
#endif
- ")|*.mdz;*.s3z;*.xmz;*.itz;*.mdr;*.zip;*.rar;*.lha"
+ ")|*.mdz;*.s3z;*.xmz;*.itz;*.mdr;*.zip;*.rar;*.lha;*.gz"
#ifndef NO_MO3_SUPPORT
";*.mo3"
#endif
"|"
- // -! NEW_FEATURE#0023
"ProTracker Modules (*.mod,*.nst)|*.mod;mod.*;*.mdz;*.nst;*.m15|"
"ScreamTracker Modules (*.s3m,*.stm)|*.s3m;*.stm;*.s3z|"
"FastTracker Modules (*.xm)|*.xm;*.xmz|"
Added: trunk/OpenMPT/ungzip/ungzip.cpp
===================================================================
--- trunk/OpenMPT/ungzip/ungzip.cpp (rev 0)
+++ trunk/OpenMPT/ungzip/ungzip.cpp 2010-05-13 21:06:48 UTC (rev 594)
@@ -0,0 +1,157 @@
+/*
+ * ungzip.cpp
+ * ----------
+ * Purpose: Implementation file for extracting modules from .gz archives
+ * Notes : (currently none)
+ * Authors: OpenMPT Devs
+ */
+
+#include "ungzip.h"
+#include "../soundlib/Endianness.h"
+
+
+CGzipArchive::CGzipArchive(LPBYTE lpStream, DWORD dwMemLength)
+//------------------------------------------------------------
+{
+ m_lpStream = lpStream;
+ m_dwStreamLen = dwMemLength;
+ m_pOutputFile = nullptr;
+ m_dwOutputLen = 0;
+}
+
+
+CGzipArchive::~CGzipArchive()
+//---------------------------
+{
+ if(m_pOutputFile != nullptr)
+ {
+ delete[] m_pOutputFile;
+ }
+}
+
+
+bool CGzipArchive::IsArchive()
+//----------------------------
+{
+ if(m_lpStream == nullptr || m_dwStreamLen <= (sizeof(GZheader) + sizeof(GZtrailer)))
+ return false;
+
+ // Check header data
+ GZheader *pHeader = (GZheader *)m_lpStream;
+ if(pHeader->magic1 != GZ_HMAGIC1 || pHeader->magic2 != GZ_HMAGIC2 || pHeader->method != GZ_HMDEFLATE || (pHeader->flags & GZ_FRESERVED) != 0)
+ return false;
+
+ // Seems to be OK...
+ return true;
+}
+
+
+bool CGzipArchive::ExtractFile()
+//------------------------------
+{
+ #define ASSERT_CAN_READ(x) \
+ if( dwMemPos > m_dwStreamLen || x > m_dwStreamLen - dwMemPos ) return false;
+
+ if(!IsArchive())
+ return false;
+
+ DWORD dwMemPos = 0;
+ GZheader *pHeader = (GZheader *)m_lpStream;
+ GZtrailer *pTrailer = (GZtrailer *)(m_lpStream + m_dwStreamLen - sizeof(GZtrailer));
+
+ dwMemPos += sizeof(GZheader);
+
+ // Extra block present? (ignore)
+ if(pHeader->flags & GZ_FEXTRA)
+ {
+ ASSERT_CAN_READ(sizeof(uint16));
+ uint16 xlen = LittleEndianW(*((uint16 *)m_lpStream + dwMemPos));
+ dwMemPos += sizeof(uint16);
+ // We skip this.
+ ASSERT_CAN_READ(xlen);
+ dwMemPos += xlen;
+ }
+
+ // Filename present? (ignore)
+ if(pHeader->flags & GZ_FNAME)
+ {
+ do
+ {
+ ASSERT_CAN_READ(1);
+ } while (m_lpStream[dwMemPos++] != 0);
+ }
+
+ // Comment present? (ignore)
+ if(pHeader->flags & GZ_FCOMMENT)
+ {
+ do
+ {
+ ASSERT_CAN_READ(1);
+ } while (m_lpStream[dwMemPos++] != 0);
+ }
+
+ // CRC16 present?
+ if(pHeader->flags & GZ_FHCRC)
+ {
+ ASSERT_CAN_READ(sizeof(uint16));
+ uint16 crc16_h = LittleEndianW(*((uint16 *)m_lpStream + dwMemPos));
+ uint16 crc16_f = (uint16)(crc32(0, m_lpStream, dwMemPos) & 0xFFFF);
+ dwMemPos += sizeof(uint16);
+ if(crc16_h != crc16_f)
+ return false;
+ }
+
+ // Well, this is a bit small when inflated.
+ if(pTrailer->isize == 0)
+ return false;
+
+ // Check if the deflated data is a bit small as well.
+ ASSERT_CAN_READ(sizeof(GZtrailer) + 1);
+
+ // Clear the output buffer, if necessary.
+ if(m_pOutputFile != nullptr)
+ {
+ delete[] m_pOutputFile;
+ }
+
+ DWORD destSize = LittleEndian(pTrailer->isize);
+
+ m_pOutputFile = new Bytef[destSize];
+ if(m_pOutputFile == nullptr)
+ return false;
+
+ // Inflate!
+ z_stream strm;
+ strm.zalloc = Z_NULL;
+ strm.zfree = Z_NULL;
+ strm.opaque = Z_NULL;
+ strm.avail_in = m_dwStreamLen - (dwMemPos + sizeof(GZtrailer));
+ strm.next_in = &m_lpStream[dwMemPos];
+ if(inflateInit2(&strm, -15) != Z_OK)
+ return false;
+ strm.avail_out = destSize;
+ strm.next_out = m_pOutputFile;
+
+ int nRetVal = inflate(&strm, Z_NO_FLUSH);
+ inflateEnd(&strm);
+
+ // Everything went OK? Check return code, number of written bytes and CRC32.
+ if(nRetVal == Z_STREAM_END && destSize == strm.total_out && LittleEndian(pTrailer->crc32) == crc32(0, m_pOutputFile, destSize))
+ {
+ // Success! :)
+ m_dwOutputLen = destSize;
+ return true;
+ } else
+ {
+ // Fail :(
+ if(m_pOutputFile != nullptr)
+ {
+ delete[] m_pOutputFile;
+ }
+ m_pOutputFile = nullptr;
+ m_lpStream = nullptr;
+ return false;
+ }
+
+ #undef ASSERT_CAN_READ
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-13 19:57:12
|
Revision: 593
http://modplug.svn.sourceforge.net/modplug/?rev=593&view=rev
Author: saga-games
Date: 2010-05-13 19:57:06 +0000 (Thu, 13 May 2010)
Log Message:
-----------
[New] Modules in gzip archives (single-file .gz archives) can now be imported, just to satisfy my laziness when downloading gzipped modules from Amiga Music Preservation. :-P
[Ref] Moved functions related to endianness conversion to a separate file.
[Mod] Updated release notes.
NOTE: The old mptrack.sln has not been updated yet; references to the ungzip project are missing.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/MPTRACK_08.sln
trunk/OpenMPT/mptrack/mptrack.vcproj
trunk/OpenMPT/mptrack/mptrack_08.vcproj
trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
Added Paths:
-----------
trunk/OpenMPT/soundlib/Endianness.h
trunk/OpenMPT/ungzip/
trunk/OpenMPT/ungzip/ungzip.h
trunk/OpenMPT/ungzip/ungzip_08.vcproj
Modified: trunk/OpenMPT/mptrack/MPTRACK_08.sln
===================================================================
--- trunk/OpenMPT/mptrack/MPTRACK_08.sln 2010-05-13 19:12:29 UTC (rev 592)
+++ trunk/OpenMPT/mptrack/MPTRACK_08.sln 2010-05-13 19:57:06 UTC (rev 593)
@@ -2,6 +2,7 @@
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mptrack", "mptrack_08.vcproj", "{21D95071-FB97-4E69-B3B1-050D0D4A5021}"
ProjectSection(ProjectDependencies) = postProject
+ {94CD7910-649A-4075-9F33-7EBEE614FD45} = {94CD7910-649A-4075-9F33-7EBEE614FD45}
{44316F22-904E-48AA-B841-5A3A6AC77319} = {44316F22-904E-48AA-B841-5A3A6AC77319}
{FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8} = {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} = {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}
@@ -21,6 +22,11 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "..\zlib\contrib\vstudio\vc9\zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ungzip", "..\ungzip\ungzip_08.vcproj", "{94CD7910-649A-4075-9F33-7EBEE614FD45}"
+ ProjectSection(ProjectDependencies) = postProject
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} = {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -70,6 +76,12 @@
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
+ {94CD7910-649A-4075-9F33-7EBEE614FD45}.Debug|Win32.ActiveCfg = Debug|Win32
+ {94CD7910-649A-4075-9F33-7EBEE614FD45}.Debug|Win32.Build.0 = Debug|Win32
+ {94CD7910-649A-4075-9F33-7EBEE614FD45}.Release|Win32.ActiveCfg = Release|Win32
+ {94CD7910-649A-4075-9F33-7EBEE614FD45}.Release|Win32.Build.0 = Release|Win32
+ {94CD7910-649A-4075-9F33-7EBEE614FD45}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
+ {94CD7910-649A-4075-9F33-7EBEE614FD45}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: trunk/OpenMPT/mptrack/mptrack.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.vcproj 2010-05-13 19:12:29 UTC (rev 592)
+++ trunk/OpenMPT/mptrack/mptrack.vcproj 2010-05-13 19:57:06 UTC (rev 593)
@@ -759,6 +759,9 @@
RelativePath=".\EffectVis.h">
</File>
<File
+ RelativePath="..\soundlib\Endianness.h">
+ </File>
+ <File
RelativePath=".\fxp.h">
</File>
<File
Modified: trunk/OpenMPT/mptrack/mptrack_08.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack_08.vcproj 2010-05-13 19:12:29 UTC (rev 592)
+++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2010-05-13 19:57:06 UTC (rev 593)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9.00"
+ Version="9,00"
Name="mptrack"
ProjectGUID="{21D95071-FB97-4E69-B3B1-050D0D4A5021}"
RootNamespace="mptrack"
@@ -1011,6 +1011,10 @@
>
</File>
<File
+ RelativePath="..\soundlib\Endianness.h"
+ >
+ </File>
+ <File
RelativePath=".\fxp.h"
>
</File>
Modified: trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html
===================================================================
--- trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html 2010-05-13 19:12:29 UTC (rev 592)
+++ trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html 2010-05-13 19:57:06 UTC (rev 593)
@@ -88,7 +88,7 @@
to the other formats - The sequences are merged into one orderlist then. Sequences can be
managed comfortably from the treeview.</li>
<li>Support for <strong>new file formats</strong>: GDM (General Digital Music), IMF (Imago Orpheus),
- J2B (Jazz Jackrabbit 2 music) and 8 channel Startrekker modules can now be imported. Scala tuning files can be used with OpenMPT's tuning editor now.
+ J2B (Jazz Jackrabbit 2 music) and 8 channel Startrekker modules can now be imported. Modules compressed with gzip can be loaded. Scala tuning files can be used with OpenMPT's tuning editor now.
Support for other file formats was also notably improved: All PSM files (old and new Epic Megagames MASI)
load correctly now, ULT (Ultratracker) import is more accurate, XM files compressed with BoobieSequeezer or made with early versions of Skale Tracker load correctly, etc...</li>
<li>A countless number of <strong>playback behaviour fixes</strong> to maximise compatibility with ProTracker,
Added: trunk/OpenMPT/soundlib/Endianness.h
===================================================================
--- trunk/OpenMPT/soundlib/Endianness.h (rev 0)
+++ trunk/OpenMPT/soundlib/Endianness.h 2010-05-13 19:57:06 UTC (rev 593)
@@ -0,0 +1,27 @@
+#ifndef ENDIANNESS_H
+#define ENDIANNESS_H
+
+// Ending swaps:
+// BigEndian(x) may be used either to:
+// -Convert DWORD x, which is in big endian format(for example read from file),
+// to endian format of current architecture.
+// -Convert value x from endian format of current architecture to big endian format.
+// Similarly LittleEndian(x) converts known little endian format to format of current
+// endian architecture or value x in format of current architecture to little endian
+// format.
+#ifdef PLATFORM_BIG_ENDIAN
+// PPC
+inline DWORD LittleEndian(DWORD x) { return ((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24); }
+inline WORD LittleEndianW(WORD x) { return (WORD)(((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)); }
+#define BigEndian(x) (x)
+#define BigEndianW(x) (x)
+#else
+// x86
+inline DWORD BigEndian(DWORD x) { return ((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24); }
+inline WORD BigEndianW(WORD x) { return (WORD)(((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)); }
+#define LittleEndian(x) (x)
+#define LittleEndianW(x) (x)
+#endif
+
+#endif // ENDIANNESS_H
+
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-05-13 19:12:29 UTC (rev 592)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-05-13 19:57:06 UTC (rev 593)
@@ -29,6 +29,7 @@
#ifndef NO_ARCHIVE_SUPPORT
#define UNRAR_SUPPORT
#define UNLHA_SUPPORT
+#define UNGZIP_SUPPORT
#define ZIPPED_MOD_SUPPORT
LPCSTR glpszModExtensions = "mod|s3m|xm|it|stm|nst|ult|669|wow|mtm|med|far|mdl|ams|dsm|amf|okt|dmf|ptm|psm|mt2|umx|gdm|imf|j2b"
#ifndef NO_UNMO3_SUPPORT
@@ -53,6 +54,10 @@
#include "../unlha/unlha32.h"
#endif
+#ifdef UNGZIP_SUPPORT
+#include "../ungzip/ungzip.h"
+#endif
+
#ifdef MMCMP_SUPPORT
extern BOOL MMCMP_Unpack(LPCBYTE *ppMemFile, LPDWORD pdwMemLength);
#endif
@@ -602,6 +607,17 @@
}
}
#endif
+#ifdef UNGZIP_SUPPORT
+ CGzipArchive ungzip((LPBYTE)lpStream, dwMemLength);
+ if (ungzip.IsArchive())
+ {
+ if (ungzip.ExtractFile() && ungzip.GetOutputFile())
+ {
+ lpStream = ungzip.GetOutputFile();
+ dwMemLength = ungzip.GetOutputFileLength();
+ }
+ }
+#endif
#ifdef MMCMP_SUPPORT
BOOL bMMCmp = MMCMP_Unpack(&lpStream, &dwMemLength);
#endif
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-05-13 19:12:29 UTC (rev 592)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-05-13 19:57:06 UTC (rev 593)
@@ -17,6 +17,7 @@
#include <bitset>
#include "midi.h"
#include "Snd_defs.h"
+#include "Endianness.h"
class CTuningBase;
typedef CTuningBase CTuning;
@@ -1010,30 +1011,7 @@
return NULL;
}
-// Ending swaps:
-// BigEndian(x) may be used either to:
-// -Convert DWORD x, which is in big endian format(for example read from file),
-// to endian format of current architecture.
-// -Convert value x from endian format of current architecture to big endian format.
-// Similarly LittleEndian(x) converts known little endian format to format of current
-// endian architecture or value x in format of current architecture to little endian
-// format.
-#ifdef PLATFORM_BIG_ENDIAN
-// PPC
-inline DWORD LittleEndian(DWORD x) { return ((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24); }
-inline WORD LittleEndianW(WORD x) { return (WORD)(((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)); }
-#define BigEndian(x) (x)
-#define BigEndianW(x) (x)
-#else
-// x86
-inline DWORD BigEndian(DWORD x) { return ((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24); }
-inline WORD BigEndianW(WORD x) { return (WORD)(((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)); }
-#define LittleEndian(x) (x)
-#define LittleEndianW(x) (x)
-#endif
-
-
//////////////////////////////////////////////////////////
// WAVE format information
Added: trunk/OpenMPT/ungzip/ungzip.h
===================================================================
--- trunk/OpenMPT/ungzip/ungzip.h (rev 0)
+++ trunk/OpenMPT/ungzip/ungzip.h 2010-05-13 19:57:06 UTC (rev 593)
@@ -0,0 +1,72 @@
+/*
+ * ungzip.h
+ * --------
+ * Purpose: Header file for .gz loader
+ * Notes : (currently none)
+ * Authors: OpenMPT Devs
+ */
+
+#pragma once
+
+#ifndef ZLIB_WINAPI
+#define ZLIB_WINAPI
+#endif // ZLIB_WINAPI
+#include "../zlib/zlib.h"
+#include "../mptrack/typedefs.h"
+
+#pragma pack(1)
+
+struct GZheader
+{
+ uint8 magic1; // 0x1F
+ uint8 magic2; // 0x8B
+ uint8 method; // 0-7 = reserved, 8 = deflate
+ uint8 flags; // See GZ_F* constants
+ uint32 mtime; // UNIX time
+ uint8 xflags; // Available for use by specific compression methods. We ignore this.
+ uint8 os; // Which OS was used to compress the file? We also ignore this.
+};
+
+struct GZtrailer
+{
+ uint32 crc32; // CRC32 of decompressed data
+ uint32 isize; // Size of decompressed data
+};
+
+#pragma pack()
+
+// magic bytes
+#define GZ_HMAGIC1 0x1F
+#define GZ_HMAGIC2 0x8B
+#define GZ_HMDEFLATE 0x08
+// header flags
+#define GZ_FTEXT 0x01 // File is probably ASCII text (who cares)
+#define GZ_FHCRC 0x02 // CRC16 present
+#define GZ_FEXTRA 0x04 // Extra fields present
+#define GZ_FNAME 0x08 // Original filename present
+#define GZ_FCOMMENT 0x10 // Comment is present
+#define GZ_FRESERVED (~(GZ_FTEXT | GZ_FHCRC | GZ_FEXTRA | GZ_FNAME | GZ_FCOMMENT))
+
+
+//================
+class CGzipArchive
+//================
+{
+public:
+
+ LPBYTE GetOutputFile() const { return m_pOutputFile; }
+ DWORD GetOutputFileLength() const { return m_dwOutputLen; }
+ bool IsArchive();
+ bool ExtractFile();
+
+ CGzipArchive(LPBYTE lpStream, DWORD dwMemLength);
+ ~CGzipArchive();
+
+protected:
+ // in
+ LPBYTE m_lpStream;
+ DWORD m_dwStreamLen;
+ // out
+ Bytef *m_pOutputFile;
+ DWORD m_dwOutputLen;
+};
Added: trunk/OpenMPT/ungzip/ungzip_08.vcproj
===================================================================
--- trunk/OpenMPT/ungzip/ungzip_08.vcproj (rev 0)
+++ trunk/OpenMPT/ungzip/ungzip_08.vcproj 2010-05-13 19:57:06 UTC (rev 593)
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="ungzip"
+ ProjectGUID="{94CD7910-649A-4075-9F33-7EBEE614FD45}"
+ RootNamespace="ungzip"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ OmitDefaultLibName="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ SuppressStartupBanner="false"
+ DebugInformationFormat="0"
+ OmitDefaultLibName="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\ungzip.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\ungzip.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-13 19:12:36
|
Revision: 592
http://modplug.svn.sourceforge.net/modplug/?rev=592&view=rev
Author: saga-games
Date: 2010-05-13 19:12:29 +0000 (Thu, 13 May 2010)
Log Message:
-----------
[Imp] Mod Loaders: Instead of creating messageboxes in various places, errors are now written to the log.
[Imp] Binary files are now less often falsely recognized as early MOD files (15 samples without header): If the orderlist contains orderlist items > 128, loading is cancelled.
[Ref] Bits of refactoring here and there.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_gdm.cpp
trunk/OpenMPT/soundlib/Load_imf.cpp
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_mo3.cpp
trunk/OpenMPT/soundlib/Load_mod.cpp
trunk/OpenMPT/soundlib/Load_psm.cpp
trunk/OpenMPT/soundlib/Load_s3m.cpp
trunk/OpenMPT/soundlib/load_j2b.cpp
Modified: trunk/OpenMPT/soundlib/Load_gdm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_gdm.cpp 2010-05-09 22:04:33 UTC (rev 591)
+++ trunk/OpenMPT/soundlib/Load_gdm.cpp 2010-05-13 19:12:29 UTC (rev 592)
@@ -14,6 +14,9 @@
#include "stdafx.h"
#include "sndfile.h"
+#ifdef MODPLUG_TRACKER
+#include "../mptrack/moddoc.h"
+#endif // MODPLUG_TRACKER
#pragma pack(1)
@@ -255,9 +258,11 @@
if(Patterns.Insert(iPat, 64))
{
+#ifdef MODPLUG_TRACKER
CString s;
s.Format(TEXT("Allocating patterns failed starting from pattern %u"), iPat);
- MessageBox(NULL, s, TEXT("OpenMPT GDM import"), MB_ICONERROR);
+ if(m_pModDoc != nullptr) m_pModDoc->AddToLog(s);
+#endif // MODPLUG_TRACKER
break;
}
Modified: trunk/OpenMPT/soundlib/Load_imf.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_imf.cpp 2010-05-09 22:04:33 UTC (rev 591)
+++ trunk/OpenMPT/soundlib/Load_imf.cpp 2010-05-13 19:12:29 UTC (rev 592)
@@ -8,6 +8,9 @@
#include "stdafx.h"
#include "sndfile.h"
+#ifdef MODPLUG_TRACKER
+#include "../mptrack/moddoc.h"
+#endif // MODPLUG_TRACKER
#pragma pack(1)
@@ -365,9 +368,11 @@
if(Patterns.Insert(nPat, nrows))
{
+#ifdef MODPLUG_TRACKER
CString s;
s.Format(TEXT("Allocating patterns failed starting from pattern %u"), nPat);
- MessageBox(NULL, s, TEXT("OpenMPT IMF import"), MB_ICONERROR);
+ if(m_pModDoc != nullptr) m_pModDoc->AddToLog(s);
+#endif // MODPLUG_TRACKER
break;
}
row_data = Patterns[nPat];
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-05-09 22:04:33 UTC (rev 591)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-05-13 19:12:29 UTC (rev 592)
@@ -1354,9 +1354,11 @@
{
if(Patterns.Insert(npat, 64))
{
+#ifdef MODPLUG_TRACKER
CString s;
- s.Format("Allocating patterns failed starting from pattern %u", npat);
- MessageBox(NULL, s, "", MB_ICONERROR);
+ s.Format(TEXT("Allocating patterns failed starting from pattern %u"), npat);
+ if(m_pModDoc != nullptr) m_pModDoc->AddToLog(s);
+#endif
break;
}
continue;
Modified: trunk/OpenMPT/soundlib/Load_mo3.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mo3.cpp 2010-05-09 22:04:33 UTC (rev 591)
+++ trunk/OpenMPT/soundlib/Load_mo3.cpp 2010-05-13 19:12:29 UTC (rev 592)
@@ -8,9 +8,10 @@
#include "stdafx.h"
#include "sndfile.h"
+#ifdef MODPLUG_TRACKER
+#include "../mptrack/moddoc.h"
+#endif // MODPLUG_TRACKER
-
-
// decode a MO3 file (returns the same "exit codes" as UNMO3.EXE, eg. 0=success)
// IN: data/len = MO3 data/len
// OUT: data/len = decoded data/len (if successful)
@@ -29,11 +30,14 @@
#ifdef NO_MO3_SUPPORT
/* As of August 2009, the format revision is 5; Versions > 31 are unlikely to exist in the next few years,
so we will just ignore those if there's no UNMO3 library to tell us if the file is valid or not
- (avoid messagebox with .MOD files that have a song name starting with "MO3" */
+ (avoid log entry with .MOD files that have a song name starting with "MO3" */
if(lpStream[3] > 31) return false;
- AfxMessageBox(GetStrI18N(__TEXT("The file appears to be a MO3 file, but this OpenMPT build does not support loading MO3 files.")));
+#ifdef MODPLUG_TRACKER
+ if(m_pModDoc != nullptr) m_pModDoc->AddToLog(GetStrI18N(__TEXT("The file appears to be a MO3 file, but this OpenMPT build does not support loading MO3 files.")));
+#endif // MODPLUG_TRACKER
return false;
+
#else
bool b_result = false; // result of trying to load the module, false == fail.
@@ -44,7 +48,9 @@
HMODULE unmo3 = LoadLibrary(_TEXT("unmo3.dll"));
if(unmo3 == NULL) // Didn't succeed.
{
- AfxMessageBox(GetStrI18N(_TEXT("Loading MO3 file failed because unmo3.dll could not be loaded.")), MB_ICONINFORMATION);
+#ifdef MODPLUG_TRACKER
+ if(m_pModDoc != nullptr) m_pModDoc->AddToLog(GetStrI18N(_TEXT("Loading MO3 file failed because unmo3.dll could not be loaded.")));
+#endif // MODPLUG_TRACKER
}
else //case: dll loaded succesfully.
{
Modified: trunk/OpenMPT/soundlib/Load_mod.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mod.cpp 2010-05-09 22:04:33 UTC (rev 591)
+++ trunk/OpenMPT/soundlib/Load_mod.cpp 2010-05-13 19:12:29 UTC (rev 592)
@@ -326,6 +326,10 @@
m_nChannels = 4;
bFLT8 = false;
}
+
+ // chances are very high that we're dealing with a non-MOD file here.
+ if(m_nSamples == 15 && i >= 0x80)
+ return false;
}
if(bFLT8)
Modified: trunk/OpenMPT/soundlib/Load_psm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_psm.cpp 2010-05-09 22:04:33 UTC (rev 591)
+++ trunk/OpenMPT/soundlib/Load_psm.cpp 2010-05-13 19:12:29 UTC (rev 592)
@@ -20,6 +20,9 @@
#include "stdafx.h"
#include "sndfile.h"
+#ifdef MODPLUG_TRACKER
+#include "../mptrack/moddoc.h"
+#endif // MODPLUG_TRACKER
#pragma pack(1)
@@ -32,67 +35,68 @@
struct PSMNEWHEADER
{
- DWORD formatID; // "PSM " (new format)
- DWORD fileSize; // Filesize - 12
- DWORD fileInfoID; // "FILE" Start of file info
+ uint32 formatID; // "PSM " (new format)
+ uint32 fileSize; // Filesize - 12
+ uint32 fileInfoID; // "FILE" Start of file info
};
struct PSMSONGHEADER
{
- CHAR songType[9]; // Mostly "MAINSONG " (But not in Extreme Pinball!)
- BYTE compression; // 1 - uncompressed
- BYTE numChannels; // Number of channels, usually 4
+ char songType[9]; // Mostly "MAINSONG " (But not in Extreme Pinball!)
+ uint8 compression; // 1 - uncompressed
+ uint8 numChannels; // Number of channels, usually 4
};
struct PSMOLDSAMPLEHEADER // Regular sample header
{
- BYTE flags;
- CHAR fileName[8]; // Filename of the original module (without extension)
- DWORD sampleID; // INS0...INS9 (only last digit of sample ID, i.e. sample 1 and sample 11 are equal)
- CHAR sampleName[33];
- CHAR unknown1[6]; // 00 00 00 00 00 FF
- WORD sampleNumber;
- DWORD sampleLength;
- DWORD loopStart;
- DWORD loopEnd; // FF FF FF FF = end of sample
- BYTE unknown3;
- BYTE defaulPan; // unused?
- BYTE defaultVolume;
- DWORD unknown4;
- WORD C5Freq;
- CHAR unknown5[21]; // 00 ... 00
+ uint8 flags;
+ char fileName[8]; // Filename of the original module (without extension)
+ uint32 sampleID; // INS0...INS9 (only last digit of sample ID, i.e. sample 1 and sample 11 are equal)
+ char sampleName[33];
+ uint8 unknown1[6]; // 00 00 00 00 00 FF
+ uint16 sampleNumber;
+ uint32 sampleLength;
+ uint32 loopStart;
+ uint32 loopEnd; // FF FF FF FF = end of sample
+ uint8 unknown3;
+ uint8 defaulPan; // unused?
+ uint8 defaultVolume;
+ uint32 unknown4;
+ uint16 C5Freq;
+ uint8 unknown5[21]; // 00 ... 00
};
struct PSMNEWSAMPLEHEADER // Sinaria sample header (and possibly other games)
{
- BYTE flags;
- CHAR fileName[8]; // Filename of the original module (without extension)
- CHAR sampleID[8]; // INS0...INS99999
- CHAR sampleName[33];
- CHAR unknown1[6]; // 00 00 00 00 00 FF
- WORD sampleNumber;
- DWORD sampleLength;
- DWORD loopStart;
- DWORD loopEnd;
- WORD unknown3;
- BYTE defaultPan; // unused?
- BYTE defaultVolume;
- DWORD unknown4;
- WORD C5Freq;
- CHAR unknown5[16]; // 00 ... 00
+ uint8 flags;
+ char fileName[8]; // Filename of the original module (without extension)
+ char sampleID[8]; // INS0...INS99999
+ char sampleName[33];
+ uint8 unknown1[6]; // 00 00 00 00 00 FF
+ uint16 sampleNumber;
+ uint32 sampleLength;
+ uint32 loopStart;
+ uint32 loopEnd;
+ uint16 unknown3;
+ uint8 defaultPan; // unused?
+ uint8 defaultVolume;
+ uint32 unknown4;
+ uint16 C5Freq;
+ char unknown5[16]; // 00 ... 00
};
#pragma pack()
struct PSMSUBSONG // For internal use (pattern conversion)
{
- BYTE channelPanning[MAX_BASECHANNELS], channelVolume[MAX_BASECHANNELS];
- bool channelSurround[MAX_BASECHANNELS];
- BYTE defaultTempo, defaultSpeed;
- CHAR songName[10];
+ uint8 channelPanning[MAX_BASECHANNELS], channelVolume[MAX_BASECHANNELS];
+ bool channelSurround[MAX_BASECHANNELS];
+ uint8 defaultTempo, defaultSpeed;
+ char songName[10];
ORDERINDEX startOrder, endOrder, restartPos;
- PSMSUBSONG() {
+ PSMSUBSONG()
+ {
memset(channelPanning, 128, sizeof(channelPanning));
memset(channelVolume, 64, sizeof(channelVolume));
memset(channelSurround, false, sizeof(channelSurround));
@@ -144,9 +148,9 @@
// pattern offset and identifier
PATTERNINDEX numPatterns = 0; // used for setting up the orderlist - final pattern count
- vector<DWORD> patternOffsets; // pattern offsets (sorted as they occour in the file)
- vector<DWORD> patternIDs; // pattern IDs (sorted as they occour in the file)
- vector<DWORD> orderOffsets; // combine the upper two vectors to get the offsets for each order item
+ vector<uint32> patternOffsets; // pattern offsets (sorted as they occour in the file)
+ vector<uint32> patternIDs; // pattern IDs (sorted as they occour in the file)
+ vector<uint32> orderOffsets; // combine the upper two vectors to get the offsets for each order item
patternOffsets.clear();
patternIDs.clear();
orderOffsets.clear();
@@ -159,8 +163,8 @@
{
// Skip through the chunks
ASSERT_CAN_READ(8);
- DWORD chunkID = LittleEndian(*(DWORD *)(lpStream + dwMemPos));
- DWORD chunkSize = LittleEndian(*(DWORD *)(lpStream + dwMemPos + 4));
+ uint32 chunkID = LittleEndian(*(uint32 *)(lpStream + dwMemPos));
+ uint32 chunkSize = LittleEndian(*(uint32 *)(lpStream + dwMemPos + 4));
dwMemPos += 8;
ASSERT_CAN_READ(chunkSize);
@@ -177,7 +181,7 @@
break;
case 0x444F4250: // "PBOD" - Pattern data of a single pattern
- if(chunkSize < 8 || chunkSize != LittleEndian(*(DWORD *)(lpStream + dwMemPos))) return false; // same value twice
+ if(chunkSize < 8 || chunkSize != LittleEndian(*(uint32 *)(lpStream + dwMemPos))) return false; // same value twice
// Pattern ID (something like "P0 " or "P13 ", or "PATT0 " in Sinaria) follows
if(memcmp(lpStream + dwMemPos + 4, "P", 1)) return false;
@@ -210,8 +214,8 @@
// "Sub sub chunks"
while(dwChunkPos + 8 < dwMemPos + chunkSize)
{
- DWORD subChunkID = LittleEndian(*(DWORD *)(lpStream + dwChunkPos));
- DWORD subChunkSize = LittleEndian(*(DWORD *)(lpStream + dwChunkPos + 4));
+ uint32 subChunkID = LittleEndian(*(uint32 *)(lpStream + dwChunkPos));
+ uint32 subChunkSize = LittleEndian(*(uint32 *)(lpStream + dwChunkPos + 4));
dwChunkPos += 8;
switch(subChunkID)
@@ -220,7 +224,7 @@
if(subChunkSize != 6) break;
{
- CHAR cversion[7];
+ char cversion[7];
memcpy(cversion, lpStream + dwChunkPos, 6);
cversion[6] = 0;
int version = atoi(cversion);
@@ -239,7 +243,7 @@
// Now, the interesting part begins!
DWORD dwSettingsOffset = dwChunkPos + 2;
- WORD nChunkCount = 0, nFirstOrderChunk = (WORD)-1;
+ uint16 nChunkCount = 0, nFirstOrderChunk = uint16_max;
// "Sub sub sub chunks" (grrrr, silly format)
while(dwSettingsOffset - dwChunkPos + 1 < subChunkSize)
@@ -257,7 +261,7 @@
char patternID[4]; // temporary
memcpy(patternID, lpStream + dwSettingsOffset + 2 + (bNewFormat ? 3 : 0), 3);
patternID[3] = 0;
- DWORD nPattern = atoi(patternID);
+ uint32 nPattern = atoi(patternID);
// seek which pattern has this ID
for(uint32 i = 0; i < patternIDs.size(); i++)
@@ -278,13 +282,13 @@
}
}
// decide whether this is the first order chunk or not (for finding out the correct restart position)
- if(nFirstOrderChunk == (WORD)-1) nFirstOrderChunk = nChunkCount;
+ if(nFirstOrderChunk == uint16_max) nFirstOrderChunk = nChunkCount;
dwSettingsOffset += 5 + (bNewFormat ? 4 : 0);
break;
case 0x04: // Restart position
{
- WORD nRestartChunk = LittleEndian(*(WORD *)(lpStream + dwSettingsOffset + 1));
+ uint16 nRestartChunk = LittleEndian(*(uint16 *)(lpStream + dwSettingsOffset + 1));
ORDERINDEX nRestartPosition = 0;
if(nRestartChunk >= nFirstOrderChunk) nRestartPosition = (ORDERINDEX)(nRestartChunk - nFirstOrderChunk);
subsong.restartPos += nRestartPosition;
@@ -359,9 +363,11 @@
break;
default: // How the hell should this happen? I've listened through almost all existing (original) PSM files. :)
+#ifdef MODPLUG_TRACKER
CString s;
s.Format("Report to the OpenMPT team: Unknown chunk %d found at position %d (in the OPLH chunk of this PSM file)", lpStream[dwSettingsOffset], dwSettingsOffset);
- MessageBox(NULL, s, TEXT("OpenMPT PSM import"), MB_ICONERROR);
+ if(m_pModDoc != nullptr) m_pModDoc->AddToLog(s);
+#endif // MODPLUG_TRACKER
// anyway, in such cases, we have to quit as we don't know how big the chunk really is.
return false;
break;
@@ -377,7 +383,7 @@
case 0x4E415050: // PPAN - Channel panning table (used in Sinaria)
if(subChunkSize & 1) return false;
- for(DWORD i = 0; i < subChunkSize; i += 2)
+ for(uint32 i = 0; i < subChunkSize; i += 2)
{
CHANNELINDEX nChn = (CHANNELINDEX)(i >> 1);
if(nChn >= m_nChannels) break;
@@ -507,16 +513,18 @@
for(ORDERINDEX nOrd = 0; nOrd < Order.size(); nOrd++)
{
if(orderOffsets[nOrd] == nullptr) continue;
- DWORD dwPatternOffset = orderOffsets[nOrd];
+ uint32 dwPatternOffset = orderOffsets[nOrd];
if(dwPatternOffset + 2 > dwMemLength) return false;
- WORD patternSize = LittleEndianW(*(WORD *)(lpStream + dwPatternOffset));
+ uint16 patternSize = LittleEndianW(*(uint16 *)(lpStream + dwPatternOffset));
dwPatternOffset += 2;
if(Patterns.Insert(nPat, patternSize))
{
+#ifdef MODPLUG_TRACKER
CString s;
s.Format(TEXT("Allocating patterns failed starting from pattern %u"), nPat);
- MessageBox(NULL, s, TEXT("OpenMPT PSM import"), MB_ICONERROR);
+ if(m_pModDoc != nullptr) m_pModDoc->AddToLog(s);
+#endif // MODPLUG_TRACKER
break;
}
@@ -527,9 +535,9 @@
for(int nRow = 0; nRow < patternSize; nRow++)
{
if(dwPatternOffset + 2 > dwMemLength) return false;
- WORD rowSize = LittleEndianW(*(WORD *)(lpStream + dwPatternOffset));
+ uint16 rowSize = LittleEndianW(*(uint16 *)(lpStream + dwPatternOffset));
- DWORD dwRowOffset = dwPatternOffset + 2;
+ uint32 dwRowOffset = dwPatternOffset + 2;
while(dwRowOffset < dwPatternOffset + rowSize)
{
@@ -579,7 +587,7 @@
{
// Effect present - convert
if(dwRowOffset + 2 > dwMemLength) return false;
- BYTE command = lpStream[dwRowOffset], param = lpStream[dwRowOffset + 1];
+ uint8 command = lpStream[dwRowOffset], param = lpStream[dwRowOffset + 1];
switch(command)
{
@@ -812,51 +820,51 @@
struct PSM16HEADER
{
- DWORD formatID; // "PSM\xFE" (PSM16)
- CHAR songName[59]; // Song title, padded with nulls
- BYTE lineEnd; // $1A
- BYTE songType; // Song Type bitfield
- BYTE formatVersion; // $10
- BYTE patternVersion; // 0 or 1
- BYTE songSpeed; //
- BYTE songTempo; // 32 ... 255
- BYTE masterVolume; // 0 ... 255
- WORD songLength; // 0 ... 255 (number of patterns to play in the song)
- WORD songOrders; // 0 ... 255 (same as previous value as no subsongs are present)
- WORD numPatterns; // 1 ... 255
- WORD numSamples; // 1 ... 255
- WORD numChannelsPlay; // 0 ... 32 (max. number of channels to play)
- WORD numChannelsReal; // 0 ... 32 (max. number of channels to process)
- DWORD orderOffset;
- DWORD panOffset;
- DWORD patOffset;
- DWORD smpOffset;
- DWORD commentsOffset;
- DWORD patSize; // Size of all patterns
- CHAR filler[40];
+ uint32 formatID; // "PSM\xFE" (PSM16)
+ char songName[59]; // Song title, padded with nulls
+ uint8 lineEnd; // $1A
+ uint8 songType; // Song Type bitfield
+ uint8 formatVersion; // $10
+ uint8 patternVersion; // 0 or 1
+ uint8 songSpeed; //
+ uint8 songTempo; // 32 ... 255
+ uint8 masterVolume; // 0 ... 255
+ uint16 songLength; // 0 ... 255 (number of patterns to play in the song)
+ uint16 songOrders; // 0 ... 255 (same as previous value as no subsongs are present)
+ uint16 numPatterns; // 1 ... 255
+ uint16 numSamples; // 1 ... 255
+ uint16 numChannelsPlay; // 0 ... 32 (max. number of channels to play)
+ uint16 numChannelsReal; // 0 ... 32 (max. number of channels to process)
+ uint32 orderOffset;
+ uint32 panOffset;
+ uint32 patOffset;
+ uint32 smpOffset;
+ uint32 commentsOffset;
+ uint32 patSize; // Size of all patterns
+ uint8 filler[40];
};
struct PSM16SMPHEADER
{
- CHAR filename[13]; // null-terminated
- CHAR name[24]; // dito
- DWORD offset; // in file
- DWORD memoffset; // not used
- WORD sampleNumber; // 1 ... 255
- BYTE flags; // sample flag bitfield
- DWORD length; // in bytes
- DWORD loopStart; // in samples?
- DWORD loopEnd; // in samples?
- CHAR finetune; // 0 ... 15 (useless? also, why is this almost always 70?)
- BYTE volume; // default volume
- WORD c2freq;
+ uint8 filename[13]; // null-terminated
+ uint8 name[24]; // dito
+ uint32 offset; // in file
+ uint32 memoffset; // not used
+ uint16 sampleNumber;// 1 ... 255
+ uint8 flags; // sample flag bitfield
+ uint32 length; // in bytes
+ uint32 loopStart; // in samples?
+ uint32 loopEnd; // in samples?
+ int8 finetune; // 0 ... 15 (useless? also, why is this almost always 70?)
+ uint8 volume; // default volume
+ uint16 c2freq;
};
struct PSM16PATHEADER
{
- WORD size; // includes header bytes
- BYTE numRows; // 1 ... 64
- BYTE numChans; // 1 ... 31
+ uint16 size; // includes header bytes
+ uint8 numRows; // 1 ... 64
+ uint8 numChans; // 1 ... 31
};
#pragma pack()
@@ -898,7 +906,7 @@
// Read orders
dwMemPos = LittleEndian(shdr->orderOffset);
ASSERT_CAN_READ((DWORD)LittleEndianW(shdr->songOrders) + 2);
- if(LittleEndian(shdr->orderOffset) > 4 && LittleEndian(*(DWORD *)(lpStream + dwMemPos - 4)) == 0x44524f50) // PORD
+ if(LittleEndian(shdr->orderOffset) > 4 && LittleEndian(*(uint32 *)(lpStream + dwMemPos - 4)) == 0x44524f50) // PORD
{
Order.ReadAsByte(lpStream + dwMemPos, LittleEndianW(shdr->songOrders), dwMemLength - dwMemPos);
}
@@ -906,7 +914,7 @@
// Read pan positions
dwMemPos = LittleEndian(shdr->panOffset);
ASSERT_CAN_READ(32);
- if(LittleEndian(shdr->panOffset) > 4 && LittleEndian(*(DWORD *)(lpStream + dwMemPos - 4)) == 0x4E415050) // PPAN
+ if(LittleEndian(shdr->panOffset) > 4 && LittleEndian(*(uint32 *)(lpStream + dwMemPos - 4)) == 0x4E415050) // PPAN
{
for(CHANNELINDEX i = 0; i < 32; i++)
{
@@ -919,7 +927,7 @@
// Read samples
dwMemPos = LittleEndian(shdr->smpOffset);
ASSERT_CAN_READ(0);
- if(LittleEndian(shdr->smpOffset) > 4 && LittleEndian(*(DWORD *)(lpStream + dwMemPos - 4)) == 0x48415350) // PSAH
+ if(LittleEndian(shdr->smpOffset) > 4 && LittleEndian(*(uint32 *)(lpStream + dwMemPos - 4)) == 0x48415350) // PSAH
{
SAMPLEINDEX iSmpCount = 0;
m_nSamples = LittleEndianW(shdr->numSamples);
@@ -1000,9 +1008,11 @@
if(Patterns.Insert(nPat, phdr->numRows))
{
+#ifdef MODPLUG_TRACKER
CString s;
s.Format(TEXT("Allocating patterns failed starting from pattern %u"), nPat);
- MessageBox(NULL, s, TEXT("OpenMPT PSM16 import"), MB_ICONERROR);
+ if(m_pModDoc != nullptr) m_pModDoc->AddToLog(s);
+#endif // MODPLUG_TRACKER
break;
}
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-05-09 22:04:33 UTC (rev 591)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-05-13 19:12:29 UTC (rev 592)
@@ -10,9 +10,11 @@
#include "stdafx.h"
#include "sndfile.h"
-#include "../mptrack/moddoc.h"
#include "../mptrack/misc_util.h"
#include "../mptrack/version.h"
+#ifdef MODPLUG_TRACKER
+#include "../mptrack/moddoc.h"
+#endif // MODPLUG_TRACKER
#pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data"
@@ -218,9 +220,9 @@
bool CSoundFile::ReadS3M(const BYTE *lpStream, DWORD dwMemLength)
//---------------------------------------------------------------
{
- if ((!lpStream) || (dwMemLength <= sizeof(S3MFILEHEADER)+64)) return false;
+ if ((!lpStream) || (dwMemLength <= sizeof(S3MFILEHEADER) + 64)) return false;
- UINT insnum,patnum,nins,npat;
+ UINT insnum, patnum, nins, npat;
DWORD insfile[128];
WORD ptr[256];
BYTE s[1024];
@@ -512,11 +514,11 @@
if (psfh.flags & 0x10) m_dwSongFlags |= SONG_AMIGALIMITS;
#ifdef MODPLUG_TRACKER
- if(bHasAdlibPatches)
+ if(bHasAdlibPatches && m_pModDoc != nullptr)
{
- ::MessageBox(0, "This track uses Adlib instruments, which are not supported by OpenMPT.", "OpenMPT S3M Import", MB_OK|MB_ICONEXCLAMATION);
+ m_pModDoc->AddToLog("This track uses Adlib instruments, which are not supported by OpenMPT.");
}
-#endif
+#endif // MODPLUG_TRACKER
return true;
}
Modified: trunk/OpenMPT/soundlib/load_j2b.cpp
===================================================================
--- trunk/OpenMPT/soundlib/load_j2b.cpp 2010-05-09 22:04:33 UTC (rev 591)
+++ trunk/OpenMPT/soundlib/load_j2b.cpp 2010-05-13 19:12:29 UTC (rev 592)
@@ -9,7 +9,9 @@
#include "stdafx.h"
#include "sndfile.h"
+#ifndef ZLIB_WINAPI
#define ZLIB_WINAPI
+#endif // ZLIB_WINAPI
#include "../zlib/zlib.h"
#pragma pack(1)
@@ -18,7 +20,7 @@
struct J2BHEADER
{
uint32 signature; // MUSE
- uint32 deadbeaf; // 0xDEADBEAF (AM) or 0xDEADBABE (AMFF)
+ uint32 deadbeaf; // 0xDEADBEAF (AM) or 0xDEADBABE (AMFF)
uint32 j2blength; // complete filesize
uint32 crc32; // checksum of the compressed data block
uint32 packed_length; // length of the compressed data block
@@ -80,7 +82,7 @@
{
uint32 signature; // "SAMP"
uint32 chunksize; // header + sample size
- uint32 headsize; // header size
+ uint32 headsize; // header size
char name[32];
uint16 pan;
uint16 volume;
@@ -485,6 +487,8 @@
// header is valid, now unpack the RIFF AM file using inflate
DWORD destSize = LittleEndian(header->unpacked_length);
Bytef *bOutput = new Bytef[destSize];
+ if(bOutput == nullptr)
+ return false;
int nRetVal = uncompress(bOutput, &destSize, &lpStream[dwMemPos], LittleEndian(header->packed_length));
bool bResult = false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-09 22:04:40
|
Revision: 591
http://modplug.svn.sourceforge.net/modplug/?rev=591&view=rev
Author: saga-games
Date: 2010-05-09 22:04:33 +0000 (Sun, 09 May 2010)
Log Message:
-----------
[Imp] Instrument Editor: "Scale envelope points" is now always available for scaling the values of the points (y axis).
[Ref] Related code changes.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp
trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.h
trunk/OpenMPT/mptrack/View_ins.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/soundlib/Dlsbank.cpp
trunk/OpenMPT/soundlib/Load_imf.cpp
trunk/OpenMPT/soundlib/Load_mid.cpp
trunk/OpenMPT/soundlib/Snd_defs.h
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp 2010-05-08 22:11:33 UTC (rev 590)
+++ trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp 2010-05-09 22:04:33 UTC (rev 591)
@@ -1,78 +1,64 @@
-// ScaleEnvPointsDlg.cpp : implementation file
-//
+/*
+ * ScaleEnvPointsDlg.cpp
+ * ---------------------
+ * Purpose: Scale instrument envelope points on x and y axis.
+ * Notes : (currently none)
+ * Authors: OpenMPT Devs
+ */
#include "stdafx.h"
#include "mptrack.h"
#include "ScaleEnvPointsDlg.h"
+float CScaleEnvPointsDlg::m_fFactorX = 1;
+float CScaleEnvPointsDlg::m_fFactorY = 1;
-// CScaleEnvPointsDlg dialog
-IMPLEMENT_DYNAMIC(CScaleEnvPointsDlg, CDialog)
-CScaleEnvPointsDlg::CScaleEnvPointsDlg(CWnd* pParent, MODINSTRUMENT* pInst, UINT env)
- : CDialog(CScaleEnvPointsDlg::IDD, pParent),
- m_pInstrument(pInst),
- m_Env(env)
-//----------------------------------------------------------------------
+BOOL CScaleEnvPointsDlg::OnInitDialog()
+//-------------------------------------
{
-}
+ CDialog::OnInitDialog();
-CScaleEnvPointsDlg::~CScaleEnvPointsDlg()
-//---------------------------------------
-{
-}
+ char buffer[10];
+ _snprintf(buffer, 9, "%g", m_fFactorX);
+ SetDlgItemText(IDC_EDIT_FACTORX, buffer);
+ _snprintf(buffer, 9, "%g", m_fFactorY);
+ SetDlgItemText(IDC_EDIT_FACTORY, buffer);
+ GetDlgItem(IDC_EDIT_FACTORX)->SetFocus();
-void CScaleEnvPointsDlg::DoDataExchange(CDataExchange* pDX)
-//--------------------------------------------------------
-{
- CDialog::DoDataExchange(pDX);
- DDX_Control(pDX, IDC_EDIT_FACTOR, m_EditFactor);
+ return FALSE; // return TRUE unless you set the focus to a control
}
-BEGIN_MESSAGE_MAP(CScaleEnvPointsDlg, CDialog)
-
-END_MESSAGE_MAP()
-
-
-// CScaleEnvPointsDlg message handlers
-
void CScaleEnvPointsDlg::OnOK()
-//------------------------------
+//-----------------------------
{
char buffer[10];
- GetDlgItemText(IDC_EDIT_FACTOR, buffer, 9);
- float factor = ConvertStrTo<float>(buffer);
- if(factor > 0)
+ GetDlgItemText(IDC_EDIT_FACTORX, buffer, 9);
+ m_fFactorX = ConvertStrTo<float>(buffer);
+
+ GetDlgItemText(IDC_EDIT_FACTORY, buffer, 9);
+ m_fFactorY = ConvertStrTo<float>(buffer);
+
+ if(m_fFactorX > 0 && m_fFactorX != 1)
{
- INSTRUMENTENVELOPE *pEnv = nullptr;
- switch(m_Env)
+ for(UINT i = 0; i < m_pEnv->nNodes; i++)
{
- case ENV_PANNING: pEnv = &m_pInstrument->PanEnv; break;
- case ENV_PITCH: pEnv = &m_pInstrument->PitchEnv; break;
- default: pEnv = &m_pInstrument->VolEnv; break;
+ m_pEnv->Ticks[i] = static_cast<WORD>(m_fFactorX * m_pEnv->Ticks[i]);
+
+ // Checking that the order of points is preserved.
+ if(i > 0 && m_pEnv->Ticks[i] <= m_pEnv->Ticks[i - 1])
+ m_pEnv->Ticks[i] = m_pEnv->Ticks[i - 1] + 1;
}
- for(UINT i = 0; i< pEnv->nNodes; i++)
- {
- pEnv->Ticks[i] = static_cast<WORD>(factor * pEnv->Ticks[i]);
+ }
- //Checking that the order of points is preserved.
- if(i > 0 && pEnv->Ticks[i] <= pEnv->Ticks[i - 1])
- pEnv->Ticks[i] = pEnv->Ticks[i - 1] + 1;
+ if(m_fFactorY != 1)
+ {
+ for(UINT i = 0; i < m_pEnv->nNodes; i++)
+ {
+ m_pEnv->Values[i] = CLAMP(static_cast<BYTE>((m_fFactorY * ((int)m_pEnv->Values[i] - m_nCenter)) + m_nCenter), ENVELOPE_MIN, ENVELOPE_MAX);
}
}
CDialog::OnOK();
}
-
-BOOL CScaleEnvPointsDlg::OnInitDialog()
-//-------------------------------------
-{
- CDialog::OnInitDialog();
-
- SetDlgItemText(IDC_EDIT_FACTOR, "");
- m_EditFactor.SetFocus();
-
-
- return FALSE; // return TRUE unless you set the focus to a control
-}
Modified: trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.h
===================================================================
--- trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.h 2010-05-08 22:11:33 UTC (rev 590)
+++ trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.h 2010-05-09 22:04:33 UTC (rev 591)
@@ -1,33 +1,31 @@
+/*
+ * ScaleEnvPointsDlg.h
+ * -------------------
+ * Purpose: Header file for envelope scaling dialog.
+ * Notes : (currently none)
+ * Authors: OpenMPT Devs
+ */
+
#pragma once
-#include "sndfile.h"
-#include "afxwin.h"
-// CScaleEnvPointsDlg dialog
-
//=======================================
class CScaleEnvPointsDlg : public CDialog
//=======================================
{
- DECLARE_DYNAMIC(CScaleEnvPointsDlg)
-
public:
- CScaleEnvPointsDlg(CWnd* pParent, MODINSTRUMENT* pInst, UINT env); // standard constructor
- virtual ~CScaleEnvPointsDlg();
-// Dialog Data
- enum { IDD = IDD_SCALE_ENV_POINTS };
+ CScaleEnvPointsDlg(CWnd* pParent, INSTRUMENTENVELOPE *pEnv, int nCenter) : CDialog(IDD_SCALE_ENV_POINTS, pParent)
+ {
+ m_pEnv = pEnv;
+ m_nCenter = nCenter;
+ }
-protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
-
- DECLARE_MESSAGE_MAP()
-
private:
- MODINSTRUMENT* m_pInstrument;
- UINT m_Env; //To tell which envelope to process.
- CEdit m_EditFactor;
+ INSTRUMENTENVELOPE *m_pEnv; //To tell which envelope to process.
+ static float m_fFactorX, m_fFactorY;
+ int m_nCenter;
+
protected:
virtual void OnOK();
-public:
virtual BOOL OnInitDialog();
};
Modified: trunk/OpenMPT/mptrack/View_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_ins.cpp 2010-05-08 22:11:33 UTC (rev 590)
+++ trunk/OpenMPT/mptrack/View_ins.cpp 2010-05-09 22:04:33 UTC (rev 591)
@@ -2189,15 +2189,18 @@
{
CModDoc *pModDoc = GetDocument();
CSoundFile *pSndFile = (pModDoc) ? pModDoc->GetSoundFile() : NULL;
- if(pSndFile == NULL)
+ if(pSndFile == nullptr)
return;
if(m_nInstrument >= 1 &&
m_nInstrument <= pSndFile->GetNumInstruments() &&
pSndFile->Instruments[m_nInstrument])
{
- CScaleEnvPointsDlg dialog(this, pSndFile->Instruments[m_nInstrument], m_nEnv);
- if (dialog.DoModal() == IDOK)
+ // "Center" y value of the envelope. For panning and pitch, this is 32, for volume and filter it is 0 (minimum).
+ int nOffset = ((m_nEnv != ENV_VOLUME) && ((GetEnvelopePtr()->dwFlags & ENV_FILTER) == 0)) ? 32 : 0;
+
+ CScaleEnvPointsDlg dlg(this, GetEnvelopePtr(), nOffset);
+ if(dlg.DoModal())
{
pModDoc->SetModified();
pModDoc->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL);
@@ -2281,10 +2284,10 @@
{
INSTRUMENTENVELOPE *pEnv = GetEnvelopePtr();
if(pEnv == nullptr || !IsDragItemEnvPoint()) return;
- if(pEnv->Values[m_nDragItem - 1] <= 64 - stepsize)
+ if(pEnv->Values[m_nDragItem - 1] <= ENVELOPE_MAX - stepsize)
pEnv->Values[m_nDragItem - 1] += stepsize;
else
- pEnv->Values[m_nDragItem - 1] = 64;
+ pEnv->Values[m_nDragItem - 1] = ENVELOPE_MAX;
GetDocument()->SetModified(); // sanity checks are done in GetEnvelopePtr() already
InvalidateRect(NULL, FALSE);
@@ -2296,10 +2299,10 @@
{
INSTRUMENTENVELOPE *pEnv = GetEnvelopePtr();
if(pEnv == nullptr || !IsDragItemEnvPoint()) return;
- if(pEnv->Values[m_nDragItem - 1] >= stepsize)
+ if(pEnv->Values[m_nDragItem - 1] >= ENVELOPE_MIN + stepsize)
pEnv->Values[m_nDragItem - 1] -= stepsize;
else
- pEnv->Values[m_nDragItem - 1] = 0;
+ pEnv->Values[m_nDragItem - 1] = ENVELOPE_MIN;
GetDocument()->SetModified(); // sanity checks are done in GetEnvelopePtr() already
InvalidateRect(NULL, FALSE);
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2010-05-08 22:11:33 UTC (rev 590)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2010-05-09 22:04:33 UTC (rev 591)
@@ -2547,15 +2547,18 @@
LISTBOX IDC_LIST6,312,62,86,68,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
END
-IDD_SCALE_ENV_POINTS DIALOGEX 0, 0, 172, 47
+IDD_SCALE_ENV_POINTS DIALOGEX 0, 0, 172, 77
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Scale Envelope Points"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LTEXT "Scale envelope points by:",IDC_STATIC_SCALE_ENV,6,6,90,8
- EDITTEXT IDC_EDIT_FACTOR,6,18,90,13,ES_AUTOHSCROLL
- DEFPUSHBUTTON "OK",IDOK,114,6,50,14
- PUSHBUTTON "Cancel",IDCANCEL,114,24,50,14
+ EDITTEXT IDC_EDIT_FACTORX,126,6,36,13,ES_AUTOHSCROLL
+ EDITTEXT IDC_EDIT_FACTORY,126,24,36,13,ES_AUTOHSCROLL
+ DEFPUSHBUTTON "OK",IDOK,60,54,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,114,54,50,14
+ LTEXT "Scale envelope points (x axis) by:",IDC_STATIC,6,8,120,8
+ LTEXT "Scale envelope values (y axis) by:",IDC_STATIC,6,26,120,8
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,6,45,156,1
END
@@ -2629,7 +2632,7 @@
LEFTMARGIN, 2
RIGHTMARGIN, 165
TOPMARGIN, 6
- BOTTOMMARGIN, 43
+ BOTTOMMARGIN, 73
END
END
#endif // APSTUDIO_INVOKED
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2010-05-08 22:11:33 UTC (rev 590)
+++ trunk/OpenMPT/mptrack/resource.h 2010-05-09 22:04:33 UTC (rev 591)
@@ -783,7 +783,8 @@
#define IDC_GENMACROLABEL 2253
#define IDC_RENDERZONE 2254
#define IDC_PATTERN_LOOP 2255
-#define IDC_EDIT_FACTOR 2256
+#define IDC_EDIT_FACTORX 2256
+#define IDC_EDIT_FACTORY 2257
#define IDC_EDIT_ORDERLIST_MARGINS 2258
#define IDC_STATICRATIOMAP 2259
#define IDC_SPIN_ORDERLIST_MARGINS 2260
Modified: trunk/OpenMPT/soundlib/Dlsbank.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Dlsbank.cpp 2010-05-08 22:11:33 UTC (rev 590)
+++ trunk/OpenMPT/soundlib/Dlsbank.cpp 2010-05-09 22:04:33 UTC (rev 591)
@@ -1779,14 +1779,14 @@
pIns->VolEnv.Ticks[nPoint] = 0;
if (part->wVolAttack)
{
- pIns->VolEnv.Values[nPoint] = (BYTE)(64/(part->wVolAttack/2+2)+8);// /-----
- pIns->VolEnv.Ticks[nPoint+1] = part->wVolAttack; // |
+ pIns->VolEnv.Values[nPoint] = (BYTE)(ENVELOPE_MAX / (part->wVolAttack / 2 + 2) + 8); // /-----
+ pIns->VolEnv.Ticks[nPoint+1] = part->wVolAttack; // |
} else
{
- pIns->VolEnv.Values[nPoint] = 64; // |-----
- pIns->VolEnv.Ticks[nPoint+1] = 1; // |
+ pIns->VolEnv.Values[nPoint] = ENVELOPE_MAX; // |-----
+ pIns->VolEnv.Ticks[nPoint + 1] = 1; // |
}
- pIns->VolEnv.Values[nPoint+1] = 64;
+ pIns->VolEnv.Values[nPoint + 1] = ENVELOPE_MAX;
nPoint += 2;
// Hold section
// -> DLS Level 2
@@ -1870,12 +1870,12 @@
}
if (lReleaseTime < 1) lReleaseTime = 1;
pIns->VolEnv.Ticks[nPoint] = (WORD)(lStartTime + lReleaseTime);
- pIns->VolEnv.Values[nPoint] = 0;
+ pIns->VolEnv.Values[nPoint] = ENVELOPE_MIN;
nPoint++;
} else
{
pIns->VolEnv.Ticks[nPoint] = (BYTE)(pIns->VolEnv.Ticks[nPoint-1] + 1);
- pIns->VolEnv.Values[nPoint] = 0;
+ pIns->VolEnv.Values[nPoint] = ENVELOPE_MIN;
nPoint++;
}
pIns->VolEnv.nNodes = (BYTE)nPoint;
@@ -1889,13 +1889,13 @@
{
pIns->VolEnv.dwFlags |= ENV_ENABLED;
pIns->VolEnv.Ticks[0] = 0;
- pIns->VolEnv.Values[0] = 64;
+ pIns->VolEnv.Values[0] = ENVELOPE_MAX;
pIns->VolEnv.Ticks[1] = 5;
- pIns->VolEnv.Values[1] = 64;
+ pIns->VolEnv.Values[1] = ENVELOPE_MAX;
pIns->VolEnv.Ticks[2] = 10;
- pIns->VolEnv.Values[2] = 32;
+ pIns->VolEnv.Values[2] = ENVELOPE_MID;
pIns->VolEnv.Ticks[3] = 20; // 1 second max. for drums
- pIns->VolEnv.Values[3] = 0;
+ pIns->VolEnv.Values[3] = ENVELOPE_MIN;
pIns->VolEnv.nNodes = 4;
}
}
Modified: trunk/OpenMPT/soundlib/Load_imf.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_imf.cpp 2010-05-08 22:11:33 UTC (rev 590)
+++ trunk/OpenMPT/soundlib/Load_imf.cpp 2010-05-09 22:04:33 UTC (rev 591)
@@ -255,7 +255,7 @@
nTick = LittleEndianW(imfins->nodes[e][n].tick);
nValue = LittleEndianW(imfins->nodes[e][n].value) >> shift;
env->Ticks[n] = (WORD)max(min, nTick);
- env->Values[n] = (BYTE)min(nValue, 64);
+ env->Values[n] = (BYTE)min(nValue, ENVELOPE_MAX);
min = nTick + 1;
}
}
Modified: trunk/OpenMPT/soundlib/Load_mid.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mid.cpp 2010-05-08 22:11:33 UTC (rev 590)
+++ trunk/OpenMPT/soundlib/Load_mid.cpp 2010-05-09 22:04:33 UTC (rev 591)
@@ -443,13 +443,13 @@
if (nChannel != MIDI_DRUMCHANNEL) pIns->VolEnv.dwFlags |= ENV_SUSTAIN;
pIns->VolEnv.nNodes = 4;
pIns->VolEnv.Ticks[0] = 0;
- pIns->VolEnv.Values[0] = 64;
+ pIns->VolEnv.Values[0] = ENVELOPE_MAX;
pIns->VolEnv.Ticks[1] = 10;
- pIns->VolEnv.Values[1] = 64;
+ pIns->VolEnv.Values[1] = ENVELOPE_MAX;
pIns->VolEnv.Ticks[2] = 15;
- pIns->VolEnv.Values[2] = 48;
+ pIns->VolEnv.Values[2] = (ENVELOPE_MAX + ENVELOPE_MID) / 2;
pIns->VolEnv.Ticks[3] = 20;
- pIns->VolEnv.Values[3] = 0;
+ pIns->VolEnv.Values[3] = ENVELOPE_MIN;
pIns->VolEnv.nSustainStart = pIns->VolEnv.nSustainEnd = 1;
// Sample
Samples[m_nSamples].nPan = 128;
Modified: trunk/OpenMPT/soundlib/Snd_defs.h
===================================================================
--- trunk/OpenMPT/soundlib/Snd_defs.h 2010-05-08 22:11:33 UTC (rev 590)
+++ trunk/OpenMPT/soundlib/Snd_defs.h 2010-05-09 22:04:33 UTC (rev 591)
@@ -170,7 +170,12 @@
#define ENV_CARRY 0x08 // env carry
#define ENV_FILTER 0x10 // filter env enabled (this has to be combined with ENV_ENABLED in the pitch envelope's flags)
+// Envelope value boundaries
+#define ENVELOPE_MIN 0
+#define ENVELOPE_MID 32
+#define ENVELOPE_MAX 64
+
// Flags of 'dF..' datafield in extended instrument properties.
#define dFdd_VOLUME 0x0001
#define dFdd_VOLSUSTAIN 0x0002
@@ -338,8 +343,8 @@
#define SNDMIX_NOBACKWARDJUMPS 0x40000
#define SNDMIX_MAXDEFAULTPAN 0x80000 // Used by the MOD loader (currently unused)
#define SNDMIX_MUTECHNMODE 0x100000 // Notes are not played on muted channels
-#define SNDMIX_EMULATE_MIX_BUGS 0x200000 // rewbs.emulateMixBugs
+
#define MAX_GLOBAL_VOLUME 256
// Resampling modes
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-05-08 22:11:33 UTC (rev 590)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-05-09 22:04:33 UTC (rev 591)
@@ -119,7 +119,7 @@
CHAR name[32]; // Note: not guaranteed to be null-terminated.
CHAR filename[32];
- BYTE nMixPlug; //rewbs.instroVSTi
+ PLUGINDEX nMixPlug; //rewbs.instroVSTi
// -> CODE#0027
// -> DESC="per-instrument volume ramping setup (refered as attack)"
USHORT nVolRamp;
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2010-05-08 22:11:33 UTC (rev 590)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2010-05-09 22:04:33 UTC (rev 591)
@@ -1298,12 +1298,12 @@
int x1, envpitch;
if (envpos >= x2)
{
- envpitch = (((int)pIns->PitchEnv.Values[pt]) - 32) * 8;
+ envpitch = (((int)pIns->PitchEnv.Values[pt]) - ENVELOPE_MID) * 8;
x1 = x2;
} else
if (pt)
{
- envpitch = (((int)pIns->PitchEnv.Values[pt-1]) - 32) * 8;
+ envpitch = (((int)pIns->PitchEnv.Values[pt-1]) - ENVELOPE_MID) * 8;
x1 = pIns->PitchEnv.Ticks[pt-1];
} else
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-08 22:11:39
|
Revision: 590
http://modplug.svn.sourceforge.net/modplug/?rev=590&view=rev
Author: saga-games
Date: 2010-05-08 22:11:33 +0000 (Sat, 08 May 2010)
Log Message:
-----------
[Mod] Added some more examples to the (still unfunctional) sample generator.
[Ref] Small changes to the code from the last revision. Forgot to mention that this code was actually by coda, so thanks!
Modified Paths:
--------------
trunk/OpenMPT/mptrack/SampleGenerator.cpp
trunk/OpenMPT/mptrack/View_gen.cpp
Modified: trunk/OpenMPT/mptrack/SampleGenerator.cpp
===================================================================
--- trunk/OpenMPT/mptrack/SampleGenerator.cpp 2010-05-08 16:57:45 UTC (rev 589)
+++ trunk/OpenMPT/mptrack/SampleGenerator.cpp 2010-05-08 22:11:33 UTC (rev 590)
@@ -596,6 +596,10 @@
preset.expression = "sin(xp * _pi / 50 * 440 * len / freq)";
presets.AddPreset(preset);
+ preset.description = "Brown Noise (kind of)";
+ preset.expression = "rnd(1) * 0.1 + smp(x - 1) * 0.9";
+ presets.AddPreset(preset);
+
preset.description = "Noisy Saw";
preset.expression = "(x mod 800) / 800 - 0.5 + rnd (0.1)";
presets.AddPreset(preset);
@@ -618,10 +622,15 @@
preset.description = "Laser";
preset.expression = "sin(xp * _pi * 100 /(xp ^ 2)) * 100 / sqrt(xp)";
+ presets.AddPreset(preset);
+ preset.description = "Noisy Laser Hit";
+ preset.expression = "(sin(sqrt(xp) * 100) + rnd(1) - 0.5) * exp(-xp / 10)";
presets.AddPreset(preset);
+
preset.description = "Twinkle, Twinkle...";
preset.expression = "sin(xp * _pi * 100 / xp) * 100 / sqrt(xp)";
+ presets.AddPreset(preset);
preset.description = "FM Tom";
preset.expression = "sin(xp * _pi * 2 + (xp / 5 - 50) ^ 2) * exp(-xp / 10)";
@@ -630,6 +639,11 @@
preset.description = "FM Warp";
preset.expression = "sin(_pi * xp / 2 * (1 + (1 + sin(_pi * xp / 4 * 50)) / 4)) * exp(-(xp / 8) * .6)";
presets.AddPreset(preset);
+
+ preset.description = "Weird Noise";
+ preset.expression = "rnd(1) * 0.1 + smp(x - rnd(xp)) * 0.9";
+ presets.AddPreset(preset);
+
}
Modified: trunk/OpenMPT/mptrack/View_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_gen.cpp 2010-05-08 16:57:45 UTC (rev 589)
+++ trunk/OpenMPT/mptrack/View_gen.cpp 2010-05-08 22:11:33 UTC (rev 590)
@@ -1485,26 +1485,28 @@
}
+// This is used for retrieving the correct background colour for the
+// frames on the general tab when using WinXP Luna or Vista/Win7 Aero.
typedef HRESULT (__stdcall * ETDT)(HWND, DWORD);
HBRUSH CViewGlobals::OnCtlColor(CDC *pDC, CWnd* pWnd, UINT nCtlColor)
//-------------------------------------------------------------------
{
static bool bUxInited = false;
- static ETDT m_ETDT = nullptr;
+ static ETDT hETDT = NULL;
if(!bUxInited)
{
HMODULE uxlib = LoadLibrary("uxtheme.dll");
if(uxlib)
- m_ETDT = (ETDT)GetProcAddress(uxlib, "EnableThemeDialogTexture");
+ hETDT = (ETDT)GetProcAddress(uxlib, "EnableThemeDialogTexture");
bUxInited = true;
}
switch(nCtlColor)
{
case CTLCOLOR_DLG:
- if(m_ETDT)
- m_ETDT(*pWnd, ETDT_ENABLETAB);
+ if(hETDT)
+ hETDT(*pWnd, ETDT_ENABLETAB);
}
return CFormView::OnCtlColor(pDC, pWnd, nCtlColor);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-08 16:57:54
|
Revision: 589
http://modplug.svn.sourceforge.net/modplug/?rev=589&view=rev
Author: saga-games
Date: 2010-05-08 16:57:45 +0000 (Sat, 08 May 2010)
Log Message:
-----------
[Fix] General Tab: The background colour of the tabs in the channel configuration is now also correct when using WinXP Luna or Vista/Win7 Aero.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_gen.cpp
trunk/OpenMPT/mptrack/View_gen.h
Modified: trunk/OpenMPT/mptrack/View_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_gen.cpp 2010-05-08 15:35:40 UTC (rev 588)
+++ trunk/OpenMPT/mptrack/View_gen.cpp 2010-05-08 16:57:45 UTC (rev 589)
@@ -23,6 +23,7 @@
ON_WM_HSCROLL()
ON_WM_VSCROLL()
ON_WM_DESTROY()
+ ON_WM_CTLCOLOR()
// -> CODE#0015
// -> DESC="channels management dlg"
@@ -1483,3 +1484,27 @@
AfxMessageBox("Not yet implemented.");
}
+
+typedef HRESULT (__stdcall * ETDT)(HWND, DWORD);
+
+HBRUSH CViewGlobals::OnCtlColor(CDC *pDC, CWnd* pWnd, UINT nCtlColor)
+//-------------------------------------------------------------------
+{
+ static bool bUxInited = false;
+ static ETDT m_ETDT = nullptr;
+
+ if(!bUxInited)
+ {
+ HMODULE uxlib = LoadLibrary("uxtheme.dll");
+ if(uxlib)
+ m_ETDT = (ETDT)GetProcAddress(uxlib, "EnableThemeDialogTexture");
+ bUxInited = true;
+ }
+ switch(nCtlColor)
+ {
+ case CTLCOLOR_DLG:
+ if(m_ETDT)
+ m_ETDT(*pWnd, ETDT_ENABLETAB);
+ }
+ return CFormView::OnCtlColor(pDC, pWnd, nCtlColor);
+}
Modified: trunk/OpenMPT/mptrack/View_gen.h
===================================================================
--- trunk/OpenMPT/mptrack/View_gen.h 2010-05-08 15:35:40 UTC (rev 588)
+++ trunk/OpenMPT/mptrack/View_gen.h 2010-05-08 16:57:45 UTC (rev 589)
@@ -68,7 +68,9 @@
virtual void UpdateView(DWORD dwHintMask=0, CObject *pObj=NULL);
virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
virtual LRESULT OnModViewMsg(WPARAM, LPARAM);
-// -> CODE#0015
+ virtual HBRUSH OnCtlColor(CDC *pDC, CWnd* pWnd, UINT nCtlColor);
+
+ // -> CODE#0015
// -> DESC="channels management dlg"
virtual void OnDraw(CDC* pDC);
// -! NEW_FEATURE#0015
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-08 15:35:46
|
Revision: 588
http://modplug.svn.sourceforge.net/modplug/?rev=588&view=rev
Author: saga-games
Date: 2010-05-08 15:35:40 +0000 (Sat, 08 May 2010)
Log Message:
-----------
[Fix] Instrument Editor: New instruments are now assigning samples properly again (forgot to commit ctrl_ins in rev. 586)
[Imp] Further improvments to automatic instrument creation.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
trunk/OpenMPT/mptrack/AbstractVstEditor.h
trunk/OpenMPT/mptrack/CleanupSong.cpp
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2010-05-07 21:36:23 UTC (rev 587)
+++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2010-05-08 15:35:40 UTC (rev 588)
@@ -320,32 +320,23 @@
case kcVSTGUIToggleSendKeysToPlug: OnPassKeypressesToPlug(); return wParam;
case kcVSTGUIBypassPlug: OnBypassPlug(); return wParam;
}
- if (wParam>=kcVSTGUIStartNotes && wParam<=kcVSTGUIEndNotes)
+ if (wParam >= kcVSTGUIStartNotes && wParam <= kcVSTGUIEndNotes)
{
- if (!CheckInstrument(m_nInstrument)) {
- m_nInstrument = GetBestInstrumentCandidate();
- }
-
- if(QueryAddInstrumentIfNeeded())
+ if(ValidateCurrentInstrument())
{
CModDoc* pModDoc = m_pVstPlugin->GetModDoc();
CMainFrame* pMainFrm = CMainFrame::GetMainFrame();
- pModDoc->PlayNote(wParam-kcVSTGUIStartNotes+1+pMainFrm->GetBaseOctave()*12, m_nInstrument, 0, FALSE);
+ pModDoc->PlayNote(wParam - kcVSTGUIStartNotes + 1 + pMainFrm->GetBaseOctave() * 12, m_nInstrument, 0, FALSE);
}
return wParam;
}
- if (wParam>=kcVSTGUIStartNoteStops && wParam<=kcVSTGUIEndNoteStops)
+ if (wParam >= kcVSTGUIStartNoteStops && wParam <= kcVSTGUIEndNoteStops)
{
- if (!CheckInstrument(m_nInstrument))
+ if(ValidateCurrentInstrument())
{
- m_nInstrument = GetBestInstrumentCandidate();
- }
-
- if(QueryAddInstrumentIfNeeded())
- {
CModDoc* pModDoc = m_pVstPlugin->GetModDoc();
CMainFrame* pMainFrm = CMainFrame::GetMainFrame();
- pModDoc->NoteOff(wParam-kcVSTGUIStartNoteStops+1+pMainFrm->GetBaseOctave()*12, FALSE, m_nInstrument);
+ pModDoc->NoteOff(wParam - kcVSTGUIStartNoteStops + 1 + pMainFrm->GetBaseOctave() * 12, FALSE, m_nInstrument);
}
return wParam;
}
@@ -354,17 +345,20 @@
}
-// Weird name! :-P
// When trying to play a note using this plugin, but no instrument is assigned to it,
// the user is asked whether a new instrument should be added.
-bool CAbstractVstEditor::QueryAddInstrumentIfNeeded()
-//---------------------------------------------------
+bool CAbstractVstEditor::ValidateCurrentInstrument()
+//--------------------------------------------------
{
- //only send warning if plug is able to process notes.
+ if (!CheckInstrument(m_nInstrument))
+ m_nInstrument = GetBestInstrumentCandidate();
+
+ //only show messagebox if plug is able to process notes.
if(m_nInstrument < 0 && m_pVstPlugin->CanRecieveMidiEvents())
{
CModDoc *pModDoc = m_pVstPlugin->GetModDoc();
- if(!pModDoc || !pModDoc->GetSoundFile())
+ CSoundFile *pSndFile = m_pVstPlugin->GetSoundFile();
+ if(!pModDoc || !pSndFile)
return false;
if(pModDoc->GetSoundFile()->GetModSpecifications().instrumentsMax == 0 ||
@@ -374,20 +368,25 @@
} else
{
// try to set up a new instrument
+ bool bFirst = (pSndFile->GetNumInstruments() == 0);
INSTRUMENTINDEX nIns = pModDoc->InsertInstrument(0);
if(nIns == INSTRUMENTINDEX_INVALID)
return false;
- MODINSTRUMENT *pIns = pModDoc->GetSoundFile()->Instruments[nIns];
+ MODINSTRUMENT *pIns = pSndFile->Instruments[nIns];
m_nInstrument = nIns;
- _snprintf(pIns->name, ARRAYELEMCOUNT(pIns->name) - 1, _T("%d: %s"), m_pVstPlugin->GetSlot() + 1, pModDoc->GetSoundFile()->m_MixPlugins[m_pVstPlugin->GetSlot()].Info.szName);
- _snprintf(pIns->filename, ARRAYELEMCOUNT(pIns->filename) - 1, _T("FX %d"), m_pVstPlugin->GetSlot() + 1);
- pIns->nMixPlug = m_pVstPlugin->GetSlot() + 1;
+ _snprintf(pIns->name, ARRAYELEMCOUNT(pIns->name) - 1, _T("%d: %s"), m_pVstPlugin->GetSlot() + 1, pSndFile->m_MixPlugins[m_pVstPlugin->GetSlot()].Info.szName);
+ strncpy(pIns->filename, pSndFile->m_MixPlugins[m_pVstPlugin->GetSlot()].Info.szLibraryName, ARRAYELEMCOUNT(pIns->filename) - 1);
+ pIns->nMixPlug = (PLUGINDEX)m_pVstPlugin->GetSlot() + 1;
pIns->nMidiChannel = 1;
- pIns->wMidiBank = (m_pVstPlugin->GetCurrentProgram() >> 7) + 1;
- pIns->nMidiProgram = (m_pVstPlugin->GetCurrentProgram() & 0x7F) + 1;
+ pIns->wMidiBank = (WORD)((m_pVstPlugin->GetCurrentProgram() >> 7) + 1);
+ pIns->nMidiProgram = (BYTE)((m_pVstPlugin->GetCurrentProgram() & 0x7F) + 1);
+ pModDoc->UpdateAllViews(NULL, (nIns << HINT_SHIFT_INS) | HINT_INSTRUMENT | HINT_INSNAMES | HINT_ENVELOPE | (bFirst ? HINT_MODTYPE : 0));
+ if(pSndFile->GetModSpecifications().supportsPlugins)
+ pModDoc->SetModified();
+
return true;
}
} else
@@ -558,9 +557,9 @@
pInfoMenu->InsertMenu(1, MF_BYPOSITION|MF_POPUP, (UINT)m_pOutputMenu->m_hMenu, "Ou&tputs");
}
-void CAbstractVstEditor::UpdateMacroMenu() {
-//------------------------------------------
-
+void CAbstractVstEditor::UpdateMacroMenu()
+//----------------------------------------
+{
CString label, macroName, macroText;
char paramName[128];
bool greyed;
@@ -697,7 +696,8 @@
//Then just take the first instrument that points to this plug..
CArray<UINT, UINT> plugInstrumentList;
m_pVstPlugin->GetInputInstrumentList(plugInstrumentList);
- if (plugInstrumentList.GetSize()) {
+ if (plugInstrumentList.GetSize())
+ {
return plugInstrumentList[0];
}
Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.h
===================================================================
--- trunk/OpenMPT/mptrack/AbstractVstEditor.h 2010-05-07 21:36:23 UTC (rev 587)
+++ trunk/OpenMPT/mptrack/AbstractVstEditor.h 2010-05-08 15:35:40 UTC (rev 588)
@@ -64,7 +64,7 @@
void UpdateOptionsMenu();
int GetBestInstrumentCandidate();
bool CheckInstrument(int instrument);
- bool QueryAddInstrumentIfNeeded();
+ bool ValidateCurrentInstrument();
int m_nInstrument;
int m_nLearnMacro;
Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CleanupSong.cpp 2010-05-07 21:36:23 UTC (rev 587)
+++ trunk/OpenMPT/mptrack/CleanupSong.cpp 2010-05-08 15:35:40 UTC (rev 588)
@@ -330,7 +330,7 @@
else
{
::MultiByteToWideChar(CP_ACP , 0, strTipText, strTipText.GetLength() + 1,
- pTTTW->szText, sizeof(pTTTW->szText)/(sizeof pTTTW->szText[0]));
+ pTTTW->szText, ARRAYELEMCOUNT(pTTTW->szText));
}
return TRUE;
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2010-05-07 21:36:23 UTC (rev 587)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2010-05-08 15:35:40 UTC (rev 588)
@@ -1546,8 +1546,8 @@
OnInstrumentDuplicate();
return;
}
- BOOL bFirst = (pSndFile->m_nInstruments) ? FALSE : TRUE;
- LONG ins = m_pModDoc->InsertInstrument(0);
+ bool bFirst = (pSndFile->GetNumInstruments() == 0);
+ LONG ins = m_pModDoc->InsertInstrument();
if (ins != INSTRUMENTINDEX_INVALID)
{
SetCurrentInstrument(ins);
@@ -1569,7 +1569,7 @@
if ((pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (pSndFile->m_nInstruments > 0))
{
BOOL bFirst = (pSndFile->m_nInstruments) ? FALSE : TRUE;
- LONG ins = m_pModDoc->InsertInstrument(0, m_nInstrument);
+ LONG ins = m_pModDoc->InsertInstrument(INSTRUMENTINDEX_INVALID, m_nInstrument);
if (ins != INSTRUMENTINDEX_INVALID)
{
SetCurrentInstrument(ins);
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-05-07 21:36:23 UTC (rev 587)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-05-08 15:35:40 UTC (rev 588)
@@ -546,7 +546,7 @@
strTipText = "Gxx and Exx/Fxx won't share effect memory. Gxx resets instrument envelopes.";
break;
case IDC_CHECK5:
- strTipText = "The resonant filter's frequency range is incresed from about 4KHz to 10KHz";
+ strTipText = "The resonant filter's frequency range is incresed from about 4KHz to 10KHz.";
break;
case IDC_CHECK6:
strTipText = "The instrument settings of the external ITI files will be ignored.";
@@ -569,7 +569,7 @@
else
{
::MultiByteToWideChar(CP_ACP , 0, strTipText, strTipText.GetLength() + 1,
- pTTTW->szText, sizeof(pTTTW->szText)/(sizeof pTTTW->szText[0]));
+ pTTTW->szText, ARRAYELEMCOUNT(pTTTW->szText));
}
return TRUE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-07 21:36:30
|
Revision: 587
http://modplug.svn.sourceforge.net/modplug/?rev=587&view=rev
Author: saga-games
Date: 2010-05-07 21:36:23 +0000 (Fri, 07 May 2010)
Log Message:
-----------
[Imp] Song Properties: Tooltips are shown for various controls.
[Ref] Added some security checks to tooltip code in the song cleanup dialog, to prevent too long tooltips.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CleanupSong.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
trunk/OpenMPT/mptrack/mptrack.rc
Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CleanupSong.cpp 2010-05-07 18:23:18 UTC (rev 586)
+++ trunk/OpenMPT/mptrack/CleanupSong.cpp 2010-05-07 21:36:23 UTC (rev 587)
@@ -325,7 +325,7 @@
{
//strncpy_s(pTTTA->szText, sizeof(pTTTA->szText), strTipText,
// strTipText.GetLength() + 1);
- strncpy(pTTTA->szText, strTipText, strTipText.GetLength() + 1);
+ strncpy(pTTTA->szText, strTipText, min(strTipText.GetLength() + 1, ARRAYELEMCOUNT(pTTTA->szText) - 1));
}
else
{
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-05-07 18:23:18 UTC (rev 586)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-05-07 21:36:23 UTC (rev 587)
@@ -105,7 +105,12 @@
ON_COMMAND(IDC_CHECK_PT1X, OnCheckPT1x)
ON_CBN_SELCHANGE(IDC_COMBO1,UpdateDialog)
// -! NEW_FEATURE#0023
+
+ ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, &CModTypeDlg::OnToolTipNotify)
+ ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, &CModTypeDlg::OnToolTipNotify)
+
//}}AFX_MSG_MAP
+
END_MESSAGE_MAP()
@@ -116,8 +121,8 @@
//{{AFX_DATA_MAP(CModTypeDlg)
DDX_Control(pDX, IDC_COMBO1, m_TypeBox);
DDX_Control(pDX, IDC_COMBO2, m_ChannelsBox);
- DDX_Control(pDX, IDC_COMBO_TEMPOMODE, m_TempoModeBox);
- DDX_Control(pDX, IDC_COMBO_MIXLEVELS, m_PlugMixBox);
+ DDX_Control(pDX, IDC_COMBO_TEMPOMODE, m_TempoModeBox);
+ DDX_Control(pDX, IDC_COMBO_MIXLEVELS, m_PlugMixBox);
DDX_Control(pDX, IDC_CHECK1, m_CheckBox1);
DDX_Control(pDX, IDC_CHECK2, m_CheckBox2);
DDX_Control(pDX, IDC_CHECK3, m_CheckBox3);
@@ -158,18 +163,12 @@
case MOD_TYPE_XM: m_TypeBox.SetCurSel(2); break;
// -> CODE#0023
// -> DESC="IT project files (.itp)"
-// case MOD_TYPE_IT: m_TypeBox.SetCurSel(3); break;
case MOD_TYPE_IT: m_TypeBox.SetCurSel(m_pSndFile->m_dwSongFlags & SONG_ITPROJECT ? 4 : 3); break;
+// -! NEW_FEATURE#0023
case MOD_TYPE_MPT: m_TypeBox.SetCurSel(5); break;
-// -! NEW_FEATURE#0023
default: m_TypeBox.SetCurSel(0); break;
}
-// -> CODE#0006
-// -> DESC="misc quantity changes"
-// for (int i=4; i<=64; i++)
-// for (int i=4; i<=MAX_BASECHANNELS; i++)
-// -! BEHAVIOUR_CHANGE#0006
UpdateChannelCBox();
m_TempoModeBox.SetItemData(m_TempoModeBox.AddString("Classic"), tempo_mode_classic);
@@ -192,8 +191,8 @@
{
//case mixLevels_Test: m_PlugMixBox.SetCurSel(4); break;
case mixLevels_original: m_PlugMixBox.SetCurSel(3); break;
- case mixLevels_117RC1: m_PlugMixBox.SetCurSel(2); break;
- case mixLevels_117RC2: m_PlugMixBox.SetCurSel(1); break;
+ case mixLevels_117RC1: m_PlugMixBox.SetCurSel(2); break;
+ case mixLevels_117RC2: m_PlugMixBox.SetCurSel(1); break;
case mixLevels_117RC3:
default: m_PlugMixBox.SetCurSel(0); break;
}
@@ -207,6 +206,8 @@
m_EditFlag.SetLimitText(16);
UpdateDialog();
+
+ EnableToolTips(TRUE);
return TRUE;
}
@@ -216,8 +217,8 @@
{
const MODTYPE type = m_TypeBox.GetItemData(m_TypeBox.GetCurSel());
CHANNELINDEX currChanSel = m_ChannelsBox.GetItemData(m_ChannelsBox.GetCurSel());
- const CHANNELINDEX minChans = m_pSndFile->GetModSpecifications(type).channelsMin;
- const CHANNELINDEX maxChans = m_pSndFile->GetModSpecifications(type).channelsMax;
+ const CHANNELINDEX minChans = CSoundFile::GetModSpecifications(type).channelsMin;
+ const CHANNELINDEX maxChans = CSoundFile::GetModSpecifications(type).channelsMax;
if(m_ChannelsBox.GetCount() < 1
||
m_ChannelsBox.GetItemData(0) != minChans
@@ -408,7 +409,7 @@
}
-BOOL CModTypeDlg::VerifyData()
+bool CModTypeDlg::VerifyData()
//----------------------------
{
@@ -418,7 +419,7 @@
{
::AfxMessageBox("Error: Rows per measure must be greater than rows per beat.", MB_OK|MB_ICONEXCLAMATION);
GetDlgItem(IDC_ROWSPERMEASURE)->SetFocus();
- return FALSE;
+ return false;
}
int sel = m_ChannelsBox.GetItemData(m_ChannelsBox.GetCurSel());
@@ -426,7 +427,8 @@
CHANNELINDEX maxChans = CSoundFile::GetModSpecifications(type).channelsMax;
- if (sel > maxChans) {
+ if (sel > maxChans)
+ {
CString error;
error.Format("Error: Max number of channels for this type is %d", maxChans);
::AfxMessageBox(error, MB_OK|MB_ICONEXCLAMATION);
@@ -436,18 +438,17 @@
if(maxChans < m_pSndFile->GetNumChannels())
{
if(MessageBox("New modtype supports less channels than currently used, and reducing channel number is required. Continue?", "", MB_OKCANCEL) != IDOK)
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void CModTypeDlg::OnOK()
//----------------------
{
- if (!VerifyData()) {
+ if (!VerifyData())
return;
- }
int sel = m_TypeBox.GetCurSel();
if (sel >= 0)
@@ -455,7 +456,8 @@
m_nType = m_TypeBox.GetItemData(sel);
// -> CODE#0023
// -> DESC="IT project files (.itp)"
- if(m_pSndFile->m_dwSongFlags & SONG_ITPROJECT && sel != 4){
+ if(m_pSndFile->m_dwSongFlags & SONG_ITPROJECT && sel != 4)
+ {
m_pSndFile->m_dwSongFlags &= ~SONG_ITPROJECT;
m_pSndFile->m_dwSongFlags &= ~SONG_ITPEMBEDIH;
}
@@ -511,6 +513,69 @@
}
+BOOL CModTypeDlg::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult)
+//-------------------------------------------------------------------------
+{
+ UNREFERENCED_PARAMETER(id);
+ UNREFERENCED_PARAMETER(pResult);
+
+ // need to handle both ANSI and UNICODE versions of the message
+ TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR;
+ TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;
+ CStringA strTipText = "";
+ UINT_PTR nID = pNMHDR->idFrom;
+ if (pNMHDR->code == TTN_NEEDTEXTA && (pTTTA->uFlags & TTF_IDISHWND) ||
+ pNMHDR->code == TTN_NEEDTEXTW && (pTTTW->uFlags & TTF_IDISHWND))
+ {
+ // idFrom is actually the HWND of the tool
+ nID = ::GetDlgCtrlID((HWND)nID);
+ }
+
+ switch(nID)
+ {
+ case IDC_CHECK1:
+ strTipText = "Note slides always slide the same amount, not depending on the sample frequency.";
+ break;
+ case IDC_CHECK2:
+ strTipText = "Old ScreamTracker 3 volume slide behaviour (not recommended).";
+ break;
+ case IDC_CHECK3:
+ strTipText = "Play some effects like in early versions of Impulse Tracker (not recommended).";
+ break;
+ case IDC_CHECK4:
+ strTipText = "Gxx and Exx/Fxx won't share effect memory. Gxx resets instrument envelopes.";
+ break;
+ case IDC_CHECK5:
+ strTipText = "The resonant filter's frequency range is incresed from about 4KHz to 10KHz";
+ break;
+ case IDC_CHECK6:
+ strTipText = "The instrument settings of the external ITI files will be ignored.";
+ break;
+ case IDC_CHECK_PT1X:
+ strTipText = "Ignore pan fx, use on-the-fly sample swapping, enforce Amiga frequency limits.";
+ break;
+ case IDC_COMBO_MIXLEVELS:
+ strTipText = "Mixing method of sample and VST levels.";
+ break;
+ }
+
+ if (pNMHDR->code == TTN_NEEDTEXTA)
+ {
+ //strncpy_s(pTTTA->szText, sizeof(pTTTA->szText), strTipText,
+ // strTipText.GetLength() + 1);
+ // 80 chars max?!
+ strncpy(pTTTA->szText, strTipText, min(strTipText.GetLength() + 1, ARRAYELEMCOUNT(pTTTA->szText) - 1));
+ }
+ else
+ {
+ ::MultiByteToWideChar(CP_ACP , 0, strTipText, strTipText.GetLength() + 1,
+ pTTTW->szText, sizeof(pTTTW->szText)/(sizeof pTTTW->szText[0]));
+ }
+
+ return TRUE;
+}
+
+
//////////////////////////////////////////////////////////////////////////////
// CShowLogDlg
Modified: trunk/OpenMPT/mptrack/dlg_misc.h
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.h 2010-05-07 18:23:18 UTC (rev 586)
+++ trunk/OpenMPT/mptrack/dlg_misc.h 2010-05-07 21:36:23 UTC (rev 587)
@@ -14,7 +14,8 @@
CButton m_CheckBox1, m_CheckBox2, m_CheckBox3, m_CheckBox4, m_CheckBox5, m_CheckBoxPT1x;
CEdit m_EditFlag;
CSoundFile *m_pSndFile;
- UINT m_nChannels, m_nType;
+ UINT m_nChannels;
+ MODTYPE m_nType;
DWORD m_dwSongFlags;
// -> CODE#0023
@@ -25,8 +26,8 @@
CButton m_CheckBoxITCompatiblePlay;
public:
- CModTypeDlg(CSoundFile *pSndFile, CWnd *parent):CDialog(IDD_MODDOC_MODTYPE, parent) { m_pSndFile = pSndFile; m_nType = m_nChannels = 0; }
- BOOL VerifyData();
+ CModTypeDlg(CSoundFile *pSndFile, CWnd *parent):CDialog(IDD_MODDOC_MODTYPE, parent) { m_pSndFile = pSndFile; m_nType = MOD_TYPE_NONE; m_nChannels = 0; }
+ bool VerifyData();
void UpdateDialog();
private:
@@ -40,6 +41,9 @@
virtual void OnCancel();
//}}AFX_VIRTUAL
+
+ BOOL OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult);
+
//{{AFX_MSG(CModTypeDlg)
afx_msg void OnCheck1();
afx_msg void OnCheck2();
@@ -565,7 +569,7 @@
//=========================================
{
protected:
- CComboBox m_CbnSplitInstrument,m_CbnSplitNote,m_CbnOctaveModifier,m_CbnSplitVolume;
+ CComboBox m_CbnSplitInstrument, m_CbnSplitNote, m_CbnOctaveModifier, m_CbnSplitVolume;
CSoundFile *m_pSndFile;
public:
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2010-05-07 18:23:18 UTC (rev 586)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2010-05-07 21:36:23 UTC (rev 587)
@@ -13,7 +13,7 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// German (Germany) resources
+// Deutsch (Deutschland) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
#ifdef _WIN32
@@ -207,12 +207,12 @@
END
#endif // APSTUDIO_INVOKED
-#endif // German (Germany) resources
+#endif // Deutsch (Deutschland) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// Englisch (USA) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
@@ -239,7 +239,7 @@
END
IDD_OPTIONS_PLAYER DIALOGEX 0, 0, 272, 279
-STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD | WS_DISABLED | WS_CAPTION
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Player"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
@@ -278,7 +278,7 @@
EDITTEXT IDC_WFIRCUTOFF,156,216,24,14,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "%",IDC_STATIC,186,219,8,8
LTEXT "Sample ramping (click avoidance):",IDC_STATIC,18,238,109,8
- LTEXT "(can be overridden by instrument setting)",IDC_STATIC,18,248,128,8
+ LTEXT "(can be overridden by instrument setting)",IDC_STATIC,18,248,138,8
EDITTEXT IDC_RAMPING,156,235,24,14,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "Samples",IDC_STATIC,182,238,29,8
PUSHBUTTON "Default Settings",IDC_BUTTON_DEFAULT_RESAMPLING,186,180,66,12
@@ -579,7 +579,7 @@
PUSHBUTTON "...",IDC_BUTTON2,502,51,13,13,NOT WS_VISIBLE,WS_EX_CLIENTEDGE
RTEXT "Sample",IDC_STATIC,62,8,24,8
CTEXT "Length: 000000 (16-bit)",IDC_TEXT5,175,6,90,13,SS_CENTERIMAGE,WS_EX_STATICEDGE
- CONTROL "Toolbar2",IDC_TOOLBAR2,"ToolbarWindow32",WS_GROUP | 0x4d,268,4,186,17
+ CONTROL "Toolbar2",IDC_TOOLBAR2,"ToolbarWindow32",WS_GROUP | 0x4d,268,4,252,17
GROUPBOX "",IDC_STATIC,3,22,94,78
LTEXT "Default Volume",IDC_STATIC,8,32,49,8
LTEXT "Global Volume",IDC_STATIC,8,45,46,8
@@ -693,41 +693,41 @@
END
IDD_MODDOC_MODTYPE DIALOGEX 0, 0, 262, 317
-STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Song Properties"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON "OK",IDOK,204,6,50,14
PUSHBUTTON "Cancel",IDCANCEL,204,24,50,14
- GROUPBOX "Type",IDC_FRAME_MODTYPE,6,6,192,48
COMBOBOX IDC_COMBO1,12,18,108,51,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COMBO2,126,18,66,77,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "Embed instrument parameters in ITP",IDC_CHECK6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,36,126,8
- GROUPBOX "Playback",IDC_FRAME_MODFLAGS,6,60,246,54
+ CONTROL "Embed instrument parameters in ITP",IDC_CHECK6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,36,174,8
CONTROL "Linear Frequency Slides",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,72,91,10
+ CONTROL "Old Effects (IT)",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,72,66,10
CONTROL "Fast Volume Slides (S3M)",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,84,96,10
+ CONTROL "Compatible Gxx (IT)",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,84,84,10
CONTROL "Extended filter range",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,96,81,10
- CONTROL "Old Effects (IT)",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,72,66,10
- CONTROL "Compatible Gxx (IT)",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,84,84,10
- GROUPBOX "Extended Playback Options (OpenMPT only)",IDC_FRAME_MPTEXT,6,120,246,84
+ CONTROL "ProTracker 1.x Mode (MOD)",IDC_CHECK_PT1X,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,96,108,10
RTEXT "Mix Levels:",IDC_TEXT_MIXMODE,18,134,81,8
COMBOBOX IDC_COMBO_MIXLEVELS,108,132,84,51,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Miscellaneous flags(0/1):",IDC_FLAGEDITTITLE,18,150,81,12,SS_CENTERIMAGE
EDITTEXT IDC_EDIT_FLAGS,108,150,84,12,ES_AUTOHSCROLL
- LTEXT "",IDC_FLAG_EXPLANATIONS,18,168,222,26
- GROUPBOX "OpenMPT Version Info",IDC_FRAME_MPTVERSION,6,263,246,48
+ COMBOBOX IDC_COMBO_TEMPOMODE,36,222,108,77,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_ROWSPERBEAT,156,222,24,12,ES_AUTOHSCROLL | ES_NUMBER
+ EDITTEXT IDC_ROWSPERMEASURE,156,240,24,12,ES_AUTOHSCROLL | ES_NUMBER
EDITTEXT IDC_EDIT_CREATEDWITH,78,276,166,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_STATICEDGE
EDITTEXT IDC_EDIT_SAVEDWITH,78,294,166,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_STATICEDGE
- RTEXT "IDC_TEXT_CREATEDWITH",IDC_TEXT_CREATEDWITH,18,278,54,8
- RTEXT "IDC_TEXT_SAVEDWITH",IDC_TEXT_SAVEDWITH,18,295,54,8
+ GROUPBOX "Type",IDC_FRAME_MODTYPE,6,6,192,48
+ GROUPBOX "Playback",IDC_FRAME_MODFLAGS,6,60,246,54
+ GROUPBOX "Extended Playback Options (OpenMPT only)",IDC_FRAME_MPTEXT,6,120,246,84
+ LTEXT "",IDC_FLAG_EXPLANATIONS,18,168,222,26
GROUPBOX "Tempo",IDC_FRAME_TEMPOMODE,6,210,246,48
LTEXT "Mode:",IDC_TEXT_TEMPOMODE,12,224,21,8
- COMBOBOX IDC_COMBO_TEMPOMODE,36,222,108,77,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- EDITTEXT IDC_ROWSPERBEAT,156,222,24,12,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "Rows/beat",IDC_TEXT_ROWSPERBEAT,186,224,36,8
- EDITTEXT IDC_ROWSPERMEASURE,156,240,24,12,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "Rows/measure",IDC_TEXT_ROWSPERMEASURE,186,242,49,8
- CONTROL "ProTracker 1.x Mode (MOD)",IDC_CHECK_PT1X,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,96,108,10
+ GROUPBOX "OpenMPT Version Info",IDC_FRAME_MPTVERSION,6,263,246,48
+ RTEXT "IDC_TEXT_CREATEDWITH",IDC_TEXT_CREATEDWITH,18,278,54,8
+ RTEXT "IDC_TEXT_SAVEDWITH",IDC_TEXT_SAVEDWITH,18,295,54,8
END
IDD_SHOWLOG DIALOG 0, 0, 300, 106
@@ -2378,12 +2378,12 @@
IDS_SOUNDTOUCH_LOADFAILURE "Unable to load OpenMPT_soundtouch_i16.dll."
END
-#endif // English (U.S.) resources
+#endif // Englisch (USA) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// English (U.K.) resources
+// Englisch (GB) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
#ifdef _WIN32
@@ -2752,7 +2752,7 @@
//
IDR_BUILTIN_TUNINGS TUNING "res\\built-inTunings.tc"
-#endif // English (U.K.) resources
+#endif // Englisch (GB) resources
/////////////////////////////////////////////////////////////////////////////
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-07 18:23:25
|
Revision: 586
http://modplug.svn.sourceforge.net/modplug/?rev=586&view=rev
Author: saga-games
Date: 2010-05-07 18:23:18 +0000 (Fri, 07 May 2010)
Log Message:
-----------
[Imp] Sample Editor: When enabling a sample loop and only parts of the sample are selected
[Imp] VST Editor: Instead of just saying the user that the plugin has to be assigned to an instrument to play notes, they are queried now whether they want to automatically add an instrument.
[Ref] Related code refactoring
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
trunk/OpenMPT/mptrack/AbstractVstEditor.h
trunk/OpenMPT/mptrack/Ctrl_smp.cpp
trunk/OpenMPT/mptrack/Moddoc.h
trunk/OpenMPT/mptrack/Modedit.cpp
Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2010-05-06 22:39:17 UTC (rev 585)
+++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2010-05-07 18:23:18 UTC (rev 586)
@@ -326,9 +326,8 @@
m_nInstrument = GetBestInstrumentCandidate();
}
- if (m_nInstrument<0 && m_pVstPlugin->CanRecieveMidiEvents()) { //only send warning if plug is able to process notes.
- AfxMessageBox("You need to assign an instrument to this plugin before you can play notes from here.");
- } else {
+ if(QueryAddInstrumentIfNeeded())
+ {
CModDoc* pModDoc = m_pVstPlugin->GetModDoc();
CMainFrame* pMainFrm = CMainFrame::GetMainFrame();
pModDoc->PlayNote(wParam-kcVSTGUIStartNotes+1+pMainFrm->GetBaseOctave()*12, m_nInstrument, 0, FALSE);
@@ -337,12 +336,13 @@
}
if (wParam>=kcVSTGUIStartNoteStops && wParam<=kcVSTGUIEndNoteStops)
{
- if (!CheckInstrument(m_nInstrument)) {
+ if (!CheckInstrument(m_nInstrument))
+ {
m_nInstrument = GetBestInstrumentCandidate();
}
- if (m_nInstrument<0 && m_pVstPlugin->CanRecieveMidiEvents()) { //only send warning if plug is able to process notes.
- AfxMessageBox("You need to assign an instrument to this plugin before you can play notes from here.");
- } else {
+
+ if(QueryAddInstrumentIfNeeded())
+ {
CModDoc* pModDoc = m_pVstPlugin->GetModDoc();
CMainFrame* pMainFrm = CMainFrame::GetMainFrame();
pModDoc->NoteOff(wParam-kcVSTGUIStartNoteStops+1+pMainFrm->GetBaseOctave()*12, FALSE, m_nInstrument);
@@ -353,6 +353,50 @@
return NULL;
}
+
+// Weird name! :-P
+// When trying to play a note using this plugin, but no instrument is assigned to it,
+// the user is asked whether a new instrument should be added.
+bool CAbstractVstEditor::QueryAddInstrumentIfNeeded()
+//---------------------------------------------------
+{
+ //only send warning if plug is able to process notes.
+ if(m_nInstrument < 0 && m_pVstPlugin->CanRecieveMidiEvents())
+ {
+ CModDoc *pModDoc = m_pVstPlugin->GetModDoc();
+ if(!pModDoc || !pModDoc->GetSoundFile())
+ return false;
+
+ if(pModDoc->GetSoundFile()->GetModSpecifications().instrumentsMax == 0 ||
+ AfxMessageBox(_T("You need to assign an instrument to this plugin before you can play notes from here.\nCreate a new instrument and assign this plugin to the instrument?"), MB_YESNO | MB_ICONQUESTION) == IDNO)
+ {
+ return false;
+ } else
+ {
+ // try to set up a new instrument
+ INSTRUMENTINDEX nIns = pModDoc->InsertInstrument(0);
+ if(nIns == INSTRUMENTINDEX_INVALID)
+ return false;
+
+ MODINSTRUMENT *pIns = pModDoc->GetSoundFile()->Instruments[nIns];
+ m_nInstrument = nIns;
+
+ _snprintf(pIns->name, ARRAYELEMCOUNT(pIns->name) - 1, _T("%d: %s"), m_pVstPlugin->GetSlot() + 1, pModDoc->GetSoundFile()->m_MixPlugins[m_pVstPlugin->GetSlot()].Info.szName);
+ _snprintf(pIns->filename, ARRAYELEMCOUNT(pIns->filename) - 1, _T("FX %d"), m_pVstPlugin->GetSlot() + 1);
+ pIns->nMixPlug = m_pVstPlugin->GetSlot() + 1;
+ pIns->nMidiChannel = 1;
+ pIns->wMidiBank = (m_pVstPlugin->GetCurrentProgram() >> 7) + 1;
+ pIns->nMidiProgram = (m_pVstPlugin->GetCurrentProgram() & 0x7F) + 1;
+
+ return true;
+ }
+ } else
+ {
+ return true;
+ }
+
+}
+
#define PRESETS_PER_COLUMN 32
#define PRESETS_PER_GROUP 128
Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.h
===================================================================
--- trunk/OpenMPT/mptrack/AbstractVstEditor.h 2010-05-06 22:39:17 UTC (rev 585)
+++ trunk/OpenMPT/mptrack/AbstractVstEditor.h 2010-05-07 18:23:18 UTC (rev 586)
@@ -64,6 +64,7 @@
void UpdateOptionsMenu();
int GetBestInstrumentCandidate();
bool CheckInstrument(int instrument);
+ bool QueryAddInstrumentIfNeeded();
int m_nInstrument;
int m_nLearnMacro;
@@ -71,6 +72,7 @@
void OnSetInputInstrument(UINT nID);
afx_msg void OnInitMenu(CMenu* pMenu);
void PrepareToLearnMacro(UINT nID);
+
};
//end rewbs.defaultPlugGUI
Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2010-05-06 22:39:17 UTC (rev 585)
+++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2010-05-07 18:23:18 UTC (rev 586)
@@ -2562,7 +2562,15 @@
// set loop points if theren't any
if(wasDisabled && ((pSmp->uFlags & CHN_LOOP) != 0) && (pSmp->nLoopStart == pSmp->nLoopEnd) && (pSmp->nLoopStart == 0))
{
- pSmp->nLoopEnd = pSmp->nLength;
+ SELECTIONPOINTS selection = GetSelectionPoints();
+ if(selection.bSelected)
+ {
+ pSmp->nLoopStart = selection.nStart;
+ pSmp->nLoopEnd = selection.nEnd;
+ } else
+ {
+ pSmp->nLoopEnd = pSmp->nLength;
+ }
m_pModDoc->UpdateAllViews(NULL, (m_nSample << HINT_SHIFT_SMP) | HINT_SAMPLEDATA | HINT_SAMPLEINFO, NULL);
}
m_pModDoc->AdjustEndOfSample(m_nSample);
@@ -2635,7 +2643,15 @@
// set sustain loop points if theren't any
if(wasDisabled && ((pSmp->uFlags & CHN_SUSTAINLOOP) != 0) && (pSmp->nSustainStart == pSmp->nSustainEnd) && (pSmp->nSustainStart == 0))
{
- pSmp->nSustainEnd = pSmp->nLength;
+ SELECTIONPOINTS selection = GetSelectionPoints();
+ if(selection.bSelected)
+ {
+ pSmp->nSustainStart = selection.nStart;
+ pSmp->nSustainEnd = selection.nEnd;
+ } else
+ {
+ pSmp->nSustainEnd = pSmp->nLength;
+ }
m_pModDoc->UpdateAllViews(NULL, (m_nSample << HINT_SHIFT_SMP) | HINT_SAMPLEDATA | HINT_SAMPLEINFO, NULL);
}
m_pModDoc->SetModified();
Modified: trunk/OpenMPT/mptrack/Moddoc.h
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.h 2010-05-06 22:39:17 UTC (rev 585)
+++ trunk/OpenMPT/mptrack/Moddoc.h 2010-05-07 18:23:18 UTC (rev 586)
@@ -226,7 +226,7 @@
PATTERNINDEX InsertPattern(ORDERINDEX nOrd = ORDERINDEX_INVALID, ROWINDEX nRows = 64);
SAMPLEINDEX InsertSample(bool bLimit = false);
- INSTRUMENTINDEX InsertInstrument(LONG lSample = 0, LONG lDuplicate = 0);
+ INSTRUMENTINDEX InsertInstrument(SAMPLEINDEX lSample = SAMPLEINDEX_INVALID, INSTRUMENTINDEX lDuplicate = INSTRUMENTINDEX_INVALID);
void InitializeInstrument(MODINSTRUMENT *pIns, UINT nsample=0);
bool RemoveOrder(SEQUENCEINDEX nSeq, ORDERINDEX nOrd);
bool RemovePattern(PATTERNINDEX nPat);
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2010-05-06 22:39:17 UTC (rev 585)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-05-07 18:23:18 UTC (rev 586)
@@ -732,15 +732,17 @@
}
-INSTRUMENTINDEX CModDoc::InsertInstrument(LONG lSample, LONG lDuplicate)
-//----------------------------------------------------------------------
+// Insert a new instrument assigned to sample nSample or duplicate instrument nDuplicate.
+// If nSample is invalid, an approriate sample slot is selected. 0 means "no sample".
+INSTRUMENTINDEX CModDoc::InsertInstrument(SAMPLEINDEX nSample, INSTRUMENTINDEX nDuplicate)
+//----------------------------------------------------------------------------------------
{
- MODINSTRUMENT *pDup = NULL;
- INSTRUMENTINDEX nInstrumentMax = m_SndFile.GetModSpecifications().instrumentsMax - 1;
+ MODINSTRUMENT *pDup = nullptr;
+ const INSTRUMENTINDEX nInstrumentMax = m_SndFile.GetModSpecifications().instrumentsMax - 1;
if ((m_SndFile.m_nType != MOD_TYPE_XM) && !(m_SndFile.m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))) return INSTRUMENTINDEX_INVALID;
- if ((lDuplicate > 0) && (lDuplicate <= (LONG)m_SndFile.m_nInstruments))
+ if ((nDuplicate > 0) && (nDuplicate <= m_SndFile.m_nInstruments))
{
- pDup = m_SndFile.Instruments[lDuplicate];
+ pDup = m_SndFile.Instruments[nDuplicate];
}
if ((!m_SndFile.m_nInstruments) && ((m_SndFile.m_nSamples > 1) || (m_SndFile.Samples[1].pSample)))
{
@@ -748,9 +750,9 @@
UINT n = CMainFrame::GetMainFrame()->MessageBox("Convert existing samples to instruments first?", NULL, MB_YESNOCANCEL|MB_ICONQUESTION);
if (n == IDYES)
{
- UINT nInstruments = m_SndFile.m_nSamples;
+ SAMPLEINDEX nInstruments = m_SndFile.m_nSamples;
if (nInstruments > nInstrumentMax) nInstruments = nInstrumentMax;
- for (UINT smp=1; smp<=nInstruments; smp++)
+ for (SAMPLEINDEX smp = 1; smp <= nInstruments; smp++)
{
m_SndFile.Samples[smp].uFlags &= ~CHN_MUTE;
if (!m_SndFile.Instruments[smp])
@@ -771,7 +773,7 @@
if (n != IDNO) return INSTRUMENTINDEX_INVALID;
}
UINT newins = 0;
- for (UINT i=1; i<=m_SndFile.m_nInstruments; i++)
+ for (INSTRUMENTINDEX i = 1; i <= m_SndFile.m_nInstruments; i++)
{
if (!m_SndFile.Instruments[i])
{
@@ -791,10 +793,10 @@
MODINSTRUMENT *pIns = new MODINSTRUMENT;
if (pIns)
{
- UINT newsmp = 0;
- if ((lSample > 0) && (lSample < m_SndFile.GetModSpecifications().samplesMax))
+ SAMPLEINDEX newsmp = 0;
+ if (nSample < m_SndFile.GetModSpecifications().samplesMax)
{
- newsmp = lSample;
+ newsmp = nSample;
} else
if (!pDup)
{
@@ -818,7 +820,7 @@
*pIns = *pDup;
// -> CODE#0023
// -> DESC="IT project files (.itp)"
- strcpy(m_SndFile.m_szInstrumentPath[newins-1],m_SndFile.m_szInstrumentPath[lDuplicate-1]);
+ strcpy(m_SndFile.m_szInstrumentPath[newins - 1], m_SndFile.m_szInstrumentPath[nDuplicate - 1]);
m_SndFile.instrumentModified[newins-1] = FALSE;
// -! NEW_FEATURE#0023
} else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-06 22:39:23
|
Revision: 585
http://modplug.svn.sourceforge.net/modplug/?rev=585&view=rev
Author: saga-games
Date: 2010-05-06 22:39:17 +0000 (Thu, 06 May 2010)
Log Message:
-----------
[Fix] IMF Loader: Some fixes copied from Schism (copied from MikMod)
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_imf.cpp
Modified: trunk/OpenMPT/soundlib/Load_imf.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_imf.cpp 2010-05-04 13:11:59 UTC (rev 584)
+++ trunk/OpenMPT/soundlib/Load_imf.cpp 2010-05-06 22:39:17 UTC (rev 585)
@@ -11,7 +11,8 @@
#pragma pack(1)
-struct IMFCHANNEL {
+struct IMFCHANNEL
+{
char name[12]; // Channel name (ASCIIZ-String, max 11 chars)
uint8 chorus; // Default chorus
uint8 reverb; // Default reverb
@@ -19,7 +20,8 @@
uint8 status; // Channel status: 0 = enabled, 1 = mute, 2 = disabled (ignore effects!)
};
-struct IMFHEADER {
+struct IMFHEADER
+{
char title[32]; // Songname (ASCIIZ-String, max. 31 chars)
uint16 ordnum; // Number of orders saved
uint16 patnum; // Number of patterns saved
@@ -36,13 +38,15 @@
uint8 orderlist[256]; // Order list (0xff = +++; blank out anything beyond ordnum)
};
-enum {
+enum
+{
IMF_ENV_VOL = 0,
IMF_ENV_PAN = 1,
IMF_ENV_FILTER = 2,
};
-struct IMFENVELOPE {
+struct IMFENVELOPE
+{
uint8 points; // Number of envelope points
uint8 sustain; // Envelope sustain point
uint8 loop_start; // Envelope loop start point
@@ -51,12 +55,14 @@
uint8 unused[3];
};
-struct IMFENVNODES {
+struct IMFENVNODES
+{
uint16 tick;
uint16 value;
};
-struct IMFINSTRUMENT {
+struct IMFINSTRUMENT
+{
char name[32]; // Inst. name (ASCIIZ-String, max. 31 chars)
uint8 map[120]; // Multisample settings
uint8 unused[8];
@@ -67,7 +73,8 @@
char ii10[4]; // 'II10'
};
-struct IMFSAMPLE {
+struct IMFSAMPLE
+{
char filename[13]; // Sample filename (12345678.ABC) */
uint8 unused1[3];
uint32 length; // Length
@@ -85,7 +92,8 @@
};
#pragma pack()
-static BYTE imf_efftrans[] = {
+static BYTE imf_efftrans[] =
+{
CMD_NONE,
CMD_SPEED, // 0x01 1xx Set Tempo
CMD_TEMPO, // 0x02 2xx Set BPM
@@ -137,7 +145,7 @@
static void import_imf_effect(MODCOMMAND *note)
//---------------------------------------------
{
- BYTE n;
+ uint8 n;
// fix some of them
switch (note->command)
{
@@ -262,7 +270,7 @@
IMFHEADER hdr;
MODSAMPLE *pSample = Samples + 1;
WORD firstsample = 1; // first pSample for the current instrument
- UINT32 ignore_channels = 0; // bit set for each channel that's completely disabled
+ uint32 ignore_channels = 0; // bit set for each channel that's completely disabled
ASSERT_CAN_READ(sizeof(IMFHEADER));
memset(&hdr, 0, sizeof(IMFHEADER));
@@ -324,7 +332,19 @@
}
}
if(!m_nChannels) return false;
-
+
+ //From mikmod: work around an Orpheus bug
+ if (hdr.channels[0].status == 0)
+ {
+ CHANNELINDEX nChn;
+ for(nChn = 1; nChn < 16; nChn++)
+ if(hdr.channels[nChn].status != 1)
+ break;
+ if (nChn == 16)
+ for(nChn = 1; nChn < 16; nChn++)
+ ChnSettings[nChn].dwFlags &= ~CHN_MUTE;
+ }
+
Order.resize(hdr.ordnum);
for(ORDERINDEX nOrd = 0; nOrd < hdr.ordnum; nOrd++)
Order[nOrd] = ((hdr.orderlist[nOrd] == 0xff) ? Order.GetIgnoreIndex() : (PATTERNINDEX)hdr.orderlist[nOrd]);
@@ -474,12 +494,9 @@
imfins.smpnum = LittleEndianW(imfins.smpnum);
imfins.fadeout = LittleEndianW(imfins.fadeout);
- if(memcmp(imfins.ii10, "II10", 4) != 0)
- {
- //printf("ii10 says %02x %02x %02x %02x!\n",
- // imfins.ii10[0], imfins.ii10[1], imfins.ii10[2], imfins.ii10[3]);
- return false;
- }
+ // Orpheus does not check this!
+ //if(memcmp(imfins.ii10, "II10", 4) != 0)
+ // return false;
pIns = new MODINSTRUMENT;
if(!pIns)
@@ -526,11 +543,7 @@
m_nSamples++;
if(memcmp(imfsmp.is10, "IS10", 4) != 0)
- {
- //printf("is10 says %02x %02x %02x %02x!\n",
- // imfsmp.is10[0], imfsmp.is10[1], imfsmp.is10[2], imfsmp.is10[3]);
return false;
- }
memcpy(pSample->filename, imfsmp.filename, 12);
SpaceToNullStringFixed(pSample->filename, 12);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-04 13:12:09
|
Revision: 584
http://modplug.svn.sourceforge.net/modplug/?rev=584&view=rev
Author: saga-games
Date: 2010-05-04 13:11:59 +0000 (Tue, 04 May 2010)
Log Message:
-----------
[Fix] MOD Loader: Very short loops (4-8 bytes long) are not ignored anymore. This fixes "Crew Generation" by Necros.
[Ref] Some code cleanup
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Moddoc.h
trunk/OpenMPT/mptrack/Mpdlgs.cpp
trunk/OpenMPT/soundlib/LOAD_AMF.CPP
trunk/OpenMPT/soundlib/Load_mod.cpp
trunk/OpenMPT/soundlib/Load_ptm.cpp
trunk/OpenMPT/soundlib/Load_s3m.cpp
trunk/OpenMPT/soundlib/Sndfile.h
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-05-01 22:35:46 UTC (rev 583)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-05-04 13:11:59 UTC (rev 584)
@@ -3343,6 +3343,7 @@
//end rewbs.customKeys
void CModDoc::TogglePluginEditor(UINT m_nCurrentPlugin)
+//-----------------------------------------------------
{
PSNDMIXPLUGIN pPlugin;
@@ -3356,8 +3357,8 @@
return;
}
-void CModDoc::ChangeFileExtension(UINT nNewType)
-//----------------------------------------------
+void CModDoc::ChangeFileExtension(MODTYPE nNewType)
+//-------------------------------------------------
{
//Not making path if path is empty(case only(?) for new file)
if(GetPathName().GetLength() > 0)
@@ -3409,22 +3410,22 @@
UINT CModDoc::FindAvailableChannel()
-//-------------------------------------------
+//----------------------------------
{
// Search for available channel
- for (UINT j=m_SndFile.m_nChannels; j<MAX_CHANNELS; j++) {
+ for (CHANNELINDEX j = m_SndFile.m_nChannels; j < MAX_CHANNELS; j++)
+ {
MODCHANNEL *p = &m_SndFile.Chn[j];
- if (!p->nLength) {
+ if (!p->nLength)
return j;
- }
}
// Not found: look for one that's stopped
- for (UINT j=m_SndFile.m_nChannels; j<MAX_CHANNELS; j++) {
+ for (CHANNELINDEX j = m_SndFile.m_nChannels; j < MAX_CHANNELS; j++)
+ {
MODCHANNEL *p = &m_SndFile.Chn[j];
- if (p->dwFlags & CHN_NOTEFADE) {
+ if (p->dwFlags & CHN_NOTEFADE)
return j;
- }
}
//Last resort: go for first virutal channel.
@@ -3440,7 +3441,8 @@
void CModDoc::LearnMacro(int macroToSet, long paramToUse)
//-------------------------------------------------------
{
- if (macroToSet<0 || macroToSet>NMACROS) {
+ if (macroToSet<0 || macroToSet>NMACROS)
+ {
return;
}
Modified: trunk/OpenMPT/mptrack/Moddoc.h
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.h 2010-05-01 22:35:46 UTC (rev 583)
+++ trunk/OpenMPT/mptrack/Moddoc.h 2010-05-04 13:11:59 UTC (rev 584)
@@ -378,7 +378,7 @@
DECLARE_MESSAGE_MAP()
private:
- void ChangeFileExtension(UINT nNewType);
+ void ChangeFileExtension(MODTYPE nNewType);
UINT FindAvailableChannel();
};
Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2010-05-01 22:35:46 UTC (rev 583)
+++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2010-05-04 13:11:59 UTC (rev 584)
@@ -444,7 +444,6 @@
if (CSoundFile::GetSysInfo() & SYSMIX_SLOWCPU)
::EnableWindow(::GetDlgItem(m_hWnd, IDC_CHECK3), FALSE);
else if (dwQuality & QUALITY_EQ) CheckDlgButton(IDC_CHECK3, MF_CHECKED);
- if (CSoundFile::gdwSoundSetup & SNDMIX_EMULATE_MIX_BUGS) CheckDlgButton(IDC_CHECK7, MF_CHECKED); //rewbs.emulateMixBugs
// Bass Expansion
m_SbXBassDepth.SetRange(0,4);
@@ -595,14 +594,6 @@
if (IsDlgButtonChecked(IDC_CHECK6)) dwQuality |= QUALITY_REVERB;
dwSrcMode = m_CbnResampling.GetCurSel();
- //rewbs.emulateMixBugs
- if (IsDlgButtonChecked(IDC_CHECK7)) {
- CSoundFile::gdwSoundSetup |= SNDMIX_EMULATE_MIX_BUGS;
- } else {
- CSoundFile::gdwSoundSetup &= ~SNDMIX_EMULATE_MIX_BUGS;
- }
- //end rewbs.emulateMixBugs
-
// Bass Expansion
{
UINT nXBassDepth = 8-m_SbXBassDepth.GetPos();
Modified: trunk/OpenMPT/soundlib/LOAD_AMF.CPP
===================================================================
--- trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2010-05-01 22:35:46 UTC (rev 583)
+++ trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2010-05-04 13:11:59 UTC (rev 584)
@@ -54,7 +54,7 @@
extern void Log(LPCSTR, ...);
#endif
-VOID AMF_Unpack(MODCOMMAND *pPat, const BYTE *pTrack, UINT nRows, UINT nChannels)
+void AMF_Unpack(MODCOMMAND *pPat, const BYTE *pTrack, UINT nRows, UINT nChannels)
//-------------------------------------------------------------------------------
{
UINT lastinstr = 0;
Modified: trunk/OpenMPT/soundlib/Load_mod.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mod.cpp 2010-05-01 22:35:46 UTC (rev 583)
+++ trunk/OpenMPT/soundlib/Load_mod.cpp 2010-05-04 13:11:59 UTC (rev 584)
@@ -280,8 +280,8 @@
if (psmp->nLoopStart >= psmp->nLength) { psmp->nLoopStart = psmp->nLength-1; derr|=1; }
if (psmp->nLoopEnd > psmp->nLength) { psmp->nLoopEnd = psmp->nLength; derr |= 1; }
if (psmp->nLoopStart > psmp->nLoopEnd) derr |= 1;
- if ((psmp->nLoopStart > psmp->nLoopEnd) || (psmp->nLoopEnd <= 8)
- || (psmp->nLoopEnd - psmp->nLoopStart <= 4))
+ if ((psmp->nLoopStart > psmp->nLoopEnd) || (psmp->nLoopEnd < 4)
+ || (psmp->nLoopEnd - psmp->nLoopStart < 4))
{
psmp->nLoopStart = 0;
psmp->nLoopEnd = 0;
Modified: trunk/OpenMPT/soundlib/Load_ptm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_ptm.cpp 2010-05-01 22:35:46 UTC (rev 583)
+++ trunk/OpenMPT/soundlib/Load_ptm.cpp 2010-05-04 13:11:59 UTC (rev 584)
@@ -173,13 +173,10 @@
if (dwMemPos + 2 > dwMemLength) break;
m[nChn].command = lpStream[dwMemPos++];
m[nChn].param = lpStream[dwMemPos++];
- if ((m[nChn].command == 0x0E) && ((m[nChn].param & 0xF0) == 0x80))
- {
- m[nChn].command = CMD_S3MCMDEX;
- } else
if (m[nChn].command < 0x10)
{
ConvertModCommand(&m[nChn]);
+ MODExx2S3MSxx(&m[nChn]);
} else
{
switch(m[nChn].command)
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-05-01 22:35:46 UTC (rev 583)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-05-04 13:11:59 UTC (rev 584)
@@ -16,8 +16,6 @@
#pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data"
-extern WORD S3MFineTuneTable[16];
-
//////////////////////////////////////////////////////
// ScreamTracker S3M file support
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-05-01 22:35:46 UTC (rev 583)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-05-04 13:11:59 UTC (rev 584)
@@ -635,7 +635,7 @@
void SetMasterVolume(UINT vol, bool adjustAGC = false);
UINT GetMasterVolume() const { return m_nMasterVolume; }
- ORDERINDEX GetNumPatterns() const;
+ PATTERNINDEX GetNumPatterns() const;
INSTRUMENTINDEX GetNumInstruments() const { return m_nInstruments; }
SAMPLEINDEX GetNumSamples() const { return m_nSamples; }
UINT GetCurrentPos() const;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-01 22:35:53
|
Revision: 583
http://modplug.svn.sourceforge.net/modplug/?rev=583&view=rev
Author: saga-games
Date: 2010-05-01 22:35:46 +0000 (Sat, 01 May 2010)
Log Message:
-----------
[Fix] AMF DSM Loader: Made some changes to the pattern reader, which elimiante the strange "vC7" commands in the pattern. I have found no hints on whether my fix is correct or not, apart from the fact that those AMF files that I have play a lot better now. And it makes kind of sense...
Modified Paths:
--------------
trunk/OpenMPT/soundlib/LOAD_AMF.CPP
Modified: trunk/OpenMPT/soundlib/LOAD_AMF.CPP
===================================================================
--- trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2010-05-01 11:50:56 UTC (rev 582)
+++ trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2010-05-01 22:35:46 UTC (rev 583)
@@ -71,9 +71,13 @@
if (cmd < 0x7F) // note+vol
{
m->note = cmd+1;
- if (!m->instr) m->instr = lastinstr;
- m->volcmd = VOLCMD_VOLUME;
- m->vol = arg;
+ // Does the next line make sense? I can't find any documents on this format, nor do any other players seem to handle this problem (or I'm overlooking something). However, the tunes in Pinball World seem to play a lot better with this, and it kind of looks right.
+ if(arg != 0xFF)
+ {
+ if (!m->instr) m->instr = lastinstr;
+ m->volcmd = VOLCMD_VOLUME;
+ m->vol = arg;
+ }
} else
if (cmd == 0x7F) // duplicate row
{
@@ -109,10 +113,9 @@
else param = (param&0x0F)<<4;
break;
// 0x04: Porta Up/Down
- //case 0x04: if (param & 0x80) { command = CMD_PORTAMENTOUP; param = -(signed char)param; }
- // else { command = CMD_PORTAMENTODOWN; } break;
case 0x04: if (param & 0x80) { command = CMD_PORTAMENTOUP; param = (-(signed char)param)&0x7F; }
- else { command = CMD_PORTAMENTODOWN; } break;
+ else { command = CMD_PORTAMENTODOWN; }
+ break;
// 0x06: Tone Portamento
case 0x06: command = CMD_TONEPORTAMENTO; break;
// 0x07: Tremor
@@ -149,8 +152,8 @@
// 0x15: Set Tempo
case 0x15: command = CMD_TEMPO; break;
// 0x17: Panning
- case 0x17: param = (param+64)&0x7F;
- if (m->command) { if (!m->volcmd) { m->volcmd = VOLCMD_PANNING; m->vol = param/2; } command = 0; }
+ case 0x17: param = (param + 64) & 0x7F;
+ if (m->command) { if (!m->volcmd) { m->volcmd = VOLCMD_PANNING; m->vol = param >> 1; } command = 0; }
else { command = CMD_PANNING8; }
break;
// Unknown effects
@@ -293,7 +296,7 @@
{
for (UINT i=0; i<16; i++)
{
- ChnSettings[i].nPan = (lpStream[dwMemPos+i] & 1) ? 0x30 : 0xD0;
+ ChnSettings[i].nPan = (lpStream[dwMemPos + i] & 1) ? 0x40 : 0xC0;
}
dwMemPos += 16;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-01 11:51:02
|
Revision: 582
http://modplug.svn.sourceforge.net/modplug/?rev=582&view=rev
Author: saga-games
Date: 2010-05-01 11:50:56 +0000 (Sat, 01 May 2010)
Log Message:
-----------
[Mod] VST Editor: Changed number of patches per sub menu from 100 to 128. Now, one sub menu equals ones MIDI bank (more logical)
[Mod] Updated release notes
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html
Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2010-04-30 21:45:37 UTC (rev 581)
+++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2010-05-01 11:50:56 UTC (rev 582)
@@ -353,8 +353,8 @@
return NULL;
}
-#define PRESETS_PER_COLUMN 25
-#define PRESETS_PER_GROUP 100
+#define PRESETS_PER_COLUMN 32
+#define PRESETS_PER_GROUP 128
void CAbstractVstEditor::UpdatePresetMenu()
{
Modified: trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html
===================================================================
--- trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html 2010-04-30 21:45:37 UTC (rev 581)
+++ trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html 2010-05-01 11:50:56 UTC (rev 582)
@@ -138,6 +138,7 @@
push-forward paste (which pushes the already existing pattern data downwards, like in Impulse Tracker).</li>
<li>Improved MOD editing - now it should be almost impossible to write commands in the patterns that don't belong into MOD files. :-)</li>
<li>If no selection has been made, Shift-Clicking a point now draws a <strong>selection</strong>, starting from the previously highlighted pattern command;</li>
+ <li>The volume column effect <pre>:</pre> (fake velocity) has been removed.</li>
</ul>
<h3>Sample Editor</h3>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-04-30 21:45:44
|
Revision: 581
http://modplug.svn.sourceforge.net/modplug/?rev=581&view=rev
Author: saga-games
Date: 2010-04-30 21:45:37 +0000 (Fri, 30 Apr 2010)
Log Message:
-----------
Added precompiled versions of the masmx86 zlib code so that a normal release build works out of the box in VS2008 again.
Added Paths:
-----------
trunk/OpenMPT/zlib/contrib/masmx86/inffas32.lst
trunk/OpenMPT/zlib/contrib/masmx86/inffas32.obj
trunk/OpenMPT/zlib/contrib/masmx86/match686.lst
trunk/OpenMPT/zlib/contrib/masmx86/match686.obj
Added: trunk/OpenMPT/zlib/contrib/masmx86/inffas32.lst
===================================================================
--- trunk/OpenMPT/zlib/contrib/masmx86/inffas32.lst (rev 0)
+++ trunk/OpenMPT/zlib/contrib/masmx86/inffas32.lst 2010-04-30 21:45:37 UTC (rev 581)
@@ -0,0 +1,1222 @@
+Microsoft (R) Macro Assembler Version 9.00.30729.01 04/30/10 23:43:25
+inffas32.asm Page 1 - 1
+
+
+ ;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding
+ ; *
+ ; * inffas32.asm is derivated from inffas86.c, with translation of assembly code
+ ; *
+ ; * Copyright (C) 1995-2003 Mark Adler
+ ; * For conditions of distribution and use, see copyright notice in zlib.h
+ ; *
+ ; * Copyright (C) 2003 Chris Anderson <chr...@ch...>
+ ; * Please use the copyright conditions above.
+ ; *
+ ; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
+ ; * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at
+ ; * the moment. I have successfully compiled and tested this code with gcc2.96,
+ ; * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S
+ ; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
+ ; * enabled. I will attempt to merge the MMX code into this version. Newer
+ ; * versions of this and inffast.S can be found at
+ ; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
+ ; *
+ ; * 2005 : modification by Gilles Vollant
+ ; */
+ ; For Visual C++ 4.x and higher and ML 6.x and higher
+ ; ml.exe is in directory \MASM611C of Win95 DDK
+ ; ml.exe is also distributed in http://www.masm32.com/masmdl.htm
+ ; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/
+ ;
+ ;
+ ; compile with command line option
+ ; ml /coff /Zi /c /Flinffas32.lst inffas32.asm
+
+ ; if you define NO_GZIP (see inflate.h), compile with
+ ; ml /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm
+
+
+ ; zlib122sup is 0 fort zlib 1.2.2.1 and lower
+ ; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head
+ ; in inflate_state in inflate.h)
+ = 00000008 zlib1222sup equ 8
+
+
+ IFDEF GUNZIP
+ ELSE
+ IFNDEF NO_GUNZIP
+ = 0000000B INFLATE_MODE_TYPE equ 11
+ = 0000001A INFLATE_MODE_BAD equ 26
+ ELSE
+ ENDIF
+ ENDIF
+
+
+ ; 75 "inffast.S"
+ ;FILE "inffast.S"
+
+ ;;;GLOBAL _inflate_fast
+
+ ;;;SECTION .text
+
+
+
+ .586p
+ .mmx
+
+ name inflate_fast_x86
+ .MODEL FLAT
+
+ 00000000 _DATA segment
+ 00000000 inflate_fast_use_mmx:
+ 00000000 00000001 dd 1
+
+
+ 00000000 _TEXT segment
+ PUBLIC _inflate_fast
+
+ ALIGN 4
+ 00000000 _inflate_fast:
+ 00000000 E9 00000103 jmp inflate_fast_entry
+
+
+
+ ALIGN 4
+ 00000008 46 61 73 74 20 db 'Fast decoding Code from Chris Anderson'
+ 64 65 63 6F 64
+ 69 6E 67 20 43
+ 6F 64 65 20 66
+ 72 6F 6D 20 43
+ 68 72 69 73 20
+ 41 6E 64 65 72
+ 73 6F 6E
+ 0000002E 00 db 0
+
+ ALIGN 4
+ 00000030 invalid_literal_length_code_msg:
+ 00000030 69 6E 76 61 6C db 'invalid literal/length code'
+ 69 64 20 6C 69
+ 74 65 72 61 6C
+ 2F 6C 65 6E 67
+ 74 68 20 63 6F
+ 64 65
+ 0000004B 00 db 0
+
+ ALIGN 4
+ 0000004C invalid_distance_code_msg:
+ 0000004C 69 6E 76 61 6C db 'invalid distance code'
+ 69 64 20 64 69
+ 73 74 61 6E 63
+ 65 20 63 6F 64
+ 65
+ 00000061 00 db 0
+
+ ALIGN 4
+ 00000064 invalid_distance_too_far_msg:
+ 00000064 69 6E 76 61 6C db 'invalid distance too far back'
+ 69 64 20 64 69
+ 73 74 61 6E 63
+ 65 20 74 6F 6F
+ 20 66 61 72 20
+ 62 61 63 6B
+ 00000081 00 db 0
+
+
+ ALIGN 4
+ 00000084 inflate_fast_mask:
+ 00000084 00000000 dd 0
+ 00000088 00000001 dd 1
+ 0000008C 00000003 dd 3
+ 00000090 00000007 dd 7
+ 00000094 0000000F dd 15
+ 00000098 0000001F dd 31
+ 0000009C 0000003F dd 63
+ 000000A0 0000007F dd 127
+ 000000A4 000000FF dd 255
+ 000000A8 000001FF dd 511
+ 000000AC 000003FF dd 1023
+ 000000B0 000007FF dd 2047
+ 000000B4 00000FFF dd 4095
+ 000000B8 00001FFF dd 8191
+ 000000BC 00003FFF dd 16383
+ 000000C0 00007FFF dd 32767
+ 000000C4 0000FFFF dd 65535
+ 000000C8 0001FFFF dd 131071
+ 000000CC 0003FFFF dd 262143
+ 000000D0 0007FFFF dd 524287
+ 000000D4 000FFFFF dd 1048575
+ 000000D8 001FFFFF dd 2097151
+ 000000DC 003FFFFF dd 4194303
+ 000000E0 007FFFFF dd 8388607
+ 000000E4 00FFFFFF dd 16777215
+ 000000E8 01FFFFFF dd 33554431
+ 000000EC 03FFFFFF dd 67108863
+ 000000F0 07FFFFFF dd 134217727
+ 000000F4 0FFFFFFF dd 268435455
+ 000000F8 1FFFFFFF dd 536870911
+ 000000FC 3FFFFFFF dd 1073741823
+ 00000100 7FFFFFFF dd 2147483647
+ 00000104 FFFFFFFF dd 4294967295
+
+
+ = 00000000 mode_state equ 0 ;/* state->mode */
+ = 00000028 wsize_state equ (32+zlib1222sup) ;/* state->wsize */
+ = 00000030 write_state equ (36+4+zlib1222sup) ;/* state->write */
+ = 00000034 window_state equ (40+4+zlib1222sup) ;/* state->window */
+ = 00000038 hold_state equ (44+4+zlib1222sup) ;/* state->hold */
+ = 0000003C bits_state equ (48+4+zlib1222sup) ;/* state->bits */
+ = 0000004C lencode_state equ (64+4+zlib1222sup) ;/* state->lencode */
+ = 00000050 distcode_state equ (68+4+zlib1222sup) ;/* state->distcode */
+ = 00000054 lenbits_state equ (72+4+zlib1222sup) ;/* state->lenbits */
+ = 00000058 distbits_state equ (76+4+zlib1222sup) ;/* state->distbits */
+
+
+ ;;SECTION .text
+ ; 205 "inffast.S"
+ ;GLOBAL inflate_fast_use_mmx
+
+ ;SECTION .data
+
+
+ ; GLOBAL inflate_fast_use_mmx:object
+ ;.size inflate_fast_use_mmx, 4
+ ; 226 "inffast.S"
+ ;SECTION .text
+
+ ALIGN 4
+ 00000108 inflate_fast_entry:
+ 00000108 57 push edi
+ 00000109 56 push esi
+ 0000010A 55 push ebp
+ 0000010B 53 push ebx
+ 0000010C 9C pushfd
+ 0000010D 83 EC 40 sub esp,64
+ 00000110 FC cld
+
+
+
+
+ 00000111 8B 74 24 58 mov esi, [esp+88]
+ 00000115 8B 7E 1C mov edi, [esi+28]
+
+
+
+
+
+
+
+ 00000118 8B 56 04 mov edx, [esi+4]
+ 0000011B 8B 06 mov eax, [esi+0]
+
+ 0000011D 03 D0 add edx,eax
+ 0000011F 83 EA 0B sub edx,11
+
+ 00000122 89 44 24 2C mov [esp+44],eax
+ 00000126 89 54 24 14 mov [esp+20],edx
+
+ 0000012A 8B 6C 24 5C mov ebp, [esp+92]
+ 0000012E 8B 4E 10 mov ecx, [esi+16]
+ 00000131 8B 5E 0C mov ebx, [esi+12]
+
+ 00000134 2B E9 sub ebp,ecx
+ 00000136 F7 DD neg ebp
+ 00000138 03 EB add ebp,ebx
+
+ 0000013A 81 E9 00000101 sub ecx,257
+ 00000140 03 CB add ecx,ebx
+
+ 00000142 89 5C 24 3C mov [esp+60],ebx
+ 00000146 89 6C 24 28 mov [esp+40],ebp
+ 0000014A 89 4C 24 10 mov [esp+16],ecx
+ ; 285 "inffast.S"
+ 0000014E 8B 47 4C mov eax, [edi+lencode_state]
+ 00000151 8B 4F 50 mov ecx, [edi+distcode_state]
+
+ 00000154 89 44 24 08 mov [esp+8],eax
+ 00000158 89 4C 24 0C mov [esp+12],ecx
+
+ 0000015C B8 00000001 mov eax,1
+ 00000161 8B 4F 54 mov ecx, [edi+lenbits_state]
+ 00000164 D3 E0 shl eax,cl
+ 00000166 48 dec eax
+ 00000167 89 04 24 mov [esp+0],eax
+
+ 0000016A B8 00000001 mov eax,1
+ 0000016F 8B 4F 58 mov ecx, [edi+distbits_state]
+ 00000172 D3 E0 shl eax,cl
+ 00000174 48 dec eax
+ 00000175 89 44 24 04 mov [esp+4],eax
+
+ 00000179 8B 47 28 mov eax, [edi+wsize_state]
+ 0000017C 8B 4F 30 mov ecx, [edi+write_state]
+ 0000017F 8B 57 34 mov edx, [edi+window_state]
+
+ 00000182 89 44 24 34 mov [esp+52],eax
+ 00000186 89 4C 24 30 mov [esp+48],ecx
+ 0000018A 89 54 24 38 mov [esp+56],edx
+
+ 0000018E 8B 6F 38 mov ebp, [edi+hold_state]
+ 00000191 8B 5F 3C mov ebx, [edi+bits_state]
+ ; 321 "inffast.S"
+ 00000194 8B 74 24 2C mov esi, [esp+44]
+ 00000198 8B 4C 24 14 mov ecx, [esp+20]
+ 0000019C 3B CE cmp ecx,esi
+ 0000019E 77 22 ja L_align_long
+
+ 000001A0 83 C1 0B add ecx,11
+ 000001A3 2B CE sub ecx,esi
+ 000001A5 B8 0000000C mov eax,12
+ 000001AA 2B C1 sub eax,ecx
+ 000001AC 8D 7C 24 1C lea edi, [esp+28]
+ 000001B0 F3/ A4 rep movsb
+ 000001B2 8B C8 mov ecx,eax
+ 000001B4 33 C0 xor eax,eax
+ 000001B6 F3/ AA rep stosb
+ 000001B8 8D 74 24 1C lea esi, [esp+28]
+ 000001BC 89 74 24 14 mov [esp+20],esi
+ 000001C0 EB 18 jmp L_is_aligned
+
+
+ 000001C2 L_align_long:
+ 000001C2 F7 C6 00000003 test esi,3
+ 000001C8 74 10 jz L_is_aligned
+ 000001CA 33 C0 xor eax,eax
+ 000001CC 8A 06 mov al, [esi]
+ 000001CE 46 inc esi
+ 000001CF 8B CB mov ecx,ebx
+ 000001D1 83 C3 08 add ebx,8
+ 000001D4 D3 E0 shl eax,cl
+ 000001D6 0B E8 or ebp,eax
+ 000001D8 EB E8 jmp L_align_long
+
+ 000001DA L_is_aligned:
+ 000001DA 8B 7C 24 3C mov edi, [esp+60]
+ ; 366 "inffast.S"
+ 000001DE L_check_mmx:
+ 000001DE 83 3D 00000000 R cmp dword ptr [inflate_fast_use_mmx],2
+ 02
+ 000001E5 0F 84 00000289 je L_init_mmx
+ 000001EB 77 6B ja L_do_loop
+
+ 000001ED 50 push eax
+ 000001EE 53 push ebx
+ 000001EF 51 push ecx
+ 000001F0 52 push edx
+ 000001F1 9C pushfd
+ 000001F2 8B 04 24 mov eax, [esp]
+ 000001F5 81 34 24 xor dword ptr [esp],0200000h
+ 00200000
+
+
+
+
+ 000001FC 9D popfd
+ 000001FD 9C pushfd
+ 000001FE 5A pop edx
+ 000001FF 33 D0 xor edx,eax
+ 00000201 74 44 jz L_dont_use_mmx
+ 00000203 33 C0 xor eax,eax
+ 00000205 0F A2 cpuid
+ 00000207 81 FB 756E6547 cmp ebx,0756e6547h
+ 0000020D 75 38 jne L_dont_use_mmx
+ 0000020F 81 F9 6C65746E cmp ecx,06c65746eh
+ 00000215 75 30 jne L_dont_use_mmx
+ 00000217 81 FA 49656E69 cmp edx,049656e69h
+ 0000021D 75 28 jne L_dont_use_mmx
+ 0000021F B8 00000001 mov eax,1
+ 00000224 0F A2 cpuid
+ 00000226 C1 E8 08 shr eax,8
+ 00000229 83 E0 0F and eax,15
+ 0000022C 83 F8 06 cmp eax,6
+ 0000022F 75 16 jne L_dont_use_mmx
+ 00000231 F7 C2 00800000 test edx,0800000h
+ 00000237 75 02 jnz L_use_mmx
+ 00000239 EB 0C jmp L_dont_use_mmx
+ 0000023B L_use_mmx:
+ 0000023B C7 05 00000000 R mov dword ptr [inflate_fast_use_mmx],2
+ 00000002
+ 00000245 EB 0A jmp L_check_mmx_pop
+ 00000247 L_dont_use_mmx:
+ 00000247 C7 05 00000000 R mov dword ptr [inflate_fast_use_mmx],3
+ 00000003
+ 00000251 L_check_mmx_pop:
+ 00000251 5A pop edx
+ 00000252 59 pop ecx
+ 00000253 5B pop ebx
+ 00000254 58 pop eax
+ 00000255 EB 87 jmp L_check_mmx
+ ; 426 "inffast.S"
+ ALIGN 4
+ 00000258 L_do_loop:
+ ; 437 "inffast.S"
+ 00000258 80 FB 0F cmp bl,15
+ 0000025B 77 0D ja L_get_length_code
+
+ 0000025D 33 C0 xor eax,eax
+ 0000025F 66| AD lodsw
+ 00000261 8A CB mov cl,bl
+ 00000263 80 C3 10 add bl,16
+ 00000266 D3 E0 shl eax,cl
+ 00000268 0B E8 or ebp,eax
+
+ 0000026A L_get_length_code:
+ 0000026A 8B 14 24 mov edx, [esp+0]
+ 0000026D 8B 4C 24 08 mov ecx, [esp+8]
+ 00000271 23 D5 and edx,ebp
+ 00000273 8B 04 91 mov eax, [ecx+edx*4]
+
+ 00000276 L_dolen:
+
+
+
+
+
+
+ 00000276 8A CC mov cl,ah
+ 00000278 2A DC sub bl,ah
+ 0000027A D3 ED shr ebp,cl
+
+
+
+
+
+
+ 0000027C 84 C0 test al,al
+ 0000027E 75 19 jnz L_test_for_length_base
+
+ 00000280 C1 E8 10 shr eax,16
+ 00000283 AA stosb
+
+ 00000284 L_while_test:
+
+
+ 00000284 39 7C 24 10 cmp [esp+16],edi
+ 00000288 0F 86 00000462 jbe L_break_loop
+
+ 0000028E 39 74 24 14 cmp [esp+20],esi
+ 00000292 77 C4 ja L_do_loop
+ 00000294 E9 00000457 jmp L_break_loop
+
+ 00000299 L_test_for_length_base:
+ ; 502 "inffast.S"
+ 00000299 8B D0 mov edx,eax
+ 0000029B C1 EA 10 shr edx,16
+ 0000029E 8A C8 mov cl,al
+
+ 000002A0 A8 10 test al,16
+ 000002A2 0F 84 000000F4 jz L_test_for_second_level_length
+ 000002A8 80 E1 0F and cl,15
+ 000002AB 74 25 jz L_save_len
+ 000002AD 3A D9 cmp bl,cl
+ 000002AF 73 11 jae L_add_bits_to_len
+
+ 000002B1 8A E9 mov ch,cl
+ 000002B3 33 C0 xor eax,eax
+ 000002B5 66| AD lodsw
+ 000002B7 8A CB mov cl,bl
+ 000002B9 80 C3 10 add bl,16
+ 000002BC D3 E0 shl eax,cl
+ 000002BE 0B E8 or ebp,eax
+ 000002C0 8A CD mov cl,ch
+
+ 000002C2 L_add_bits_to_len:
+ 000002C2 B8 00000001 mov eax,1
+ 000002C7 D3 E0 shl eax,cl
+ 000002C9 48 dec eax
+ 000002CA 2A D9 sub bl,cl
+ 000002CC 23 C5 and eax,ebp
+ 000002CE D3 ED shr ebp,cl
+ 000002D0 03 D0 add edx,eax
+
+ 000002D2 L_save_len:
+ 000002D2 89 54 24 18 mov [esp+24],edx
+
+
+ 000002D6 L_decode_distance:
+ ; 549 "inffast.S"
+ 000002D6 80 FB 0F cmp bl,15
+ 000002D9 77 0D ja L_get_distance_code
+
+ 000002DB 33 C0 xor eax,eax
+ 000002DD 66| AD lodsw
+ 000002DF 8A CB mov cl,bl
+ 000002E1 80 C3 10 add bl,16
+ 000002E4 D3 E0 shl eax,cl
+ 000002E6 0B E8 or ebp,eax
+
+ 000002E8 L_get_distance_code:
+ 000002E8 8B 54 24 04 mov edx, [esp+4]
+ 000002EC 8B 4C 24 0C mov ecx, [esp+12]
+ 000002F0 23 D5 and edx,ebp
+ 000002F2 8B 04 91 mov eax, [ecx+edx*4]
+
+
+ 000002F5 L_dodist:
+ 000002F5 8B D0 mov edx,eax
+ 000002F7 C1 EA 10 shr edx,16
+ 000002FA 8A CC mov cl,ah
+ 000002FC 2A DC sub bl,ah
+ 000002FE D3 ED shr ebp,cl
+ ; 584 "inffast.S"
+ 00000300 8A C8 mov cl,al
+
+ 00000302 A8 10 test al,16
+ 00000304 0F 84 000000B2 jz L_test_for_second_level_dist
+ 0000030A 80 E1 0F and cl,15
+ 0000030D 74 65 jz L_check_dist_one
+ 0000030F 3A D9 cmp bl,cl
+ 00000311 73 11 jae L_add_bits_to_dist
+
+ 00000313 8A E9 mov ch,cl
+ 00000315 33 C0 xor eax,eax
+ 00000317 66| AD lodsw
+ 00000319 8A CB mov cl,bl
+ 0000031B 80 C3 10 add bl,16
+ 0000031E D3 E0 shl eax,cl
+ 00000320 0B E8 or ebp,eax
+ 00000322 8A CD mov cl,ch
+
+ 00000324 L_add_bits_to_dist:
+ 00000324 B8 00000001 mov eax,1
+ 00000329 D3 E0 shl eax,cl
+ 0000032B 48 dec eax
+ 0000032C 2A D9 sub bl,cl
+ 0000032E 23 C5 and eax,ebp
+ 00000330 D3 ED shr ebp,cl
+ 00000332 03 D0 add edx,eax
+ 00000334 EB 00 jmp L_check_window
+
+ 00000336 L_check_window:
+ ; 625 "inffast.S"
+ 00000336 89 74 24 2C mov [esp+44],esi
+ 0000033A 8B C7 mov eax,edi
+ 0000033C 2B 44 24 28 sub eax, [esp+40]
+
+ 00000340 3B C2 cmp eax,edx
+ 00000342 0F 82 00000094 jb L_clip_window
+
+ 00000348 8B 4C 24 18 mov ecx, [esp+24]
+ 0000034C 8B F7 mov esi,edi
+ 0000034E 2B F2 sub esi,edx
+
+ 00000350 83 E9 03 sub ecx,3
+ 00000353 8A 06 mov al, [esi]
+ 00000355 88 07 mov [edi],al
+ 00000357 8A 46 01 mov al, [esi+1]
+ 0000035A 8A 56 02 mov dl, [esi+2]
+ 0000035D 83 C6 03 add esi,3
+ 00000360 88 47 01 mov [edi+1],al
+ 00000363 88 57 02 mov [edi+2],dl
+ 00000366 83 C7 03 add edi,3
+ 00000369 F3/ A4 rep movsb
+
+ 0000036B 8B 74 24 2C mov esi, [esp+44]
+ 0000036F E9 FFFFFF10 jmp L_while_test
+
+ ALIGN 4
+ 00000374 L_check_dist_one:
+ 00000374 83 FA 01 cmp edx,1
+ 00000377 75 BD jne L_check_window
+ 00000379 39 7C 24 28 cmp [esp+40],edi
+ 0000037D 74 B7 je L_check_window
+
+ 0000037F 4F dec edi
+ 00000380 8B 4C 24 18 mov ecx, [esp+24]
+ 00000384 8A 07 mov al, [edi]
+ 00000386 83 E9 03 sub ecx,3
+
+ 00000389 88 47 01 mov [edi+1],al
+ 0000038C 88 47 02 mov [edi+2],al
+ 0000038F 88 47 03 mov [edi+3],al
+ 00000392 83 C7 04 add edi,4
+ 00000395 F3/ AA rep stosb
+
+ 00000397 E9 FFFFFEE8 jmp L_while_test
+
+ ALIGN 4
+ 0000039C L_test_for_second_level_length:
+
+
+
+
+ 0000039C A8 40 test al,64
+ 0000039E 0F 85 0000030E jnz L_test_for_end_of_block
+
+ 000003A4 B8 00000001 mov eax,1
+ 000003A9 D3 E0 shl eax,cl
+ 000003AB 48 dec eax
+ 000003AC 23 C5 and eax,ebp
+ 000003AE 03 C2 add eax,edx
+ 000003B0 8B 54 24 08 mov edx, [esp+8]
+ 000003B4 8B 04 82 mov eax, [edx+eax*4]
+ 000003B7 E9 FFFFFEBA jmp L_dolen
+
+ ALIGN 4
+ 000003BC L_test_for_second_level_dist:
+
+
+
+
+ 000003BC A8 40 test al,64
+ 000003BE 0F 85 000002E2 jnz L_invalid_distance_code
+
+ 000003C4 B8 00000001 mov eax,1
+ 000003C9 D3 E0 shl eax,cl
+ 000003CB 48 dec eax
+ 000003CC 23 C5 and eax,ebp
+ 000003CE 03 C2 add eax,edx
+ 000003D0 8B 54 24 0C mov edx, [esp+12]
+ 000003D4 8B 04 82 mov eax, [edx+eax*4]
+ 000003D7 E9 FFFFFF19 jmp L_dodist
+
+ ALIGN 4
+ 000003DC L_clip_window:
+ ; 721 "inffast.S"
+ 000003DC 8B C8 mov ecx,eax
+ 000003DE 8B 44 24 34 mov eax, [esp+52]
+ 000003E2 F7 D9 neg ecx
+ 000003E4 8B 74 24 38 mov esi, [esp+56]
+
+ 000003E8 3B C2 cmp eax,edx
+ 000003EA 0F 82 000002DE jb L_invalid_distance_too_far
+
+ 000003F0 03 CA add ecx,edx
+ 000003F2 83 7C 24 30 00 cmp dword ptr [esp+48],0
+ 000003F7 75 24 jne L_wrap_around_window
+
+ 000003F9 2B C1 sub eax,ecx
+ 000003FB 03 F0 add esi,eax
+ ; 749 "inffast.S"
+ 000003FD 8B 44 24 18 mov eax, [esp+24]
+ 00000401 3B C1 cmp eax,ecx
+ 00000403 76 60 jbe L_do_copy1
+
+ 00000405 2B C1 sub eax,ecx
+ 00000407 F3/ A4 rep movsb
+ 00000409 8B F7 mov esi,edi
+ 0000040B 2B F2 sub esi,edx
+ 0000040D EB 56 jmp L_do_copy1
+
+ 0000040F 3B C1 cmp eax,ecx
+ 00000411 76 52 jbe L_do_copy1
+
+ 00000413 2B C1 sub eax,ecx
+ 00000415 F3/ A4 rep movsb
+ 00000417 8B F7 mov esi,edi
+ 00000419 2B F2 sub esi,edx
+ 0000041B EB 48 jmp L_do_copy1
+
+ 0000041D L_wrap_around_window:
+ ; 793 "inffast.S"
+ 0000041D 8B 44 24 30 mov eax, [esp+48]
+ 00000421 3B C8 cmp ecx,eax
+ 00000423 76 2C jbe L_contiguous_in_window
+
+ 00000425 03 74 24 34 add esi, [esp+52]
+ 00000429 03 F0 add esi,eax
+ 0000042B 2B F1 sub esi,ecx
+ 0000042D 2B C8 sub ecx,eax
+
+
+ 0000042F 8B 44 24 18 mov eax, [esp+24]
+ 00000433 3B C1 cmp eax,ecx
+ 00000435 76 2E jbe L_do_copy1
+
+ 00000437 2B C1 sub eax,ecx
+ 00000439 F3/ A4 rep movsb
+ 0000043B 8B 74 24 38 mov esi, [esp+56]
+ 0000043F 8B 4C 24 30 mov ecx, [esp+48]
+ 00000443 3B C1 cmp eax,ecx
+ 00000445 76 1E jbe L_do_copy1
+
+ 00000447 2B C1 sub eax,ecx
+ 00000449 F3/ A4 rep movsb
+ 0000044B 8B F7 mov esi,edi
+ 0000044D 2B F2 sub esi,edx
+ 0000044F EB 14 jmp L_do_copy1
+
+ 00000451 L_contiguous_in_window:
+ ; 836 "inffast.S"
+ 00000451 03 F0 add esi,eax
+ 00000453 2B F1 sub esi,ecx
+
+
+ 00000455 8B 44 24 18 mov eax, [esp+24]
+ 00000459 3B C1 cmp eax,ecx
+ 0000045B 76 08 jbe L_do_copy1
+
+ 0000045D 2B C1 sub eax,ecx
+ 0000045F F3/ A4 rep movsb
+ 00000461 8B F7 mov esi,edi
+ 00000463 2B F2 sub esi,edx
+
+ 00000465 L_do_copy1:
+ ; 862 "inffast.S"
+ 00000465 8B C8 mov ecx,eax
+ 00000467 F3/ A4 rep movsb
+
+ 00000469 8B 74 24 2C mov esi, [esp+44]
+ 0000046D E9 FFFFFE12 jmp L_while_test
+ ; 878 "inffast.S"
+ ALIGN 4
+ 00000474 L_init_mmx:
+ 00000474 0F 77 emms
+
+
+
+
+
+ 00000476 0F 6E C5 movd mm0,ebp
+ 00000479 8B EB mov ebp,ebx
+ ; 896 "inffast.S"
+ 0000047B 0F 6E 24 24 movd mm4,dword ptr [esp+0]
+ 0000047F 0F 7F E3 movq mm3,mm4
+ 00000482 0F 6E 6C 24 04 movd mm5,dword ptr [esp+4]
+ 00000487 0F 7F EA movq mm2,mm5
+ 0000048A 0F EF C9 pxor mm1,mm1
+ 0000048D 8B 5C 24 08 mov ebx, [esp+8]
+ 00000491 EB 01 jmp L_do_loop_mmx
+
+ ALIGN 4
+ 00000494 L_do_loop_mmx:
+ 00000494 0F D3 C1 psrlq mm0,mm1
+
+ 00000497 83 FD 20 cmp ebp,32
+ 0000049A 77 12 ja L_get_length_code_mmx
+
+ 0000049C 0F 6E F5 movd mm6,ebp
+ 0000049F 0F 6E 3E movd mm7,dword ptr [esi]
+ 000004A2 83 C6 04 add esi,4
+ 000004A5 0F F3 FE psllq mm7,mm6
+ 000004A8 83 C5 20 add ebp,32
+ 000004AB 0F EB C7 por mm0,mm7
+
+ 000004AE L_get_length_code_mmx:
+ 000004AE 0F DB E0 pand mm4,mm0
+ 000004B1 0F 7E E0 movd eax,mm4
+ 000004B4 0F 7F DC movq mm4,mm3
+ 000004B7 8B 04 83 mov eax, [ebx+eax*4]
+
+ 000004BA L_dolen_mmx:
+ 000004BA 0F B6 CC movzx ecx,ah
+ 000004BD 0F 6E C9 movd mm1,ecx
+ 000004C0 2B E9 sub ebp,ecx
+
+ 000004C2 84 C0 test al,al
+ 000004C4 75 19 jnz L_test_for_length_base_mmx
+
+ 000004C6 C1 E8 10 shr eax,16
+ 000004C9 AA stosb
+
+ 000004CA L_while_test_mmx:
+
+
+ 000004CA 39 7C 24 10 cmp [esp+16],edi
+ 000004CE 0F 86 0000021C jbe L_break_loop
+
+ 000004D4 39 74 24 14 cmp [esp+20],esi
+ 000004D8 77 BA ja L_do_loop_mmx
+ 000004DA E9 00000211 jmp L_break_loop
+
+ 000004DF L_test_for_length_base_mmx:
+
+ 000004DF 8B D0 mov edx,eax
+ 000004E1 C1 EA 10 shr edx,16
+
+ 000004E4 A8 10 test al,16
+ 000004E6 0F 84 000000E0 jz L_test_for_second_level_length_mmx
+ 000004EC 83 E0 0F and eax,15
+ 000004EF 74 14 jz L_decode_distance_mmx
+
+ 000004F1 0F D3 C1 psrlq mm0,mm1
+ 000004F4 0F 6E C8 movd mm1,eax
+ 000004F7 0F 7E C1 movd ecx,mm0
+ 000004FA 2B E8 sub ebp,eax
+ 000004FC 23 0C 85 and ecx, [inflate_fast_mask+eax*4]
+ 00000084 R
+ 00000503 03 D1 add edx,ecx
+
+ 00000505 L_decode_distance_mmx:
+ 00000505 0F D3 C1 psrlq mm0,mm1
+
+ 00000508 83 FD 20 cmp ebp,32
+ 0000050B 77 12 ja L_get_dist_code_mmx
+
+ 0000050D 0F 6E F5 movd mm6,ebp
+ 00000510 0F 6E 3E movd mm7,dword ptr [esi]
+ 00000513 83 C6 04 add esi,4
+ 00000516 0F F3 FE psllq mm7,mm6
+ 00000519 83 C5 20 add ebp,32
+ 0000051C 0F EB C7 por mm0,mm7
+
+ 0000051F L_get_dist_code_mmx:
+ 0000051F 8B 5C 24 0C mov ebx, [esp+12]
+ 00000523 0F DB E8 pand mm5,mm0
+ 00000526 0F 7E E8 movd eax,mm5
+ 00000529 0F 7F D5 movq mm5,mm2
+ 0000052C 8B 04 83 mov eax, [ebx+eax*4]
+
+ 0000052F L_dodist_mmx:
+
+ 0000052F 0F B6 CC movzx ecx,ah
+ 00000532 8B D8 mov ebx,eax
+ 00000534 C1 EB 10 shr ebx,16
+ 00000537 2B E9 sub ebp,ecx
+ 00000539 0F 6E C9 movd mm1,ecx
+
+ 0000053C A8 10 test al,16
+ 0000053E 0F 84 000000AC jz L_test_for_second_level_dist_mmx
+ 00000544 83 E0 0F and eax,15
+ 00000547 74 57 jz L_check_dist_one_mmx
+
+ 00000549 L_add_bits_to_dist_mmx:
+ 00000549 0F D3 C1 psrlq mm0,mm1
+ 0000054C 0F 6E C8 movd mm1,eax
+ 0000054F 0F 7E C1 movd ecx,mm0
+ 00000552 2B E8 sub ebp,eax
+ 00000554 23 0C 85 and ecx, [inflate_fast_mask+eax*4]
+ 00000084 R
+ 0000055B 03 D9 add ebx,ecx
+
+ 0000055D L_check_window_mmx:
+ 0000055D 89 74 24 2C mov [esp+44],esi
+ 00000561 8B C7 mov eax,edi
+ 00000563 2B 44 24 28 sub eax, [esp+40]
+
+ 00000567 3B C3 cmp eax,ebx
+ 00000569 0F 82 000000A9 jb L_clip_window_mmx
+
+ 0000056F 8B CA mov ecx,edx
+ 00000571 8B F7 mov esi,edi
+ 00000573 2B F3 sub esi,ebx
+
+ 00000575 83 E9 03 sub ecx,3
+ 00000578 8A 06 mov al, [esi]
+ 0000057A 88 07 mov [edi],al
+ 0000057C 8A 46 01 mov al, [esi+1]
+ 0000057F 8A 56 02 mov dl, [esi+2]
+ 00000582 83 C6 03 add esi,3
+ 00000585 88 47 01 mov [edi+1],al
+ 00000588 88 57 02 mov [edi+2],dl
+ 0000058B 83 C7 03 add edi,3
+ 0000058E F3/ A4 rep movsb
+
+ 00000590 8B 74 24 2C mov esi, [esp+44]
+ 00000594 8B 5C 24 08 mov ebx, [esp+8]
+ 00000598 E9 FFFFFF2D jmp L_while_test_mmx
+
+ALIGN 4
+ 000005A0 L_check_dist_one_mmx:
+ 000005A0 83 FB 01 cmp ebx,1
+ 000005A3 75 B8 jne L_check_window_mmx
+ 000005A5 39 7C 24 28 cmp [esp+40],edi
+ 000005A9 74 B2 je L_check_window_mmx
+
+ 000005AB 4F dec edi
+ 000005AC 8B CA mov ecx,edx
+ 000005AE 8A 07 mov al, [edi]
+ 000005B0 83 E9 03 sub ecx,3
+
+ 000005B3 88 47 01 mov [edi+1],al
+ 000005B6 88 47 02 mov [edi+2],al
+ 000005B9 88 47 03 mov [edi+3],al
+ 000005BC 83 C7 04 add edi,4
+ 000005BF F3/ AA rep stosb
+
+ 000005C1 8B 5C 24 08 mov ebx, [esp+8]
+ 000005C5 E9 FFFFFF00 jmp L_while_test_mmx
+
+ ALIGN 4
+ 000005CC L_test_for_second_level_length_mmx:
+ 000005CC A8 40 test al,64
+ 000005CE 0F 85 000000DE jnz L_test_for_end_of_block
+
+ 000005D4 83 E0 0F and eax,15
+ 000005D7 0F D3 C1 psrlq mm0,mm1
+ 000005DA 0F 7E C1 movd ecx,mm0
+ 000005DD 23 0C 85 and ecx, [inflate_fast_mask+eax*4]
+ 00000084 R
+ 000005E4 03 CA add ecx,edx
+ 000005E6 8B 04 8B mov eax, [ebx+ecx*4]
+ 000005E9 E9 FFFFFECC jmp L_dolen_mmx
+
+ ALIGN 4
+ 000005F0 L_test_for_second_level_dist_mmx:
+ 000005F0 A8 40 test al,64
+ 000005F2 0F 85 000000AE jnz L_invalid_distance_code
+
+ 000005F8 83 E0 0F and eax,15
+ 000005FB 0F D3 C1 psrlq mm0,mm1
+ 000005FE 0F 7E C1 movd ecx,mm0
+ 00000601 23 0C 85 and ecx, [inflate_fast_mask+eax*4]
+ 00000084 R
+ 00000608 8B 44 24 0C mov eax, [esp+12]
+ 0000060C 03 CB add ecx,ebx
+ 0000060E 8B 04 88 mov eax, [eax+ecx*4]
+ 00000611 E9 FFFFFF19 jmp L_dodist_mmx
+
+ ALIGN 4
+ 00000618 L_clip_window_mmx:
+
+ 00000618 8B C8 mov ecx,eax
+ 0000061A 8B 44 24 34 mov eax, [esp+52]
+ 0000061E F7 D9 neg ecx
+ 00000620 8B 74 24 38 mov esi, [esp+56]
+
+ 00000624 3B C3 cmp eax,ebx
+ 00000626 0F 82 000000A2 jb L_invalid_distance_too_far
+
+ 0000062C 03 CB add ecx,ebx
+ 0000062E 83 7C 24 30 00 cmp dword ptr [esp+48],0
+ 00000633 75 20 jne L_wrap_around_window_mmx
+
+ 00000635 2B C1 sub eax,ecx
+ 00000637 03 F0 add esi,eax
+
+ 00000639 3B D1 cmp edx,ecx
+ 0000063B 76 58 jbe L_do_copy1_mmx
+
+ 0000063D 2B D1 sub edx,ecx
+ 0000063F F3/ A4 rep movsb
+ 00000641 8B F7 mov esi,edi
+ 00000643 2B F3 sub esi,ebx
+ 00000645 EB 4E jmp L_do_copy1_mmx
+
+ 00000647 3B D1 cmp edx,ecx
+ 00000649 76 4A jbe L_do_copy1_mmx
+
+ 0000064B 2B D1 sub edx,ecx
+ 0000064D F3/ A4 rep movsb
+ 0000064F 8B F7 mov esi,edi
+ 00000651 2B F3 sub esi,ebx
+ 00000653 EB 40 jmp L_do_copy1_mmx
+
+ 00000655 L_wrap_around_window_mmx:
+
+ 00000655 8B 44 24 30 mov eax, [esp+48]
+ 00000659 3B C8 cmp ecx,eax
+ 0000065B 76 28 jbe L_contiguous_in_window_mmx
+
+ 0000065D 03 74 24 34 add esi, [esp+52]
+ 00000661 03 F0 add esi,eax
+ 00000663 2B F1 sub esi,ecx
+ 00000665 2B C8 sub ecx,eax
+
+
+ 00000667 3B D1 cmp edx,ecx
+ 00000669 76 2A jbe L_do_copy1_mmx
+
+ 0000066B 2B D1 sub edx,ecx
+ 0000066D F3/ A4 rep movsb
+ 0000066F 8B 74 24 38 mov esi, [esp+56]
+ 00000673 8B 4C 24 30 mov ecx, [esp+48]
+ 00000677 3B D1 cmp edx,ecx
+ 00000679 76 1A jbe L_do_copy1_mmx
+
+ 0000067B 2B D1 sub edx,ecx
+ 0000067D F3/ A4 rep movsb
+ 0000067F 8B F7 mov esi,edi
+ 00000681 2B F3 sub esi,ebx
+ 00000683 EB 10 jmp L_do_copy1_mmx
+
+ 00000685 L_contiguous_in_window_mmx:
+
+ 00000685 03 F0 add esi,eax
+ 00000687 2B F1 sub esi,ecx
+
+
+ 00000689 3B D1 cmp edx,ecx
+ 0000068B 76 08 jbe L_do_copy1_mmx
+
+ 0000068D 2B D1 sub edx,ecx
+ 0000068F F3/ A4 rep movsb
+ 00000691 8B F7 mov esi,edi
+ 00000693 2B F3 sub esi,ebx
+
+ 00000695 L_do_copy1_mmx:
+
+
+ 00000695 8B CA mov ecx,edx
+ 00000697 F3/ A4 rep movsb
+
+ 00000699 8B 74 24 2C mov esi, [esp+44]
+ 0000069D 8B 5C 24 08 mov ebx, [esp+8]
+ 000006A1 E9 FFFFFE24 jmp L_while_test_mmx
+ ; 1174 "inffast.S"
+ 000006A6 L_invalid_distance_code:
+
+
+
+
+
+ 000006A6 B9 0000004C R mov ecx, invalid_distance_code_msg
+ 000006AB BA 0000001A mov edx,INFLATE_MODE_BAD
+ 000006B0 EB 2C jmp L_update_stream_state
+
+ 000006B2 L_test_for_end_of_block:
+
+
+
+
+
+ 000006B2 A8 20 test al,32
+ 000006B4 74 0C jz L_invalid_literal_length_code
+
+ 000006B6 B9 00000000 mov ecx,0
+ 000006BB BA 0000000B mov edx,INFLATE_MODE_TYPE
+ 000006C0 EB 1C jmp L_update_stream_state
+
+ 000006C2 L_invalid_literal_length_code:
+
+
+
+
+
+ 000006C2 B9 00000030 R mov ecx, invalid_literal_length_code_msg
+ 000006C7 BA 0000001A mov edx,INFLATE_MODE_BAD
+ 000006CC EB 10 jmp L_update_stream_state
+
+ 000006CE L_invalid_distance_too_far:
+
+
+
+ 000006CE 8B 74 24 2C mov esi, [esp+44]
+ 000006D2 B9 00000064 R mov ecx, invalid_distance_too_far_msg
+ 000006D7 BA 0000001A mov edx,INFLATE_MODE_BAD
+ 000006DC EB 00 jmp L_update_stream_state
+
+ 000006DE L_update_stream_state:
+
+ 000006DE 8B 44 24 58 mov eax, [esp+88]
+ 000006E2 85 C9 test ecx,ecx
+ 000006E4 74 03 jz L_skip_msg
+ 000006E6 89 48 18 mov [eax+24],ecx
+ 000006E9 L_skip_msg:
+ 000006E9 8B 40 1C mov eax, [eax+28]
+ 000006EC 89 10 mov [eax+mode_state],edx
+ 000006EE EB 00 jmp L_break_loop
+
+ ALIGN 4
+ 000006F0 L_break_loop:
+ ; 1243 "inffast.S"
+ 000006F0 83 3D 00000000 R cmp dword ptr [inflate_fast_use_mmx],2
+ 02
+ 000006F7 75 02 jne L_update_next_in
+
+
+
+ 000006F9 8B DD mov ebx,ebp
+
+ 000006FB L_update_next_in:
+ ; 1266 "inffast.S"
+ 000006FB 8B 44 24 58 mov eax, [esp+88]
+ 000006FF 8B CB mov ecx,ebx
+ 00000701 8B 50 1C mov edx, [eax+28]
+ 00000704 C1 E9 03 shr ecx,3
+ 00000707 2B F1 sub esi,ecx
+ 00000709 C1 E1 03 shl ecx,3
+ 0000070C 2B D9 sub ebx,ecx
+ 0000070E 89 78 0C mov [eax+12],edi
+ 00000711 89 5A 3C mov [edx+bits_state],ebx
+ 00000714 8B CB mov ecx,ebx
+
+ 00000716 8D 5C 24 1C lea ebx, [esp+28]
+ 0000071A 39 5C 24 14 cmp [esp+20],ebx
+ 0000071E 75 14 jne L_buf_not_used
+
+ 00000720 2B F3 sub esi,ebx
+ 00000722 8B 18 mov ebx, [eax+0]
+ 00000724 89 5C 24 14 mov [esp+20],ebx
+ 00000728 03 F3 add esi,ebx
+ 0000072A 8B 58 04 mov ebx, [eax+4]
+ 0000072D 83 EB 0B sub ebx,11
+ 00000730 01 5C 24 14 add [esp+20],ebx
+
+ 00000734 L_buf_not_used:
+ 00000734 89 30 mov [eax+0],esi
+
+ 00000736 BB 00000001 mov ebx,1
+ 0000073B D3 E3 shl ebx,cl
+ 0000073D 4B dec ebx
+
+
+
+
+
+ 0000073E 83 3D 00000000 R cmp dword ptr [inflate_fast_use_mmx],2
+ 02
+ 00000745 75 08 jne L_update_hold
+
+
+
+ 00000747 0F D3 C1 psrlq mm0,mm1
+ 0000074A 0F 7E C5 movd ebp,mm0
+
+ 0000074D 0F 77 emms
+
+ 0000074F L_update_hold:
+
+
+
+ 0000074F 23 EB and ebp,ebx
+ 00000751 89 6A 38 mov [edx+hold_state],ebp
+
+
+
+
+ 00000754 8B 5C 24 14 mov ebx, [esp+20]
+ 00000758 3B DE cmp ebx,esi
+ 0000075A 76 0A jbe L_last_is_smaller
+
+ 0000075C 2B DE sub ebx,esi
+ 0000075E 83 C3 0B add ebx,11
+ 00000761 89 58 04 mov [eax+4],ebx
+ 00000764 EB 0A jmp L_fixup_out
+ 00000766 L_last_is_smaller:
+ 00000766 2B F3 sub esi,ebx
+ 00000768 F7 DE neg esi
+ 0000076A 83 C6 0B add esi,11
+ 0000076D 89 70 04 mov [eax+4],esi
+
+
+
+
+ 00000770 L_fixup_out:
+
+ 00000770 8B 5C 24 10 mov ebx, [esp+16]
+ 00000774 3B DF cmp ebx,edi
+ 00000776 76 0D jbe L_end_is_smaller
+
+ 00000778 2B DF sub ebx,edi
+ 0000077A 81 C3 00000101 add ebx,257
+ 00000780 89 58 10 mov [eax+16],ebx
+ 00000783 EB 0D jmp L_done
+ 00000785 L_end_is_smaller:
+ 00000785 2B FB sub edi,ebx
+ 00000787 F7 DF neg edi
+ 00000789 81 C7 00000101 add edi,257
+ 0000078F 89 78 10 mov [eax+16],edi
+
+
+
+
+
+ 00000792 L_done:
+ 00000792 83 C4 40 add esp,64
+ 00000795 9D popfd
+ 00000796 5B pop ebx
+ 00000797 5D pop ebp
+ 00000798 5E pop esi
+ 00000799 5F pop edi
+ 0000079A C3 ret
+
+ 00000004 _TEXT ends
+ end
+Microsoft (R) Macro Assembler Version 9.00.30729.01 04/30/10 23:43:25
+inffas32.asm Symbols 2 - 1
+
+
+
+
+Segments and Groups:
+
+ N a m e Size Length Align Combine Class
+
+FLAT . . . . . . . . . . . . . . GROUP
+_DATA . . . . . . . . . . . . . 32 Bit 00000004 Para Public 'DATA'
+_TEXT . . . . . . . . . . . . . 32 Bit 0000079B Para Public 'CODE'
+
+
+Symbols:
+
+ N a m e Type Value Attr
+
+@CodeSize . . . . . . . . . . . Number 00000000h
+@DataSize . . . . . . . . . . . Number 00000000h
+@Interface . . . . . . . . . . . Number 00000000h
+@Model . . . . . . . . . . . . . Number 00000007h
+@code . . . . . . . . . . . . . Text _TEXT
+@data . . . . . . . . . . . . . Text FLAT
+@fardata? . . . . . . . . . . . Text FLAT
+@fardata . . . . . . . . . . . . Text FLAT
+@stack . . . . . . . . . . . . . Text FLAT
+INFLATE_MODE_BAD . . . . . . . . Number 0000001Ah
+INFLATE_MODE_TYPE . . . . . . . Number 0000000Bh
+L_add_bits_to_dist_mmx . . . . . L Near 00000549 _TEXT
+L_add_bits_to_dist . . . . . . . L Near 00000324 _TEXT
+L_add_bits_to_len . . . . . . . L Near 000002C2 _TEXT
+L_align_long . . . . . . . . . . L Near 000001C2 _TEXT
+L_break_loop . . . . . . . . . . L Near 000006F0 _TEXT
+L_buf_not_used . . . . . . . . . L Near 00000734 _TEXT
+L_check_dist_one_mmx . . . . . . L Near 000005A0 _TEXT
+L_check_dist_one . . . . . . . . L Near 00000374 _TEXT
+L_check_mmx_pop . . . . . . . . L Near 00000251 _TEXT
+L_check_mmx . . . . . . . . . . L Near 000001DE _TEXT
+L_check_window_mmx . . . . . . . L Near 0000055D _TEXT
+L_check_window . . . . . . . . . L Near 00000336 _TEXT
+L_clip_window_mmx . . . . . . . L Near 00000618 _TEXT
+L_clip_window . . . . . . . . . L Near 000003DC _TEXT
+L_contiguous_in_window_mmx . . . L Near 00000685 _TEXT
+L_contiguous_in_window . . . . . L Near 00000451 _TEXT
+L_decode_distance_mmx . . . . . L Near 00000505 _TEXT
+L_decode_distance . . . . . . . L Near 000002D6 _TEXT
+L_do_copy1_mmx . . . . . . . . . L Near 00000695 _TEXT
+L_do_copy1 . . . . . . . . . . . L Near 00000465 _TEXT
+L_do_loop_mmx . . . . . . . . . L Near 00000494 _TEXT
+L_do_loop . . . . . . . . . . . L Near 00000258 _TEXT
+L_dodist_mmx . . . . . . . . . . L Near 0000052F _TEXT
+L_dodist . . . . . . . . . . . . L Near 000002F5 _TEXT
+L_dolen_mmx . . . . . . . . . . L Near 000004BA _TEXT
+L_dolen . . . . . . . . . . . . L Near 00000276 _TEXT
+L_done . . . . . . . . . . . . . L Near 00000792 _TEXT
+L_dont_use_mmx . . . . . . . . . L Near 00000247 _TEXT
+L_end_is_smaller . . . . . . . . L Near 00000785 _TEXT
+L_fixup_out . . . . . . . . . . L Near 00000770 _TEXT
+L_get_dist_code_mmx . . . . . . L Near 0000051F _TEXT
+L_get_distance_code . . . . . . L Near 000002E8 _TEXT
+L_get_length_code_mmx . . . . . L Near 000004AE _TEXT
+L_get_length_code . . . . . . . L Near 0000026A _TEXT
+L_init_mmx . . . . . . . . . . . L Near 00000474 _TEXT
+L_invalid_distance_code . . . . L Near 000006A6 _TEXT
+L_invalid_distance_too_far . . . L Near 000006CE _TEXT
+L_invalid_literal_length_code . L Near 000006C2 _TEXT
+L_is_aligned . . . . . . . . . . L Near 000001DA _TEXT
+L_last_is_smaller . . . . . . . L Near 00000766 _TEXT
+L_save_len . . . . . . . . . . . L Near 000002D2 _TEXT
+L_skip_msg . . . . . . . . . . . L Near 000006E9 _TEXT
+L_test_for_end_of_block . . . . L Near 000006B2 _TEXT
+L_test_for_length_base_mmx . . . L Near 000004DF _TEXT
+L_test_for_length_base . . . . . L Near 00000299 _TEXT
+L_test_for_second_level_dist_mmx . L Near 000005F0 _TEXT
+L_test_for_second_level_dist . . L Near 000003BC _TEXT
+L_test_for_second_level_length_mmx . L Near 000005CC _TEXT
+L_test_for_second_level_length . L Near 0000039C _TEXT
+L_update_hold . . . . . . . . . L Near 0000074F _TEXT
+L_update_next_in . . . . . . . . L Near 000006FB _TEXT
+L_update_stream_state . . . . . L Near 000006DE _TEXT
+L_use_mmx . . . . . . . . . . . L Near 0000023B _TEXT
+L_while_test_mmx . . . . . . . . L Near 000004CA _TEXT
+L_while_test . . . . . . . . . . L Near 00000284 _TEXT
+L_wrap_around_window_mmx . . . . L Near 00000655 _TEXT
+L_wrap_around_window . . . . . . L Near 0000041D _TEXT
+_inflate_fast . . . . . . . . . L Near 00000000 _TEXT Public
+bits_state . . . . . . . . . . . Number 0000003Ch
+distbits_state . . . . . . . . . Number 00000058h
+distcode_state . . . . . . . . . Number 00000050h
+hold_state . . . . . . . . . . . Number 00000038h
+inflate_fast_entry . . . . . . . L Near 00000108 _TEXT
+inflate_fast_mask . . . . . . . L Near 00000084 _TEXT
+inflate_fast_use_mmx . . . . . . L Near 00000000 _DATA
+invalid_distance_code_msg . . . L Near 0000004C _TEXT
+invalid_distance_too_far_msg . . L Near 00000064 _TEXT
+invalid_literal_length_code_msg L Near 00000030 _TEXT
+lenbits_state . . . . . . . . . Number 00000054h
+lencode_state . . . . . . . . . Number 0000004Ch
+mode_state . . . . . . . . . . . Number 00000000h
+window_state . . . . . . . . . . Number 00000034h
+write_state . . . . . . . . . . Number 00000030h
+wsize_state . . . . . . . . . . Number 00000028h
+zlib1222sup . . . . . . . . . . Number 00000008h
+
+ 0 Warnings
+ 0 Errors
Added: trunk/OpenMPT/zlib/contrib/masmx86/inffas32.obj
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/zlib/contrib/masmx86/inffas32.obj
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/OpenMPT/zlib/contrib/masmx86/match686.lst
===================================================================
--- trunk/OpenMPT/zlib/contrib/masmx86/match686.lst (rev 0)
+++ trunk/OpenMPT/zlib/contrib/masmx86/match686.lst 2010-04-30 21:45:37 UTC (rev 581)
@@ -0,0 +1,623 @@
+Microsoft (R) Macro Assembler Version 9.00.30729.01 04/30/10 23:43:24
+match686.asm Page 1 - 1
+
+
+ ; match686.asm -- Asm portion of the optimized longest_match for 32 bits x86
+ ; Copyright (C) 1995-1996 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
+ ; File written by Gilles Vollant, by converting match686.S from Brian Raiter
+ ; for MASM. This is as assembly version of longest_match
+ ; from Jean-loup Gailly in deflate.c
+ ;
+ ; http://www.zlib.net
+ ; http://www.winimage.com/zLibDll
+ ; http://www.muppetlabs.com/~breadbox/software/assembly.html
+ ;
+ ; For Visual C++ 4.x and higher and ML 6.x and higher
+ ; ml.exe is distributed in
+ ; http://www.microsoft.com/downloads/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
+ ;
+ ; this file contain two implementation of longest_match
+ ;
+ ; this longest_match was written by Brian raiter (1998), optimized for Pentium Pro
+ ; (and the faster known version of match_init on modern Core 2 Duo and AMD Phenom)
+ ;
+ ; for using an assembly version of longest_match, you need define ASMV in project
+ ;
+ ; compile the asm file running
+ ; ml /coff /Zi /c /Flmatch686.lst match686.asm
+ ; and do not include match686.obj in your project
+ ;
+ ; note: contrib of zLib 1.2.3 and earlier contained both a deprecated version for
+ ; Pentium (prior Pentium Pro) and this version for Pentium Pro and modern processor
+ ; with autoselect (with cpu detection code)
+ ; if you want support the old pentium optimization, you can still use these version
+ ;
+ ; this file is not optimized for old pentium, but it compatible with all x86 32 bits
+ ; processor (starting 80386)
+ ;
+ ;
+ ; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2
+
+ ;uInt longest_match(s, cur_match)
+ ; deflate_state *s;
+ ; IPos cur_match; /* current match */
+
+ = 0000004C NbStack equ 76
+ = dword ptr[esp+NbStack-0] cur_match equ dword ptr[esp+NbStack-0]
+ = dword ptr[esp+NbStack-4] str_s equ dword ptr[esp+NbStack-4]
+ ; 5 dword on top (ret,ebp,esi,edi,ebx)
+ = dword ptr[esp+NbStack-8] adrret equ dword ptr[esp+NbStack-8]
+ = dword ptr[esp+NbStack-12 pushebp equ dword ptr[esp+NbStack-12]
+ ]
+ = dword ptr[esp+NbStack-16 pushedi equ dword ptr[esp+NbStack-16]
+ ]
+ = dword ptr[esp+NbStack-20 pushesi equ dword ptr[esp+NbStack-20]
+ ]
+ = dword ptr[esp+NbStack-24 pushebx equ dword ptr[esp+NbStack-24]
+ ]
+
+ = dword ptr [esp+NbStack-2 chain_length equ dword ptr [esp+NbStack-28]
+ 8]
+ = dword ptr [esp+NbStack-3 limit equ dword ptr [esp+NbStack-32]
+ 2]
+ = dword ptr [esp+NbStack-3 best_len equ dword ptr [esp+NbStack-36]
+ 6]
+ = dword ptr [esp+NbStack-4 window equ dword ptr [esp+NbStack-40]
+ 0]
+ = dword ptr [esp+NbStack-4 prev equ dword ptr [esp+NbStack-44]
+ 4]
+ = word ptr [esp+NbStack-48 scan_start equ word ptr [esp+NbStack-48]
+ ]
+ = dword ptr [esp+NbStack-5 wmask equ dword ptr [esp+NbStack-52]
+ 2]
+ = dword ptr [esp+NbStack-5 match_start_ptr equ dword ptr [esp+NbStack-56]
+ 6]
+ = dword ptr [esp+NbStack-6 nice_match equ dword ptr [esp+NbStack-60]
+ 0]
+ = dword ptr [esp+NbStack-6 scan equ dword ptr [esp+NbStack-64]
+ 4]
+
+ = dword ptr [esp+NbStack-6 windowlen equ dword ptr [esp+NbStack-68]
+ 8]
+ = dword ptr [esp+NbStack-7 match_start equ dword ptr [esp+NbStack-72]
+ 2]
+ = dword ptr [esp+NbStack-7 strend equ dword ptr [esp+NbStack-76]
+ 6]
+ = 00000034 NbStackAdd equ (NbStack-24)
+
+ .386p
+
+ name gvmatch
+ .MODEL FLAT
+
+
+
+ ; all the +zlib1222add offsets are due to the addition of fields
+ ; in zlib in the deflate_state structure since the asm code was first written
+ ; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
+ ; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
+ ; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
+
+ = 00000008 zlib1222add equ 8
+
+ ; Note : these value are good with a 8 bytes boundary pack structure
+ = 0000007C dep_chain_length equ 74h+zlib1222add
+ = 00000038 dep_window equ 30h+zlib1222add
+ = 0000006C dep_strstart equ 64h+zlib1222add
+ = 00000078 dep_prev_length equ 70h+zlib1222add
+ = 00000090 dep_nice_match equ 88h+zlib1222add
+ = 0000002C dep_w_size equ 24h+zlib1222add
+ = 00000040 dep_prev equ 38h+zlib1222add
+ = 00000034 dep_w_mask equ 2ch+zlib1222add
+ = 0000008C dep_good_match equ 84h+zlib1222add
+ = 00000070 dep_match_start equ 68h+zlib1222add
+ = 00000074 dep_lookahead equ 6ch+zlib1222add
+
+
+ 00000000 _TEXT segment
+
+ IFDEF NOUNDERLINE
+ ELSE
+ public _longest_match
+ public _match_init
+ ENDIF
+
+ = 00000102 MAX_MATCH equ 258
+ = 00000003 MIN_MATCH equ 3
+ = 00000106 MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1)
+
+
+
+ = 00000102 MAX_MATCH equ 258
+ = 00000003 MIN_MATCH equ 3
+ = 00000106 MIN_LOOKAHEAD equ (MAX_MATCH + MIN_MATCH + 1)
+ = 00000100 MAX_MATCH_8_ equ ((MAX_MATCH + 7) AND 0FFF0h)
+
+
+ ;;; stack frame offsets
+
+ = esp + 0 chainlenwmask equ esp + 0 ; high word: current chain len
+ ; low word: s->wmask
+ = esp + 4 window equ esp + 4 ; local copy of s->window
+ = esp + 8 windowbestlen equ esp + 8 ; s->window + bestlen
+ = esp + 16 scanstart equ esp + 16 ; first two bytes of string
+ = esp + 12 scanend equ esp + 12 ; last two bytes of string
+ = esp + 20 scanalign equ esp + 20 ; dword-misalignment of string
+ = esp + 24 nicematch equ esp + 24 ; a good enough match size
+ = esp + 28 bestlen equ esp + 28 ; size of best match so far
+ = esp + 32 scan equ esp + 32 ; ptr to string wanting match
+
+ = 00000024 LocalVarsSize equ 36
+ ; saved ebx byte esp + 36
+ ; saved edi byte esp + 40
+ ; saved esi byte esp + 44
+ ; saved ebp byte esp + 48
+ ; return address byte esp + 52
+ = esp + 56 deflatestate equ esp + 56 ; the function arguments
+ = esp + 60 curmatch equ esp + 60
+
+ ;;; Offsets for fields in the deflate_state structure. These numbers
+ ;;; are calculated from the definition of deflate_state, with the
+ ;;; assumption that the compiler will dword-align the fields. (Thus,
+ ;;; changing the definition of deflate_state could easily cause this
+ ;;; program to crash horribly, without so much as a warning at
+ ;;; compile time. Sigh.)
+
+ = 0000002C dsWSize equ 36+zlib1222add
+ = 00000034 dsWMask equ 44+zlib1222add
+ = 00000038 dsWindow equ 48+zlib1222add
+ = 00000040 dsPrev equ 56+zlib1222add
+ = 00000060 dsMatchLen equ 88+zlib1222add
+ = 00000064 dsPrevMatch equ 92+zlib1222add
+ = 0000006C dsStrStart equ 100+zlib1222add
+ = 00000070 dsMatchStart equ 104+zlib1222add
+ = 00000074 dsLookahead equ 108+zlib1222add
+ = 00000078 dsPrevLen equ 112+zlib1222add
+ = 0000007C dsMaxChainLen equ 116+zlib1222add
+ = 0000008C dsGoodMatch equ 132+zlib1222add
+ = 00000090 dsNiceMatch equ 136+zlib1222add
+
+
+ ;;; match686.asm -- Pentium-Pro-optimized version of longest_match()
+ ;;; Written for zlib 1.1.2
+ ;;; Copyright (C) 1998 Brian Raiter <bre...@mu...>
+ ;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html
+ ;;;
+ ;;
+ ;; This software is provided 'as-is', without any express or implied
+ ;; warranty. In no event will the authors be held liable for any damages
+ ;; arising from the use of this software.
+ ;;
+ ;; Permission is granted to anyone to use this software for any purpose,
+ ;; including commercial applications, and to alter it and redistribute it
+ ;; freely, subject to the following restrictions:
+ ;;
+ ;; 1. The origin of this software must not be misrepresented; you must not
+ ;; claim that you wrote the original software. If you use this software
+ ;; in a product, an acknowledgment in the product documentation would be
+ ;; appreciated but is not required.
+ ;; 2. Altered source versions must be plainly marked as such, and must not be
+ ;; misrepresented as being the original software
+ ;; 3. This notice may not be removed or altered from any source distribution.
+ ;;
+
+ ;GLOBAL _longest_match, _match_init
+
+
+ ;SECTION .text
+
+ ;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
+
+ ;_longest_match:
+ IFDEF NOUNDERLINE
+ ELSE
+ 00000000 _longest_match proc near
+ ENDIF
+
+ ;;; Save registers that the compiler may be using, and adjust esp to
+ ;;; make room for our stack frame.
+
+ 00000000 55 push ebp
+ 00000001 57 push edi
+ 00000002 56 push esi
+ 00000003 53 push ebx
+ 00000004 83 EC 24 sub esp, LocalVarsSize
+
+ ;;; Retrieve the function arguments. ecx will hold cur_match
+ ;;; throughout the entire function. edx will hold the pointer to the
+ ;;; deflate_state structure during the function's setup (before
+ ;;; entering the main loop.
+
+ 00000007 8B 54 24 38 mov edx, [deflatestate]
+ 0000000B 8B 4C 24 3C mov ecx, [curmatch]
+
+ ;;; uInt wmask = s->w_mask;
+ ;;; unsigned chain_length = s->max_chain_length;
+ ;;; if (s->prev_length >= s->good_match) {
+ ;;; chain_length >>= 2;
+ ;;; }
+
+ 0000000F 8B 42 78 mov eax, [edx + dsPrevLen]
+ 00000012 8B 9A 0000008C mov ebx, [edx + dsGoodMatch]
+ 00000018 3B C3 cmp eax, ebx
+ 0000001A 8B 42 34 mov eax, [edx + dsWMask]
+ 0000001D 8B 5A 7C mov ebx, [edx + dsMaxChainLen]
+ 00000020 7C 03 jl LastMatchGood
+ 00000022 C1 EB 02 shr ebx, 2
+ 00000025 LastMatchGood:
+
+ ;;; chainlen is decremented once beforehand so that the function can
+ ;;; use the sign flag instead of the zero flag for the exit test.
+ ;;; It is then shifted into the high word, to make room for the wmask
+ ;;; value, which it will always accompany.
+
+ 00000025 4B dec ebx
+ 00000026 C1 E3 10 shl ebx, 16
+ 00000029 0B D8 or ebx, eax
+ 0000002B 89 1C 24 mov [chainlenwmask], ebx
+
+ ;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
+
+ 0000002E 8B 82 00000090 mov eax, [edx + dsNiceMatch]
+ 00000034 8B 5A 74 mov ebx, [edx + dsLookahead]
+ 00000037 3B D8 cmp ebx, eax
+ 00000039 7C 02 jl LookaheadLess
+ 0000003B 8B D8 mov ebx, eax
+ 0000003D 89 5C 24 18 LookaheadLess: mov [nicematch], ebx
+
+ ;;; register Bytef *scan = s->window + s->strstart;
+
+ 00000041 8B 72 38 mov esi, [edx + dsWindow]
+ 00000044 89 74 24 04 mov [window], esi
+ 00000048 8B 6A 6C mov ebp, [edx + dsStrStart]
+ 0000004B 8D 7C 35 00 lea edi, [esi + ebp]
+ 0000004F 89 7C 24 20 mov [scan], edi
+
+ ;;; Determine how many bytes the scan ptr is off from being
+ ;;; dword-aligned.
+
+ 00000053 8B C7 mov eax, edi
+ 00000055 F7 D8 neg eax
+ 00000057 83 E0 03 and eax, 3
+ 0000005A 89 44 24 14 mov [scanalign], eax
+
+ ;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
+ ;;; s->strstart - (IPos)MAX_DIST(s) : NIL;
+
+ 0000005E 8B 42 2C mov eax, [edx + dsWSize]
+ 00000061 2D 00000106 sub eax, MIN_LOOKAHEAD
+ 00000066 2B E8 sub ebp, eax
+ 00000068 7F 02 jg LimitPositive
+ 0000006A 33 ED xor ebp, ebp
+ 0000006C LimitPositive:
+
+ ;;; int best_len = s->prev_length;
+
+ 0000006C 8B 42 78 mov eax, [edx + dsPrevLen]
+ 0000006F 89 44 24 1C mov [bestlen], eax
+
+ ;;; Store the sum of s->window + best_len in esi locally, and in esi.
+
+ 00000073 03 F0 add esi, eax
+ 00000075 89 74 24 08 mov [windowbestlen], esi
+
+ ;;; register ush scan_start = *(ushf*)scan;
+ ;;; register ush scan_end = *(ushf*)(scan+best_len-1);
+ ;;; Posf *prev = s->prev;
+
+ 00000079 0F B7 1F movzx ebx, word ptr [edi]
+ 0000007C 89 5C 24 10 mov [scanstart], ebx
+ 00000080 0F B7 5C 38 FF movzx ebx, word ptr [edi + eax - 1]
+ 00000085 89 5C 24 0C mov [scanend], ebx
+ 00000089 8B 7A 40 mov edi, [edx + dsPrev]
+
+ ;;; Jump into the main loop.
+
+ 0000008C 8B 14 24 mov edx, [chainlenwmask]
+ 0000008F EB 1D jmp short LoopEntry
+
+ align 4
+
+ ;;; do {
+ ;;; match = s->window + cur_match;
+ ;;; if (*(ushf*)(match+best_len-1) != scan_end ||
+ ;;; *(ushf*)match != scan_start) continue;
+ ;;; [...]
+ ;;; } while ((cur_match = prev[cur_match & wmask]) > limit
+ ;;; && --chain_length != 0);
+ ;;;
+ ;;; Here is the inner loop of the function. The function will spend the
+ ;;; majority of its time in this loop, and majority of that time will
+ ;;; be spent in the first ten instructions.
+ ;;;
+ ;;; Within this loop:
+ ;;; ebx = scanend
+ ;;; ecx = curmatch
+ ;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
+ ;;; esi = windowbestlen - i.e., (window + bestlen)
+ ;;; edi = prev
+ ;;; ebp = limit
+
+ 00000094 LookupLoop:
+ 00000094 23 CA and ecx, edx
+ 00000096 0F B7 0C 4F movzx ecx, word ptr [edi + ecx*2]
+ 0000009A 3B CD cmp ecx, ebp
+ 0000009C 0F 86 000000E0 jbe LeaveNow
+ 000000A2 81 EA 00010000 sub edx, 00010000h
+ 000000A8 0F 88 000000D4 js LeaveNow
+ 000000AE 0F B7 44 31 FF LoopEntry: movzx eax, word ptr [esi + ecx - 1]
+ 000000B3 3B C3 cmp eax, ebx
+ 000000B5 75 DD jnz LookupLoop
+ 000000B7 8B 44 24 04 mov eax, [window]
+ 000000BB 0F B7 04 01 movzx eax, word ptr [eax + ecx]
+ 000000BF 3B 44 24 10 cmp eax, [scanstart]
+ 000000C3 75 CF jnz LookupLoop
+
+ ;;; Store the current value of chainlen.
+
+ 000000C5 89 14 24 mov [chainlenwmask], edx
+
+ ;;; Point edi to the string under scrutiny, and esi to the string we
+ ;;; are hoping to match it up with. In actuality, esi and edi are
+ ;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
+ ;;; initialized to -(MAX_MATCH_8 - scanalign).
+
+ 000000C8 8B 74 24 04 mov esi, [window]
+ 000000CC 8B 7C 24 20 mov edi, [scan]
+ 000000D0 03 F1 add esi, ecx
+ 000000D2 8B 44 24 14 mov eax, [scanalign]
+ 000000D6 BA FFFFFEF8 mov edx, 0fffffef8h; -(MAX_MATCH_8)
+ 000000DB 8D BC 38 lea edi, [edi + eax + 0108h] ;MAX_MATCH_8]
+ 00000108
+ 000000E2 8D B4 30 lea esi, [esi + eax + 0108h] ;MAX_MATCH_8]
+ 00000108
+
+ ;;; Test the strings for equality, 8 bytes at a time. At the end,
+ ;;; adjust edx so that it is offset to the exact byte that mismatched.
+ ;;;
+ ;;; We already know at this point that the first three bytes of the
+ ;;; strings match each other, and they can be safely passed over before
+ ;;; starting the compare loop. So what this code does is skip over 0-3
+ ;;; bytes, as much as necessary in order to dword-align the edi
+ ;;; pointer. (esi will still be misaligned three times out of four.)
+ ;;;
+ ;;; It should be confessed that this loop usually does not represent
+ ;;; much of the total running time. Replacing it with a more
+ ;;; straightforward "rep cmpsb" would not drastically degrade
+ ;;; performance.
+
+ 000000E9 LoopCmps:
+ 000000E9 8B 04 32 mov eax, [esi + edx]
+ 000000EC 33 04 3A xor eax, [edi + edx]
+ 000000EF 75 14 jnz LeaveLoopCmps
+ 000000F1 8B 44 32 04 mov eax, [esi + edx + 4]
+ 000000F5 33 44 3A 04 xor eax, [edi + edx + 4]
+ 000000F9 75 07 jnz LeaveLoopCmps4
+ 000000FB 83 C2 08 add edx, 8
+ 000000FE 75 E9 jnz LoopCmps
+ 00000100 EB 71 jmp short LenMaximum
+ 00000102 83 C2 04 LeaveLoopCmps4: add edx, 4
+ 00000105 A9 0000FFFF LeaveLoopCmps: test eax, 0000FFFFh
+ 0000010A 75 06 jnz LenLower
+ 0000010C 83 C2 02 add edx, 2
+ 0000010F C1 E8 10 shr eax, 16
+ 00000112 2C 01 LenLower: sub al, 1
+ 00000114 83 D2 00 adc edx, 0
+
+ ;;; Calculate the length of the match. If it is longer than MAX_MATCH,
+ ;;; then automatically accept it as the best possible match and leave.
+
+ 00000117 8D 04 3A lea eax, [edi + edx]
+ 0000011A 8B 7C 24 20 mov edi, [scan]
+ 0000011E 2B C7 sub eax, edi
+ 00000120 3D 00000102 cmp eax, MAX_MATCH
+ 00000125 7D 4C jge LenMaximum
+
+ ;;; If the length of the match is not longer than the best match we
+ ;;; have so far, then forget it and return to the lookup loop.
+
+ 00000127 8B 54 24 38 mov edx, [deflatestate]
+ 0000012B 8B 5C 24 1C mov ebx, [bestlen]
+ 0000012F 3B C3 cmp eax, ebx
+ 00000131 7F 13 jg LongerMatch
+ 00000133 8B 74 24 08 mov esi, [windowbestlen]
+ 00000137 8B 7A 40 mov edi, [edx + dsPrev]
+ 0000013A 8B 5C 24 0C mov ebx, [scanend]
+ 0000013E 8B 14 24 mov edx, [chainlenwmask]
+ 00000141 E9 FFFFFF4E jmp LookupLoop
+
+ ;;; s->match_start = cur_match;
+ ;;; best_len = len;
+ ;;; if (len >= nice_match) break;
+ ;;; scan_end = *(ushf*)(scan+best_len-1);
+
+ 00000146 8B 5C 24 18 LongerMatch: mov ebx, [nicematch]
+ 0000014A 89 44 24 1C mov [bestlen], eax
+ 0000014E 89 4A 70 mov [edx + dsMatchStart], ecx
+ 00000151 3B C3 cmp eax, ebx
+ 00000153 7D 2D jge LeaveNow
+ 00000155 8B 74 24 04 mov esi, [window]
+ 00000159 03 F0 add esi, eax
+ 0000015B 89 74 24 08 mov [windowbestlen], esi
+ 0000015F 0F B7 5C 38 FF movzx ebx, word ptr [edi + eax - 1]
+ 00000164 8B 7A 40 mov edi, [edx + dsPrev]
+ 00000167 89 5C 24 0C mov [scanend], ebx
+ 0000016B 8B 14 24 mov edx, [chainlenwmask]
+ 0000016E E9 FFFFFF21 jmp LookupLoop
+
+ ;;; Accept the current string, with the maximum possible length.
+
+ 00000173 8B 54 24 38 LenMaximum: mov edx, [deflatestate]
+ 00000177 C7 44 24 1C mov dword ptr [bestlen], MAX_MATCH
+ 00000102
+ 0000017F 89 4A 70 mov [edx + dsMatchStart], ecx
+
+ ;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
+ ;;; return s->lookahead;
+
+ 00000182 LeaveNow:
+ 00000182 8B 54 24 38 mov edx, [deflatestate]
+ 00000186 8B 5C 24 1C mov ebx, [bestlen]
+ 0000018A 8B 42 74 mov eax, [edx + dsLookahead]
+ 0000018D 3B D8 cmp ebx, eax
+ 0000018F 7F 02 jg LookaheadRet
+ 00000191 8B C3 mov eax, ebx
+ 00000193 LookaheadRet:
+
+ ;;; Restore the stack and return from whence we came.
+
+ 00000193 83 C4 24 add esp, LocalVarsSize
+ 00000196 5B pop ebx
+ 00000197 5E pop esi
+ 00000198 5F pop edi
+ 00000199 5D pop ebp
+
+ 0000019A C3 ret
+ ; please don't remove this string !
+ ; Your can freely use match686 in any free or commercial app if you don't remove the string in the binary!
+ 0000019B 0D 0A 61 73 6D db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah
+ 36 38 36 20 77
+ 69 74 68 20 6D
+ 61 73 6D 2C 20
+ 6F 70 74 69 6D
+ 69 73 65 64 20
+ 61 73 73 65 6D
+ 62 6C 79 20 63
+ 6F 64 65 20 66
+ 72 6F 6D 20 42
+ 72 69 61 6E 20
+ 52 61 69 74 65
+ 72 2C 20 77 72
+ 69 74 74 65 6E
+ 20 31 39 39 38
+ 0D 0A
+
+
+ IFDEF NOUNDERLINE
+ ELSE
+ 000001E8 _longest_match endp
+ ENDIF
+
+ IFDEF NOUNDERLINE
+ ELSE
+ 000001E8 _match_init proc near
+ 000001E8 C3 ret
+ 000001E9 _match_init endp
+ ENDIF
+
+
+ 000001E9 _TEXT ends
+ end
+Microsoft (R) Macro Assembler Version 9.00.30729.01 04/30/10 23:43:24
+match686.asm Symbols 2 - 1
+
+
+
+
+Segments and Groups:
+
+ N a m e Size Length Align Combine Class
+
+FLAT . . . . . . . . . . . . . . GROUP
+_DATA . . . . . . . . . . . . . 32 Bit 00000000 DWord Public 'DATA'
+_TEXT . . . . . . . . . . . . . 32 Bit 000001E9 DWord Public 'CODE'
+
+
+Procedures, parameters, and locals:
+
+ N a m e Type Value Attr
+
+_longest_match . . . . . . . . . P Near 00000000 _TEXT Length= 000001E8 Public
+ LastMatchGood . . . . . . . . L Near 00000025 _TEXT
+ LookaheadLess . . . . . . . . L Near 0000003D _TEXT
+ LimitPositive . . . . . . . . L Near 0000006C _TEXT
+ LookupLoop . . . . . . . . . . L Near 00000094 _TEXT
+ LoopEntry . . . . . . . . . . L Near 000000AE _TEXT
+ LoopCmps . . . . . . . . . . . L Near 000000E9 _TEXT
+ LeaveLoopCmps4 . . . . . . . . L Near 00000102 _TEXT
+ LeaveLoopCmps . . . . . . . . L Near 00000105 _TEXT
+ LenLower . . . . . . . . . . . L Near 00000112 _TEXT
+ LongerMatch . . . . . . . . . L Near 00000146 _TEXT
+ LenMaximum . . . . . . . . . . L Near 00000173 _TEXT
+ LeaveNow . . . . . . . . . . . L Near 00000182 _TEXT
+ LookaheadRet . . . . . . . . . L Near 00000193 _TEXT
+_match_init . . . . . . . . . . P Near 000001E8 _TEXT Length= 00000001 Public
+
+
+Symbols:
+
+ N a m e Type Value Attr
+
+@CodeSize . . . . . . . . . . . Number 00000000h
+@DataSize . . . . . . . . . . . Number 00000000h
+@Interface . . . . . . . . . . . Number 00000000h
+@Model . . . . . . . . . . . . . Number 00000007h
+@co...
[truncated message content] |
|
From: <sag...@us...> - 2010-04-30 21:29:00
|
Revision: 580
http://modplug.svn.sourceforge.net/modplug/?rev=580&view=rev
Author: saga-games
Date: 2010-04-30 21:28:47 +0000 (Fri, 30 Apr 2010)
Log Message:
-----------
Updated zlib to version 1.2.5
Modified Paths:
--------------
trunk/OpenMPT/zlib/ChangeLog
trunk/OpenMPT/zlib/INDEX
trunk/OpenMPT/zlib/Makefile.in
trunk/OpenMPT/zlib/README
trunk/OpenMPT/zlib/configure
trunk/OpenMPT/zlib/contrib/vstudio/readme.txt
trunk/OpenMPT/zlib/contrib/vstudio/vc10/zlib.rc
trunk/OpenMPT/zlib/contrib/vstudio/vc9/miniunz.vcproj
trunk/OpenMPT/zlib/contrib/vstudio/vc9/minizip.vcproj
trunk/OpenMPT/zlib/contrib/vstudio/vc9/testzlib.vcproj
trunk/OpenMPT/zlib/contrib/vstudio/vc9/testzlibdll.vcproj
trunk/OpenMPT/zlib/contrib/vstudio/vc9/zlib.rc
trunk/OpenMPT/zlib/contrib/vstudio/vc9/zlibstat.vcproj
trunk/OpenMPT/zlib/contrib/vstudio/vc9/zlibvc.def
trunk/OpenMPT/zlib/contrib/vstudio/vc9/zlibvc.sln
trunk/OpenMPT/zlib/contrib/vstudio/vc9/zlibvc.vcproj
trunk/OpenMPT/zlib/crc32.c
trunk/OpenMPT/zlib/deflate.c
trunk/OpenMPT/zlib/deflate.h
trunk/OpenMPT/zlib/inffast.c
trunk/OpenMPT/zlib/inffast.h
trunk/OpenMPT/zlib/inftrees.c
trunk/OpenMPT/zlib/inftrees.h
trunk/OpenMPT/zlib/minigzip.c
trunk/OpenMPT/zlib/trees.c
trunk/OpenMPT/zlib/trees.h
trunk/OpenMPT/zlib/zconf.h
trunk/OpenMPT/zlib/zlib.3
trunk/OpenMPT/zlib/zlib.h
trunk/OpenMPT/zlib/zutil.c
trunk/OpenMPT/zlib/zutil.h
Added Paths:
-----------
trunk/OpenMPT/zlib/contrib/masmx64/bld_ml64.bat
trunk/OpenMPT/zlib/contrib/masmx64/gvmat64.asm
trunk/OpenMPT/zlib/contrib/masmx64/inffas8664.c
trunk/OpenMPT/zlib/contrib/masmx64/inffasx64.asm
trunk/OpenMPT/zlib/contrib/masmx64/readme.txt
trunk/OpenMPT/zlib/contrib/masmx86/bld_ml32.bat
trunk/OpenMPT/zlib/contrib/masmx86/inffas32.asm
trunk/OpenMPT/zlib/contrib/masmx86/match686.asm
trunk/OpenMPT/zlib/contrib/masmx86/readme.txt
trunk/OpenMPT/zlib/gzclose.c
trunk/OpenMPT/zlib/gzguts.h
trunk/OpenMPT/zlib/gzlib.c
trunk/OpenMPT/zlib/gzread.c
trunk/OpenMPT/zlib/gzwrite.c
Removed Paths:
-------------
trunk/OpenMPT/zlib/contrib/masmx64/bld_ml64.bat
trunk/OpenMPT/zlib/contrib/masmx64/gvmat64.asm
trunk/OpenMPT/zlib/contrib/masmx64/gvmat64.obj
trunk/OpenMPT/zlib/contrib/masmx64/inffas8664.c
trunk/OpenMPT/zlib/contrib/masmx64/inffasx64.asm
trunk/OpenMPT/zlib/contrib/masmx64/inffasx64.obj
trunk/OpenMPT/zlib/contrib/masmx64/readme.txt
trunk/OpenMPT/zlib/contrib/masmx86/bld_ml32.bat
trunk/OpenMPT/zlib/contrib/masmx86/gvmat32.asm
trunk/OpenMPT/zlib/contrib/masmx86/gvmat32.obj
trunk/OpenMPT/zlib/contrib/masmx86/gvmat32c.c
trunk/OpenMPT/zlib/contrib/masmx86/inffas32.asm
trunk/OpenMPT/zlib/contrib/masmx86/inffas32.obj
trunk/OpenMPT/zlib/contrib/masmx86/mkasm.bat
trunk/OpenMPT/zlib/contrib/masmx86/readme.txt
trunk/OpenMPT/zlib/zconf.in.h
Modified: trunk/OpenMPT/zlib/ChangeLog
===================================================================
--- trunk/OpenMPT/zlib/ChangeLog 2010-04-28 20:52:46 UTC (rev 579)
+++ trunk/OpenMPT/zlib/ChangeLog 2010-04-30 21:28:47 UTC (rev 580)
@@ -1,6 +1,84 @@
ChangeLog file for zlib
+Changes in 1.2.5 (19 Apr 2010)
+- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev]
+- Default to libdir as sharedlibdir in configure [Nieder]
+- Update copyright dates on modified source files
+- Update trees.c to be able to generate modified trees.h
+- Exit configure for MinGW, suggesting win32/Makefile.gcc
+
+Changes in 1.2.4.5 (18 Apr 2010)
+- Set sharedlibdir in configure [Torok]
+- Set LDFLAGS in Makefile.in [Bar-Lev]
+- Avoid mkdir objs race condition in Makefile.in [Bowler]
+- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays
+- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C
+- Don't use hidden attribute when it is a warning generator (e.g. Solaris)
+
+Changes in 1.2.4.4 (18 Apr 2010)
+- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok]
+- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty
+- Try to use bash or ksh regardless of functionality of /bin/sh
+- Fix configure incompatibility with NetBSD sh
+- Remove attempt to run under bash or ksh since have better NetBSD fix
+- Fix win32/Makefile.gcc for MinGW [Bar-Lev]
+- Add diagnostic messages when using CROSS_PREFIX in configure
+- Added --sharedlibdir option to configure [Weigelt]
+- Use hidden visibility attribute when available [Frysinger]
+
+Changes in 1.2.4.3 (10 Apr 2010)
+- Only use CROSS_PREFIX in configure for ar and ranlib if they exist
+- Use CROSS_PREFIX for nm [Bar-Lev]
+- Assume _LARGEFILE64_SOURCE defined is equivalent to true
+- Avoid use of undefined symbols in #if with && and ||
+- Make *64 prototypes in gzguts.h consistent with functions
+- Add -shared load option for MinGW in configure [Bowler]
+- Move z_off64_t to public interface, use instead of off64_t
+- Remove ! from shell test in configure (not portable to Solaris)
+- Change +0 macro tests to -0 for possibly increased portability
+
+Changes in 1.2.4.2 (9 Apr 2010)
+- Add consistent carriage returns to readme.txt's in masmx86 and masmx64
+- Really provide prototypes for *64 functions when building without LFS
+- Only define unlink() in minigzip.c if unistd.h not included
+- Update README to point to contrib/vstudio project files
+- Move projects/vc6 to old/ and remove projects/
+- Include stdlib.h in minigzip.c for setmode() definition under WinCE
+- Clean up assembler builds in win32/Makefile.msc [Rowe]
+- Include sys/types.h for Microsoft for off_t definition
+- Fix memory leak on error in gz_open()
+- Symbolize nm as $NM in configure [Weigelt]
+- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt]
+- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined
+- Fix bug in gzeof() to take into account unused input data
+- Avoid initialization of structures with variables in puff.c
+- Updated win32/README-WIN32.txt [Rowe]
+
+Changes in 1.2.4.1 (28 Mar 2010)
+- Remove the use of [a-z] constructs for sed in configure [gentoo 310225]
+- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech]
+- Restore "for debugging" comment on sprintf() in gzlib.c
+- Remove fdopen for MVS from gzguts.h
+- Put new README-WIN32.txt in win32 [Rowe]
+- Add check for shell to configure and invoke another shell if needed
+- Fix big fat stinking bug in gzseek() on uncompressed files
+- Remove vestigial F_OPEN64 define in zutil.h
+- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE
+- Avoid errors on non-LFS systems when applications define LFS macros
+- Set EXE to ".exe" in configure for MINGW [Kahle]
+- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill]
+- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev]
+- Add DLL install in win32/makefile.gcc [Bar-Lev]
+- Allow Linux* or linux* from uname in configure [Bar-Lev]
+- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev]
+- Add cross-compilation prefixes to configure [Bar-Lev]
+- Match type exactly in gz_load() invocation in gzread.c
+- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func
+- Provide prototypes for *64 functions when building zlib without LFS
+- Don't use -lc when linking shared library on MinGW
+- Remove errno.h check in configure and vestigial errno code in zutil.h
+
Changes in 1.2.4 (14 Mar 2010)
- Fix VER3 extraction in configure for no fourth subversion
- Update zlib.3, add docs to Makefile.in to make .pdf out of it
@@ -99,7 +177,7 @@
- Correct email address in configure for system options
- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser]
- Update zlib.map [Brown]
-- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [T\x9Ar\x9Ak]
+- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok]
- Apply various fixes to CMakeLists.txt [Lowman]
- Add checks on len in gzread() and gzwrite()
- Add error message for no more room for gzungetc()
Modified: trunk/OpenMPT/zlib/INDEX
===================================================================
--- trunk/OpenMPT/zlib/INDEX 2010-04-28 20:52:46 UTC (rev 579)
+++ trunk/OpenMPT/zlib/INDEX 2010-04-30 21:28:47 UTC (rev 580)
@@ -22,7 +22,6 @@
nintendods/ makefile for Nintendo DS
old/ makefiles for various architectures and zlib documentation
files that have not yet been updated for zlib 1.2.x
-projects/ projects for various Integrated Development Environments
qnx/ makefiles for QNX
watcom/ makefiles for OpenWatcom
win32/ makefiles for Windows
Modified: trunk/OpenMPT/zlib/Makefile.in
===================================================================
--- trunk/OpenMPT/zlib/Makefile.in 2010-04-28 20:52:46 UTC (rev 579)
+++ trunk/OpenMPT/zlib/Makefile.in 2010-04-30 21:28:47 UTC (rev 580)
@@ -25,19 +25,21 @@
# -Wstrict-prototypes -Wmissing-prototypes
SFLAGS=-O
-
-LDFLAGS=-L. libz.a
+LDFLAGS=
+TEST_LDFLAGS=-L. libz.a
LDSHARED=$(CC)
CPP=$(CC) -E
STATICLIB=libz.a
SHAREDLIB=libz.so
-SHAREDLIBV=libz.so.1.2.4
+SHAREDLIBV=libz.so.1.2.5
SHAREDLIBM=libz.so.1
-LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)
+LIBS=$(STATICLIB) $(SHAREDLIBV)
AR=ar rc
RANLIB=ranlib
+LDCONFIG=ldconfig
+LDSHAREDLIBC=-lc
TAR=tar
SHELL=/bin/sh
EXE=
@@ -45,6 +47,7 @@
prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
+sharedlibdir = ${libdir}
includedir = ${prefix}/include
mandir = ${prefix}/share/man
man3dir = ${mandir}/man3
@@ -129,22 +132,22 @@
.SUFFIXES: .lo
.c.lo:
- -@if [ ! -d objs ]; then mkdir objs; fi
+ -@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $<
-@mv objs/$*.o $@
$(SHAREDLIBV): $(PIC_OBJS)
- $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc
+ $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS)
rm -f $(SHAREDLIB) $(SHAREDLIBM)
ln -s $@ $(SHAREDLIB)
ln -s $@ $(SHAREDLIBM)
-@rmdir objs
example$(EXE): example.o $(STATICLIB)
- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS)
minigzip$(EXE): minigzip.o $(STATICLIB)
- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
examplesh$(EXE): example.o $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
@@ -153,25 +156,27 @@
$(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
example64$(EXE): example64.o $(STATICLIB)
- $(CC) $(CFLAGS) -o $@ example64.o $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
minigzip64$(EXE): minigzip64.o $(STATICLIB)
- $(CC) $(CFLAGS) -o $@ minigzip64.o $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS)
install-libs: $(LIBS)
-@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
-@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
+ -@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi
-@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
-@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi
- cp $(LIBS) $(DESTDIR)$(libdir)
+ cp $(STATICLIB) $(DESTDIR)$(libdir)
+ cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)
cd $(DESTDIR)$(libdir); chmod u=rw,go=r $(STATICLIB)
-@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
- -@cd $(DESTDIR)$(libdir); if test "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \
+ -@cd $(DESTDIR)$(sharedlibdir); if test "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \
chmod 755 $(SHAREDLIBV); \
rm -f $(SHAREDLIB) $(SHAREDLIBM); \
ln -s $(SHAREDLIBV) $(SHAREDLIB); \
ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
- (ldconfig || true) >/dev/null 2>&1; \
+ ($(LDCONFIG) || true) >/dev/null 2>&1; \
fi
cp zlib.3 $(DESTDIR)$(man3dir)
chmod 644 $(DESTDIR)$(man3dir)/zlib.3
Modified: trunk/OpenMPT/zlib/README
===================================================================
--- trunk/OpenMPT/zlib/README 2010-04-28 20:52:46 UTC (rev 579)
+++ trunk/OpenMPT/zlib/README 2010-04-30 21:28:47 UTC (rev 580)
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY
-zlib 1.2.4 is a general purpose data compression library. All the code is
+zlib 1.2.5 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
@@ -16,7 +16,8 @@
To compile all files and run the test program, follow the instructions given at
the top of Makefile.in. In short "./configure; make test", and if that goes
well, "make install" should work for most flavors of Unix. For Windows, use one
-of the special makefiles in win32/ or projects/ . For VMS, use make_vms.com.
+of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
+make_vms.com.
Questions about zlib should be sent to <zl...@gz...>, or to Gilles Vollant
<in...@wi...> for the Windows DLL version. The zlib home page is
@@ -30,7 +31,7 @@
issue of Dr. Dobb's Journal; a copy of the article is available at
http://marknelson.us/1997/01/01/zlib-engine/ .
-The changes made in version 1.2.4 are documented in the file ChangeLog.
+The changes made in version 1.2.5 are documented in the file ChangeLog.
Unsupported third party contributions are provided in directory contrib/ .
Modified: trunk/OpenMPT/zlib/configure
===================================================================
--- trunk/OpenMPT/zlib/configure 2010-04-28 20:52:46 UTC (rev 579)
+++ trunk/OpenMPT/zlib/configure 2010-04-30 21:28:47 UTC (rev 580)
@@ -13,18 +13,43 @@
# If you have problems, try without defining CC and CFLAGS before reporting
# an error.
+if [ -n "${CHOST}" ]; then
+ uname="$(echo "${CHOST}" | sed -e 's/^[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)-.*$/\1/')"
+ CROSS_PREFIX="${CHOST}-"
+fi
+
STATICLIB=libz.a
LDFLAGS="${LDFLAGS} -L. ${STATICLIB}"
VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h`
VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
-AR=${AR-"ar"}
+if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+ AR=${AR-"${CROSS_PREFIX}ar"}
+ test -n "${CROSS_PREFIX}" && echo Using ${AR}
+else
+ AR=${AR-"ar"}
+ test -n "${CROSS_PREFIX}" && echo Using ${AR}
+fi
AR_RC="${AR} rc"
-RANLIB=${RANLIB-"ranlib"}
+if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+ RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
+ test -n "${CROSS_PREFIX}" && echo Using ${RANLIB}
+else
+ RANLIB=${RANLIB-"ranlib"}
+fi
+if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+ NM=${NM-"${CROSS_PREFIX}nm"}
+ test -n "${CROSS_PREFIX}" && echo Using ${NM}
+else
+ NM=${NM-"nm"}
+fi
+LDCONFIG=${LDCONFIG-"ldconfig"}
+LDSHAREDLIBC="${LDSHAREDLIBC--lc}"
prefix=${prefix-/usr/local}
exec_prefix=${exec_prefix-'${prefix}'}
libdir=${libdir-'${exec_prefix}/lib'}
+sharedlibdir=${sharedlibdir-'${libdir}'}
includedir=${includedir-'${prefix}/include'}
mandir=${mandir-'${prefix}/share/man'}
shared_ext='.so'
@@ -41,13 +66,15 @@
-h* | --help)
echo 'usage:'
echo ' configure [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]'
- echo ' [--static] [--64] [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
+ echo ' [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]'
+ echo ' [--includedir=INCLUDEDIR]'
exit 0 ;;
- -p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
- -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
- -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
- -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift ;;
- -u*=* | --uname=*) uname=`echo $1 | sed 's/[-a-z_]*=//'`;shift ;;
+ -p*=* | --prefix=*) prefix=`echo $1 | sed 's/.*=//'`; shift ;;
+ -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/.*=//'`; shift ;;
+ -l*=* | --libdir=*) libdir=`echo $1 | sed 's/.*=//'`; shift ;;
+ --sharedlibdir=*) sharedlibdir=`echo $1 | sed 's/.*=//'`; shift ;;
+ -i*=* | --includedir=*) includedir=`echo $1 | sed 's/.*=//'`;shift ;;
+ -u*=* | --uname=*) uname=`echo $1 | sed 's/.*=//'`;shift ;;
-p* | --prefix) prefix="$2"; shift; shift ;;
-e* | --eprefix) exec_prefix="$2"; shift; shift ;;
-l* | --libdir) libdir="$2"; shift; shift ;;
@@ -68,8 +95,8 @@
int hello() {return getchar();}
EOF
-test -z "$CC" && echo Checking for gcc...
-cc=${CC-gcc}
+test -z "$CC" && echo Checking for ${CROSS_PREFIX}gcc...
+cc=${CC-${CROSS_PREFIX}gcc}
cflags=${CFLAGS-"-O3"}
# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
case "$cc" in
@@ -78,8 +105,8 @@
if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
CC="$cc"
- SFLAGS="${CFLAGS-"-O3"} -fPIC"
- CFLAGS="${CFLAGS-"-O3"}"
+ SFLAGS="${CFLAGS--O3} -fPIC"
+ CFLAGS="${CFLAGS--O3}"
if test $build64 -eq 1; then
CFLAGS="${CFLAGS} -m64"
SFLAGS="${SFLAGS} -m64"
@@ -91,9 +118,17 @@
uname=`(uname -s || echo unknown) 2>/dev/null`
fi
case "$uname" in
- Linux | linux | GNU | GNU/* | *BSD | DragonFly) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"} ;;
- CYGWIN* | Cygwin* | cygwin* | OS/2* )
- EXE='.exe' ;;
+ Linux* | linux* | GNU | GNU/* | *BSD | DragonFly) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"} ;;
+ CYGWIN* | Cygwin* | cygwin* | OS/2*)
+ EXE='.exe' ;;
+ MINGW*|mingw*)
+# temporary bypass
+ rm -f $test.[co] $test $test$shared_ext
+ echo "Please use win32/Makefile.gcc instead."
+ exit 1
+ LDSHARED=${LDSHARED-"$cc -shared"}
+ LDSHAREDLIBC=""
+ EXE='.exe' ;;
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
# (ala...@ic...)
LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;;
@@ -117,6 +152,7 @@
else
# find system name and corresponding cc options
CC=${CC-cc}
+ gcc=0
if test -z "$uname"; then
uname=`(uname -sr || echo unknown) 2>/dev/null`
fi
@@ -474,22 +510,32 @@
fi
fi
-cat >$test.c <<EOF
-#include <errno.h>
-int main() { return 0; }
+if test "$gcc" -eq 1; then
+ cat > $test.c <<EOF
+#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33)
+# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
+#else
+# define ZLIB_INTERNAL
+#endif
+int ZLIB_INTERNAL foo;
+int main()
+{
+ return 0;
+}
EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- echo "Checking for errno.h... Yes."
-else
- echo "Checking for errno.h... No."
- CFLAGS="$CFLAGS -DNO_ERRNO_H"
- SFLAGS="$SFLAGS -DNO_ERRNO_H"
+ if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
+ echo "Checking for attribute(visibility) support... Yes."
+ else
+ CFLAGS="$CFLAGS -DNO_VIZ"
+ SFLAGS="$SFLAGS -DNO_VIZ"
+ echo "Checking for attribute(visibility) support... No."
+ fi
fi
CPP=${CPP-"$CC -E"}
case $CFLAGS in
*ASMV*)
- if test "`nm $test.o | grep _hello`" = ""; then
+ if test "`$NM $test.o | grep _hello`" = ""; then
CPP="$CPP -DNO_UNDERLINE"
echo Checking for underline in external names... No.
else
@@ -513,10 +559,13 @@
/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
/^AR *=/s#=.*#=$AR_RC#
/^RANLIB *=/s#=.*#=$RANLIB#
+/^LDCONFIG *=/s#=.*#=$LDCONFIG#
+/^LDSHAREDLIBC *=/s#=.*#=$LDSHAREDLIBC#
/^EXE *=/s#=.*#=$EXE#
/^prefix *=/s#=.*#=$prefix#
/^exec_prefix *=/s#=.*#=$exec_prefix#
/^libdir *=/s#=.*#=$libdir#
+/^sharedlibdir *=/s#=.*#=$sharedlibdir#
/^includedir *=/s#=.*#=$includedir#
/^mandir *=/s#=.*#=$mandir#
/^all: */s#:.*#: $ALL#
@@ -538,6 +587,7 @@
/^prefix *=/s#=.*#=$prefix#
/^exec_prefix *=/s#=.*#=$exec_prefix#
/^libdir *=/s#=.*#=$libdir#
+/^sharedlibdir *=/s#=.*#=$sharedlibdir#
/^includedir *=/s#=.*#=$includedir#
/^mandir *=/s#=.*#=$mandir#
/^LDFLAGS *=/s#=.*#=$LDFLAGS#
Deleted: trunk/OpenMPT/zlib/contrib/masmx64/bld_ml64.bat
===================================================================
--- trunk/OpenMPT/zlib/contrib/masmx64/bld_ml64.bat 2010-04-28 20:52:46 UTC (rev 579)
+++ trunk/OpenMPT/zlib/contrib/masmx64/bld_ml64.bat 2010-04-30 21:28:47 UTC (rev 580)
@@ -1,2 +0,0 @@
-ml64.exe /Flinffasx64 /c /Zi inffasx64.asm
-ml64.exe /Flgvmat64 /c /Zi gvmat64.asm
Added: trunk/OpenMPT/zlib/contrib/masmx64/bld_ml64.bat
===================================================================
--- trunk/OpenMPT/zlib/contrib/masmx64/bld_ml64.bat (rev 0)
+++ trunk/OpenMPT/zlib/contrib/masmx64/bld_ml64.bat 2010-04-30 21:28:47 UTC (rev 580)
@@ -0,0 +1,2 @@
+ml64.exe /Flinffasx64 /c /Zi inffasx64.asm
+ml64.exe /Flgvmat64 /c /Zi gvmat64.asm
Deleted: trunk/OpenMPT/zlib/contrib/masmx64/gvmat64.asm
===================================================================
--- trunk/OpenMPT/zlib/contrib/masmx64/gvmat64.asm 2010-04-28 20:52:46 UTC (rev 579)
+++ trunk/OpenMPT/zlib/contrib/masmx64/gvmat64.asm 2010-04-30 21:28:47 UTC (rev 580)
@@ -1,553 +0,0 @@
-;uInt longest_match_x64(
-; deflate_state *s,
-; IPos cur_match); /* current match */
-
-; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64
-; (AMD64 on Athlon 64, Opteron, Phenom
-; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7)
-; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
-;
-; File written by Gilles Vollant, by converting to assembly the longest_match
-; from Jean-loup Gailly in deflate.c of zLib and infoZip zip.
-;
-; and by taking inspiration on asm686 with masm, optimised assembly code
-; from Brian Raiter, written 1998
-;
-; This software is provided 'as-is', without any express or implied
-; warranty. In no event will the authors be held liable for any damages
-; arising from the use of this software.
-;
-; Permission is granted to anyone to use this software for any purpose,
-; including commercial applications, and to alter it and redistribute it
-; freely, subject to the following restrictions:
-;
-; 1. The origin of this software must not be misrepresented; you must not
-; claim that you wrote the original software. If you use this software
-; in a product, an acknowledgment in the product documentation would be
-; appreciated but is not required.
-; 2. Altered source versions must be plainly marked as such, and must not be
-; misrepresented as being the original software
-; 3. This notice may not be removed or altered from any source distribution.
-;
-;
-;
-; http://www.zlib.net
-; http://www.winimage.com/zLibDll
-; http://www.muppetlabs.com/~breadbox/software/assembly.html
-;
-; to compile this file for infozip Zip, I use option:
-; ml64.exe /Flgvmat64 /c /Zi /DINFOZIP gvmat64.asm
-;
-; to compile this file for zLib, I use option:
-; ml64.exe /Flgvmat64 /c /Zi gvmat64.asm
-; Be carrefull to adapt zlib1222add below to your version of zLib
-; (if you use a version of zLib before 1.0.4 or after 1.2.2.2, change
-; value of zlib1222add later)
-;
-; This file compile with Microsoft Macro Assembler (x64) for AMD64
-;
-; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK
-;
-; (you can get Windows WDK with ml64 for AMD64 from
-; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)
-;
-
-
-;uInt longest_match(s, cur_match)
-; deflate_state *s;
-; IPos cur_match; /* current match */
-.code
-longest_match PROC
-
-
-;LocalVarsSize equ 88
- LocalVarsSize equ 72
-
-; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12
-; free register : r14,r15
-; register can be saved : rsp
-
- chainlenwmask equ rsp + 8 - LocalVarsSize ; high word: current chain len
- ; low word: s->wmask
-;window equ rsp + xx - LocalVarsSize ; local copy of s->window ; stored in r10
-;windowbestlen equ rsp + xx - LocalVarsSize ; s->window + bestlen , use r10+r11
-;scanstart equ rsp + xx - LocalVarsSize ; first two bytes of string ; stored in r12w
-;scanend equ rsp + xx - LocalVarsSize ; last two bytes of string use ebx
-;scanalign equ rsp + xx - LocalVarsSize ; dword-misalignment of string r13
-;bestlen equ rsp + xx - LocalVarsSize ; size of best match so far -> r11d
-;scan equ rsp + xx - LocalVarsSize ; ptr to string wanting match -> r9
-IFDEF INFOZIP
-ELSE
- nicematch equ (rsp + 16 - LocalVarsSize) ; a good enough match size
-ENDIF
-
-save_rdi equ rsp + 24 - LocalVarsSize
-save_rsi equ rsp + 32 - LocalVarsSize
-save_rbx equ rsp + 40 - LocalVarsSize
-save_rbp equ rsp + 48 - LocalVarsSize
-save_r12 equ rsp + 56 - LocalVarsSize
-save_r13 equ rsp + 64 - LocalVarsSize
-;save_r14 equ rsp + 72 - LocalVarsSize
-;save_r15 equ rsp + 80 - LocalVarsSize
-
-
-; summary of register usage
-; scanend ebx
-; scanendw bx
-; chainlenwmask edx
-; curmatch rsi
-; curmatchd esi
-; windowbestlen r8
-; scanalign r9
-; scanalignd r9d
-; window r10
-; bestlen r11
-; bestlend r11d
-; scanstart r12d
-; scanstartw r12w
-; scan r13
-; nicematch r14d
-; limit r15
-; limitd r15d
-; prev rcx
-
-; all the +4 offsets are due to the addition of pending_buf_size (in zlib
-; in the deflate_state structure since the asm code was first written
-; (if you compile with zlib 1.0.4 or older, remove the +4).
-; Note : these value are good with a 8 bytes boundary pack structure
-
-
- MAX_MATCH equ 258
- MIN_MATCH equ 3
- MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1)
-
-
-;;; Offsets for fields in the deflate_state structure. These numbers
-;;; are calculated from the definition of deflate_state, with the
-;;; assumption that the compiler will dword-align the fields. (Thus,
-;;; changing the definition of deflate_state could easily cause this
-;;; program to crash horribly, without so much as a warning at
-;;; compile time. Sigh.)
-
-; all the +zlib1222add offsets are due to the addition of fields
-; in zlib in the deflate_state structure since the asm code was first written
-; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
-; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
-; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
-
-
-IFDEF INFOZIP
-
-_DATA SEGMENT
-COMM window_size:DWORD
-; WMask ; 7fff
-COMM window:BYTE:010040H
-COMM prev:WORD:08000H
-; MatchLen : unused
-; PrevMatch : unused
-COMM strstart:DWORD
-COMM match_start:DWORD
-; Lookahead : ignore
-COMM prev_length:DWORD ; PrevLen
-COMM max_chain_length:DWORD
-COMM good_match:DWORD
-COMM nice_match:DWORD
-prev_ad equ OFFSET prev
-window_ad equ OFFSET window
-nicematch equ nice_match
-_DATA ENDS
-WMask equ 07fffh
-
-ELSE
-
- IFNDEF zlib1222add
- zlib1222add equ 8
- ENDIF
-dsWSize equ 56+zlib1222add+(zlib1222add/2)
-dsWMask equ 64+zlib1222add+(zlib1222add/2)
-dsWindow equ 72+zlib1222add
-dsPrev equ 88+zlib1222add
-dsMatchLen equ 128+zlib1222add
-dsPrevMatch equ 132+zlib1222add
-dsStrStart equ 140+zlib1222add
-dsMatchStart equ 144+zlib1222add
-dsLookahead equ 148+zlib1222add
-dsPrevLen equ 152+zlib1222add
-dsMaxChainLen equ 156+zlib1222add
-dsGoodMatch equ 172+zlib1222add
-dsNiceMatch equ 176+zlib1222add
-
-window_size equ [ rcx + dsWSize]
-WMask equ [ rcx + dsWMask]
-window_ad equ [ rcx + dsWindow]
-prev_ad equ [ rcx + dsPrev]
-strstart equ [ rcx + dsStrStart]
-match_start equ [ rcx + dsMatchStart]
-Lookahead equ [ rcx + dsLookahead] ; 0ffffffffh on infozip
-prev_length equ [ rcx + dsPrevLen]
-max_chain_length equ [ rcx + dsMaxChainLen]
-good_match equ [ rcx + dsGoodMatch]
-nice_match equ [ rcx + dsNiceMatch]
-ENDIF
-
-; parameter 1 in r8(deflate state s), param 2 in rdx (cur match)
-
-; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and
-; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp
-;
-; All registers must be preserved across the call, except for
-; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch.
-
-
-
-;;; Save registers that the compiler may be using, and adjust esp to
-;;; make room for our stack frame.
-
-
-;;; Retrieve the function arguments. r8d will hold cur_match
-;;; throughout the entire function. edx will hold the pointer to the
-;;; deflate_state structure during the function's setup (before
-;;; entering the main loop.
-
-; parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match)
-
-; this clear high 32 bits of r8, which can be garbage in both r8 and rdx
-
- mov [save_rdi],rdi
- mov [save_rsi],rsi
- mov [save_rbx],rbx
- mov [save_rbp],rbp
-IFDEF INFOZIP
- mov r8d,ecx
-ELSE
- mov r8d,edx
-ENDIF
- mov [save_r12],r12
- mov [save_r13],r13
-; mov [save_r14],r14
-; mov [save_r15],r15
-
-
-;;; uInt wmask = s->w_mask;
-;;; unsigned chain_length = s->max_chain_length;
-;;; if (s->prev_length >= s->good_match) {
-;;; chain_length >>= 2;
-;;; }
-
- mov edi, prev_length
- mov esi, good_match
- mov eax, WMask
- mov ebx, max_chain_length
- cmp edi, esi
- jl LastMatchGood
- shr ebx, 2
-LastMatchGood:
-
-;;; chainlen is decremented once beforehand so that the function can
-;;; use the sign flag instead of the zero flag for the exit test.
-;;; It is then shifted into the high word, to make room for the wmask
-;;; value, which it will always accompany.
-
- dec ebx
- shl ebx, 16
- or ebx, eax
-
-;;; on zlib only
-;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-IFDEF INFOZIP
- mov [chainlenwmask], ebx
-; on infozip nice_match = [nice_match]
-ELSE
- mov eax, nice_match
- mov [chainlenwmask], ebx
- mov r10d, Lookahead
- cmp r10d, eax
- cmovnl r10d, eax
- mov [nicematch],r10d
-ENDIF
-
-;;; register Bytef *scan = s->window + s->strstart;
- mov r10, window_ad
- mov ebp, strstart
- lea r13, [r10 + rbp]
-
-;;; Determine how many bytes the scan ptr is off from being
-;;; dword-aligned.
-
- mov r9,r13
- neg r13
- and r13,3
-
-;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-;;; s->strstart - (IPos)MAX_DIST(s) : NIL;
-IFDEF INFOZIP
- mov eax,07efah ; MAX_DIST = (WSIZE-MIN_LOOKAHEAD) (0x8000-(3+8+1))
-ELSE
- mov eax, window_size
- sub eax, MIN_LOOKAHEAD
-ENDIF
- xor edi,edi
- sub ebp, eax
-
- mov r11d, prev_length
-
- cmovng ebp,edi
-
-;;; int best_len = s->prev_length;
-
-
-;;; Store the sum of s->window + best_len in esi locally, and in esi.
-
- lea rsi,[r10+r11]
-
-;;; register ush scan_start = *(ushf*)scan;
-;;; register ush scan_end = *(ushf*)(scan+best_len-1);
-;;; Posf *prev = s->prev;
-
- movzx r12d,word ptr [r9]
- movzx ebx, word ptr [r9 + r11 - 1]
-
- mov rdi, prev_ad
-
-;;; Jump into the main loop.
-
- mov edx, [chainlenwmask]
-
- cmp bx,word ptr [rsi + r8 - 1]
- jz LookupLoopIsZero
-
-LookupLoop1:
- and r8d, edx
-
- movzx r8d, word ptr [rdi + r8*2]
- cmp r8d, ebp
- jbe LeaveNow
- sub edx, 00010000h
- js LeaveNow
-
-LoopEntry1:
- cmp bx,word ptr [rsi + r8 - 1]
- jz LookupLoopIsZero
-
-LookupLoop2:
- and r8d, edx
-
- movzx r8d, word ptr [rdi + r8*2]
- cmp r8d, ebp
- jbe LeaveNow
- sub edx, 00010000h
- js LeaveNow
-
-LoopEntry2:
- cmp bx,word ptr [rsi + r8 - 1]
- jz LookupLoopIsZero
-
-LookupLoop4:
- and r8d, edx
-
- movzx r8d, word ptr [rdi + r8*2]
- cmp r8d, ebp
- jbe LeaveNow
- sub edx, 00010000h
- js LeaveNow
-
-LoopEntry4:
-
- cmp bx,word ptr [rsi + r8 - 1]
- jnz LookupLoop1
- jmp LookupLoopIsZero
-
-
-;;; do {
-;;; match = s->window + cur_match;
-;;; if (*(ushf*)(match+best_len-1) != scan_end ||
-;;; *(ushf*)match != scan_start) continue;
-;;; [...]
-;;; } while ((cur_match = prev[cur_match & wmask]) > limit
-;;; && --chain_length != 0);
-;;;
-;;; Here is the inner loop of the function. The function will spend the
-;;; majority of its time in this loop, and majority of that time will
-;;; be spent in the first ten instructions.
-;;;
-;;; Within this loop:
-;;; ebx = scanend
-;;; r8d = curmatch
-;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
-;;; esi = windowbestlen - i.e., (window + bestlen)
-;;; edi = prev
-;;; ebp = limit
-
-LookupLoop:
- and r8d, edx
-
- movzx r8d, word ptr [rdi + r8*2]
- cmp r8d, ebp
- jbe LeaveNow
- sub edx, 00010000h
- js LeaveNow
-
-LoopEntry:
-
- cmp bx,word ptr [rsi + r8 - 1]
- jnz LookupLoop1
-LookupLoopIsZero:
- cmp r12w, word ptr [r10 + r8]
- jnz LookupLoop1
-
-
-;;; Store the current value of chainlen.
- mov [chainlenwmask], edx
-
-;;; Point edi to the string under scrutiny, and esi to the string we
-;;; are hoping to match it up with. In actuality, esi and edi are
-;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
-;;; initialized to -(MAX_MATCH_8 - scanalign).
-
- lea rsi,[r8+r10]
- mov rdx, 0fffffffffffffef8h; -(MAX_MATCH_8)
- lea rsi, [rsi + r13 + 0108h] ;MAX_MATCH_8]
- lea rdi, [r9 + r13 + 0108h] ;MAX_MATCH_8]
-
- prefetcht1 [rsi+rdx]
- prefetcht1 [rdi+rdx]
-
-
-;;; Test the strings for equality, 8 bytes at a time. At the end,
-;;; adjust rdx so that it is offset to the exact byte that mismatched.
-;;;
-;;; We already know at this point that the first three bytes of the
-;;; strings match each other, and they can be safely passed over before
-;;; starting the compare loop. So what this code does is skip over 0-3
-;;; bytes, as much as necessary in order to dword-align the edi
-;;; pointer. (rsi will still be misaligned three times out of four.)
-;;;
-;;; It should be confessed that this loop usually does not represent
-;;; much of the total running time. Replacing it with a more
-;;; straightforward "rep cmpsb" would not drastically degrade
-;;; performance.
-
-
-LoopCmps:
- mov rax, [rsi + rdx]
- xor rax, [rdi + rdx]
- jnz LeaveLoopCmps
-
- mov rax, [rsi + rdx + 8]
- xor rax, [rdi + rdx + 8]
- jnz LeaveLoopCmps8
-
-
- mov rax, [rsi + rdx + 8+8]
- xor rax, [rdi + rdx + 8+8]
- jnz LeaveLoopCmps16
-
- add rdx,8+8+8
-
- jnz short LoopCmps
- jmp short LenMaximum
-LeaveLoopCmps16: add rdx,8
-LeaveLoopCmps8: add rdx,8
-LeaveLoopCmps:
-
- test eax, 0000FFFFh
- jnz LenLower
-
- test eax,0ffffffffh
-
- jnz LenLower32
-
- add rdx,4
- shr rax,32
- or ax,ax
- jnz LenLower
-
-LenLower32:
- shr eax,16
- add rdx,2
-LenLower: sub al, 1
- adc rdx, 0
-;;; Calculate the length of the match. If it is longer than MAX_MATCH,
-;;; then automatically accept it as the best possible match and leave.
-
- lea rax, [rdi + rdx]
- sub rax, r9
- cmp eax, MAX_MATCH
- jge LenMaximum
-
-;;; If the length of the match is not longer than the best match we
-;;; have so far, then forget it and return to the lookup loop.
-;///////////////////////////////////
-
- cmp eax, r11d
- jg LongerMatch
-
- lea rsi,[r10+r11]
-
- mov rdi, prev_ad
- mov edx, [chainlenwmask]
- jmp LookupLoop
-
-;;; s->match_start = cur_match;
-;;; best_len = len;
-;;; if (len >= nice_match) break;
-;;; scan_end = *(ushf*)(scan+best_len-1);
-
-LongerMatch:
- mov r11d, eax
- mov match_start, r8d
- cmp eax, [nicematch]
- jge LeaveNow
-
- lea rsi,[r10+rax]
-
- movzx ebx, word ptr [r9 + rax - 1]
- mov rdi, prev_ad
- mov edx, [chainlenwmask]
- jmp LookupLoop
-
-;;; Accept the current string, with the maximum possible length.
-
-LenMaximum:
- mov r11d,MAX_MATCH
- mov match_start, r8d
-
-;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-;;; return s->lookahead;
-
-LeaveNow:
-IFDEF INFOZIP
- mov eax,r11d
-ELSE
- mov eax, Lookahead
- cmp r11d, eax
- cmovng eax, r11d
-ENDIF
-
-;;; Restore the stack and return from whence we came.
-
-
- mov rsi,[save_rsi]
- mov rdi,[save_rdi]
- mov rbx,[save_rbx]
- mov rbp,[save_rbp]
- mov r12,[save_r12]
- mov r13,[save_r13]
-; mov r14,[save_r14]
-; mov r15,[save_r15]
-
-
- ret 0
-; please don't remove this string !
-; Your can freely use gvmat64 in any free or commercial app
-; but it is far better don't remove the string in the binary!
- db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0
-longest_match ENDP
-
-match_init PROC
- ret 0
-match_init ENDP
-
-
-END
Added: trunk/OpenMPT/zlib/contrib/masmx64/gvmat64.asm
===================================================================
--- trunk/OpenMPT/zlib/contrib/masmx64/gvmat64.asm (rev 0)
+++ trunk/OpenMPT/zlib/contrib/masmx64/gvmat64.asm 2010-04-30 21:28:47 UTC (rev 580)
@@ -0,0 +1,553 @@
+;uInt longest_match_x64(
+; deflate_state *s,
+; IPos cur_match); /* current match */
+
+; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64
+; (AMD64 on Athlon 64, Opteron, Phenom
+; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7)
+; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
+;
+; File written by Gilles Vollant, by converting to assembly the longest_match
+; from Jean-loup Gailly in deflate.c of zLib and infoZip zip.
+;
+; and by taking inspiration on asm686 with masm, optimised assembly code
+; from Brian Raiter, written 1998
+;
+; This software is provided 'as-is', without any express or implied
+; warranty. In no event will the authors be held liable for any damages
+; arising from the use of this software.
+;
+; Permission is granted to anyone to use this software for any purpose,
+; including commercial applications, and to alter it and redistribute it
+; freely, subject to the following restrictions:
+;
+; 1. The origin of this software must not be misrepresented; you must not
+; claim that you wrote the original software. If you use this software
+; in a product, an acknowledgment in the product documentation would be
+; appreciated but is not required.
+; 2. Altered source versions must be plainly marked as such, and must not be
+; misrepresented as being the original software
+; 3. This notice may not be removed or altered from any source distribution.
+;
+;
+;
+; http://www.zlib.net
+; http://www.winimage.com/zLibDll
+; http://www.muppetlabs.com/~breadbox/software/assembly.html
+;
+; to compile this file for infozip Zip, I use option:
+; ml64.exe /Flgvmat64 /c /Zi /DINFOZIP gvmat64.asm
+;
+; to compile this file for zLib, I use option:
+; ml64.exe /Flgvmat64 /c /Zi gvmat64.asm
+; Be carrefull to adapt zlib1222add below to your version of zLib
+; (if you use a version of zLib before 1.0.4 or after 1.2.2.2, change
+; value of zlib1222add later)
+;
+; This file compile with Microsoft Macro Assembler (x64) for AMD64
+;
+; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK
+;
+; (you can get Windows WDK with ml64 for AMD64 from
+; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)
+;
+
+
+;uInt longest_match(s, cur_match)
+; deflate_state *s;
+; IPos cur_match; /* current match */
+.code
+longest_match PROC
+
+
+;LocalVarsSize equ 88
+ LocalVarsSize equ 72
+
+; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12
+; free register : r14,r15
+; register can be saved : rsp
+
+ chainlenwmask equ rsp + 8 - LocalVarsSize ; high word: current chain len
+ ; low word: s->wmask
+;window equ rsp + xx - LocalVarsSize ; local copy of s->window ; stored in r10
+;windowbestlen equ rsp + xx - LocalVarsSize ; s->window + bestlen , use r10+r11
+;scanstart equ rsp + xx - LocalVarsSize ; first two bytes of string ; stored in r12w
+;scanend equ rsp + xx - LocalVarsSize ; last two bytes of string use ebx
+;scanalign equ rsp + xx - LocalVarsSize ; dword-misalignment of string r13
+;bestlen equ rsp + xx - LocalVarsSize ; size of best match so far -> r11d
+;scan equ rsp + xx - LocalVarsSize ; ptr to string wanting match -> r9
+IFDEF INFOZIP
+ELSE
+ nicematch equ (rsp + 16 - LocalVarsSize) ; a good enough match size
+ENDIF
+
+save_rdi equ rsp + 24 - LocalVarsSize
+save_rsi equ rsp + 32 - LocalVarsSize
+save_rbx equ rsp + 40 - LocalVarsSize
+save_rbp equ rsp + 48 - LocalVarsSize
+save_r12 equ rsp + 56 - LocalVarsSize
+save_r13 equ rsp + 64 - LocalVarsSize
+;save_r14 equ rsp + 72 - LocalVarsSize
+;save_r15 equ rsp + 80 - LocalVarsSize
+
+
+; summary of register usage
+; scanend ebx
+; scanendw bx
+; chainlenwmask edx
+; curmatch rsi
+; curmatchd esi
+; windowbestlen r8
+; scanalign r9
+; scanalignd r9d
+; window r10
+; bestlen r11
+; bestlend r11d
+; scanstart r12d
+; scanstartw r12w
+; scan r13
+; nicematch r14d
+; limit r15
+; limitd r15d
+; prev rcx
+
+; all the +4 offsets are due to the addition of pending_buf_size (in zlib
+; in the deflate_state structure since the asm code was first written
+; (if you compile with zlib 1.0.4 or older, remove the +4).
+; Note : these value are good with a 8 bytes boundary pack structure
+
+
+ MAX_MATCH equ 258
+ MIN_MATCH equ 3
+ MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1)
+
+
+;;; Offsets for fields in the deflate_state structure. These numbers
+;;; are calculated from the definition of deflate_state, with the
+;;; assumption that the compiler will dword-align the fields. (Thus,
+;;; changing the definition of deflate_state could easily cause this
+;;; program to crash horribly, without so much as a warning at
+;;; compile time. Sigh.)
+
+; all the +zlib1222add offsets are due to the addition of fields
+; in zlib in the deflate_state structure since the asm code was first written
+; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
+; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
+; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
+
+
+IFDEF INFOZIP
+
+_DATA SEGMENT
+COMM window_size:DWORD
+; WMask ; 7fff
+COMM window:BYTE:010040H
+COMM prev:WORD:08000H
+; MatchLen : unused
+; PrevMatch : unused
+COMM strstart:DWORD
+COMM match_start:DWORD
+; Lookahead : ignore
+COMM prev_length:DWORD ; PrevLen
+COMM max_chain_length:DWORD
+COMM good_match:DWORD
+COMM nice_match:DWORD
+prev_ad equ OFFSET prev
+window_ad equ OFFSET window
+nicematch equ nice_match
+_DATA ENDS
+WMask equ 07fffh
+
+ELSE
+
+ IFNDEF zlib1222add
+ zlib1222add equ 8
+ ENDIF
+dsWSize equ 56+zlib1222add+(zlib1222add/2)
+dsWMask equ 64+zlib1222add+(zlib1222add/2)
+dsWindow equ 72+zlib1222add
+dsPrev equ 88+zlib1222add
+dsMatchLen equ 128+zlib1222add
+dsPrevMatch equ 132+zlib1222add
+dsStrStart equ 140+zlib1222add
+dsMatchStart equ 144+zlib1222add
+dsLookahead equ 148+zlib1222add
+dsPrevLen equ 152+zlib1222add
+dsMaxChainLen equ 156+zlib1222add
+dsGoodMatch equ 172+zlib1222add
+dsNiceMatch equ 176+zlib1222add
+
+window_size equ [ rcx + dsWSize]
+WMask equ [ rcx + dsWMask]
+window_ad equ [ rcx + dsWindow]
+prev_ad equ [ rcx + dsPrev]
+strstart equ [ rcx + dsStrStart]
+match_start equ [ rcx + dsMatchStart]
+Lookahead equ [ rcx + dsLookahead] ; 0ffffffffh on infozip
+prev_length equ [ rcx + dsPrevLen]
+max_chain_length equ [ rcx + dsMaxChainLen]
+good_match equ [ rcx + dsGoodMatch]
+nice_match equ [ rcx + dsNiceMatch]
+ENDIF
+
+; parameter 1 in r8(deflate state s), param 2 in rdx (cur match)
+
+; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and
+; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp
+;
+; All registers must be preserved across the call, except for
+; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch.
+
+
+
+;;; Save registers that the compiler may be using, and adjust esp to
+;;; make room for our stack frame.
+
+
+;;; Retrieve the function arguments. r8d will hold cur_match
+;;; throughout the entire function. edx will hold the pointer to the
+;;; deflate_state structure during the function's setup (before
+;;; entering the main loop.
+
+; parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match)
+
+; this clear high 32 bits of r8, which can be garbage in both r8 and rdx
+
+ mov [save_rdi],rdi
+ mov [save_rsi],rsi
+ mov [save_rbx],rbx
+ mov [save_rbp],rbp
+IFDEF INFOZIP
+ mov r8d,ecx
+ELSE
+ mov r8d,edx
+ENDIF
+ mov [save_r12],r12
+ mov [save_r13],r13
+; mov [save_r14],r14
+; mov [save_r15],r15
+
+
+;;; uInt wmask = s->w_mask;
+;;; unsigned chain_length = s->max_chain_length;
+;;; if (s->prev_length >= s->good_match) {
+;;; chain_length >>= 2;
+;;; }
+
+ mov edi, prev_length
+ mov esi, good_match
+ mov eax, WMask
+ mov ebx, max_chain_length
+ cmp edi, esi
+ jl LastMatchGood
+ shr ebx, 2
+LastMatchGood:
+
+;;; chainlen is decremented once beforehand so that the function can
+;;; use the sign flag instead of the zero flag for the exit test.
+;;; It is then shifted into the high word, to make room for the wmask
+;;; value, which it will always accompany.
+
+ dec ebx
+ shl ebx, 16
+ or ebx, eax
+
+;;; on zlib only
+;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
+
+IFDEF INFOZIP
+ mov [chainlenwmask], ebx
+; on infozip nice_match = [nice_match]
+ELSE
+ mov eax, nice_match
+ mov [chainlenwmask], ebx
+ mov r10d, Lookahead
+ cmp r10d, eax
+ cmovnl r10d, eax
+ mov [nicematch],r10d
+ENDIF
+
+;;; register Bytef *scan = s->window + s->strstart;
+ mov r10, window_ad
+ mov ebp, strstart
+ lea r13, [r10 + rbp]
+
+;;; Determine how many bytes the scan ptr is off from being
+;;; dword-aligned.
+
+ mov r9,r13
+ neg r13
+ and r13,3
+
+;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
+;;; s->strstart - (IPos)MAX_DIST(s) : NIL;
+IFDEF INFOZIP
+ mov eax,07efah ; MAX_DIST = (WSIZE-MIN_LOOKAHEAD) (0x8000-(3+8+1))
+ELSE
+ mov eax, window_size
+ sub eax, MIN_LOOKAHEAD
+ENDIF
+ xor edi,edi
+ sub ebp, eax
+
+ mov r11d, prev_length
+
+ cmovng ebp,edi
+
+;;; int best_len = s->prev_length;
+
+
+;;; Store the sum of s->window + best_len in esi locally, and in esi.
+
+ lea rsi,[r10+r11]
+
+;;; register ush scan_start = *(ushf*)scan;
+;;; register ush scan_end = *(ushf*)(scan+best_len-1);
+;;; Posf *prev = s->prev;
+
+ movzx r12d,word ptr [r9]
+ movzx ebx, word ptr [r9 + r11 - 1]
+
+ mov rdi, prev_ad
+
+;;; Jump into the main loop.
+
+ mov edx, [chainlenwmask]
+
+ cmp bx,word ptr [rsi + r8 - 1]
+ jz LookupLoopIsZero
+
+LookupLoop1:
+ and r8d, edx
+
+ movzx r8d, word ptr [rdi + r8*2]
+ cmp r8d, ebp
+ jbe LeaveNow
+ sub edx, 00010000h
+ js LeaveNow
+
+LoopEntry1:
+ cmp bx,word ptr [rsi + r8 - 1]
+ jz LookupLoopIsZero
+
+LookupLoop2:
+ and r8d, edx
+
+ movzx r8d, word ptr [rdi + r8*2]
+ cmp r8d, ebp
+ jbe LeaveNow
+ sub edx, 00010000h
+ js LeaveNow
+
+LoopEntry2:
+ cmp bx,word ptr [rsi + r8 - 1]
+ jz LookupLoopIsZero
+
+LookupLoop4:
+ and r8d, edx
+
+ movzx r8d, word ptr [rdi + r8*2]
+ cmp r8d, ebp
+ jbe LeaveNow
+ sub edx, 00010000h
+ js LeaveNow
+
+LoopEntry4:
+
+ cmp bx,word ptr [rsi + r8 - 1]
+ jnz LookupLoop1
+ jmp LookupLoopIsZero
+
+
+;;; do {
+;;; match = s->window + cur_match;
+;;; if (*(ushf*)(match+best_len-1) != scan_end ||
+;;; *(ushf*)match != scan_start) continue;
+;;; [...]
+;;; } while ((cur_match = prev[cur_match & wmask]) > limit
+;;; && --chain_length != 0);
+;;;
+;;; Here is the inner loop of the function. The function will spend the
+;;; majority of its time in this loop, and majority of that time will
+;;; be spent in the first ten instructions.
+;;;
+;;; Within this loop:
+;;; ebx = scanend
+;;; r8d = curmatch
+;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
+;;; esi = windowbestlen - i.e., (window + bestlen)
+;;; edi = prev
+;;; ebp = limit
+
+LookupLoop:
+ and r8d, edx
+
+ movzx r8d, word ptr [rdi + r8*2]
+ cmp r8d, ebp
+ jbe LeaveNow
+ sub edx, 00010000h
+ js LeaveNow
+
+LoopEntry:
+
+ cmp bx,word ptr [rsi + r8 - 1]
+ jnz LookupLoop1
+LookupLoopIsZero:
+ cmp r12w, word ptr [r10 + r8]
+ jnz LookupLoop1
+
+
+;;; Store the current value of chainlen.
+ mov [chainlenwmask], edx
+
+;;; Point edi to the string under scrutiny, and esi to the string we
+;;; are hoping to match it up with. In actuality, esi and edi are
+;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
+;;; initialized to -(MAX_MATCH_8 - scanalign).
+
+ lea rsi,[r8+r10]
+ mov rdx, 0fffffffffffffef8h; -(MAX_MATCH_8)
+ lea rsi, [rsi + r13 + 0108h] ;MAX_MATCH_8]
+ lea rdi, [r9 + r13 + 0108h] ;MAX_MATCH_8]
+
+ prefetcht1 [rsi+rdx]
+ prefetcht1 [rdi+rdx]
+
+
+;;; Test the strings for equality, 8 bytes at a time. At the end,
+;;; adjust rdx so that it is offset to the exact byte that mismatched.
+;;;
+;;; We already know at this point that the first three bytes of the
+;;; strings match each other, and they can be safely passed over before
+;;; starting the compare loop. So what this code does is skip over 0-3
+;;; bytes, as much as necessary in order to dword-align the edi
+;;; pointer. (rsi will still be misaligned three times out of four.)
+;;;
+;;; It should be confessed that this loop usually does not represent
+;;; much of the total running time. Replacing it with a more
+;;; straightforward "rep cmpsb" would not drastically degrade
+;;; performance.
+
+
+LoopCmps:
+ mov rax, [rsi + rdx]
+ xor rax, [rdi + rdx]
+ jnz LeaveLoopCmps
+
+ mov rax, [rsi + rdx + 8]
+ xor rax, [rdi + rdx + 8]
+ jnz LeaveLoopCmps8
+
+
+ mov rax, [rsi + rdx + 8+8]
+ xor rax, [rdi + rdx + 8+8]
+ jnz LeaveLoopCmps16
+
+ add rdx,8+8+8
+
+ jnz short LoopCmps
+ jmp short LenMaximum
+LeaveLoopCmps16: add rdx,8
+LeaveLoopCmps8: add rdx,8
+LeaveLoopCmps:
+
+ test eax, 0000FFFFh
+ jnz LenLower
+
+ test eax,0ffffffffh
+
+ jnz LenLower32
+
+ add rdx,4
+ shr rax,32
+ or ax,ax
+ jnz LenLower
+
+LenLower32:
+ shr eax,16
+ add rdx,2
+LenLower: sub al, 1
+ adc rdx, 0
+;;; Calculate the length of the match. If it is longer than MAX_MATCH,
+;;; then automatically accept it as the best possible match and leave.
+
+ lea rax, [rdi + rdx]
+ sub rax, r9
+ cmp eax, MAX_MATCH
+ jge LenMaximum
+
+;;; If the length of the match is not longer than the best match we
+;;; have so far, then forget it and return to the lookup loop.
+;///////////////////////////////////
+
+ cmp eax, r11d
+ jg LongerMatch
+
+ lea rsi,[r10+r11]
+
+ mov rdi, prev_ad
+ mov edx, [chainlenwmask]
+ jmp LookupLoop
+
+;;; s->match_start = cur_match;
+;;; best_len = len;
+;;; if (len >= nice_match) break;
+;;; scan_end = *(ushf*)(scan+best_len-1);
+
+LongerMatch:
+ mov r11d, eax
+ mov match_start, r8d
+ cmp eax, [nicematch]
+ jge LeaveNow
+
+ lea rsi,[r10+rax]
+
+ movzx ebx, word ptr [r9 + rax - 1]
+ mov rdi, prev_ad
+ mov edx, [chainlenwmask]
+ jmp LookupLoop
+
+;;; Accept the current string, with the maximum possible length.
+
+LenMaximum:
+ mov r11d,MAX_MATCH
+ mov match_start, r8d
+
+;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
+;;; return s->lookahead;
+
+LeaveNow:
+IFDEF INFOZIP
+ mov eax,r11d
+ELSE
+ mov eax, Lookahead
+ cmp r11d, eax
+ cmovng eax, r11d
+ENDIF
+
+;;; Restore the stack and return from whence we came.
+
+
+ mov rsi,[save_rsi]
+ mov rdi,[save_rdi]
+ mov rbx,[save_rbx]
+ mov rbp,[save_rbp]
+ mov r12,[save_r12]
+ mov r13,[save_r13]
+; mov r14,[save_r14]
+; mov r15,[save_r15]
+
+
+ ret 0
+; please don't remove this string !
+; Your can freely use gvmat64 in any free or commercial app
+; but it is far better don't remove the string in the binary!
+ db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0
+longest_match ENDP
+
+match_init PROC
+ ret 0
+match_init ENDP
+
+
+END
Deleted: trunk/OpenMPT/zlib/contrib/masmx64/gvmat64.obj
===================================================================
(Binary files differ)
Deleted: trunk/OpenMPT/zlib/contrib/masmx64/inffas8664.c
===================================================================
--- trunk/OpenMPT/zlib/contrib/masmx64/inffas8664.c 2010-04-28 20:52:46 UTC (rev 579)
+++ trunk/OpenMPT/zlib/contrib/masmx64/inffas8664.c 2010-04-30 21:28:47 UTC (rev 580)
@@ -1,186 +0,0 @@
-/* inffas8664.c is a hand tuned assembler version of inffast.c - fast decoding
- * version for AMD64 on Windows using Microsoft C compiler
- *
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Copyright (C) 2003 Chris Anderson <chr...@ch...>
- * Please use the copyright conditions above.
- *
- * 2005 - Adaptation to Microsoft C Compiler for AMD64 by Gilles Vollant
- *
- * inffas8664.c call function inffas8664fnc in inffasx64.asm
- * inffasx64.asm is automatically convert from AMD64 portion of inffas86.c
- *
- * Dec-29-2003 -- I added AMD64 inflate asm support. This version is also
- * slightly quicker on x86 systems because, instead of using rep movsb to copy
- * data, it uses rep movsw, which moves data in 2-byte chunks instead of single
- * bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates
- * from http://fedora.linux.duke.edu/fc1_x86_64
- * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with
- * 1GB ram. The 64-bit version is about 4% faster than the 32-bit version,
- * when decompressing mozilla-source-1.3.tar.gz.
- *
- * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
- * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at
- * the moment. I have successfully compiled and tested this code with gcc2.96,
- * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S
- * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
- * enabled. I will attempt to merge the MMX code into this version. Newer
- * versions of this and inffast.S can be found at
- * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
- *
- */
-
-#include <stdio.h>
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-/* Mark Adler's comments from inffast.c: */
-
-/*
- Decode literal, length, and distance codes and write out the resulting
- literal and match bytes until either not enough input or output is
- available, an end-of-block is encountered, or a data error is encountered.
- When large enough input and output buffers are supplied to inflate(), for
- example, a 16K input buffer and a 64K output buffer, more than 95% of the
- inflate execution time is spent in this routine.
-
- Entry assumptions:
-
- state->mode == LEN
- strm->avail_in >= 6
- strm->avail_out >= 258
- start >= strm->avail_out
- state->bits < 8
-
- On return, state->mode is one of:
-
- LEN -- ran out of enough output space or enough available input
- TYPE -- reached end of block code, inflate() to interpret next block
- BAD -- error in block data
-
- Notes:
-
- - The maximum input bits used by a length/distance pair is 15 bits for the
- length code, 5 bits for the length extra, 15 bits for the distance code,
- and 13 bits for the distance extra. This totals 48 bits, or six bytes.
- Therefore if strm->avail_in >= 6, then there is enough input to avoid
- checking for available input while decoding.
-
- - The maximum bytes that a single length/distance pair can output is 258
- bytes, which is the maximum length that can be coded. inflate_fast()
- requires strm->avail_out >= 258 for each loop to avoid checking for
- output space.
- */
-
-
-
- typedef struct inffast_ar {
-/* 64 32 x86 x86_64 */
-/* ar offset register */
-/* 0 0 */ void *esp; /* esp save */
-/* 8 4 */ void *ebp; /* ebp save */
-/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */
-/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */
-/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */
-/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */
-/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */
-/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */
-/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */
-/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */
-/* 80 40 */ size_t /*unsigned long */hold; /* edx rdx local strm->hold */
-/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */
-/* 92 48 */ unsigned wsize; /* window size */
-/* 96 52 */ unsigned write; /* window write index */
-/*100 56 */ unsigned lmask; /* r12 mask for lcode */
-/*104 60 */ unsigned dmask; /* r13 mask for dcode */
-/*108 64 */ unsigned len; /* r14 match length */
-/*112 68 */ unsigned dist; /* r15 match distance */
-/*116 72 */ unsigned status; /* set when state chng*/
- } type_ar;
-#ifdef ASMINF
-
-void inflate_fast(strm, start)
-z_streamp strm;
-unsigned start; /* inflate()'s starting value for strm->avail_out */
-{
- struct inflate_state FAR *state;
- type_ar ar;
- void inffas8664fnc(struct inffast_ar * par);
-
-
-
-#if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64))
-#define PAD_AVAIL_IN 6
-#define PAD_AVAIL_OUT 258
-#else
-#define PAD_AVAIL_IN 5
-#define PAD_AVAIL_OUT 257
-#endif
-
- /* copy state to local variables */
- state = (struct inf...
[truncated message content] |
|
From: <sag...@us...> - 2010-04-28 20:52:52
|
Revision: 579
http://modplug.svn.sourceforge.net/modplug/?rev=579&view=rev
Author: saga-games
Date: 2010-04-28 20:52:46 +0000 (Wed, 28 Apr 2010)
Log Message:
-----------
[Reg] Pattern Editor: Creating a selection using the Shift key + Mouse click now only works if there was previously no selection made; This seems reasonable as the old shift-behaviour seems to be widely used.
[Mod] Updated release notes.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-04-27 21:14:59 UTC (rev 578)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-04-28 20:52:46 UTC (rev 579)
@@ -998,7 +998,7 @@
DragToSel(m_dwEndSel, TRUE);
} else */
{
- if(CMainFrame::GetInputHandler()->ShiftPressed())
+ if(CMainFrame::GetInputHandler()->ShiftPressed() && m_dwStartSel == m_dwEndSel)
{
// Shift pressed -> set 2nd selection point
DragToSel(GetPositionFromPoint(point), TRUE);
@@ -4241,7 +4241,7 @@
// -- write sdx if playing live
if (usePlaybackPosition && nTick) // avoid SD0 which will be mis-interpreted
{
- if (p->command == 0) //make sure we don't overwrite any existing commands.
+ if (p->command == CMD_NONE) //make sure we don't overwrite any existing commands.
{
p->command = (pSndFile->TypeIsS3M_IT_MPT()) ? CMD_S3MCMDEX : CMD_MODCMDEX;
UINT maxSpeed = 0x0F;
@@ -4251,9 +4251,8 @@
}
// -- old style note cut/off: erase instrument number
- if (oldStyle && ((p->note == NOTE_NOTECUT) || (p->note == NOTE_KEYOFF) || (p->note == NOTE_FADE))) {
+ if (oldStyle && ((p->note == NOTE_NOTECUT) || (p->note == NOTE_KEYOFF) || (p->note == NOTE_FADE)))
p->instr=0;
- }
// -- if recording, handle post note entry behaviour (move cursor etc..)
if(bRecordEnabled)
Modified: trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html
===================================================================
--- trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html 2010-04-27 21:14:59 UTC (rev 578)
+++ trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html 2010-04-28 20:52:46 UTC (rev 579)
@@ -48,8 +48,18 @@
h3 { border-left-width: 2em; }
h4 { border-left-width: 1em; }
- li {list-style-type: none; padding:0 0 1em 0; }
+ li {list-style-type: none; padding: 0 0 1em 0; }
li:before { content: "» "; }
+
+ li li { padding: 0; }
+
+ /* use this for pattern data */
+ pre
+ {
+ font-family: monospace;
+ display: inline;
+ color: #006;
+ }
</style>
</head>
@@ -92,7 +102,7 @@
<li><strong>Program settings</strong> are now stored in the Application Data folder by default.</li>
<li>More <strong>intelligtent autosave</strong> behaviour, which does not autosave anymore if nothing has changed since the last autosave.
A friendly reminder: The autosave and backup options should always be enabled; You will be very glad about them once OpenMPT <i>really</i> crashes
- or you accidentally overwrite a file.</strong>
+ or you accidentally overwrite a file.</li>
<li>New and <strong>updated keymaps</strong> with many new shortcuts!</li>
<li><strong>Redesigned</strong> several dialogs.</li>
</ul>
@@ -105,22 +115,29 @@
<li>The upper panel is a lot more <strong>compact</strong> now; The split keyboard settings
have been moved to a separate dialog which can be called with a keyboard shortcut
or through the main menu.</li>
- <li><strong>Parameter Control Notes</strong>: These new pattern events almost completely replace Zxx and \xx commands
+ <li><strong>Parameter Control Notes</strong>: These new pattern events almost completely replace <pre>Zxx</pre> and <pre>\xx</pre> commands
for VST parameter automation in the MPTM format. They are not bound to a specific channel or macro anymore;
The pattern event stores all necessary information and can thus be moved around easily in the pattern.
- The format for those events is: PC(s) XX YYY ZZZ. A PC "note" equals a Zxx effect, a PCs "note" behaves like \xx.
- The instrument column (XX) contains the VST number (can be obtained from the VST list or through the context menu).
- The volume column (YYY) stores the parameter that is going to be automated, ranging from 0 to 999 (decimal).
- The effect column (ZZZ) stores the parameter value, also ranging from 0 to 999 (decimal).</li>
- <li><strong>Note Fade</strong> is a new note type in IT / MPTM modules, based on an unfinished feature in Impulse Tracker.
+ The format for those events is <pre>PC(s) XX YYY ZZZ</pre>, the parameters work as follows:
+ <ul>
+ <li>A <pre>PC</pre> "note" entry equals a <pre>Zxx</pre> effect, a <pre>PCs</pre> "note" behaves like <pre>\xx</pre>.</li>
+ <li>The instrument column (<pre>XX</pre>) contains the VST number (can be obtained from the VST list or through the context menu).</li>
+ <li>The volume column (<pre>YYY</pre>) stores the parameter that is going to be automated, ranging from <pre>000</pre> to <pre>999</pre> (decimal).</li>
+ <li>The effect column (<pre>ZZZ</pre>) stores the parameter value, also ranging from <pre>000</pre> to <pre>999</pre> (decimal).</li>
+ </ul>
+ </li>
+ <li><strong>Note Fade</strong> is a new note type in IT / MPTM modules, based on an unfinished feature in Impulse Tracker, displayed as <pre>~~</pre>.
As the name suggests, this note fades out the instrument depending on its fadeout value (without releasing any envelopes).
- Therefore, it will not work in sample mode.</li>
+ Therefore, it will not work in sample mode. Various players and trackers support this command already.</li>
+ <li>New combined effect in the MPTM format: <strong>Note Delay + Cut</strong>. Format is <pre>:xy</pre>, whereas <pre>x</pre> is the delay in
+ ticks and <pre>y</pre> the amount of ticks after which the instrument will be cut off again (or more precise: the instrument will be cut off at tick <pre>x</pre> + <pre>y</pre>).</li>
<li>In the <strong>orderlist</strong>, multiple orders can now be selected at once (default multiselect shortcut: Shift).
Order selections can be quickly rendered to a wave file using the context menu.</li>
<li>New <strong>paste modes</strong>: Overflow paste (which continues the paste in the next pattern if it reaches the bottom of the current pattern),
paste flood (which keeps pasting the data again and again, until it reaches the bottom of the pattern) and
push-forward paste (which pushes the already existing pattern data downwards, like in Impulse Tracker).</li>
<li>Improved MOD editing - now it should be almost impossible to write commands in the patterns that don't belong into MOD files. :-)</li>
+ <li>If no selection has been made, Shift-Clicking a point now draws a <strong>selection</strong>, starting from the previously highlighted pattern command;</li>
</ul>
<h3>Sample Editor</h3>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-04-27 21:15:06
|
Revision: 578
http://modplug.svn.sourceforge.net/modplug/?rev=578&view=rev
Author: saga-games
Date: 2010-04-27 21:14:59 +0000 (Tue, 27 Apr 2010)
Log Message:
-----------
[Fix] Mod Conversion: S00 (IT/S3M) does not equal E00 (MOD/XM), as Exx doesn't have effect memory. Trying to convert S00 to the last used value now.
[Ref] That one comparison that was changed in Snd_fx.cpp in the last revision might have worked, but it's looking slightly wrong...
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2010-04-25 20:42:36 UTC (rev 577)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-04-27 21:14:59 UTC (rev 578)
@@ -171,8 +171,13 @@
MODCOMMAND *m = m_SndFile.Patterns[nPat];
// This is used for -> MOD/XM conversion
- BYTE cEffectMemory[MAX_BASECHANNELS][MAX_EFFECTS];
- memset(&cEffectMemory, 0, sizeof(BYTE) * MAX_BASECHANNELS * MAX_EFFECTS);
+ vector<vector<MODCOMMAND::PARAM> > cEffectMemory;
+ cEffectMemory.resize(m_SndFile.GetNumChannels());
+ for(size_t i = 0; i < m_SndFile.GetNumChannels(); i++)
+ {
+ cEffectMemory[i].resize(MAX_EFFECTS, 0);
+ }
+
UINT nChannel = m_SndFile.m_nChannels - 1;
for (UINT len = m_SndFile.PatternSize[nPat] * m_SndFile.m_nChannels; len; m++, len--)
@@ -187,11 +192,13 @@
switch(m->command)
{
case CMD_ARPEGGIO:
+ case CMD_S3MCMDEX:
+ case CMD_MODCMDEX:
// No effect memory in XM / MOD
if(m->param == 0)
- m->param = cEffectMemory[nChannel][CMD_ARPEGGIO];
+ m->param = cEffectMemory[nChannel][m->command];
else
- cEffectMemory[nChannel][CMD_ARPEGGIO] = m->param;
+ cEffectMemory[nChannel][m->command] = m->param;
break;
}
}
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-04-25 20:42:36 UTC (rev 577)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-04-27 21:14:59 UTC (rev 578)
@@ -2877,7 +2877,7 @@
{
// EFx implementation for MOD files (PT 1.1A and up: Invert Loop)
// This effect trashes samples. Thanks to 8bitbubsy for making this work. :)
- if((GetType() == MOD_TYPE_MOD) == 0 || pChn->nEFxSpeed == 0) return;
+ if(GetType() != MOD_TYPE_MOD || pChn->nEFxSpeed == 0) return;
// we obviously also need a sample for this
MODSAMPLE *pModSample = pChn->pModSample;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-04-25 20:42:43
|
Revision: 577
http://modplug.svn.sourceforge.net/modplug/?rev=577&view=rev
Author: saga-games
Date: 2010-04-25 20:42:36 +0000 (Sun, 25 Apr 2010)
Log Message:
-----------
[Fix] DBM Loader: Various fixes to increase import precision and an endianness fix
[Fix] Further fixes to the song length detection code
[Fix] VST Editor: Preset names starting with ' ' >= char > 'A' were cropped (i.e. "123ABC" was displayed as "ABC")
[Fix] Mod Conversion: When converting to MOD/S3M, the extended filter range flag was not deactivated.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/soundlib/LOAD_DBM.CPP
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2010-04-20 21:57:38 UTC (rev 576)
+++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2010-04-25 20:42:36 UTC (rev 577)
@@ -24,7 +24,7 @@
else
{
size_t k=0;
- while(k < rnSize-1 && rawname[k] != 0 && rawname[k] < 'A' && k<255) k++;
+ while(k < rnSize-1 && rawname[k] != 0 && rawname[k] <= ' ' && k<255) k++;
wsprintf(name, "%02d - %s", p, &rawname[k]);
}
name[nSize-1] = 0;
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2010-04-20 21:57:38 UTC (rev 576)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-04-25 20:42:36 UTC (rev 577)
@@ -356,6 +356,7 @@
if (!newTypeIsIT_MPT) m_SndFile.m_dwSongFlags &= ~(SONG_ITOLDEFFECTS|SONG_ITCOMPATMODE);
if (!newTypeIsS3M) m_SndFile.m_dwSongFlags &= ~SONG_FASTVOLSLIDES;
if (!newTypeIsMOD) m_SndFile.m_dwSongFlags &= ~SONG_PT1XMODE;
+ if (newTypeIsS3M || newTypeIsMOD) m_SndFile.m_dwSongFlags &= ~SONG_EXFILTERRANGE;
END_CRITICAL();
ChangeFileExtension(nNewType);
Modified: trunk/OpenMPT/soundlib/LOAD_DBM.CPP
===================================================================
--- trunk/OpenMPT/soundlib/LOAD_DBM.CPP 2010-04-20 21:57:38 UTC (rev 576)
+++ trunk/OpenMPT/soundlib/LOAD_DBM.CPP 2010-04-25 20:42:36 UTC (rev 577)
@@ -19,8 +19,6 @@
#include "stdafx.h"
#include "sndfile.h"
-#pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data"
-
#define DBM_FILE_MAGIC 0x304d4244
#define DBM_ID_NAME 0x454d414e
#define DBM_NAMELEN 0x2c000000
@@ -97,12 +95,93 @@
#pragma pack()
+static MODCOMMAND::COMMAND dbm_efftrans[23] =
+{
+ CMD_ARPEGGIO, CMD_PORTAMENTOUP, CMD_PORTAMENTODOWN, CMD_TONEPORTAMENTO,
+ CMD_VIBRATO, CMD_TONEPORTAVOL, CMD_VIBRATOVOL, CMD_TREMOLO,
+ CMD_PANNING8, CMD_OFFSET, CMD_VOLUMESLIDE, CMD_POSITIONJUMP,
+ CMD_VOLUME, CMD_PATTERNBREAK, CMD_MODCMDEX, CMD_TEMPO,
+ CMD_GLOBALVOLUME, CMD_GLOBALVOLSLIDE, CMD_KEYOFF, CMD_SETENVPOSITION,
+ CMD_CHANNELVOLUME, CMD_CHANNELVOLSLIDE, CMD_PANNINGSLIDE,
+};
+
+
+void ConvertDBMEffect(uint8 *command, uint8 *param)
+//----------------------------------
+{
+ if(*command < ARRAYELEMCOUNT(dbm_efftrans))
+ *command = dbm_efftrans[*command];
+ else
+ *command = CMD_NONE;
+
+ switch (*command)
+ {
+ case CMD_ARPEGGIO:
+ if(*param == 0)
+ *command = CMD_NONE;
+ break;
+ case CMD_VOLUMESLIDE:
+ if(*param & 0xF0)
+ *param &= 0xF0;
+ break;
+ case CMD_MODCMDEX:
+ switch(*param & 0xF0)
+ {
+ case 0x00: // set filter
+ *command = CMD_NONE;
+ break;
+ case 0x30: // play backwards
+ *command = CMD_S3MCMDEX;
+ *param = 0x9F;
+ break;
+ case 0x40: // turn off sound in channel
+ // TODO
+ break;
+ case 0x50: // turn on/off channel
+ // TODO is this correct?
+ if((*param & 0x0F) <= 0x01)
+ {
+ *command = CMD_CHANNELVOLUME;
+ *param = (*param == 0x50) ? 0x00 : 0x40;
+ }
+ break;
+ case 0x60: // set loop begin / loop
+ // TODO
+ break;
+ case 0x70: // set offset
+ // TODO
+ break;
+ case 0xF0: // turn on/off channel
+ // TODO
+ break;
+ default:
+ // Rest will be converted later from CMD_MODCMDEX to CMD_S3MCMDEX.
+ break;
+ }
+ break;
+ case CMD_TEMPO:
+ if(*param <= 0x1F) *command = CMD_SPEED;
+ break;
+ case CMD_KEYOFF:
+ if (*param == 0)
+ {
+ // TODO key of at tick 0
+ }
+ break;
+ case CMD_OFFSET:
+ // TODO Sample offset slide
+ *command = CMD_NONE;
+ break;
+ }
+}
+
+
bool CSoundFile::ReadDBM(const BYTE *lpStream, DWORD dwMemLength)
//---------------------------------------------------------------
{
const DBMFILEHEADER *pfh = (DBMFILEHEADER *)lpStream;
DWORD dwMemPos;
- UINT nOrders, nSamples, nInstruments, nPatterns;
+ uint16 nOrders, nSamples, nInstruments, nPatterns;
if ((!lpStream) || (dwMemLength <= sizeof(DBMFILEHEADER)) || (!pfh->channels)
|| (pfh->dbm_id != DBM_FILE_MAGIC) || (!pfh->songs) || (pfh->song_id != DBM_ID_SONG)
@@ -115,9 +194,7 @@
nSamples = BigEndianW(pfh->samples);
nPatterns = BigEndianW(pfh->patterns);
m_nType = MOD_TYPE_DBM;
- m_nChannels = BigEndianW(pfh->channels);
- if (m_nChannels < 1) m_nChannels = 1;
- if (m_nChannels > 64) m_nChannels = 64;
+ m_nChannels = CLAMP(BigEndianW(pfh->channels), 1, MAX_BASECHANNELS); // note: MAX_BASECHANNELS is currently 127, but DBM supports up to 128 channels.
memcpy(m_szNames[0], (pfh->songname[0]) ? pfh->songname : pfh->songname2, 32);
SpaceToNullStringFixed(m_szNames[0], 31);
Order.resize(nOrders, Order.GetInvalidPatIndex());
@@ -129,7 +206,7 @@
dwMemPos += 2*nOrders;
while (dwMemPos + 10 < dwMemLength)
{
- DWORD chunk_id = ((LPDWORD)(lpStream+dwMemPos))[0];
+ DWORD chunk_id = LittleEndian(((LPDWORD)(lpStream+dwMemPos))[0]);
DWORD chunk_size = BigEndian(((LPDWORD)(lpStream+dwMemPos))[1]);
DWORD chunk_pos;
@@ -141,19 +218,22 @@
if (chunk_id == DBM_ID_INST)
{
if (nInstruments >= MAX_INSTRUMENTS) nInstruments = MAX_INSTRUMENTS-1;
- for (UINT iIns=0; iIns<nInstruments; iIns++)
+ for(INSTRUMENTINDEX iIns = 0; iIns < nInstruments; iIns++)
{
MODSAMPLE *psmp;
MODINSTRUMENT *pIns;
DBMINSTRUMENT *pih;
- UINT nsmp;
+ WORD nsmp;
if (chunk_pos + sizeof(DBMINSTRUMENT) > dwMemPos) break;
- if ((pIns = new MODINSTRUMENT) == NULL) break;
- pih = (DBMINSTRUMENT *)(lpStream+chunk_pos);
+ if ((pIns = new MODINSTRUMENT) == nullptr) break;
+ memset(pIns, 0, sizeof(MODINSTRUMENT));
+ SetDefaultInstrumentValues(pIns);
+ Instruments[iIns + 1] = pIns;
+
+ pih = (DBMINSTRUMENT *)(lpStream + chunk_pos);
nsmp = BigEndianW(pih->sampleno);
- psmp = ((nsmp) && (nsmp < MAX_SAMPLES)) ? &Samples[nsmp] : NULL;
- memset(pIns, 0, sizeof(MODINSTRUMENT));
+ psmp = ((nsmp) && (nsmp < MAX_SAMPLES)) ? &Samples[nsmp] : nullptr;
memcpy(pIns->name, pih->name, 30);
SpaceToNullStringFixed(pIns->name, 30);
if (psmp)
@@ -161,7 +241,7 @@
memcpy(m_szNames[nsmp], pih->name, 30);
SpaceToNullStringFixed(m_szNames[nsmp], 30);
}
- Instruments[iIns+1] = pIns;
+
pIns->nFadeOut = 1024; // ???
pIns->nGlobalVol = 64;
pIns->nPan = BigEndianW(pih->panning);
@@ -169,12 +249,12 @@
pIns->dwFlags = INS_SETPANNING;
else
pIns->nPan = 128;
- pIns->nPPC = 5*12;
- SetDefaultInstrumentValues(pIns);
- for (UINT i=0; i<NOTE_MAX; i++)
+ pIns->nPPC = 5 * 12;
+
+ for (BYTE i = 0; i < NOTE_MAX; i++)
{
pIns->Keyboard[i] = nsmp;
- pIns->NoteMap[i] = i+1;
+ pIns->NoteMap[i] = i + 1;
}
// Sample Info
if (psmp)
@@ -185,7 +265,7 @@
psmp->nGlobalVol = 64;
psmp->nC5Speed = BigEndian(pih->finetune);
int f2t = FrequencyToTranspose(psmp->nC5Speed);
- psmp->RelativeTone = f2t >> 7;
+ psmp->RelativeTone = (signed char)(f2t >> 7);
psmp->nFineTune = f2t & 0x7F;
if ((pih->looplen) && (sflags & 3))
{
@@ -197,7 +277,7 @@
}
}
chunk_pos += sizeof(DBMINSTRUMENT);
- m_nInstruments = iIns+1;
+ m_nInstruments = iIns + 1;
}
} else
// Volume Envelopes
@@ -239,7 +319,7 @@
if (chunk_id == DBM_ID_PATT)
{
if (nPatterns > MAX_PATTERNS) nPatterns = MAX_PATTERNS;
- for (UINT iPat=0; iPat<nPatterns; iPat++)
+ for(PATTERNINDEX iPat = 0; iPat < nPatterns; iPat++)
{
DBMPATTERN *pph;
DWORD pksize;
@@ -272,47 +352,64 @@
{
if (b & 0x01)
{
- UINT note = pkdata[i++];
+ uint8 note = pkdata[i++];
- if (note == 0x1F) note = 0xFF; else
+ if (note == 0x1F) note = NOTE_KEYOFF; else
if ((note) && (note < 0xFE))
{
- note = ((note >> 4)*12) + (note & 0x0F) + 13;
+ note = ((note >> 4) * 12) + (note & 0x0F) + 13;
}
m[ch].note = note;
}
if (b & 0x02) m[ch].instr = pkdata[i++];
if (b & 0x3C)
{
- UINT cmd1 = 0xFF, param1 = 0, cmd2 = 0xFF, param2 = 0;
- if (b & 0x04) cmd1 = (UINT)pkdata[i++];
- if (b & 0x08) param1 = pkdata[i++];
- if (b & 0x10) cmd2 = (UINT)pkdata[i++];
- if (b & 0x20) param2 = pkdata[i++];
- if (cmd1 == 0x0C)
+ uint8 cmd1 = CMD_NONE, cmd2 = CMD_NONE;
+ uint8 param1 = 0, param2 = 0;
+ if (b & 0x04) cmd2 = pkdata[i++];
+ if (b & 0x08) param2 = pkdata[i++];
+ if (b & 0x10) cmd1 = pkdata[i++];
+ if (b & 0x20) param1 = pkdata[i++];
+ ConvertDBMEffect(&cmd1, ¶m1);
+ ConvertDBMEffect(&cmd2, ¶m2);
+
+ // this is the same conversion algorithm as in the ULT loader. maybe this should be merged at some point...
+ if (cmd2 == CMD_VOLUME || (cmd2 == CMD_NONE && cmd1 != CMD_VOLUME))
{
- m[ch].volcmd = VOLCMD_VOLUME;
- m[ch].vol = param1;
- cmd1 = 0xFF;
- } else
- if (cmd2 == 0x0C)
- {
- m[ch].volcmd = VOLCMD_VOLUME;
- m[ch].vol = param2;
- cmd2 = 0xFF;
+ std::swap(cmd1, cmd2);
+ std::swap(param1, param2);
}
- if ((cmd1 > 0x13) || ((cmd1 >= 0x10) && (cmd2 < 0x10)))
+
+ int n;
+ for (n = 0; n < 4; n++)
{
- cmd1 = cmd2;
- param1 = param2;
- cmd2 = 0xFF;
+ if(CSoundFile::ConvertVolEffect(&cmd1, ¶m1, (n >> 1) ? true : false))
+ {
+ n = 5;
+ break;
+ }
+ std::swap(cmd1, cmd2);
+ std::swap(param1, param2);
}
- if (cmd1 <= 0x13)
+ if (n < 5)
{
- m[ch].command = cmd1;
- m[ch].param = param1;
- ConvertModCommand(&m[ch]);
+ if (CSoundFile::GetEffectWeight((MODCOMMAND::COMMAND)cmd1) > CSoundFile::GetEffectWeight((MODCOMMAND::COMMAND)cmd2))
+ {
+ std::swap(cmd1, cmd2);
+ std::swap(param1, param2);
+ }
+ cmd1 = CMD_NONE;
}
+ if (!cmd1)
+ param1 = 0;
+ if (!cmd2)
+ param2 = 0;
+
+ m[ch].volcmd = cmd1;
+ m[ch].vol = param1;
+ m[ch].command = cmd2;
+ m[ch].param = param2;
+ MODExx2S3MSxx(&m[ch]);
}
} else
{
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-04-20 21:57:38 UTC (rev 576)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-04-25 20:42:36 UTC (rev 577)
@@ -150,7 +150,7 @@
}
nPattern = (nCurrentPattern < Order.size()) ? Order[nCurrentPattern] : Order.GetInvalidPatIndex();
nNextPattern = nCurrentPattern;
- if(IsRowVisited(nCurrentPattern, 0, true))
+ if((!Patterns.IsValidPat(nPattern)) && IsRowVisited(nCurrentPattern, 0, true))
break;
}
// Skip non-existing patterns
@@ -2877,7 +2877,7 @@
{
// EFx implementation for MOD files (PT 1.1A and up: Invert Loop)
// This effect trashes samples. Thanks to 8bitbubsy for making this work. :)
- if((m_nType & MOD_TYPE_MOD) == 0 || pChn->nEFxSpeed == 0) return;
+ if((GetType() == MOD_TYPE_MOD) == 0 || pChn->nEFxSpeed == 0) return;
// we obviously also need a sample for this
MODSAMPLE *pModSample = pChn->pModSample;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|