aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/sdl/sdl.cpp19
-rw-r--r--base/main.cpp2
-rw-r--r--dists/msvc9/scumm.vcproj1
-rw-r--r--dists/msvc9/scummvm-tfmx.sln14
-rw-r--r--dists/msvc9/scummvm-tfmx.vcproj167
-rw-r--r--sound/mods/tfmx.cpp18
6 files changed, 203 insertions, 18 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index e65f4361ce..343a1ac6f4 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -90,7 +90,11 @@ void OSystem_SDL::initBackend() {
int joystick_num = ConfMan.getInt("joystick_num");
joystick_num = 0;
- uint32 sdlFlags = /* SDL_INIT_VIDEO | */ SDL_INIT_AUDIO /*| SDL_INIT_TIMER*/;
+#if !defined(TFMX_CMDLINE_TOOL)
+ uint32 sdlFlags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
+#else
+ uint32 sdlFlags = /*SDL_INIT_VIDEO |*/ SDL_INIT_AUDIO | SDL_INIT_TIMER;
+#endif
if (ConfMan.hasKey("disable_sdl_parachute"))
sdlFlags |= SDL_INIT_NOPARACHUTE;
@@ -108,11 +112,12 @@ void OSystem_SDL::initBackend() {
if (SDL_Init(sdlFlags) == -1) {
error("Could not initialize SDL: %s", SDL_GetError());
}
-/*
- _graphicsMutex = createMutex();
- SDL_ShowCursor(SDL_DISABLE);
+ _graphicsMutex = createMutex();
+#if !defined(TFMX_CMDLINE_TOOL)
+ SDL_ShowCursor(SDL_DISABLE);
+
// Enable unicode support if possible
SDL_EnableUNICODE(1);
@@ -164,13 +169,13 @@ void OSystem_SDL::initBackend() {
_savefile = new DefaultSaveFileManager();
#endif
}
-*/
+#endif
// Create and hook up the mixer, if none exists yet (we check for this to
// allow subclasses to provide their own).
if (_mixer == 0) {
setupMixer();
}
-/*
+
// Create and hook up the timer manager, if none exists yet (we check for
// this to allow subclasses to provide their own).
if (_timer == 0) {
@@ -184,7 +189,7 @@ void OSystem_SDL::initBackend() {
_timer = new DefaultTimerManager();
_timerID = SDL_AddTimer(10, &timer_handler, _timer);
}
-*/
+
// Invoke parent implementation of this method
OSystem::initBackend();
diff --git a/base/main.cpp b/base/main.cpp
index 5744ec41f0..913d4a4010 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -295,7 +295,7 @@ static void setupKeymapper(OSystem &system) {
}
-#if 1
+#if defined(TFMX_CMDLINE_TOOL)
void tfmxmain(int argc, const char * const argv[]);
extern "C" int scummvm_main(int argc, const char * const argv[]) {
diff --git a/dists/msvc9/scumm.vcproj b/dists/msvc9/scumm.vcproj
index d9214f7ff0..56f9ad2dae 100644
--- a/dists/msvc9/scumm.vcproj
+++ b/dists/msvc9/scumm.vcproj
@@ -55,7 +55,6 @@
ForceConformanceInForLoopScope="true"
UsePrecompiledHeader="0"
WarningLevel="4"
- WarnAsError="true"
SuppressStartupBanner="false"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
diff --git a/dists/msvc9/scummvm-tfmx.sln b/dists/msvc9/scummvm-tfmx.sln
index b00821d4b7..70447a14b8 100644
--- a/dists/msvc9/scummvm-tfmx.sln
+++ b/dists/msvc9/scummvm-tfmx.sln
@@ -2,17 +2,31 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scummvm", "scummvm-tfmx.vcproj", "{8434CB15-D08F-427D-9E6D-581AE5B28440}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B6AFD548-63D2-40CD-A652-E87095AFCBAF} = {B6AFD548-63D2-40CD-A652-E87095AFCBAF}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scumm", "scumm.vcproj", "{B6AFD548-63D2-40CD-A652-E87095AFCBAF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug_Command|Win32 = Debug_Command|Win32
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {8434CB15-D08F-427D-9E6D-581AE5B28440}.Debug_Command|Win32.ActiveCfg = Debug_Command|Win32
+ {8434CB15-D08F-427D-9E6D-581AE5B28440}.Debug_Command|Win32.Build.0 = Debug_Command|Win32
{8434CB15-D08F-427D-9E6D-581AE5B28440}.Debug|Win32.ActiveCfg = Debug|Win32
{8434CB15-D08F-427D-9E6D-581AE5B28440}.Debug|Win32.Build.0 = Debug|Win32
{8434CB15-D08F-427D-9E6D-581AE5B28440}.Release|Win32.ActiveCfg = Release|Win32
{8434CB15-D08F-427D-9E6D-581AE5B28440}.Release|Win32.Build.0 = Release|Win32
+ {B6AFD548-63D2-40CD-A652-E87095AFCBAF}.Debug_Command|Win32.ActiveCfg = Debug|Win32
+ {B6AFD548-63D2-40CD-A652-E87095AFCBAF}.Debug_Command|Win32.Build.0 = Debug|Win32
+ {B6AFD548-63D2-40CD-A652-E87095AFCBAF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B6AFD548-63D2-40CD-A652-E87095AFCBAF}.Debug|Win32.Build.0 = Debug|Win32
+ {B6AFD548-63D2-40CD-A652-E87095AFCBAF}.Release|Win32.ActiveCfg = Release|Win32
+ {B6AFD548-63D2-40CD-A652-E87095AFCBAF}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/dists/msvc9/scummvm-tfmx.vcproj b/dists/msvc9/scummvm-tfmx.vcproj
index 63bf94a448..65d4d27aea 100644
--- a/dists/msvc9/scummvm-tfmx.vcproj
+++ b/dists/msvc9/scummvm-tfmx.vcproj
@@ -43,7 +43,7 @@
Optimization="0"
InlineFunctionExpansion="0"
AdditionalIncludeDirectories="../../;../../engines"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;ENABLE_SCUMM;USE_ZLIB;USE_MAD;USE_VORBIS"
MinimalRebuild="true"
ExceptionHandling="1"
BasicRuntimeChecks="3"
@@ -71,7 +71,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="winmm.lib sdl.lib"
+ AdditionalDependencies="winmm.lib sdl.lib zlib.lib libmad.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib"
OutputFile="$(OutDir)\$(ProjectName)-tfmx.exe"
LinkIncremental="2"
IgnoreDefaultLibraryNames="libc.lib;libcmt.lib;msvcrt.lib"
@@ -135,7 +135,7 @@
EnableIntrinsicFunctions="true"
OmitFramePointers="true"
AdditionalIncludeDirectories="../../;../../engines"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ENABLE_SCUMM;USE_ZLIB;USE_MAD;USE_VORBIS"
StringPooling="true"
MinimalRebuild="false"
ExceptionHandling="1"
@@ -160,7 +160,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="winmm.lib sdl.lib"
+ AdditionalDependencies="winmm.lib sdl.lib zlib.lib libmad.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib"
OutputFile="$(OutDir)\$(ProjectName)-tfmx.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
@@ -196,6 +196,95 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
+ <Configuration
+ Name="Debug_Command|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ InlineFunctionExpansion="0"
+ AdditionalIncludeDirectories="../../;../../engines"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TFMX_CMDLINE_TOOL;USE_ZLIB;USE_MAD;USE_VORBIS"
+ MinimalRebuild="true"
+ ExceptionHandling="1"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="true"
+ EnableFunctionLevelLinking="true"
+ DisableLanguageExtensions="false"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ SuppressStartupBanner="false"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ DisableSpecificWarnings="4512"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib sdl.lib zlib.lib libmad.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib"
+ OutputFile="$(OutDir)\$(ProjectName)-tfmx.exe"
+ LinkIncremental="2"
+ IgnoreDefaultLibraryNames="libc.lib;libcmt.lib;msvcrt.lib"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/scummvm.pdb"
+ SubSystem="1"
+ EntryPointSymbol="WinMainCRTStartup"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
@@ -560,6 +649,15 @@
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Command|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\$(InputName)1.obj"
+ XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\..\sound\iff.h"
@@ -709,6 +807,15 @@
XMLDocumentationFileName="$(IntDir)/$(InputName)1.xdc"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Command|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"
+ XMLDocumentationFileName="$(IntDir)/$(InputName)1.xdc"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\..\sound\softsynth\emumidi.h"
@@ -739,6 +846,15 @@
XMLDocumentationFileName="$(IntDir)/$(InputName)1.xdc"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Command|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"
+ XMLDocumentationFileName="$(IntDir)/$(InputName)1.xdc"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\..\sound\softsynth\pcspk.cpp"
@@ -769,6 +885,15 @@
XMLDocumentationFileName="$(IntDir)/$(InputName)1.xdc"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Command|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"
+ XMLDocumentationFileName="$(IntDir)/$(InputName)1.xdc"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\..\sound\softsynth\ym2612.h"
@@ -1016,6 +1141,15 @@
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Command|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\$(InputName)1.obj"
+ XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\..\backends\platform\sdl\sdl.cpp"
@@ -1416,6 +1550,13 @@
Name="VCCustomBuildTool"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Command|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\..\gui\widget.cpp"
@@ -1569,6 +1710,15 @@
Outputs="$(OutDir)\$(InputName).obj"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Command|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="nasm.exe -f win32 -g -o &quot;$(OutDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ Outputs="$(OutDir)\$(InputName).obj"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\..\graphics\scaler\hq3x.cpp"
@@ -1599,6 +1749,15 @@
Outputs="$(OutDir)\$(InputName).obj"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Command|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="nasm.exe -f win32 -g -o &quot;$(OutDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ Outputs="$(OutDir)\$(InputName).obj"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\..\graphics\scaler\intern.h"
diff --git a/sound/mods/tfmx.cpp b/sound/mods/tfmx.cpp
index f3d87df1b2..16f7f19b91 100644
--- a/sound/mods/tfmx.cpp
+++ b/sound/mods/tfmx.cpp
@@ -281,6 +281,7 @@ FORCEINLINE bool Tfmx::macroStep(ChannelContext &channel) {
case 0x07: // Stop Macro
channel.macroRun = false;
+ --channel.macroStep;
return false;
case 0x08: // AddNote. Parameters: Note, Finetune(W)
@@ -403,9 +404,6 @@ FORCEINLINE bool Tfmx::macroStep(ChannelContext &channel) {
return channel.deferWait;
case 0x1B: // Random play. Parameters: macro/speed/mode
- macroPtr[1];
- macroPtr[2];
- macroPtr[3];
warnMacroUnimplemented(macroPtr, 0);
return true;
@@ -527,6 +525,7 @@ FORCEINLINE bool Tfmx::patternStep(PatternContext &pattern) {
switch (pattCmd & 0xF) {
case 0: // End Pattern + Next Trackstep
pattern.command = 0xFF;
+ --pattern.step;
_playerCtx.pendingTrackstep = true;
return false;
@@ -553,14 +552,17 @@ FORCEINLINE bool Tfmx::patternStep(PatternContext &pattern) {
// FT
case 4: // Stop this pattern
pattern.command = 0xFF;
+ --pattern.step;
// TODO: try figuring out if this was the last Channel?
return false;
case 5: // Kup^-Set key up
- // TODO: add expose?
+ if (!_channelCtx[patternPtr[2] % kNumVoices].sfxLocked)
+ _channelCtx[patternPtr[2] % kNumVoices].keyUp = false;
+ return true;
+
case 6: // Vibrato
case 7: // Envelope
- case 12: // Lock
noteCommand(pattCmd, patternPtr[1], patternPtr[2], patternPtr[3]);
return true;
@@ -582,6 +584,12 @@ FORCEINLINE bool Tfmx::patternStep(PatternContext &pattern) {
target.loopCount = 0xFF;
}
return true;
+
+ case 12: // Lock
+ _channelCtx[patternPtr[2] % kNumVoices].sfxLocked = (patternPtr[1] != 0);
+ _channelCtx[patternPtr[2] % kNumVoices].sfxLockTime = patternPtr[3];
+ return true;
+
case 13: // Cue
return true;
case 15: // NOP