diff --git a/CMakeLists.txt b/CMakeLists.txt index 44e751627..58743bd48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_PROJECT_VERSION_MAJOR 0) set(CMAKE_PROJECT_VERSION_MINOR 6) -set(CMAKE_PROJECT_VERSION_PATCH 1) +set(CMAKE_PROJECT_VERSION_PATCH 2) set(BUILD_GUI_DEFAULT ON) set(USE_SDL2_DEFAULT ON) @@ -137,19 +137,20 @@ else() set(SYSTEM_SDL_MIN_VER 2.0.0) endif() -if (WIN32) - # support Windows XP - if (SUPPORT_XP) - add_compile_definitions("_WIN32_WINNT=0x0501") - endif() -endif() - #list(APPEND DEPENDENCIES_INCLUDE_DIRS "extern/SAASound/include") list(APPEND DEPENDENCIES_INCLUDE_DIRS "extern/vgsound_emu-modified") find_package(Threads REQUIRED) list(APPEND DEPENDENCIES_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + +if (WIN32) + # support Windows XP + if (SUPPORT_XP) + list(APPEND DEPENDENCIES_DEFINES "_WIN32_WINNT=0x0501") + endif() +endif() + if (SYSTEM_FFTW) find_package(PkgConfig REQUIRED) pkg_check_modules(FFTW REQUIRED fftw3>=3.3) @@ -1045,7 +1046,6 @@ else() endif() target_include_directories(furnace SYSTEM PRIVATE ${DEPENDENCIES_INCLUDE_DIRS}) -target_compile_definitions(furnace PRIVATE ${DEPENDENCIES_DEFINES}) target_compile_options(furnace PRIVATE ${DEPENDENCIES_COMPILE_OPTIONS}) target_link_libraries(furnace PRIVATE ${DEPENDENCIES_LIBRARIES}) if (PKG_CONFIG_FOUND AND (SYSTEM_FMT OR SYSTEM_LIBSNDFILE OR SYSTEM_ZLIB OR SYSTEM_SDL2 OR SYSTEM_RTMIDI OR WITH_JACK)) @@ -1098,9 +1098,9 @@ if (NOT ANDROID OR TERMUX) if (WITH_WAVETABLES) install(DIRECTORY wavetables DESTINATION ${FURNACE_DATADIR}) endif() - add_compile_definitions(FURNACE_DATADIR="${FURNACE_DATADIR}") + list(APPEND DEPENDENCIES_DEFINES FURNACE_DATADIR="${FURNACE_DATADIR}") if (SHOW_OPEN_ASSETS_MENU_ENTRY) - add_compile_definitions(SHOW_OPEN_ASSETS_MENU_ENTRY) + list(APPEND DEPENDENCIES_DEFINES SHOW_OPEN_ASSETS_MENU_ENTRY) endif() endif() foreach(num 16 32 64 128 256 512) @@ -1131,3 +1131,5 @@ if (NOT ANDROID OR TERMUX) include(CPack) endif() + +target_compile_definitions(furnace PRIVATE ${DEPENDENCIES_DEFINES}) \ No newline at end of file diff --git a/README.md b/README.md index 06f7a59b5..63f92f8e3 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,10 @@ for other operating systems, you may [build the source](#developer-info). - **Game Boy** - including SOFTWARE ENVELOPES (zombie mode) - Virtual Boy + - Game Boy Advance + - DMA (direct memory access) two channel mode + - MinMod software driver by Natt Akuma + - Nintendo DS - modern/fantasy: - Commander X16 VERA - tildearrow Sound Unit diff --git a/android/app/build.gradle b/android/app/build.gradle index 6fed5ed8e..1b6e1c72d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -15,8 +15,8 @@ android { } minSdkVersion 21 targetSdkVersion 26 - versionCode 192 - versionName "0.6.1" + versionCode 197 + versionName "0.6.2" externalNativeBuild { cmake { arguments "-DANDROID_APP_PLATFORM=android-21", "-DANDROID_STL=c++_static", "-DWARNINGS_ARE_ERRORS=ON" diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 0c430ea6b..b48b1e92d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -2,7 +2,7 @@ diff --git a/doc/4-instrument/README.md b/doc/4-instrument/README.md index 8b106db91..9205d4b7f 100644 --- a/doc/4-instrument/README.md +++ b/doc/4-instrument/README.md @@ -76,6 +76,8 @@ the following instrument types are available: - [C219](c219.md) - for use with C219 sample chip. - [PowerNoise](powernoise.md) - for use with PowerNoise chip. - [Dave](dave.md) - for use with Dave chip. +- [Game Boy Advance DMA](gbadma.md) - for use with Game Boy Advance in direct mode. +- [Game Boy Advance MinMod](gbaminmod.md) - for use with Game Boy Advance with the MinMod software mixing driver. ## macros diff --git a/doc/4-instrument/gbadma.md b/doc/4-instrument/gbadma.md new file mode 100644 index 000000000..73c34d184 --- /dev/null +++ b/doc/4-instrument/gbadma.md @@ -0,0 +1,17 @@ +# GBA DMA instrument editor + +the GBA DMA instrument editor contains two tabs: Sample and Macros. + +## Sample + +for sample settings, see [the Sample instrument editor](sample.md). + +## Macros + +- **Volume**: volume sequence. +- **Arpeggio**: pitch sequence. +- **Waveform**: waveform sequence. +- **Panning (left)**: output level for left channel. +- **Panning (right)**: output level for right channel. +- **Pitch**: fine pitch. +- **Phase Reset**: trigger restart of waveform. diff --git a/doc/4-instrument/gbaminmod.md b/doc/4-instrument/gbaminmod.md new file mode 100644 index 000000000..71d87bae7 --- /dev/null +++ b/doc/4-instrument/gbaminmod.md @@ -0,0 +1,18 @@ +# GBA MinMod instrument editor + +the GBA MinMod instrument editor contains two tabs: Sample and Macros. + +## Sample + +for sample settings, see [the Sample instrument editor](sample.md). + +## Macros + +- **Volume**: volume sequence. +- **Arpeggio**: pitch sequence. +- **Waveform**: waveform sequence. +- **Panning (left)**: output level for left channel. +- **Panning (right)**: output level for right channel. +- **Pitch**: fine pitch. +- **Phase Reset**: trigger restart of waveform. +- **Special**: invert outputs. diff --git a/doc/4-instrument/nds.md b/doc/4-instrument/nds.md new file mode 100644 index 000000000..c59791378 --- /dev/null +++ b/doc/4-instrument/nds.md @@ -0,0 +1,17 @@ +# Nintendo DS instrument editor + +the Nintendo DS instrument editor contains two tabs: Sample and Macros. + +## Sample + +for sample settings, see [the Sample instrument editor](sample.md). + +## Macros + +- **Volume**: volume sequence. +- **Arpeggio**: pitch sequence. +- **Duty**: pulse width sequence. + - only in PSG channels. +- **Panning**: left/right balance sequence. +- **Pitch**: fine pitch. +- **Phase Reset**: trigger restart of waveform. diff --git a/doc/7-systems/README.md b/doc/7-systems/README.md index b1110e29f..a6f880687 100644 --- a/doc/7-systems/README.md +++ b/doc/7-systems/README.md @@ -73,6 +73,7 @@ this is the full list of chips that Furnace supports. - [Konami SCC](scc.md) - [FDS](fds.md) - [Game Boy](game-boy.md) +- [Game Boy Advance](gba.md) - [Generic PCM DAC](dac.md) - [Irem GA20](ga20.md) - [Bubble System WSG](bubblesystem.md) @@ -86,6 +87,7 @@ this is the full list of chips that Furnace supports. - [Namco 163](n163.md) - [Namco C140](c140.md) - [Namco WSG/C15/C30](namco.md) +- [Nintendo DS](nds.md) - [HuC6280](pce.md) - [PC Speaker](pcspkr.md) - [PET](pet.md) diff --git a/doc/7-systems/gba.md b/doc/7-systems/gba.md new file mode 100644 index 000000000..f89bbdb24 --- /dev/null +++ b/doc/7-systems/gba.md @@ -0,0 +1,30 @@ +# Game Boy Advance + +a portable video game console from Nintendo, succeeding the Game Boy. + +it adds two stereo sample audio channels which can be used directly ("DMA", left/right) or used in a software mixing driver (most games do this) in order to have multiple voices. + +# effects + +- `10xx`: **change wave.** + +## Game Boy Advance (MinMod) + +this is the software mixing driver available in Furnace. it is written by Natt Akuma. +it features echo and up to 16 voices. + +- `10xx`: **change wave.** +- `11xy`: **configure echo.** + - this effect is kinda odd. this is how it works: + +> How do you echo on GBA +> +> Create an empty instrment and put a very high note of it in channel 1 then do 110x in effect column and set volume column to set feedback and do nothing else on it + +- `12xy`: **toggle invert.** + - `x` left channel. + - `y` right channel. + +## info + +this chip uses the [GBA DMA](../4-instrument/gbadma.md) and [GBA MinMod](../4-instrument/gbaminmod.md) instrument editors. diff --git a/doc/7-systems/nds.md b/doc/7-systems/nds.md new file mode 100644 index 000000000..fd345b8f0 --- /dev/null +++ b/doc/7-systems/nds.md @@ -0,0 +1,18 @@ +# Nintendo DS + +this portable video game console succeeded the Game Boy Advance. +it has 16 channels of sampled sound, supporting 8-bit PCM, 16-bit PCM and IMA ADPCM. + +additionally, the last 8 channels may be put in "PSG mode", featuring 6 channels of pulse with 8 duty cycles and 2 noise channels. + +# effects + +- `12xy`: **set duty cycle.** + - `0` to `7`. + - only works in PSG channels. +- `1Fxx`: **set global volume.** + +## info + +this chip uses the [Nintendo DS](../4-instrument/nds.md) instrument editor. + diff --git a/extern/imgui_patched/backends/imgui_impl_dx11.cpp b/extern/imgui_patched/backends/imgui_impl_dx11.cpp index 26288d0cd..596db7f6e 100644 --- a/extern/imgui_patched/backends/imgui_impl_dx11.cpp +++ b/extern/imgui_patched/backends/imgui_impl_dx11.cpp @@ -57,12 +57,14 @@ struct ImGui_ImplDX11_Data ID3D11Buffer* pVertexConstantBuffer; ID3D11PixelShader* pPixelShader; ID3D11SamplerState* pFontSampler; + ID3D11SamplerState* pTexSampler; ID3D11ShaderResourceView* pFontTextureView; ID3D11RasterizerState* pRasterizerState; ID3D11BlendState* pBlendState; ID3D11DepthStencilState* pDepthStencilState; int VertexBufferSize; int IndexBufferSize; + bool SamplersSet; ImGui_ImplDX11_Data() { memset((void*)this, 0, sizeof(*this)); VertexBufferSize = 5000; IndexBufferSize = 10000; } }; @@ -109,6 +111,7 @@ static void ImGui_ImplDX11_SetupRenderState(ImDrawData* draw_data, ID3D11DeviceC ctx->VSSetConstantBuffers(0, 1, &bd->pVertexConstantBuffer); ctx->PSSetShader(bd->pPixelShader, nullptr, 0); ctx->PSSetSamplers(0, 1, &bd->pFontSampler); + bd->SamplersSet=false; ctx->GSSetShader(nullptr, nullptr, 0); ctx->HSSetShader(nullptr, nullptr, 0); // In theory we should backup and restore this as well.. very infrequently used.. ctx->DSSetShader(nullptr, nullptr, 0); // In theory we should backup and restore this as well.. very infrequently used.. @@ -283,6 +286,13 @@ void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data) // Bind texture, Draw ID3D11ShaderResourceView* texture_srv = (ID3D11ShaderResourceView*)pcmd->GetTexID(); + if (texture_srv == bd->pFontTextureView && bd->SamplersSet) { + ctx->PSSetSamplers(0, 1, &bd->pFontSampler); + bd->SamplersSet=false; + } else if (texture_srv != bd->pFontTextureView && !bd->SamplersSet) { + ctx->PSSetSamplers(0, 1, &bd->pTexSampler); + bd->SamplersSet=true; + } ctx->PSSetShaderResources(0, 1, &texture_srv); ctx->DrawIndexed(pcmd->ElemCount, pcmd->IdxOffset + global_idx_offset, pcmd->VtxOffset + global_vtx_offset); } @@ -376,6 +386,21 @@ static void ImGui_ImplDX11_CreateFontsTexture() desc.MaxLOD = 0.f; bd->pd3dDevice->CreateSamplerState(&desc, &bd->pFontSampler); } + + // Create other sampler + { + D3D11_SAMPLER_DESC desc; + ZeroMemory(&desc, sizeof(desc)); + desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT; + desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; + desc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP; + desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP; + desc.MipLODBias = 0.f; + desc.ComparisonFunc = D3D11_COMPARISON_ALWAYS; + desc.MinLOD = 0.f; + desc.MaxLOD = 0.f; + bd->pd3dDevice->CreateSamplerState(&desc, &bd->pTexSampler); + } } bool ImGui_ImplDX11_CreateDeviceObjects() @@ -550,6 +575,7 @@ void ImGui_ImplDX11_InvalidateDeviceObjects() return; if (bd->pFontSampler) { bd->pFontSampler->Release(); bd->pFontSampler = nullptr; } + if (bd->pTexSampler) { bd->pTexSampler->Release(); bd->pTexSampler = nullptr; } if (bd->pFontTextureView) { bd->pFontTextureView->Release(); bd->pFontTextureView = nullptr; ImGui::GetIO().Fonts->SetTexID(0); } // We copied data->pFontTextureView to io.Fonts->TexID so let's clear that as well. if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; } if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; } diff --git a/papers/clipboard-format.md b/papers/clipboard-format.md index 7182b59e2..730cd2d7f 100644 --- a/papers/clipboard-format.md +++ b/papers/clipboard-format.md @@ -6,7 +6,7 @@ when copying pattern data from Furnace, it's stored in the clipboard as plain te org.tildearrow.furnace - Pattern Data (144) ``` -this top line of text is always the same except for the number in parentheses, which is the internal build number. for example, 0.6.1 is `192`. +this top line of text is always the same except for the number in parentheses, which is the internal build number. for example, 0.6.2 is `197`. the second line is a number between 0 and 18 (decimal) which indicates which column the clip starts from. - `0`: note. diff --git a/papers/format.md b/papers/format.md index f979ee2f7..39e5e04e5 100644 --- a/papers/format.md +++ b/papers/format.md @@ -32,6 +32,7 @@ these fields are 0 in format versions prior to 100 (0.6pre1). the format versions are: +- 197: Furnace 0.6.2 - 192: Furnace 0.6.1 - 181: Furnace 0.6 - 180: Furnace 0.6pre18 diff --git a/res/Info.plist b/res/Info.plist index 20f1b73b5..b5e4ba1fc 100644 --- a/res/Info.plist +++ b/res/Info.plist @@ -15,17 +15,17 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleLongVersionString - 0.6.1 + 0.6.2 CFBundleName Furnace CFBundlePackageType APPL CFBundleShortVersionString - 0.6.1 + 0.6.2 CFBundleSignature ???? CFBundleVersion - 0.6.1 + 0.6.2 NSHumanReadableCopyright NSHighResolutionCapable diff --git a/res/docpdf/make_paper.py b/res/docpdf/make_paper.py index 91e97e77c..1dcfe389c 100644 --- a/res/docpdf/make_paper.py +++ b/res/docpdf/make_paper.py @@ -325,7 +325,7 @@ if __name__ == "__main__":

Furnace
User Manual

- for version 0.6.1 + for version 0.6.2
@@ -348,7 +348,7 @@ if __name__ == "__main__":

this documentation is under the Creative Commons Attribution 3.0 Unported license.

you may reproduce, modify and/or distribute this documentation provided this copyright notice (including license and attribution) is present and any necessary disclaimers whether modifications have been made.

this documentation is provided as-is and without warranty of any kind.

-

this manual is written for version 0.6.1 of Furnace.
it may not necessarily apply to previous or future versions.

+

this manual is written for version 0.6.2 of Furnace.
it may not necessarily apply to previous or future versions.

%s diff --git a/res/releaseReadme/stable-linux.txt b/res/releaseReadme/stable-linux.txt index e93f352cc..e11717c9e 100644 --- a/res/releaseReadme/stable-linux.txt +++ b/res/releaseReadme/stable-linux.txt @@ -18,7 +18,7 @@ if you find issues (e.g. bugs or annoyances), report them. links below. - discussion: https://github.com/tildearrow/furnace/discussions - Furnace on Discord: https://discord.gg/EfrwT2wq7z - Furnace on Revolt: https://rvlt.gg/GRPS6tmc -- online manual: https://tildearrow.org/furnace/doc/v0.6.1/ +- online manual: https://tildearrow.org/furnace/doc/v0.6.2/ # notes diff --git a/res/releaseReadme/stable-mac.txt b/res/releaseReadme/stable-mac.txt index 623a59d0f..a62dd792d 100644 --- a/res/releaseReadme/stable-mac.txt +++ b/res/releaseReadme/stable-mac.txt @@ -28,7 +28,7 @@ if you find issues (e.g. bugs or annoyances), report them. links below. - discussion: https://github.com/tildearrow/furnace/discussions - Furnace on Discord: https://discord.gg/EfrwT2wq7z - Furnace on Revolt: https://rvlt.gg/GRPS6tmc -- online manual: https://tildearrow.org/furnace/doc/v0.6.1/ +- online manual: https://tildearrow.org/furnace/doc/v0.6.2/ # notes diff --git a/res/releaseReadme/stable-win.txt b/res/releaseReadme/stable-win.txt index dab2b11c0..92e15e5ab 100644 --- a/res/releaseReadme/stable-win.txt +++ b/res/releaseReadme/stable-win.txt @@ -18,7 +18,7 @@ if you find issues (e.g. bugs or annoyances), report them. links below. - discussion: https://github.com/tildearrow/furnace/discussions - Furnace on Discord: https://discord.gg/EfrwT2wq7z - Furnace on Revolt: https://rvlt.gg/GRPS6tmc -- online manual: https://tildearrow.org/furnace/doc/v0.6.1/ +- online manual: https://tildearrow.org/furnace/doc/v0.6.2/ # notes diff --git a/src/engine/engine.h b/src/engine/engine.h index 95b8c80ba..db703d543 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -54,8 +54,8 @@ class DivWorkPool; #define DIV_UNSTABLE -#define DIV_VERSION "dev196" -#define DIV_ENGINE_VERSION 196 +#define DIV_VERSION "0.6.2" +#define DIV_ENGINE_VERSION 197 // for imports #define DIV_VERSION_MOD 0xff01 #define DIV_VERSION_FC 0xff02 diff --git a/src/engine/platform/nds.cpp b/src/engine/platform/nds.cpp index cc5146a94..fc9d35651 100644 --- a/src/engine/platform/nds.cpp +++ b/src/engine/platform/nds.cpp @@ -565,6 +565,7 @@ void DivPlatformNDS::setFlags(const DivConfig& flags) { for (int i=0; i<16; i++) { oscBuf[i]->rate=rate; } + memCompo.capacity=(isDSi?16777216:4194304); } int DivPlatformNDS::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) { diff --git a/src/engine/platform/sound/dave/dave.cpp b/src/engine/platform/sound/dave/dave.cpp index 59d2f5f20..d62bc7154 100644 --- a/src/engine/platform/sound/dave/dave.cpp +++ b/src/engine/platform/sound/dave/dave.cpp @@ -18,7 +18,8 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "dave.hpp" -#include +#include +#include #define EP128EMU_UNLIKELY(x) x diff --git a/src/gui/newSong.cpp b/src/gui/newSong.cpp index 213ba3aab..66197b5a9 100644 --- a/src/gui/newSong.cpp +++ b/src/gui/newSong.cpp @@ -93,6 +93,26 @@ void FurnaceGUI::drawSysDefs(std::vector& category, bool& acce } } +void findInSubs(std::vector& where, std::vector& newSongSearchResults, String lowerCase) { + for (FurnaceGUISysDef& j: where) { + if (!j.orig.empty()) { + String lowerCase1=j.name; + for (char& i: lowerCase1) { + if (i>='A' && i<='Z') i+='a'-'A'; + } + auto lastItem=std::remove_if(lowerCase1.begin(),lowerCase1.end(),[](char c) { + return (c==' ' || c=='_' || c=='-'); + }); + lowerCase1.erase(lastItem,lowerCase1.end()); + if (lowerCase1.find(lowerCase)!=String::npos) { + newSongSearchResults.push_back(j); + newSongSearchResults[newSongSearchResults.size()-1].subDefs.clear(); + } + } + findInSubs(j.subDefs,newSongSearchResults,lowerCase); + } +} + void FurnaceGUI::drawNewSong() { bool accepted=false; std::vector sysDefStack; @@ -121,26 +141,30 @@ void FurnaceGUI::drawNewSong() { newSongSearchResults.clear(); for (FurnaceGUISysCategory& i: sysCategories) { for (FurnaceGUISysDef& j: i.systems) { - String lowerCase1=j.name; - for (char& i: lowerCase1) { - if (i>='A' && i<='Z') i+='a'-'A'; - } - auto lastItem=std::remove_if(lowerCase1.begin(),lowerCase1.end(),[](char c) { - return (c==' ' || c=='_' || c=='-'); - }); - lowerCase1.erase(lastItem,lowerCase1.end()); - if (lowerCase1.find(lowerCase)!=String::npos) { - newSongSearchResults.push_back(j); + if (!j.orig.empty()) { + String lowerCase1=j.name; + for (char& i: lowerCase1) { + if (i>='A' && i<='Z') i+='a'-'A'; + } + auto lastItem=std::remove_if(lowerCase1.begin(),lowerCase1.end(),[](char c) { + return (c==' ' || c=='_' || c=='-'); + }); + lowerCase1.erase(lastItem,lowerCase1.end()); + if (lowerCase1.find(lowerCase)!=String::npos) { + newSongSearchResults.push_back(j); + newSongSearchResults[newSongSearchResults.size()-1].subDefs.clear(); + } } + findInSubs(j.subDefs,newSongSearchResults,lowerCase); } - std::sort(newSongSearchResults.begin(),newSongSearchResults.end(),[](const FurnaceGUISysDef& a, const FurnaceGUISysDef& b) { - return strcmp(a.name.c_str(),b.name.c_str())<0; - }); - auto lastItem=std::unique(newSongSearchResults.begin(),newSongSearchResults.end(),[](const FurnaceGUISysDef& a, const FurnaceGUISysDef& b) { - return a.name==b.name; - }); - newSongSearchResults.erase(lastItem,newSongSearchResults.end()); } + std::sort(newSongSearchResults.begin(),newSongSearchResults.end(),[](const FurnaceGUISysDef& a, const FurnaceGUISysDef& b) { + return strcmp(a.name.c_str(),b.name.c_str())<0; + }); + auto lastItem1=std::unique(newSongSearchResults.begin(),newSongSearchResults.end(),[](const FurnaceGUISysDef& a, const FurnaceGUISysDef& b) { + return a.name==b.name; + }); + newSongSearchResults.erase(lastItem1,newSongSearchResults.end()); } if (ImGui::BeginTable("sysPicker",newSongQuery.empty()?2:1,ImGuiTableFlags_BordersInnerV)) { if (newSongQuery.empty()) { diff --git a/src/gui/presets.cpp b/src/gui/presets.cpp index a0bda5b73..9849e0ec6 100644 --- a/src/gui/presets.cpp +++ b/src/gui/presets.cpp @@ -2430,8 +2430,10 @@ void FurnaceGUI::initSystemPresets() { ); CATEGORY_END; + /* CATEGORY_BEGIN("User","system presets that you have saved."); CATEGORY_END; + */ CATEGORY_BEGIN("FM","chips which use frequency modulation (FM) to generate sound.\nsome of these also pack more (like square and sample channels)."); ENTRY( @@ -2837,7 +2839,7 @@ void FurnaceGUI::initSystemPresets() { } ); ENTRY( - "NDS", { + "Nintendo DS", { CH(DIV_SYSTEM_NDS, 1.0f, 0, "") } ); diff --git a/src/gui/tutorial.cpp b/src/gui/tutorial.cpp index 89eec5e36..4b63bbd87 100644 --- a/src/gui/tutorial.cpp +++ b/src/gui/tutorial.cpp @@ -26,7 +26,10 @@ #define TS FurnaceGUITutorialStep -#ifndef _WIN32 +#ifdef _WIN32 +#include +#include "../utfutils.h" +#else #include #endif @@ -482,8 +485,8 @@ struct FurnaceCV { static const char* cvText[]={ // intro "Play demo songs?\n" - "- Down: no\n" - "- Up: yes", + "- Down: Play current song\n" + "- Up: Play demo songs", "Well, well, well. You wanna\n" "enable Serious Mode, right?\n", @@ -495,7 +498,8 @@ static const char* cvText[]={ "April 1st\n", "The plot is left\n" - "as an exercise for the player.", + "as an exercise for the player.\n\n" + "X - Shoot Arrow Key - Move", "GAME OVER", @@ -795,15 +799,18 @@ void FurnaceGUI::initRandomDemoSong() { #ifdef _WIN32 WIN32_FIND_DATAW de; - demoPath+=DIR_SEPARATOR_STR; - HANDLE d=FindFirstFileW(utf8To16(demoPath.c_str()).c_str(),&de); + String realDemoPath=demoPath; + realDemoPath+=DIR_SEPARATOR_STR; + realDemoPath+="*"; + HANDLE d=FindFirstFileW(utf8To16(realDemoPath.c_str()).c_str(),&de); if (d==INVALID_HANDLE_VALUE) { - demoPath=".."; - demoPath+=DIR_SEPARATOR_STR; - demoPath+="demos"; - demoPath+=DIR_SEPARATOR_STR; + realDemoPath=".."; + realDemoPath+=DIR_SEPARATOR_STR; + realDemoPath+="demos"; + realDemoPath+=DIR_SEPARATOR_STR; + realDemoPath+="*"; logW("OH NO"); - HANDLE d=FindFirstFileW(utf8To16(demoPath.c_str()).c_str(),&de); + HANDLE d=FindFirstFileW(utf8To16(realDemoPath.c_str()).c_str(),&de); if (d==INVALID_HANDLE_VALUE) { logW("dang it"); return; @@ -866,13 +873,14 @@ void FurnaceGUI::initRandomDemoSong() { for (String& i: subDirs) { #ifdef _WIN32 WIN32_FIND_DATAW de1; - i+=DIR_SEPARATOR_STR; - i+="*.fur"; - HANDLE d1=FindFirstFileW(utf8To16(i.c_str()).c_str(),&de1); + String realI=i; + realI+=DIR_SEPARATOR_STR; + realI+="*.fur"; + HANDLE d1=FindFirstFileW(utf8To16(realI.c_str()).c_str(),&de1); if (d1==INVALID_HANDLE_VALUE) continue; do { String u8Name=utf16To8(de.cFileName); - String newPath=demoPath; + String newPath=i; newPath+=DIR_SEPARATOR_STR; newPath+=u8Name; randomDemoSong.push_back(newPath); @@ -1983,6 +1991,7 @@ void FurnaceCVPlayer::collision(FurnaceCVObject* other) { if (!invincible) { dead=true; cv->respawnTime=48; + cv->shotType=0; cv->soundEffect(SE_DEATH_C1); cv->soundEffect(SE_DEATH_C2); cv->createObject(x-8,y);