├── .editorconfig ├── .gitattributes ├── .gitignore ├── .gitmodules ├── AUTHORS ├── CMakeLists.txt ├── COPYING ├── ChangeLog.md ├── INSTALL.md ├── NEWS ├── README.md ├── appveyor.yml ├── build.sh ├── build_rpi.sh ├── cmake ├── FindJACK.cmake ├── FindLHASA.cmake ├── FindRTMIDI.cmake └── FindZZIPLIB.cmake ├── docs ├── CMakeLists.txt ├── ChangeLog.html ├── FAQ.html ├── MilkyTracker.html ├── TiTAN.nfo ├── readme_PocketPC.html ├── readme_rtaudio └── readme_unix ├── platforms ├── haiku │ ├── Add_Jamfiles.sh │ ├── Jamfiles │ │ ├── Jamfile │ │ ├── Jamrules │ │ ├── src-compression-Jamfile │ │ ├── src-compression-zzlib-generic-Jamfile │ │ ├── src-fx-Jamfile │ │ ├── src-midi-Jamfile │ │ ├── src-milkyplay-Jamfile │ │ ├── src-ppui-Jamfile │ │ ├── src-ppui-osinterface-Jamfile │ │ ├── src-tracker-Jamfile │ │ └── src-tracker-haiku-MilkySettings-Jamfile │ ├── ReadMe_-_How_to_build_for_Haiku │ └── Remove_Jamfiles.sh ├── ppc-amigaos │ └── inttypes.h └── wince │ ├── PocketPC_KeyConfig │ ├── KeyConfigDlg.cpp │ ├── KeyConfigDlg.h │ ├── PocketPC_KeyConfig.cpp │ ├── PocketPC_KeyConfig.h │ ├── PocketPC_KeyConfig.ico │ ├── PocketPC_KeyConfig.rc │ ├── Registry.cpp │ ├── Registry.h │ ├── StdAfx.cpp │ ├── StdAfx.h │ ├── newres.h │ └── resource.h │ └── milkytracker_evc3.zip ├── resources ├── fonts │ ├── ARIEL.8X8 │ ├── ATHENA.12X12 │ ├── ATHENA_SPACED.12X12 │ ├── DISORDERTRACKER2.8X8 │ ├── DX-FUTUR.8X8 │ ├── EK-MAC.8X8 │ ├── EK-SPACE.8X8 │ ├── FINELINE.8X8 │ ├── FN-ICE.8X8 │ ├── FN-LOWER.8X8 │ ├── FN-ROUND.8X8 │ ├── GRAFPAPR.8X8 │ ├── GTHS-BUG.8X8 │ ├── IDC-Harmonica.12X12 │ ├── IDC-Harmonica.8X8 │ ├── IDC-Hoodlum.8X8 │ ├── IDC-MicroKnight.12X12 │ ├── IDC-MicroKnight.8X8 │ ├── IDC-Topaz1.3.8X8 │ ├── IDC-Topaz2.0.8X8 │ ├── INVERSE.8X8 │ ├── J-CURSE.8X8 │ ├── J-ELECTR.8X8 │ ├── J-FLUX.8X8 │ ├── J-TERMO.8X8 │ ├── KANAFONT.8X8 │ ├── MOTIF.8X8 │ ├── NOTCH.8X8 │ ├── PEANUT.8X8 │ ├── PERISOFT.8X8 │ ├── REZ-ASCII.8X8 │ ├── SCRIPT.8X8 │ ├── SMALLCAP.8X8 │ ├── THICK.8X8 │ ├── TINY.6X5 │ ├── TINY_UPPERCASE.6x5 │ ├── XTSAMP.8X8 │ ├── ZERO.8X8 │ └── ZIRCFONT.8X8 ├── milkytracker.desktop ├── music │ ├── CMakeLists.txt │ ├── milky.xm │ ├── slumberjack.xm │ ├── sv_ttt.xm │ ├── theday.xm │ └── universalnetwork2_real.xm ├── org.milkytracker.MilkyTracker.metainfo.xml.in ├── packaging │ └── osx │ │ ├── DMGBackground.png │ │ ├── DMGBackground.tif │ │ ├── DMGBackground@2x.png │ │ └── DMGSetup.scpt ├── pictures │ ├── 16note2.ico │ ├── IDC-Harmonica.bmp │ ├── IDC-Hoodlum.bmp │ ├── IDC-MicroKnight.bmp │ ├── Setup_Blue_Screen.ico │ ├── athena_ft2_style_12x12.png │ ├── carton.icns │ ├── carton.ico │ ├── carton.png │ ├── drop.ico │ ├── ft2_style_12x12_spaced.png │ ├── milky2.png │ ├── milkytracker.png │ └── oldschool.icns └── reference │ ├── Amiga_resampler │ ├── Alankila_email_140108.txt │ └── modguide │ │ ├── Changes.txt │ │ ├── compute-blep.py │ │ ├── computed-blep_c_source.txt │ │ ├── interpolate.txt │ │ ├── note-guide-unfinished.txt │ │ └── results │ │ ├── a1200_off.png │ │ ├── a1200_on.png │ │ ├── a4000_off.png │ │ ├── a500_off.png │ │ ├── a500_on.png │ │ ├── comb1200_off.png │ │ ├── comb1200_on.png │ │ ├── comb4000_off.png │ │ ├── comb500_off.png │ │ └── comb500_on.png │ ├── EqualizerDesign.doc │ ├── xm-form.txt │ └── xmeffects.html ├── shell.nix └── src ├── cli ├── CLIParser.cpp └── CLIParser.h ├── compression ├── AIFFWriter.h ├── AIFFWriter.m ├── CMakeLists.txt ├── Decompressor.cpp ├── Decompressor.h ├── DecompressorGZIP.cpp ├── DecompressorGZIP.h ├── DecompressorLHA.cpp ├── DecompressorLHA.h ├── DecompressorLZX.cpp ├── DecompressorLZX.h ├── DecompressorPP20.cpp ├── DecompressorPP20.h ├── DecompressorQT.h ├── DecompressorQT.mm ├── DecompressorUMX.cpp ├── DecompressorUMX.h ├── DecompressorZIP.cpp ├── DecompressorZIP.h ├── PP20.cpp ├── PP20.h ├── ZipExtractor.cpp ├── ZipExtractor.h ├── unlzx.cpp ├── unlzx.h └── zziplib │ ├── MyIO.cpp │ └── MyIO.h ├── fx ├── CMakeLists.txt ├── Camera.cpp ├── Camera.h ├── FXAbstract.h ├── FXInterface.h ├── Filter.cpp ├── Filter.h ├── Fire.cpp ├── Fire.h ├── Math3d.cpp ├── Math3d.h ├── ParticleBlobs.cpp ├── ParticleBlobs.h ├── ParticleEmitter.cpp ├── ParticleEmitter.h ├── ParticleFX.cpp ├── ParticleFX.h ├── ParticleFun.cpp ├── ParticleFun.h ├── ParticleScene.cpp ├── ParticleScene.h ├── PictureGlow.h ├── Starfield.cpp ├── Starfield.h ├── TCBSpline.cpp ├── TCBSpline.h ├── TCBSplineTest.cpp ├── TCBSplineTest.h ├── Texture.cpp ├── Texture.h ├── TexturedGrid.cpp ├── TexturedGrid.h ├── TexturedPlane.cpp ├── TexturedPlane.h ├── Twister.cpp ├── Twister.h ├── TwisterFX.cpp ├── TwisterFX.h ├── fpmath.cpp └── fpmath.h ├── midi ├── CMakeLists.txt ├── MidiTools.h ├── haiku │ ├── MidiSetup.cpp │ ├── MidiSetup.h │ ├── MilkyMidiConsumer.cpp │ └── MilkyMidiConsumer.h ├── osx │ ├── MidiReceiver_CoreMIDI.h │ └── MidiReceiver_CoreMIDI.mm ├── posix │ ├── MidiReceiver_pthread.cpp │ └── MidiReceiver_pthread.h └── win32 │ ├── LongMsg.cpp │ ├── LongMsg.h │ ├── MIDIInDevice.cpp │ ├── MIDIInDevice.h │ ├── MIDIMsg.h │ ├── MidiReceiver_win32.cpp │ ├── MidiReceiver_win32.h │ ├── ShortMsg.cpp │ ├── ShortMsg.h │ └── midi.h ├── milkyplay ├── AudioDriverBase.cpp ├── AudioDriverBase.h ├── AudioDriverManager.cpp ├── AudioDriverManager.h ├── AudioDriver_COMPENSATE.h ├── AudioDriver_NULL.cpp ├── AudioDriver_NULL.h ├── AudioDriver_WAVWriter.cpp ├── AudioDriver_WAVWriter.h ├── CMakeLists.txt ├── ChannelMixer.cpp ├── ChannelMixer.h ├── ExporterXM.cpp ├── Limiter.h ├── LittleEndian.cpp ├── LittleEndian.h ├── Loader669.cpp ├── LoaderAMF.cpp ├── LoaderAMS.cpp ├── LoaderCBA.cpp ├── LoaderDBM.cpp ├── LoaderDIGI.cpp ├── LoaderDSM.cpp ├── LoaderDTM.cpp ├── LoaderFAR.cpp ├── LoaderGDM.cpp ├── LoaderIMF.cpp ├── LoaderIT.cpp ├── LoaderMDL.cpp ├── LoaderMOD.cpp ├── LoaderMTM.cpp ├── LoaderMXM.cpp ├── LoaderOKT.cpp ├── LoaderPLM.cpp ├── LoaderPSM.cpp ├── LoaderPTM.cpp ├── LoaderS3M.cpp ├── LoaderSTM.cpp ├── LoaderULT.cpp ├── LoaderUNI.cpp ├── LoaderXM.cpp ├── Loaders.h ├── MasterMixer.cpp ├── MasterMixer.h ├── MilkyPlay.h ├── MilkyPlayCommon.h ├── MilkyPlayResults.h ├── MilkyPlayTypes.h ├── Mixable.h ├── PlayerBase.cpp ├── PlayerBase.h ├── PlayerFAR.cpp ├── PlayerFAR.h ├── PlayerGeneric.cpp ├── PlayerGeneric.h ├── PlayerIT.cpp ├── PlayerIT.h ├── PlayerSTD.cpp ├── PlayerSTD.h ├── ResamplerAmiga.h ├── ResamplerCubic.h ├── ResamplerFactory.cpp ├── ResamplerFactory.h ├── ResamplerFast.h ├── ResamplerMacros.h ├── ResamplerSinc.h ├── SampleLoaderAIFF.cpp ├── SampleLoaderAIFF.h ├── SampleLoaderALL.cpp ├── SampleLoaderALL.h ├── SampleLoaderAbstract.cpp ├── SampleLoaderAbstract.h ├── SampleLoaderGeneric.cpp ├── SampleLoaderGeneric.h ├── SampleLoaderIFF.cpp ├── SampleLoaderIFF.h ├── SampleLoaderSF2.cpp ├── SampleLoaderSF2.h ├── SampleLoaderWAV.cpp ├── SampleLoaderWAV.h ├── XIInstrument.cpp ├── XIInstrument.h ├── XMFile.cpp ├── XMFile.h ├── XModule.cpp ├── XModule.h ├── computed-blep.h └── drivers │ ├── alsa │ ├── AudioDriver_ALSA.cpp │ └── AudioDriver_ALSA.h │ ├── generic │ ├── AudioDriver_PORTAUDIO.cpp │ ├── AudioDriver_PORTAUDIO.h │ ├── AudioDriver_RTAUDIO.cpp │ ├── AudioDriver_RTAUDIO.h │ ├── RtAudio4Impl.cpp │ └── portaudio │ │ └── portaudio.h │ ├── haiku │ ├── AudioDriver_Haiku.cpp │ └── AudioDriver_Haiku.h │ ├── jack │ ├── AudioDriver_JACK.cpp │ └── AudioDriver_JACK.h │ ├── osx │ ├── AudioDriver_COREAUDIO.h │ └── AudioDriver_COREAUDIO.mm │ ├── psp │ ├── AudioDriver_PSP.cpp │ └── AudioDriver_PSP.h │ ├── sdl │ ├── AudioDriver_SDL.cpp │ └── AudioDriver_SDL.h │ └── windows │ ├── AudioDriver_MMSYSTEM.cpp │ └── AudioDriver_MMSYSTEM.h ├── ppui ├── BasicTypes.h ├── Button.cpp ├── Button.h ├── CMakeLists.txt ├── CheckBox.cpp ├── CheckBox.h ├── CheckBoxLabel.cpp ├── CheckBoxLabel.h ├── Container.cpp ├── Container.h ├── ContextMenu.cpp ├── ContextMenu.h ├── Control.cpp ├── Control.h ├── DialogBase.cpp ├── DialogBase.h ├── DialogFileSelector.cpp ├── DialogFileSelector.h ├── Dictionary.cpp ├── Dictionary.h ├── DictionaryKey.cpp ├── DictionaryKey.h ├── DisplayDeviceBase.h ├── Event.cpp ├── Event.h ├── Font.cpp ├── Font.h ├── Graphics.h ├── GraphicsAbstract.h ├── Graphics_15BIT.cpp ├── Graphics_16BIT.cpp ├── Graphics_24bpp_generic.cpp ├── Graphics_32bpp_generic.cpp ├── Graphics_ARGB32.cpp ├── Graphics_BGR24.cpp ├── Graphics_BGR24_SLOW.cpp ├── KeyBindings.h ├── KeyboardBindingHandler.cpp ├── KeyboardBindingHandler.h ├── ListBox.cpp ├── ListBox.h ├── ListBoxFileBrowser.cpp ├── ListBoxFileBrowser.h ├── Menu.cpp ├── Menu.h ├── MessageBoxContainer.cpp ├── MessageBoxContainer.h ├── Object.h ├── PPPath.h ├── PPUI.h ├── PPUIConfig.cpp ├── PPUIConfig.h ├── RadioGroup.cpp ├── RadioGroup.h ├── ScanCodes.h ├── Screen.cpp ├── Screen.h ├── ScrollBar.h ├── Scrollbar.cpp ├── Seperator.cpp ├── Seperator.h ├── SimpleVector.h ├── Singleton.h ├── Slider.cpp ├── Slider.h ├── StaticText.cpp ├── StaticText.h ├── Tools.cpp ├── Tools.h ├── TransparentContainer.cpp ├── TransparentContainer.h ├── UndoStack.h ├── VirtualKeys.h ├── cocoa │ ├── DisplayDevice_COCOA.h │ └── DisplayDevice_COCOA.mm ├── fastfill.h ├── haiku │ ├── DisplayDevice_Haiku.cpp │ ├── DisplayDevice_Haiku.h │ ├── KeyCodeMap.cpp │ ├── KeyCodeMap.h │ ├── MilkyView.cpp │ ├── MilkyView.h │ ├── MilkyWindow.cpp │ └── MilkyWindow.h ├── osinterface │ ├── CMakeLists.txt │ ├── PPMessageBox.h │ ├── PPModalDialog.h │ ├── PPOpenPanel.h │ ├── PPPathFactory.cpp │ ├── PPPathFactory.h │ ├── PPQuitSaveAlert.h │ ├── PPSavePanel.h │ ├── PPSystem.h │ ├── carbon │ │ ├── PPMessageBox_CARBON.cpp │ │ ├── PPOpenPanel_CARBON.cpp │ │ ├── PPQuitSaveAlert_CARBON.cpp │ │ └── PPSavePanel_CARBON.cpp │ ├── cocoa │ │ ├── PPMessageBox_COCOA.mm │ │ ├── PPOpenPanel_COCOA.mm │ │ ├── PPQuitSaveAlert_COCOA.mm │ │ └── PPSavePanel_COCOA.mm │ ├── haiku │ │ ├── PPMessageBox_Haiku.cpp │ │ ├── PPOpenPanel_Haiku.cpp │ │ ├── PPQuitSaveAlert_Haiku.cpp │ │ ├── PPSavePanel_Haiku.cpp │ │ ├── SynchronousFilePanel.cpp │ │ ├── SynchronousFilePanel.h │ │ ├── WaitView.cpp │ │ ├── WaitView.h │ │ ├── WaitWindow.cpp │ │ └── WaitWindow.h │ ├── posix │ │ ├── PPMutex.cpp │ │ ├── PPMutex.h │ │ ├── PPPath_POSIX.cpp │ │ ├── PPPath_POSIX.h │ │ ├── PPSystemString_POSIX.h │ │ ├── PPSystem_POSIX.cpp │ │ └── PPSystem_POSIX.h │ ├── sdl │ │ ├── PPMessageBox_SDL.cpp │ │ ├── PPMutex.cpp │ │ ├── PPMutex.h │ │ ├── PPOpenPanel_SDL.cpp │ │ ├── PPQuitSaveAlert_SDL.cpp │ │ ├── PPSavePanel_SDL.cpp │ │ ├── SDL_ModalLoop.cpp │ │ └── SDL_ModalLoop.h │ ├── win32 │ │ ├── PPMessageBox_WIN32.cpp │ │ ├── PPMutex.cpp │ │ ├── PPMutex.h │ │ ├── PPOpenPanel_WIN32.cpp │ │ ├── PPPath_WIN32.cpp │ │ ├── PPPath_WIN32.h │ │ ├── PPQuitSaveAlert_WIN32.cpp │ │ ├── PPSavePanel_WIN32.cpp │ │ ├── PPSystemString_WIN32.h │ │ ├── PPSystem_WIN32.cpp │ │ ├── PPSystem_WIN32.h │ │ ├── WaitWindow_WIN32.cpp │ │ └── WaitWindow_WIN32.h │ └── wince │ │ ├── PPOpenPanel_WINCE.cpp │ │ ├── PPQuitSaveAlert_WINCE.cpp │ │ └── PPSavePanel_WINCE.cpp ├── sdl │ ├── DisplayDeviceFB_SDL.cpp │ ├── DisplayDeviceFB_SDL.h │ ├── DisplayDevice_SDL.cpp │ └── DisplayDevice_SDL.h ├── win32 │ ├── DisplayDevice_WIN32.cpp │ └── DisplayDevice_WIN32.h └── wince │ ├── DisplayDevice_GAPI.cpp │ └── DisplayDevice_GAPI.h ├── tools ├── FontLibrary.cpp ├── TINY.6x5 ├── TINY_UPPERCASE.6x5 ├── addons.txt ├── archivewriter.cpp ├── compile.sh ├── convertrawfont.cpp ├── fontcompiler.cpp ├── generateAddons.sh ├── generateHelp.sh ├── genlargefont.cpp ├── gentinyfont.cpp ├── milkycli │ ├── CMakeLists.txt │ └── milkycli.cpp └── test.cpp └── tracker ├── ASCIISTEP16.h ├── Addon.cpp ├── Addon.h ├── Addons.h ├── AnimatedFXControl.cpp ├── AnimatedFXControl.h ├── CMakeLists.txt ├── ColorExportImport.cpp ├── ColorExportImport.h ├── ColorPaletteContainer.cpp ├── ColorPaletteContainer.h ├── ControlIDs.h ├── DialogChannelSelector.cpp ├── DialogChannelSelector.h ├── DialogEQ.cpp ├── DialogEQ.h ├── DialogGroupSelection.cpp ├── DialogGroupSelection.h ├── DialogHandlers.cpp ├── DialogHandlers.h ├── DialogHelp.cpp ├── DialogHelp.h ├── DialogHelpText.h ├── DialogListBox.cpp ├── DialogListBox.h ├── DialogPanning.cpp ├── DialogPanning.h ├── DialogQuickChooseInstrument.cpp ├── DialogQuickChooseInstrument.h ├── DialogResample.cpp ├── DialogResample.h ├── DialogSliders.cpp ├── DialogSliders.h ├── DialogWithValues.cpp ├── DialogWithValues.h ├── DialogZap.cpp ├── DialogZap.h ├── EditModes.h ├── EditorBase.cpp ├── EditorBase.h ├── EnvelopeContainer.cpp ├── EnvelopeContainer.h ├── EnvelopeEditor.cpp ├── EnvelopeEditor.h ├── EnvelopeEditorControl.cpp ├── EnvelopeEditorControl.h ├── FileExtProvider.cpp ├── FileExtProvider.h ├── FileIdentificator.cpp ├── FileIdentificator.h ├── FileTypes.h ├── FilterParameters.h ├── GlobalColorConfig.cpp ├── GlobalColorConfig.h ├── InputControlListener.cpp ├── InputControlListener.h ├── LogoBig.cpp ├── LogoBig.h ├── LogoSmall.cpp ├── LogoSmall.h ├── ModuleEditor.cpp ├── ModuleEditor.h ├── ModuleServices.cpp ├── ModuleServices.h ├── PatternEditor.cpp ├── PatternEditor.h ├── PatternEditorClipBoard.cpp ├── PatternEditorControl.cpp ├── PatternEditorControl.h ├── PatternEditorControlEventListener.cpp ├── PatternEditorControlKeyboard.cpp ├── PatternEditorControlTransposeHandler.cpp ├── PatternEditorTools.cpp ├── PatternEditorTools.h ├── PatternTools.cpp ├── PatternTools.h ├── PeakLevelControl.cpp ├── PeakLevelControl.h ├── Piano.cpp ├── Piano.h ├── PianoControl.cpp ├── PianoControl.h ├── PlayerController.cpp ├── PlayerController.h ├── PlayerCriticalSection.h ├── PlayerLogic.cpp ├── PlayerLogic.h ├── PlayerMaster.cpp ├── PlayerMaster.h ├── RecPosProvider.cpp ├── RecPosProvider.h ├── RecorderLogic.cpp ├── RecorderLogic.h ├── ResamplerHelper.cpp ├── ResamplerHelper.h ├── SIPButtons.h ├── SampleEditor.cpp ├── SampleEditor.h ├── SampleEditorControl.cpp ├── SampleEditorControl.h ├── SampleEditorControlLastValues.h ├── SampleEditorControlToolHandler.cpp ├── SampleEditorControlToolHandler.h ├── SampleEditorResampler.cpp ├── SampleEditorResampler.h ├── SamplePlayer.cpp ├── SamplePlayer.h ├── ScopesControl.cpp ├── ScopesControl.h ├── SectionAbout.cpp ├── SectionAbout.h ├── SectionAbstract.cpp ├── SectionAbstract.h ├── SectionAdvancedEdit.cpp ├── SectionAdvancedEdit.h ├── SectionDiskMenu.cpp ├── SectionDiskMenu.h ├── SectionHDRecorder.cpp ├── SectionHDRecorder.h ├── SectionInstruments.cpp ├── SectionInstruments.h ├── SectionOptimize.cpp ├── SectionOptimize.h ├── SectionQuickOptions.cpp ├── SectionQuickOptions.h ├── SectionSamples.cpp ├── SectionSamples.h ├── SectionSettings.cpp ├── SectionSettings.h ├── SectionSwitcher.cpp ├── SectionSwitcher.h ├── SectionTranspose.cpp ├── SectionTranspose.h ├── SectionUpperLeft.cpp ├── SectionUpperLeft.h ├── SongLengthEstimator.cpp ├── SongLengthEstimator.h ├── Synth.cpp ├── Synth.h ├── SynthFM.cpp ├── SynthFM.h ├── SynthPL.h ├── Synths.cpp ├── SystemMessage.cpp ├── SystemMessage.h ├── TabHeaderControl.cpp ├── TabHeaderControl.h ├── TabManager.cpp ├── TabManager.h ├── TabTitleProvider.cpp ├── TabTitleProvider.h ├── TitlePageManager.cpp ├── TitlePageManager.h ├── ToolInvokeHelper.cpp ├── ToolInvokeHelper.h ├── Tracker.cpp ├── Tracker.h ├── TrackerConfig.cpp ├── TrackerConfig.h ├── TrackerInit.cpp ├── TrackerKeyboard.cpp ├── TrackerSettings.cpp ├── TrackerSettingsDatabase.cpp ├── TrackerSettingsDatabase.h ├── TrackerShortCuts.cpp ├── TrackerShutDown.cpp ├── TrackerStartUp.cpp ├── TrackerUpdate.cpp ├── Undo.cpp ├── Undo.h ├── VRand.cpp ├── VRand.h ├── VolumeRampHelper.cpp ├── VolumeRampHelper.h ├── Zapper.cpp ├── Zapper.h ├── cocoa ├── AppDelegate.h ├── AppDelegate.mm ├── MTKeyTranslator.h ├── MTKeyTranslator.mm ├── MTTrackerView.h ├── MTTrackerView.mm ├── main.mm └── resources │ ├── Application.xib │ └── Info.plist.in ├── fx ├── Convolver.cpp ├── Convolver.h ├── EQConstants.cpp ├── EQConstants.h ├── Equalizer.cpp ├── Equalizer.h ├── Filter.cpp └── Filter.h ├── haiku ├── Haiku_main.cpp ├── MilkyApplication.cpp ├── MilkyApplication.h ├── MilkySettings │ ├── InterfaceSettingsView.cpp │ ├── InterfaceSettingsView.h │ ├── MidiSettingsView.cpp │ ├── MidiSettingsView.h │ ├── MilkySettingsApplication.cpp │ ├── MilkySettingsApplication.h │ ├── SettingsMessages.h │ ├── SettingsWindow.cpp │ ├── SettingsWindow.h │ └── main.cpp ├── MilkyTracker.rdef └── Tools.cpp ├── sdl ├── SDL_KeyTranslation.cpp ├── SDL_KeyTranslation.h └── SDL_Main.cpp ├── version.h.in ├── wav ├── WAVExportArgs.cpp ├── WAVExportArgs.h ├── WAVExporter.cpp ├── WAVExporter.h ├── WAVUtils.cpp └── WAVUtils.h ├── win32 ├── PreferencesDialog.cpp ├── PreferencesDialog.h ├── ThreadTimer.cpp ├── ThreadTimer.h ├── Win32_main.cpp ├── Win32_resource.h └── Win32_resources.rc └── wince ├── ButtonMapper.cpp ├── ButtonMapper.h ├── Logger.cpp ├── Logger.h ├── Simple.h ├── VirtualKeyToScanCodeTable.cpp ├── VirtualKeyToScanCodeTable.h ├── WaitStateThread.cpp ├── WaitStateThread.h ├── WinCE_NEWRES.H ├── WinCE_ThreadTimer.cpp ├── WinCE_ThreadTimer.h ├── WinCE_main.cpp ├── WinCE_main.h └── WinCE_resource.h /.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | indent_style = tab 3 | indent_size = 4 4 | trim_trailing_whitespace = false 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # The build output folders 2 | build/ 3 | build-debug/ 4 | 5 | # Editor config files 6 | .vscode/ 7 | .vs/ 8 | 9 | # Audio files 10 | *.wav 11 | *.wav.asd 12 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "rtaudio"] 2 | path = src/submodules/rtaudio 3 | url = https://github.com/thestk/rtaudio.git 4 | branch = releases 5 | [submodule "lhasa"] 6 | path = src/submodules/lhasa 7 | url = https://github.com/fragglet/lhasa.git 8 | [submodule "zlib"] 9 | path = src/submodules/zlib 10 | url = https://github.com/madler/zlib.git 11 | [submodule "zziplib"] 12 | path = src/submodules/zziplib 13 | url = https://github.com/gdraheim/zziplib.git 14 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Main Code: 2 | Peter "pailes" Barth 3 | 4 | Additional Code: 5 | Christopher "Deltafire" O'Neill (SDL ports, some features/bugfixes) 6 | Dale "d0pefish" Whinham (Cocoa & cmake port, some features/bugfixes) 7 | Julian "jua" Harnath (Haiku port) 8 | Antti S. Lankila (Amiga filter coefficients) 9 | Varthall (Amiga port) 10 | Andrew Simper (noise code) 11 | David Ross (EQ code) 12 | Stuart Caie/Claudio Matsuoka (powerpacker decrunching) 13 | Corvus Corax (sample editor filters) 14 | Henri Isojärvi (GUS patch loader fixes, GUI improvements) 15 | Johannes Schultz (various compatibility fixes) 16 | 17 | 3rd Party Libraries: 18 | RtMidi/RtAudio 19 | PortAudio 20 | zlib 21 | zziplib 22 | 23 | Pixel Graphics: 24 | kenet 25 | raina 26 | IDC 27 | 28 | Demo songs: 29 | svenzzon 30 | Strobe & Kmuland 31 | raina 32 | 33 | ASCII art (.nfo file): 34 | H2o 35 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | See http://www.milkytracker.org/ for latest news and updates. 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | MilkyTracker - Cross-Platform XM Tracker 2 | ======================================== 3 | 4 | [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/milkytracker/MilkyTracker?branch=master&svg=true)](https://ci.appveyor.com/project/Deltafire/milkytracker) 5 | 6 | 7 | 8 | MilkyTracker is an multi-platform music application for creating .MOD 9 | and .XM module files. It attempts to recreate the module replay and 10 | user experience of the popular DOS program Fasttracker II, with 11 | special playback modes available for improved Amiga ProTracker 2/3 12 | compatibility. 13 | 14 | ## [⬇ DOWNLOAD](https://milkytracker.org/downloads) 15 | 16 | ## [CHAT COMMUNITY](https://milkytracker.org/community/) 17 | 18 | Refer to http://milkytracker.org/about for further details. 19 | 20 | Please read the file [INSTALL.md][] for installation instructions. 21 | 22 | The [docs/readme_unix][] file contains notes specific to the SDL port 23 | of MilkyTracker. 24 | 25 | [INSTALL.md]:INSTALL.md 26 | [docs/readme_unix]:docs/readme_unix 27 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # https://crascit.com/2016/04/03/scripting-cmake-builds/ 3 | 4 | # Set defaults 5 | BUILD_TYPE="Release" 6 | BUILD_DMG=ON 7 | 8 | # Parse arguments 9 | while [[ $# -gt 0 ]]; do 10 | case $1 in 11 | Release|Debug) 12 | BUILD_TYPE="$1" 13 | ;; 14 | --no-dmg) 15 | BUILD_DMG=OFF 16 | ;; 17 | *) 18 | echo "Unknown argument: $1" 19 | echo "Usage: $0 [Release|Debug] [--no-dmg]" 20 | exit 1 21 | ;; 22 | esac 23 | shift 24 | done 25 | 26 | # Set build directory based on build type 27 | BUILD_DIR="build" 28 | CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_DMG=$BUILD_DMG" 29 | 30 | if [[ "$BUILD_TYPE" == "Debug" ]]; then 31 | BUILD_DIR="build-debug" 32 | # Add debug-specific flags 33 | CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_CXX_FLAGS_DEBUG='-g3'" 34 | fi 35 | 36 | echo "Building MilkyTracker in $BUILD_TYPE mode in $BUILD_DIR..." 37 | if [ "$BUILD_DMG" = "OFF" ]; then 38 | echo "DMG generation: OFF" 39 | fi 40 | 41 | cmake -E make_directory $BUILD_DIR 42 | pushd $BUILD_DIR 43 | cmake $CMAKE_FLAGS .. 44 | cmake --build . --config $BUILD_TYPE 45 | cpack . 46 | popd 47 | -------------------------------------------------------------------------------- /docs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # docs/CMakeLists.txt 3 | # 4 | # Copyright 2016 Dale Whinham 5 | # 6 | # This file is part of MilkyTracker. 7 | # 8 | # MilkyTracker is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # MilkyTracker is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with MilkyTracker. If not, see . 20 | # 21 | 22 | set( 23 | DOCUMENTS 24 | ChangeLog.html 25 | FAQ.html 26 | MilkyTracker.html 27 | TiTAN.nfo 28 | ChangeLog.html 29 | ) 30 | 31 | if(${CMAKE_SYSTEM_NAME} MATCHES "BSD") 32 | set(BSD TRUE) 33 | endif() 34 | 35 | if(APPLE) 36 | set(INSTALL_DEST Documentation) 37 | elseif(BSD) 38 | set(INSTALL_DEST share/doc/${PROJECT_NAME_LOWER}) 39 | elseif(WIN32) 40 | list(APPEND DOCUMENTS readme_rtaudio) 41 | set(INSTALL_DEST .) 42 | else() 43 | list(APPEND DOCUMENTS readme_unix) 44 | set(INSTALL_DEST ${CMAKE_INSTALL_DOCDIR}) 45 | endif() 46 | 47 | install(FILES ${DOCUMENTS} DESTINATION ${INSTALL_DEST}) 48 | install(FILES ../AUTHORS DESTINATION ${INSTALL_DEST} RENAME Authors.txt) 49 | install(FILES ../COPYING DESTINATION ${INSTALL_DEST} RENAME Copying.txt) 50 | # add_custom_command(OUTPUT ChangeLog.html COMMAND pandoc ARGS "-so ChangeLog.html ../ChangeLog.md") 51 | -------------------------------------------------------------------------------- /platforms/haiku/Add_Jamfiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MILKY_ROOT="../.." 4 | 5 | echo "Copying Jamfiles..." 6 | 7 | cp Jamfiles/Jamfile $MILKY_ROOT 8 | cp Jamfiles/Jamrules $MILKY_ROOT 9 | cp Jamfiles/src-compression-Jamfile $MILKY_ROOT/src/compression/Jamfile 10 | cp Jamfiles/src-compression-zzlib-generic-Jamfile $MILKY_ROOT/src/compression/zziplib/generic/Jamfile 11 | cp Jamfiles/src-fx-Jamfile $MILKY_ROOT/src/fx/Jamfile 12 | cp Jamfiles/src-midi-Jamfile $MILKY_ROOT/src/midi/Jamfile 13 | cp Jamfiles/src-milkyplay-Jamfile $MILKY_ROOT/src/milkyplay/Jamfile 14 | cp Jamfiles/src-ppui-Jamfile $MILKY_ROOT/src/ppui/Jamfile 15 | cp Jamfiles/src-ppui-osinterface-Jamfile $MILKY_ROOT/src/ppui/osinterface/Jamfile 16 | cp Jamfiles/src-tracker-Jamfile $MILKY_ROOT/src/tracker/Jamfile 17 | cp Jamfiles/src-tracker-haiku-MilkySettings-Jamfile $MILKY_ROOT/src/tracker/haiku/MilkySettings/Jamfile 18 | 19 | echo "Done!" 20 | -------------------------------------------------------------------------------- /platforms/haiku/Jamfiles/Jamfile: -------------------------------------------------------------------------------- 1 | SubDir TOP ; 2 | 3 | SubInclude TOP src compression ; 4 | SubInclude TOP src compression zziplib generic ; 5 | SubInclude TOP src fx ; 6 | SubInclude TOP src midi ; 7 | SubInclude TOP src milkyplay ; 8 | SubInclude TOP src ppui ; 9 | SubInclude TOP src ppui osinterface ; 10 | SubInclude TOP src tracker ; 11 | SubInclude TOP src tracker haiku MilkySettings ; 12 | -------------------------------------------------------------------------------- /platforms/haiku/Jamfiles/Jamrules: -------------------------------------------------------------------------------- 1 | C++ = g++ ; 2 | C++FLAGS = -O2 -DMILKYTRACKER -D__HAIKU__ ; 3 | LINKFLAGS = -Xlinker -soname=_APP_ ; 4 | 5 | # Paths to sources, used as include paths 6 | PathCompression = $(TOP)/src/compression ; 7 | PathZZIP = $(TOP)/src/compression/zziplib ; 8 | PathFX = $(TOP)/src/fx ; 9 | PathMidi = $(TOP)/src/midi ; 10 | PathMilkyPlay = $(TOP)/src/milkyplay ; 11 | PathPPUI = $(TOP)/src/ppui ; 12 | PathOSInterface = $(TOP)/src/ppui/osinterface ; 13 | PathTracker = $(TOP)/src/tracker ; 14 | 15 | actions FinishExecutable { 16 | rc $(2) -o resources.rsrc 17 | xres -o $(1) resources.rsrc 18 | mimeset -f $(1) 19 | } 20 | -------------------------------------------------------------------------------- /platforms/haiku/Jamfiles/src-compression-Jamfile: -------------------------------------------------------------------------------- 1 | SubDir TOP src compression ; 2 | 3 | SubDirHdrs $(PathCompression) lha ; 4 | SubDirHdrs $(PathMilkyPlay) ; 5 | SubDirHdrs $(PathOSInterface) posix ; 6 | SubDirHdrs $(PathPPUI) ; 7 | SubDirHdrs $(PathZZIP) ; 8 | SubDirHdrs - ; 9 | SubDirHdrs $(PathZZIP) generic ; 10 | 11 | Library libcompression : 12 | Decompressor.cpp 13 | DecompressorGZIP.cpp 14 | DecompressorLHA.cpp 15 | DecompressorLZX.cpp 16 | DecompressorPP20.cpp 17 | DecompressorUMX.cpp 18 | DecompressorZIP.cpp 19 | PP20.cpp 20 | unlzx.cpp 21 | ZipExtractor.cpp 22 | lha/unlha.cpp 23 | zziplib/MyIO.cpp 24 | ; 25 | -------------------------------------------------------------------------------- /platforms/haiku/Jamfiles/src-compression-zzlib-generic-Jamfile: -------------------------------------------------------------------------------- 1 | SubDir TOP src compression zziplib generic ; 2 | 3 | SubDirHdrs $(PathZZIP) ; 4 | 5 | Library libzzip : 6 | dir.cpp 7 | err.cpp 8 | fetch.cpp 9 | file.cpp 10 | fseeko.cpp 11 | info.cpp 12 | plugin.cpp 13 | stat.cpp 14 | zip.cpp 15 | ; 16 | -------------------------------------------------------------------------------- /platforms/haiku/Jamfiles/src-fx-Jamfile: -------------------------------------------------------------------------------- 1 | SubDir TOP src fx ; 2 | 3 | SubDirHdrs $(PathOSInterface) posix ; 4 | SubDirHdrs $(PathPPUI) ; 5 | SubDirHdrs - ; 6 | 7 | Library libfx : 8 | Camera.cpp 9 | Filter.cpp 10 | Fire.cpp 11 | fpmath.cpp 12 | Math3d.cpp 13 | ParticleBlobs.cpp 14 | ParticleEmitter.cpp 15 | ParticleFun.cpp 16 | ParticleFX.cpp 17 | ParticleScene.cpp 18 | Starfield.cpp 19 | TCBSpline.cpp 20 | TCBSplineTest.cpp 21 | Texture.cpp 22 | TexturedGrid.cpp 23 | TexturedPlane.cpp 24 | Twister.cpp 25 | TwisterFX.cpp 26 | ; 27 | -------------------------------------------------------------------------------- /platforms/haiku/Jamfiles/src-midi-Jamfile: -------------------------------------------------------------------------------- 1 | SubDir TOP src midi ; 2 | 3 | SubDirHdrs $(PathTracker) ; 4 | SubDirHdrs $(PathMidi) ; 5 | SubDirHdrs $(PathMidi) haiku ; 6 | SubDirHdrs $(PathMilkyPlay) ; 7 | SubDirHdrs $(PathOSInterface) posix ; 8 | SubDirHdrs $(PathPPUI) ; 9 | SubDirHdrs - ; 10 | 11 | Library libmidi : 12 | # --- Haiku specific --- 13 | haiku/MilkyMidiConsumer.cpp 14 | haiku/MidiSetup.cpp 15 | ; 16 | -------------------------------------------------------------------------------- /platforms/haiku/Jamfiles/src-milkyplay-Jamfile: -------------------------------------------------------------------------------- 1 | SubDir TOP src milkyplay ; 2 | 3 | SubDirHdrs $(PathMilkyPlay) drivers haiku ; 4 | 5 | Library libmilkyplay : 6 | AudioDriver_NULL.cpp 7 | AudioDriver_WAVWriter.cpp 8 | AudioDriverBase.cpp 9 | AudioDriverManager.cpp 10 | ChannelMixer.cpp 11 | ExporterXM.cpp 12 | LittleEndian.cpp 13 | Loader669.cpp 14 | LoaderAMF.cpp 15 | LoaderAMS.cpp 16 | LoaderCBA.cpp 17 | LoaderDBM.cpp 18 | LoaderDIGI.cpp 19 | LoaderDSM.cpp 20 | LoaderDTM.cpp 21 | LoaderFAR.cpp 22 | LoaderGDM.cpp 23 | LoaderIMF.cpp 24 | LoaderIT.cpp 25 | LoaderMDL.cpp 26 | LoaderMOD.cpp 27 | LoaderMTM.cpp 28 | LoaderMXM.cpp 29 | LoaderOKT.cpp 30 | LoaderPLM.cpp 31 | LoaderPSM.cpp 32 | LoaderPTM.cpp 33 | LoaderS3M.cpp 34 | LoaderSTM.cpp 35 | LoaderULT.cpp 36 | LoaderUNI.cpp 37 | LoaderXM.cpp 38 | MasterMixer.cpp 39 | PlayerBase.cpp 40 | PlayerFAR.cpp 41 | PlayerGeneric.cpp 42 | PlayerIT.cpp 43 | PlayerSTD.cpp 44 | ResamplerFactory.cpp 45 | SampleLoaderAbstract.cpp 46 | SampleLoaderAIFF.cpp 47 | SampleLoaderALL.cpp 48 | SampleLoaderGeneric.cpp 49 | SampleLoaderIFF.cpp 50 | SampleLoaderWAV.cpp 51 | XIInstrument.cpp 52 | XMFile.cpp 53 | XModule.cpp 54 | # --- Haiku specific --- 55 | drivers/haiku/AudioDriver_Haiku.cpp 56 | ; 57 | -------------------------------------------------------------------------------- /platforms/haiku/Jamfiles/src-ppui-Jamfile: -------------------------------------------------------------------------------- 1 | SubDir TOP src ppui ; 2 | 3 | SubDirHdrs $(PathMilkyPlay) ; 4 | SubDirHdrs $(PathOSInterface) ; 5 | SubDirHdrs $(PathOSInterface) haiku ; 6 | SubDirHdrs $(PathOSInterface) posix ; 7 | SubDirHdrs $(PathPPUI) haiku ; 8 | SubDirHdrs $(PathTracker) ; 9 | SubDirHdrs $(PathTracker) haiku ; 10 | SubDirHdrs - ; 11 | 12 | Library libppui : 13 | Button.cpp 14 | CheckBox.cpp 15 | CheckBoxLabel.cpp 16 | Container.cpp 17 | ContextMenu.cpp 18 | Control.cpp 19 | DialogBase.cpp 20 | DialogFileSelector.cpp 21 | Dictionary.cpp 22 | DictionaryKey.cpp 23 | Event.cpp 24 | Font.cpp 25 | # Graphics_15BIT.cpp 26 | # Graphics_16BIT.cpp 27 | # Graphics_24bpp_generic.cpp 28 | Graphics_32bpp_generic.cpp 29 | # Graphics_ARGB32.cpp 30 | # Graphics_BGR24_SLOW.cpp 31 | # Graphics_BGR24.cpp 32 | # Graphics_OGL.cpp 33 | KeyboardBindingHandler.cpp 34 | ListBox.cpp 35 | ListBoxFileBrowser.cpp 36 | Menu.cpp 37 | MessageBoxContainer.cpp 38 | PPUIConfig.cpp 39 | RadioGroup.cpp 40 | Screen.cpp 41 | Scrollbar.cpp 42 | Seperator.cpp 43 | Slider.cpp 44 | StaticText.cpp 45 | Tools.cpp 46 | TransparentContainer.cpp 47 | # --- Haiku specific --- 48 | haiku/DisplayDevice_Haiku.cpp 49 | haiku/MilkyView.cpp 50 | haiku/MilkyWindow.cpp 51 | haiku/KeyCodeMap.cpp 52 | ; 53 | -------------------------------------------------------------------------------- /platforms/haiku/Jamfiles/src-ppui-osinterface-Jamfile: -------------------------------------------------------------------------------- 1 | SubDir TOP src ppui osinterface ; 2 | 3 | SubDirHdrs $(PathMilkyPlay) ; 4 | SubDirHdrs $(PathOSInterface) posix ; 5 | SubDirHdrs $(PathOSInterface) haiku ; 6 | SubDirHdrs $(PathPPUI) ; 7 | SubDirHdrs $(PathPPUI) haiku ; 8 | SubDirHdrs $(PathTracker) haiku ; 9 | SubDirHdrs - ; 10 | 11 | Library libosinterface : 12 | PPPathFactory.cpp 13 | posix/PPMutex.cpp 14 | posix/PPPath_POSIX.cpp 15 | posix/PPSystem_POSIX.cpp 16 | # --- Haiku specific --- 17 | haiku/SynchronousFilePanel.cpp 18 | haiku/PPMessageBox_Haiku.cpp 19 | haiku/PPOpenPanel_Haiku.cpp 20 | haiku/PPQuitSaveAlert_Haiku.cpp 21 | haiku/PPSavePanel_Haiku.cpp 22 | haiku/WaitView.cpp 23 | haiku/WaitWindow.cpp 24 | ; 25 | -------------------------------------------------------------------------------- /platforms/haiku/Jamfiles/src-tracker-haiku-MilkySettings-Jamfile: -------------------------------------------------------------------------------- 1 | SubDir TOP src tracker haiku MilkySettings ; 2 | 3 | LINKLIBS on MilkySettings = -lbe -lmidi2 ; 4 | 5 | Main MilkySettings : 6 | MilkySettingsApplication.cpp 7 | SettingsWindow.cpp 8 | InterfaceSettingsView.cpp 9 | MidiSettingsView.cpp 10 | main.cpp 11 | ; 12 | 13 | # FinishExecutable MilkySettings : MilkySettings.rdef ; 14 | -------------------------------------------------------------------------------- /platforms/haiku/ReadMe_-_How_to_build_for_Haiku: -------------------------------------------------------------------------------- 1 | How to build MilkyTracker for Haiku 2 | 3 | (1) Open a terminal in platforms/haiku (the directory where this ReadMe is in) 4 | 5 | (2) Run Add_Jamfiles.sh which copies Jamfiles into the source directories 6 | $> ./Add_Jamfiles.sh 7 | 8 | (3) Go two directory levels up, into the root of the sources 9 | $> cd ../.. 10 | 11 | (4) Run jam to build 12 | $> jam 13 | 14 | (5) After a while it should complete successfully. The binaries are now at: 15 | src/tracker/MilkyTracker and 16 | src/tracker/haiku/MilkySettings/MilkySettings 17 | 18 | If you want to clean up the source tree again you can use 19 | jam clean 20 | and the Remove_Jamfiles.sh script from the platforms/haiku directory. 21 | -------------------------------------------------------------------------------- /platforms/haiku/Remove_Jamfiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MILKY_ROOT="../.." 4 | 5 | echo "Removing Jamfiles..." 6 | 7 | rm $MILKY_ROOT/Jamfile 8 | rm $MILKY_ROOT/Jamrules 9 | rm $MILKY_ROOT/src/compression/Jamfile 10 | rm $MILKY_ROOT/src/compression/zziplib/generic/Jamfile 11 | rm $MILKY_ROOT/src/fx/Jamfile 12 | rm $MILKY_ROOT/src/midi/Jamfile 13 | rm $MILKY_ROOT/src/milkyplay/Jamfile 14 | rm $MILKY_ROOT/src/ppui/Jamfile 15 | rm $MILKY_ROOT/src/ppui/osinterface/Jamfile 16 | rm $MILKY_ROOT/src/tracker/Jamfile 17 | rm $MILKY_ROOT/src/tracker/haiku/MilkySettings/Jamfile 18 | 19 | echo "Done!" 20 | -------------------------------------------------------------------------------- /platforms/ppc-amigaos/inttypes.h: -------------------------------------------------------------------------------- 1 | #ifndef INTTYPE_H 2 | #define INTTYPE_H 3 | 4 | typedef unsigned char uint8_t; 5 | typedef char int8_t; 6 | typedef unsigned int uint32_t; 7 | typedef int int32_t; 8 | typedef unsigned short uint16_t; 9 | typedef short int16_t; 10 | typedef unsigned long long uint64_t; 11 | typedef long long int64_t; 12 | 13 | typedef unsigned char Uint8; 14 | typedef char int8; 15 | typedef unsigned int Uint32; 16 | typedef int int32; 17 | typedef unsigned short Uint16; 18 | typedef short int16; 19 | typedef unsigned long long Uint64; 20 | typedef long long int64; 21 | #endif 22 | -------------------------------------------------------------------------------- /platforms/wince/PocketPC_KeyConfig/KeyConfigDlg.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYCONFIGDLG__H 2 | #define KEYCONFIGDLG__H 3 | 4 | #ifndef _WIN32_WCE_EMULATION 5 | #define NUM_INVALID_KEYS 5 6 | extern short nInvalidKeys[5]; 7 | #else 8 | #define NUM_INVALID_KEYS 2 9 | extern short nInvalidKeys[2]; 10 | #endif 11 | 12 | void RegisterKeys(HWND hWnd); 13 | void UnregisterKeys(HWND hWnd); 14 | void CreateKeyDialog(HINSTANCE hInst, HWND hWnd); 15 | 16 | 17 | #endif -------------------------------------------------------------------------------- /platforms/wince/PocketPC_KeyConfig/PocketPC_KeyConfig.h: -------------------------------------------------------------------------------- 1 | 2 | #if !defined(AFX_POCKETPCKEYCONFIG_H__159E0D94_E1F9_479E_A337_A03081FBBD41__INCLUDED_) 3 | #define AFX_POCKETPCKEYCONFIG_H__159E0D94_E1F9_479E_A337_A03081FBBD41__INCLUDED_ 4 | 5 | #if _MSC_VER > 1000 6 | #pragma once 7 | #endif // _MSC_VER > 1000 8 | 9 | #include "resource.h" 10 | 11 | #define MENU_HEIGHT 26 12 | 13 | #endif // !defined(AFX_POCKETPCKEYCONFIG_H__159E0D94_E1F9_479E_A337_A03081FBBD41__INCLUDED_) 14 | -------------------------------------------------------------------------------- /platforms/wince/PocketPC_KeyConfig/PocketPC_KeyConfig.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/platforms/wince/PocketPC_KeyConfig/PocketPC_KeyConfig.ico -------------------------------------------------------------------------------- /platforms/wince/PocketPC_KeyConfig/Registry.h: -------------------------------------------------------------------------------- 1 | #ifndef __REGISTRY_H__ 2 | #define __REGISTRY_H__ 3 | 4 | #include 5 | 6 | void GetFullAppPath(LPCTSTR pszApplicationTitle, HINSTANCE hInst, LPTSTR pszModule, UINT max); 7 | BOOL RegQueryFileInfo(LPCTSTR pszExecutable, HINSTANCE hInst, LPCTSTR pszExt); 8 | void RegFileInfo(LPCTSTR pszExecutable, HINSTANCE hInst, LPCTSTR pszExt, int idi_app); // IDI_APP 9 | void RegUnregisterFileInfo(LPCTSTR pszExecutable, HINSTANCE hInst, LPCTSTR pszExt); 10 | 11 | #endif -------------------------------------------------------------------------------- /platforms/wince/PocketPC_KeyConfig/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // PocketPC KeyConfig.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /platforms/wince/PocketPC_KeyConfig/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__5FDB452E_354E_48F7_AE1C_1B8375FF6F91__INCLUDED_) 7 | #define AFX_STDAFX_H__5FDB452E_354E_48F7_AE1C_1B8375FF6F91__INCLUDED_ 8 | 9 | #if _MSC_VER > 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 14 | 15 | // Windows Header Files: 16 | #include 17 | 18 | // Local Header Files 19 | 20 | // TODO: reference additional headers your program requires here 21 | 22 | //{{AFX_INSERT_LOCATION}} 23 | // Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line. 24 | 25 | #endif // !defined(AFX_STDAFX_H__5FDB452E_354E_48F7_AE1C_1B8375FF6F91__INCLUDED_) 26 | -------------------------------------------------------------------------------- /platforms/wince/PocketPC_KeyConfig/newres.h: -------------------------------------------------------------------------------- 1 | #ifndef __NEWRES_H__ 2 | #define __NEWRES_H__ 3 | 4 | #if !defined(UNDER_CE) 5 | #define UNDER_CE _WIN32_WCE 6 | #endif 7 | 8 | #if defined(_WIN32_WCE) 9 | #if !defined(WCEOLE_ENABLE_DIALOGEX) 10 | #define DIALOGEX DIALOG DISCARDABLE 11 | #endif 12 | #include 13 | #define SHMENUBAR RCDATA 14 | #if defined(WIN32_PLATFORM_PSPC) && (_WIN32_WCE >= 300) 15 | #include 16 | #define AFXCE_IDR_SCRATCH_SHMENU 28700 17 | #else 18 | #define I_IMAGENONE (-2) 19 | #define NOMENU 0xFFFF 20 | #define IDS_SHNEW 1 21 | 22 | #define IDM_SHAREDNEW 10 23 | #define IDM_SHAREDNEWDEFAULT 11 24 | #endif // _WIN32_WCE_PSPC 25 | #define AFXCE_IDD_SAVEMODIFIEDDLG 28701 26 | #endif // _WIN32_WCE 27 | 28 | #ifdef RC_INVOKED 29 | #ifndef _INC_WINDOWS 30 | #define _INC_WINDOWS 31 | #include "winuser.h" // extract from windows header 32 | #include "winver.h" 33 | #endif 34 | #endif 35 | 36 | #ifdef IDC_STATIC 37 | #undef IDC_STATIC 38 | #endif 39 | #define IDC_STATIC (-1) 40 | 41 | #endif //__NEWRES_H__ 42 | -------------------------------------------------------------------------------- /platforms/wince/milkytracker_evc3.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/platforms/wince/milkytracker_evc3.zip -------------------------------------------------------------------------------- /resources/fonts/ARIEL.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/ARIEL.8X8 -------------------------------------------------------------------------------- /resources/fonts/ATHENA.12X12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/ATHENA.12X12 -------------------------------------------------------------------------------- /resources/fonts/ATHENA_SPACED.12X12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/ATHENA_SPACED.12X12 -------------------------------------------------------------------------------- /resources/fonts/DISORDERTRACKER2.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/DISORDERTRACKER2.8X8 -------------------------------------------------------------------------------- /resources/fonts/DX-FUTUR.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/DX-FUTUR.8X8 -------------------------------------------------------------------------------- /resources/fonts/EK-MAC.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/EK-MAC.8X8 -------------------------------------------------------------------------------- /resources/fonts/EK-SPACE.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/EK-SPACE.8X8 -------------------------------------------------------------------------------- /resources/fonts/FINELINE.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/FINELINE.8X8 -------------------------------------------------------------------------------- /resources/fonts/FN-ICE.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/FN-ICE.8X8 -------------------------------------------------------------------------------- /resources/fonts/FN-LOWER.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/FN-LOWER.8X8 -------------------------------------------------------------------------------- /resources/fonts/FN-ROUND.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/FN-ROUND.8X8 -------------------------------------------------------------------------------- /resources/fonts/GRAFPAPR.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/GRAFPAPR.8X8 -------------------------------------------------------------------------------- /resources/fonts/GTHS-BUG.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/GTHS-BUG.8X8 -------------------------------------------------------------------------------- /resources/fonts/IDC-Harmonica.12X12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/IDC-Harmonica.12X12 -------------------------------------------------------------------------------- /resources/fonts/IDC-Harmonica.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/IDC-Harmonica.8X8 -------------------------------------------------------------------------------- /resources/fonts/IDC-Hoodlum.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/IDC-Hoodlum.8X8 -------------------------------------------------------------------------------- /resources/fonts/IDC-MicroKnight.12X12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/IDC-MicroKnight.12X12 -------------------------------------------------------------------------------- /resources/fonts/IDC-MicroKnight.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/IDC-MicroKnight.8X8 -------------------------------------------------------------------------------- /resources/fonts/IDC-Topaz1.3.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/IDC-Topaz1.3.8X8 -------------------------------------------------------------------------------- /resources/fonts/IDC-Topaz2.0.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/IDC-Topaz2.0.8X8 -------------------------------------------------------------------------------- /resources/fonts/INVERSE.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/INVERSE.8X8 -------------------------------------------------------------------------------- /resources/fonts/J-CURSE.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/J-CURSE.8X8 -------------------------------------------------------------------------------- /resources/fonts/J-ELECTR.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/J-ELECTR.8X8 -------------------------------------------------------------------------------- /resources/fonts/J-FLUX.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/J-FLUX.8X8 -------------------------------------------------------------------------------- /resources/fonts/J-TERMO.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/J-TERMO.8X8 -------------------------------------------------------------------------------- /resources/fonts/KANAFONT.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/KANAFONT.8X8 -------------------------------------------------------------------------------- /resources/fonts/MOTIF.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/MOTIF.8X8 -------------------------------------------------------------------------------- /resources/fonts/NOTCH.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/NOTCH.8X8 -------------------------------------------------------------------------------- /resources/fonts/PEANUT.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/PEANUT.8X8 -------------------------------------------------------------------------------- /resources/fonts/PERISOFT.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/PERISOFT.8X8 -------------------------------------------------------------------------------- /resources/fonts/REZ-ASCII.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/REZ-ASCII.8X8 -------------------------------------------------------------------------------- /resources/fonts/SCRIPT.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/SCRIPT.8X8 -------------------------------------------------------------------------------- /resources/fonts/SMALLCAP.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/SMALLCAP.8X8 -------------------------------------------------------------------------------- /resources/fonts/THICK.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/THICK.8X8 -------------------------------------------------------------------------------- /resources/fonts/TINY.6X5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/TINY.6X5 -------------------------------------------------------------------------------- /resources/fonts/TINY_UPPERCASE.6x5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/TINY_UPPERCASE.6x5 -------------------------------------------------------------------------------- /resources/fonts/XTSAMP.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/XTSAMP.8X8 -------------------------------------------------------------------------------- /resources/fonts/ZERO.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/ZERO.8X8 -------------------------------------------------------------------------------- /resources/fonts/ZIRCFONT.8X8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/fonts/ZIRCFONT.8X8 -------------------------------------------------------------------------------- /resources/milkytracker.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Type=Application 4 | Name=MilkyTracker 5 | Comment=Fast Tracker II inspired music tracker 6 | Comment[fr]=Tracker musical inspiré par Fast Tracker II 7 | Exec=milkytracker %f 8 | Icon=milkytracker 9 | Terminal=false 10 | StartupNotify=false 11 | MimeType=audio/x-mod;audio/x-xm; 12 | Categories=AudioVideo;Audio;AudioVideoEditing;Sequencer; 13 | -------------------------------------------------------------------------------- /resources/music/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # resources/music/CMakeLists.txt 3 | # 4 | # Copyright 2016 Dale Whinham 5 | # 6 | # This file is part of MilkyTracker. 7 | # 8 | # MilkyTracker is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # MilkyTracker is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with MilkyTracker. If not, see . 20 | # 21 | 22 | file(GLOB SONGS "*.xm") 23 | 24 | if(APPLE OR WIN32) 25 | set(INSTALL_DEST "Example Songs") 26 | else() 27 | set(INSTALL_DEST ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME_LOWER}/songs) 28 | endif() 29 | 30 | install(FILES ${SONGS} DESTINATION ${INSTALL_DEST}) 31 | -------------------------------------------------------------------------------- /resources/music/milky.xm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/music/milky.xm -------------------------------------------------------------------------------- /resources/music/slumberjack.xm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/music/slumberjack.xm -------------------------------------------------------------------------------- /resources/music/sv_ttt.xm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/music/sv_ttt.xm -------------------------------------------------------------------------------- /resources/music/theday.xm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/music/theday.xm -------------------------------------------------------------------------------- /resources/music/universalnetwork2_real.xm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/music/universalnetwork2_real.xm -------------------------------------------------------------------------------- /resources/packaging/osx/DMGBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/packaging/osx/DMGBackground.png -------------------------------------------------------------------------------- /resources/packaging/osx/DMGBackground.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/packaging/osx/DMGBackground.tif -------------------------------------------------------------------------------- /resources/packaging/osx/DMGBackground@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/packaging/osx/DMGBackground@2x.png -------------------------------------------------------------------------------- /resources/pictures/16note2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/16note2.ico -------------------------------------------------------------------------------- /resources/pictures/IDC-Harmonica.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/IDC-Harmonica.bmp -------------------------------------------------------------------------------- /resources/pictures/IDC-Hoodlum.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/IDC-Hoodlum.bmp -------------------------------------------------------------------------------- /resources/pictures/IDC-MicroKnight.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/IDC-MicroKnight.bmp -------------------------------------------------------------------------------- /resources/pictures/Setup_Blue_Screen.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/Setup_Blue_Screen.ico -------------------------------------------------------------------------------- /resources/pictures/athena_ft2_style_12x12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/athena_ft2_style_12x12.png -------------------------------------------------------------------------------- /resources/pictures/carton.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/carton.icns -------------------------------------------------------------------------------- /resources/pictures/carton.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/carton.ico -------------------------------------------------------------------------------- /resources/pictures/carton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/carton.png -------------------------------------------------------------------------------- /resources/pictures/drop.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/drop.ico -------------------------------------------------------------------------------- /resources/pictures/ft2_style_12x12_spaced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/ft2_style_12x12_spaced.png -------------------------------------------------------------------------------- /resources/pictures/milky2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/milky2.png -------------------------------------------------------------------------------- /resources/pictures/milkytracker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/milkytracker.png -------------------------------------------------------------------------------- /resources/pictures/oldschool.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/pictures/oldschool.icns -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/Alankila_email_140108.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/reference/Amiga_resampler/Alankila_email_140108.txt -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/modguide/Changes.txt: -------------------------------------------------------------------------------- 1 | pre-release 2006-07-02 alankila 2 | 3 | * Christopher O'Neill (Deltafire from ircnet's #amigaexotic, and one of the 4 | authors of milkytracker) tried to implement the blep approach. He made an 5 | excellent point that convinced me to separate the aging function from the 6 | function that adds new bleps. The function is now known as input_sample, and 7 | the aging function is called clock(). 8 | 9 | * Christopher also found out the hard way a silly bug of mine: sampleclip 10 | routine had the comparison operators the wrong way. :-( 11 | 12 | 13 | pre-release 2006-06-27 alankila 14 | 15 | * LED filter cutoff is at 3.2, not at 1.6. Duh. This was due to a bug in Butterworth 16 | filter computation routine, noticing as I reimplemented it from BLT. 17 | 18 | * LED filter on genuine Amiga appears to perform slightly suboptimally with about 19 | 0.3 dB lowered resonance from theoretical. Perhaps component tolerances are at 20 | issue? Additionally, the filtering slope appears slightly different from 21 | expected. 22 | -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/modguide/note-guide-unfinished.txt: -------------------------------------------------------------------------------- 1 | the guide has not yet been finished. I plan to extend it with some pictures that hopefully 2 | illuminate the issues. 3 | -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/modguide/results/a1200_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/reference/Amiga_resampler/modguide/results/a1200_off.png -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/modguide/results/a1200_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/reference/Amiga_resampler/modguide/results/a1200_on.png -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/modguide/results/a4000_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/reference/Amiga_resampler/modguide/results/a4000_off.png -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/modguide/results/a500_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/reference/Amiga_resampler/modguide/results/a500_off.png -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/modguide/results/a500_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/reference/Amiga_resampler/modguide/results/a500_on.png -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/modguide/results/comb1200_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/reference/Amiga_resampler/modguide/results/comb1200_off.png -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/modguide/results/comb1200_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/reference/Amiga_resampler/modguide/results/comb1200_on.png -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/modguide/results/comb4000_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/reference/Amiga_resampler/modguide/results/comb4000_off.png -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/modguide/results/comb500_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/reference/Amiga_resampler/modguide/results/comb500_off.png -------------------------------------------------------------------------------- /resources/reference/Amiga_resampler/modguide/results/comb500_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/reference/Amiga_resampler/modguide/results/comb500_on.png -------------------------------------------------------------------------------- /resources/reference/EqualizerDesign.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/resources/reference/EqualizerDesign.doc -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | # usage: just install 'nix' packagemanager (nixos.org) and run 'nix-shell' to start developing 2 | { pkgs ? import {} }: 3 | 4 | pkgs.mkShell { 5 | # nativeBuildInputs is usually what you want -- tools you need to run 6 | nativeBuildInputs = with pkgs.buildPackages; [ 7 | cmake gdb SDL2 alsa-lib libjack2 lhasa perl rtmidi zlib zziplib lynx pkg-config pipewire 8 | ]; 9 | 10 | shellHook = '' 11 | export NIX_SHELL_MILKYTRACKER=1 12 | ''; 13 | } 14 | -------------------------------------------------------------------------------- /src/compression/AIFFWriter.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/src/compression/AIFFWriter.h -------------------------------------------------------------------------------- /src/compression/AIFFWriter.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/src/compression/AIFFWriter.m -------------------------------------------------------------------------------- /src/compression/ZipExtractor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * compression/ZipExtractor.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * ZipExtractor.h 25 | * milkytracker_universal 26 | * 27 | * Created by Peter Barth on 31.01.07. 28 | * 29 | */ 30 | 31 | #ifndef __ARCHIVEEXTRACTOR_H__ 32 | #define __ARCHIVEEXTRACTOR_H__ 33 | 34 | #include "BasicTypes.h" 35 | 36 | class ZipExtractor 37 | { 38 | private: 39 | PPSystemString archivePath; 40 | 41 | public: 42 | ZipExtractor(const PPSystemString& archivePath); 43 | 44 | bool parseZip(pp_int32& err, bool extract, const PPSystemString* outFile); 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/compression/zziplib/MyIO.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * MyIO.cpp 3 | * MilkyTracker 4 | * 5 | * Created by Peter Barth on 03.12.07. 6 | * 7 | */ 8 | 9 | #include "MyIO.h" 10 | #include "XMFile.h" 11 | 12 | #define FILE_TABLE_ENTRIES 256 13 | static XMFile* file_table[FILE_TABLE_ENTRIES]; 14 | 15 | int Myopen(const zzip_char_t* name, int flags, ...) 16 | { 17 | XMFile* f = new XMFile((SYSCHAR*)name, (flags & O_WRONLY) ? true : false); 18 | if (f->isOpen()) 19 | { 20 | // Find free space in the file table 21 | // zziplib has a bug where it forbid using fd 0, so skip it 22 | for (int i = 1; i < FILE_TABLE_ENTRIES; i++) 23 | { 24 | if (file_table[i] == NULL) 25 | { 26 | file_table[i] = f; 27 | return i; 28 | } 29 | } 30 | } 31 | 32 | delete f; 33 | return -1; 34 | } 35 | 36 | int Myclose(int fd) 37 | { 38 | if (fd == -1) 39 | return -1; 40 | 41 | delete file_table[fd]; 42 | file_table[fd] = NULL; 43 | return 0; 44 | } 45 | 46 | zzip_ssize_t Myread(int fd, void *buffer, zzip_size_t count) 47 | { 48 | if (fd == -1) 49 | return -1; 50 | 51 | return file_table[fd]->read(buffer, 1, static_cast (count)); 52 | } 53 | 54 | zzip_off_t Mylseek(int fd, zzip_off_t offset, int origin) 55 | { 56 | if (fd == -1) 57 | return -1; 58 | 59 | XMFile::SeekOffsetTypes moveMethod = XMFile::SeekOffsetTypeStart; 60 | 61 | if (origin == SEEK_CUR) 62 | moveMethod = XMFile::SeekOffsetTypeCurrent; 63 | else if (origin == SEEK_END) 64 | moveMethod = XMFile::SeekOffsetTypeEnd; 65 | 66 | file_table[fd]->seek(offset, moveMethod); 67 | return file_table[fd]->pos(); 68 | } 69 | 70 | zzip_off_t Myfsize(int fd) 71 | { 72 | if (fd == -1) 73 | return -1; 74 | 75 | return file_table[fd]->size(); 76 | } 77 | -------------------------------------------------------------------------------- /src/compression/zziplib/MyIO.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MyIO.h 3 | * MilkyTracker 4 | * 5 | * Created by Peter Barth on 03.12.07. 6 | * 7 | */ 8 | 9 | #ifndef __MYIO_H__ 10 | #define __MYIO_H__ 11 | 12 | #include 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | int Myopen(const zzip_char_t* name, int flags, ...); 19 | int Myclose(int fd); 20 | zzip_ssize_t Myread(int fd, void *buffer, zzip_size_t count); 21 | zzip_off_t Mylseek(int fd, zzip_off_t offset, int origin); 22 | zzip_off_t Myfsize(int fd); 23 | 24 | #ifdef __cplusplus 25 | }; 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/fx/Camera.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/Camera.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef CAMERA__H 24 | #define CAMERA__H 25 | 26 | #include "Math3d.h" 27 | 28 | class Camera 29 | { 30 | public: 31 | VectorFP position,target; 32 | float bank,lens; 33 | 34 | MatrixFP trackPositionMatrix,trackTargetMatrix; 35 | 36 | Camera(); 37 | Camera(VectorFP& pos, VectorFP& target); 38 | 39 | MatrixFP getMatrix(); 40 | 41 | MatrixFP getMatrixInverse(); 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/fx/FXAbstract.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/FXAbstract.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * FXAbstract.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 25.11.05. 28 | * 29 | */ 30 | 31 | #ifndef FXABSTRACT__H 32 | #define FXABSTRACT__H 33 | 34 | #include "BasicTypes.h" 35 | 36 | class FXAbstract 37 | { 38 | protected: 39 | pp_uint32 width, height; 40 | 41 | public: 42 | FXAbstract(pp_uint32 w, pp_uint32 h) : 43 | width(w), height(h) 44 | { 45 | } 46 | virtual ~FXAbstract() {} 47 | 48 | virtual void update(pp_uint32 syncFrac) { } 49 | 50 | virtual void render(pp_uint8* buffer) = 0; 51 | }; 52 | 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /src/fx/FXInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/FXInterface.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef FXINTERFACE__H 24 | #define FXINTERFACE__H 25 | 26 | class FXInterface 27 | { 28 | protected: 29 | int width, height; 30 | 31 | public: 32 | virtual ~FXInterface() {} 33 | 34 | virtual void render(unsigned short* vscreen, unsigned int pitch) = 0; 35 | 36 | virtual void update(float syncFrac) = 0; 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/fx/Fire.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/Fire.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * Fire.h 25 | * MyFirstCarbonProject 26 | * 27 | * Created by Peter Barth on Wed Feb 20 2002. 28 | * 29 | */ 30 | 31 | #ifndef FIRE__H 32 | #define FIRE__H 33 | 34 | #include "BasicTypes.h" 35 | #include "FXAbstract.h" 36 | 37 | class Fire : public FXAbstract 38 | { 39 | private: 40 | pp_uint16* workbuffer; 41 | pp_uint8 colorLUT[256][3]; 42 | 43 | void buildColorLUT(); 44 | 45 | public: 46 | Fire(pp_int32 w, pp_int32 h); 47 | virtual ~Fire(); 48 | 49 | virtual void render(pp_uint8* buffer); 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/fx/ParticleBlobs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/ParticleBlobs.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef PARTICLEBLOBS__H 24 | #define PARTICLEBLOBS__H 25 | 26 | #include "ParticleFX.h" 27 | #include "Math3d.h" 28 | 29 | 30 | class ParticleBlobs : public ParticleFX 31 | { 32 | unsigned short* flareTexture[3]; 33 | unsigned short* temp; 34 | unsigned short* buffer; 35 | 36 | 37 | public: 38 | ParticleBlobs(int width, int height); 39 | virtual ~ParticleBlobs(); 40 | 41 | virtual void render(unsigned short* vscreen, unsigned int pitch); 42 | virtual void update(float syncFrac); 43 | 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/fx/ParticleEmitter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/ParticleEmitter.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef PARTICLEEMITTER__H 24 | #define PARTICLEEMITTER__H 25 | 26 | #include "ParticleFX.h" 27 | #include "Math3d.h" 28 | 29 | class ParticleEmitter : public ParticleFX 30 | { 31 | private: 32 | unsigned short* flareTexture[3]; 33 | unsigned short* temp; 34 | unsigned short* buffer; 35 | 36 | unsigned int numEmitters; 37 | unsigned short* emitterTexture[6]; 38 | Particle* emitters; 39 | int currentParticleIndex; 40 | 41 | int maxParticles; 42 | 43 | public: 44 | ParticleEmitter(int width, int height, int FOV, int numEmitters, int maxParticles); 45 | virtual ~ParticleEmitter(); 46 | 47 | void setEmitter(unsigned int index, VectorFP& pos) { if (index < numEmitters) emitters[index].pos = pos; } 48 | 49 | virtual void update(float syncFrac); 50 | virtual void render(unsigned short* vscreen, unsigned int pitch); 51 | 52 | }; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/fx/ParticleFun.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/ParticleFun.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef PARTICLEFUN__H 24 | #define PARTICLEFUN__H 25 | 26 | #include "ParticleFX.h" 27 | #include "Math3d.h" 28 | 29 | class ParticleFun : public ParticleFX 30 | { 31 | private: 32 | unsigned short* flareTexture; 33 | float phi; 34 | 35 | public: 36 | ParticleFun(int width, int height, int FOV); 37 | virtual ~ParticleFun(); 38 | 39 | virtual void update(float syncFrac); 40 | 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/fx/ParticleScene.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/ParticleScene.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef PARTICLESCENE__H 24 | #define PARTICLESCENE__H 25 | 26 | #include "FXInterface.h" 27 | 28 | class ParticleFX; 29 | class TexturedGrid; 30 | 31 | class ParticleScene : public FXInterface 32 | { 33 | private: 34 | float time; 35 | ParticleFX *particleFX; 36 | ParticleFX *particleFun; 37 | TexturedGrid *texturedGrid; 38 | 39 | public: 40 | ParticleScene(int width, int height, int gridshift); 41 | ~ParticleScene(); 42 | 43 | void render(unsigned short* vscreen, unsigned int pitch); 44 | void update(float syncFrac); 45 | 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/fx/Starfield.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/Starfield.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * Fire.h 25 | * MyFirstCarbonProject 26 | * 27 | * Created by Peter Barth on Wed Feb 20 2002. 28 | * 29 | */ 30 | 31 | #ifndef STARFIELD__H 32 | #define STARFIELD__H 33 | 34 | #include "BasicTypes.h" 35 | #include "FXAbstract.h" 36 | #include "Math3d.h" 37 | 38 | class Starfield : public FXAbstract 39 | { 40 | private: 41 | VectorFP* stars; 42 | 43 | const pp_int32 numStars; 44 | 45 | public: 46 | Starfield(pp_int32 w, pp_int32 h); 47 | virtual ~Starfield(); 48 | 49 | virtual void render(pp_uint8* buffer); 50 | 51 | virtual void update(pp_uint32 syncFrac); 52 | 53 | void setPixel(pp_int32 x, pp_int32 y, const PPColor& color, pp_uint8* buffer); 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/fx/TCBSpline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/TCBSpline.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef TCBSPLINE__H 24 | #define TCBSPLINE__H 25 | 26 | #include "Math3d.h" 27 | 28 | class TCBSpline 29 | { 30 | public: 31 | struct TKey 32 | { 33 | int ti; 34 | VectorFloat v; 35 | float t,c,b; 36 | }; 37 | 38 | private: 39 | TKey* keys; 40 | 41 | int numKeys; 42 | 43 | VectorFloat getLastPos(int i); 44 | VectorFloat getNextPos(int i); 45 | VectorFloat calcTi(int i); 46 | VectorFloat calcTo(int i); 47 | int findKey(int curTime,int startIndex, int endIndex); 48 | 49 | public: 50 | 51 | TCBSpline(int numKeys); 52 | ~TCBSpline(); 53 | 54 | void setKey(int index, VectorFloat& v, int time, float tension = 0, float continuity = 0, float bias = 0); 55 | void setKey(int index, TKey& key) { if (index < numKeys) keys[index] = key; } 56 | TKey* getKey(int index) { if (index < numKeys) return &keys[index]; else return &keys[0];} 57 | VectorFloat getPos(float curTime); 58 | 59 | }; 60 | 61 | #endif 62 | 63 | -------------------------------------------------------------------------------- /src/fx/TCBSplineTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/TCBSplineTest.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #include "FXInterface.h" 24 | 25 | class TCBSplineTest : public FXInterface 26 | { 27 | private: 28 | float* buffer; 29 | 30 | public: 31 | TCBSplineTest(int width, int height); 32 | ~TCBSplineTest(); 33 | 34 | void render(unsigned short* vscreen, unsigned int pitch); 35 | void update(float syncFrac); 36 | 37 | }; 38 | -------------------------------------------------------------------------------- /src/fx/Texture.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/Texture.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef TEXTURE__H 24 | #define TEXTURE__H 25 | 26 | class Texture 27 | { 28 | public: 29 | static void createSplineTexture(unsigned char* tex, 30 | int numBlocks = 10000, 31 | int blockSize = 16); 32 | 33 | static void createFlareTexture(unsigned char* tex, 34 | int r,int g,int b, 35 | float pw = 4.0f, 36 | unsigned int size = 256); 37 | 38 | static void createPlasmaTexture(unsigned char* tex, 39 | unsigned int size = 256, 40 | int smooth = 3, 41 | int r = 255, int g = 255, int b = 255); 42 | 43 | static void convert24to16(unsigned short* dstImage, unsigned char* srcImage, int size = 256*256, unsigned int shifter = 0); 44 | 45 | static void blur24(unsigned char* tex, unsigned int width, unsigned int height, unsigned int passes = 1); 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/fx/TexturedGrid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/TexturedGrid.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef TEXTUREDGRID__H 24 | #define TEXTUREDGRID__H 25 | 26 | #include "FXInterface.h" 27 | 28 | struct VectorFP; 29 | 30 | class TexturedGrid : public FXInterface 31 | { 32 | protected: 33 | int fov; 34 | int gridshift; 35 | int gridsize; // must be 1 << GRIDSHIFT 36 | 37 | VectorFP* grid; 38 | int gridWidth, gridHeight; 39 | 40 | unsigned short* texture; 41 | 42 | int sintab[1024]; 43 | 44 | public: 45 | TexturedGrid(int width, int height, int gridshift); 46 | virtual ~TexturedGrid(); 47 | 48 | void setTexture(unsigned short* texture) { this->texture = texture; } 49 | 50 | // from FXInterface 51 | virtual void render(unsigned short* vscreen, unsigned int pitch); 52 | virtual void update(float syncFrac); 53 | 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/fx/TexturedPlane.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/TexturedPlane.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef TEXTUREDPLANE__H 24 | #define TEXTUREDPLANE__H 25 | 26 | #include "TexturedGrid.h" 27 | #include "Math3d.h" 28 | 29 | class TexturedPlane : public TexturedGrid 30 | { 31 | private: 32 | MatrixFP rotMatrix; 33 | VectorFP cop; 34 | VectorFP light; 35 | 36 | public: 37 | TexturedPlane(int width, int height, int gridshift); 38 | 39 | void setMatrix(MatrixFP& matrix) { rotMatrix = matrix; } 40 | void setCOP(VectorFP& cop) { this->cop = cop; } 41 | void setLight(VectorFP& light) { this->light = light; } 42 | 43 | virtual void update(float syncFrac); 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/fx/TwisterFX.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/TwisterFX.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * TwisterFX.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 26.11.05. 28 | * 29 | */ 30 | 31 | #ifndef TWISTERFX__H 32 | #define TWISTERFX__H 33 | 34 | #include "BasicTypes.h" 35 | #include "FXAbstract.h" 36 | 37 | class FXInterface; 38 | 39 | class TwisterFX : public FXAbstract 40 | { 41 | private: 42 | FXInterface* fx; 43 | pp_uint16* vscreen; 44 | 45 | pp_uint32 realw, realh; 46 | 47 | public: 48 | TwisterFX(pp_int32 w, pp_int32 h); 49 | ~TwisterFX(); 50 | 51 | virtual void update(pp_uint32 syncFrac); 52 | 53 | virtual void render(pp_uint8* buffer); 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/fx/fpmath.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fx/fpmath.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef FPMATH_H 24 | #define FPMATH_H 25 | 26 | #include "BasicTypes.h" 27 | 28 | #define fpceil(x) ((x+65535)>>16) 29 | 30 | // 16.16 fixed point multiply 31 | pp_int32 fpmul(pp_int32 a, pp_int32 b); 32 | 33 | // 16.16 fixed point division 34 | pp_int32 fpdiv(pp_int32 n, pp_int32 d); 35 | 36 | // 16.16 fixed point squareroot 37 | pp_int32 fpsqrt(pp_int32 value); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/midi/MidiTools.h: -------------------------------------------------------------------------------- 1 | #ifndef __MIDITOOLS_H__ 2 | #define __MIDITOOLS_H__ 3 | 4 | static inline int vol126to255(int vol, int amplify) 5 | { 6 | int finalVol = (((vol <= 126 ? (vol*133300)>>16 : 255)) * amplify) / 100; 7 | 8 | return finalVol <= 255 ? finalVol : 255; 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/midi/haiku/MidiSetup.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | #ifndef __HAIKU_MIDISETUP_H__ 21 | #define __HAIKU_MIDISETUP_H__ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | class MilkyMidiConsumer; 28 | class Tracker; 29 | 30 | 31 | class MidiSetup 32 | { 33 | public: 34 | static void StartMidi(Tracker* tracker, sem_id eventLock); 35 | static void StopMidi(); 36 | 37 | static void ConnectProducer(int32 id); 38 | static void ConnectProducer(BString name); 39 | static void SetRecordVelocity(bool record); 40 | static void SetVelocityAmplify(int32 amplification); 41 | 42 | private: 43 | static MilkyMidiConsumer* sMilkyMidiConsumer; 44 | }; 45 | 46 | #endif // __HAIKU_MIDISETUP_H__ 47 | -------------------------------------------------------------------------------- /src/milkyplay/LoaderAMS.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/src/milkyplay/LoaderAMS.cpp -------------------------------------------------------------------------------- /src/ppui/CheckBoxLabel.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/src/ppui/CheckBoxLabel.cpp -------------------------------------------------------------------------------- /src/ppui/CheckBoxLabel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/src/ppui/CheckBoxLabel.h -------------------------------------------------------------------------------- /src/ppui/DictionaryKey.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/DictionaryKey.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * DictionaryKey.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on Mon Mar 14 2005. 28 | * 29 | */ 30 | 31 | #ifndef DICTIONARYKEY__H 32 | #define DICTIONARYKEY__H 33 | 34 | #include "BasicTypes.h" 35 | 36 | class PPDictionaryKey 37 | { 38 | private: 39 | PPString key; 40 | PPString value; 41 | 42 | public: 43 | PPDictionaryKey(const PPString& newKey, const PPString& newValue); 44 | 45 | PPDictionaryKey(const PPString& newKey, const pp_uint32 value); 46 | 47 | // copy c'tor 48 | PPDictionaryKey(const PPDictionaryKey& source); 49 | 50 | void store(const PPString& newValue); 51 | 52 | void store(const pp_uint32 value); 53 | 54 | const PPString& getStringValue() const { return value; } 55 | pp_uint32 getIntValue() const; 56 | bool getBoolValue() const { return getIntValue() != 0; } 57 | 58 | const PPString& getKey() const { return key; } 59 | 60 | }; 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /src/ppui/Event.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/Event.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPEvent.cpp 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 23.05.05. 28 | * 29 | */ 30 | 31 | #include "Event.h" 32 | 33 | pp_uint32 keyModifier = 0; 34 | pp_uint32 forceKeyModifier = 0; 35 | 36 | void QueryKeyModifiers(); 37 | 38 | void setKeyModifier(KeyModifiers eModifier) 39 | { 40 | keyModifier |= eModifier; 41 | } 42 | 43 | void clearKeyModifier(KeyModifiers eModifier) 44 | { 45 | keyModifier &= ~eModifier; 46 | } 47 | 48 | void setForceKeyModifier(KeyModifiers eModifier) 49 | { 50 | forceKeyModifier |= eModifier; 51 | } 52 | 53 | void clearForceKeyModifier(KeyModifiers eModifier) 54 | { 55 | forceKeyModifier &= ~eModifier; 56 | } 57 | 58 | pp_uint32 getKeyModifier() 59 | { 60 | QueryKeyModifiers(); 61 | return keyModifier | forceKeyModifier; 62 | } 63 | -------------------------------------------------------------------------------- /src/ppui/KeyboardBindingHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/KeyboardBindingHandler.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * KeyboardBindingHandler.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 29.04.05. 28 | * 29 | */ 30 | 31 | #ifndef KEYBOARDBINDINGHANDLER__H 32 | #define KEYBOARDBINDINGHANDLER__H 33 | 34 | #include "BasicTypes.h" 35 | #include "Event.h" 36 | 37 | class KeyboardBindingHandler 38 | { 39 | private: 40 | pp_uint32 keyModifier; 41 | 42 | public: 43 | KeyboardBindingHandler() : 44 | keyModifier(0) 45 | { 46 | } 47 | 48 | protected: 49 | bool processKeyEvents(PPEvent* event); 50 | 51 | void resetKeyModifier() { keyModifier = 0; } 52 | pp_uint32 getKeyModifier() const { return keyModifier; } 53 | }; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/ppui/Object.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/Object.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef OBJECT__H 24 | #define OBJECT__H 25 | 26 | class PPObject 27 | { 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/ppui/PPUI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/PPUI.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | ///////////////////////////////////////////////////////////////// 24 | // 25 | // PPUI main include 26 | // 27 | ///////////////////////////////////////////////////////////////// 28 | #ifndef PPUI__H 29 | #define PPUI__H 30 | 31 | #include "Object.h" 32 | #include "BasicTypes.h" 33 | #include "Tools.h" 34 | #include "Event.h" 35 | #include "Screen.h" 36 | #include "GraphicsAbstract.h" 37 | #include "Font.h" 38 | #include "Control.h" 39 | #include "Button.h" 40 | #include "ScrollBar.h" 41 | #include "Slider.h" 42 | #include "ListBox.h" 43 | #include "CheckBox.h" 44 | #include "Container.h" 45 | #include "MessageBoxContainer.h" 46 | #include "RadioGroup.h" 47 | #include "StaticText.h" 48 | #include "ContextMenu.h" 49 | #include "Seperator.h" 50 | #include "PPUIConfig.h" 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/ppui/Seperator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/Seperator.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * Seperator.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 16.03.05. 28 | * 29 | */ 30 | #ifndef SEPERATOR__H 31 | #define SEPERATOR__H 32 | 33 | #include "BasicTypes.h" 34 | #include "Control.h" 35 | 36 | class PPSeperator : public PPControl 37 | { 38 | private: 39 | bool horizontal; 40 | 41 | const PPColor* color; 42 | 43 | public: 44 | PPSeperator(pp_int32 id, PPScreen* parentScreen, 45 | const PPPoint& location, pp_uint32 size, 46 | const PPColor& theColor, bool horizontal = true); 47 | 48 | void setColor(const PPColor& color) { this->color = &color; } 49 | 50 | virtual void paint(PPGraphicsAbstract* graphics); 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/ppui/Singleton.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/Singleton.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * Singleton.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 10.04.08. 28 | * 29 | */ 30 | 31 | #ifndef __SINGLETON_H__ 32 | #define __SINGLETON_H__ 33 | 34 | template 35 | class PPSingleton 36 | { 37 | private: 38 | static type* instance; 39 | 40 | public: 41 | static type* getInstance() 42 | { 43 | if (instance == NULL) 44 | instance = new type(); 45 | 46 | return instance; 47 | } 48 | }; 49 | 50 | template 51 | type* PPSingleton::instance = NULL; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/ppui/TransparentContainer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/TransparentContainer.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #include "GraphicsAbstract.h" 24 | #include "TransparentContainer.h" 25 | #include "BasicTypes.h" 26 | 27 | PPTransparentContainer::PPTransparentContainer(pp_int32 id, PPScreen* parentScreen, EventListenerInterface* eventListener, 28 | const PPPoint& location, const PPSize& size) : 29 | PPContainer(id, parentScreen, eventListener, location, size) 30 | { 31 | } 32 | 33 | PPTransparentContainer::~PPTransparentContainer() 34 | { 35 | } 36 | 37 | void PPTransparentContainer::paint(PPGraphicsAbstract* g) 38 | { 39 | if (!isVisible()) 40 | return; 41 | 42 | paintControls(g); 43 | } 44 | -------------------------------------------------------------------------------- /src/ppui/TransparentContainer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/TransparentContainer.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | ///////////////////////////////////////////////////////////////// 24 | // 25 | // PPContainer control that can be used to group controls 26 | // 27 | ///////////////////////////////////////////////////////////////// 28 | #ifndef TRANSPARENTCONTAINER__H 29 | #define TRANSPARENTCONTAINER__H 30 | 31 | #include "BasicTypes.h" 32 | #include "Container.h" 33 | 34 | class PPButton; 35 | 36 | class PPTransparentContainer : public PPContainer 37 | { 38 | public: 39 | PPTransparentContainer(pp_int32 id, PPScreen* parentScreen, EventListenerInterface* eventListener, 40 | const PPPoint& location, const PPSize& size); 41 | 42 | virtual ~PPTransparentContainer(); 43 | 44 | virtual void paint(PPGraphicsAbstract* graphics); 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/ppui/fastfill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/fastfill.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * fastfill.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 28.12.07. 28 | * 29 | */ 30 | 31 | static inline void fill_dword(pp_uint32* buff, pp_uint32 dw, pp_uint32 len) 32 | { 33 | while (len--) 34 | *(buff++) = dw; 35 | } 36 | 37 | static inline void fill_dword_vertical(pp_uint32* buff, pp_uint32 dw, pp_uint32 len, pp_uint32 pitch) 38 | { 39 | pitch >>= 2; 40 | do 41 | { 42 | *buff = dw; 43 | buff += pitch; 44 | } while (--len); 45 | } 46 | -------------------------------------------------------------------------------- /src/ppui/haiku/KeyCodeMap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | #ifndef __HAIKU_KEYCODEMAP_H__ 21 | #define __HAIKU_KEYCODEMAP_H__ 22 | 23 | #include "Event.h" 24 | 25 | #include 26 | #include 27 | 28 | 29 | struct ModifierData { 30 | int32 modifier; 31 | int32 modifierLeft; 32 | int32 modifierRight; 33 | KeyModifiers keyModifiers; 34 | uint32 vk; 35 | uint32 vkLeft; 36 | uint32 vkRight; 37 | }; 38 | 39 | extern uint16 gKeyCodeToSC[]; 40 | 41 | inline uint16 42 | KeyCodeToSC(int32 keyCode) 43 | { 44 | return gKeyCodeToSC[keyCode]; 45 | } 46 | 47 | uint16 KeyCodeToVK(int32 keyCode, char character); 48 | 49 | 50 | extern bool gSwapCommandControl; 51 | 52 | extern ModifierData gModifierDataShift; 53 | extern ModifierData gModifierDataControl; 54 | extern ModifierData gModifierDataCommand; 55 | 56 | #endif // __HAIKU_KEYCODEMAP_H__ 57 | -------------------------------------------------------------------------------- /src/ppui/osinterface/PPMessageBox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/PPMessageBox.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPMessageBox.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 27.09.05. 28 | * 29 | */ 30 | 31 | #ifndef PPMESSAGEBOX__H 32 | #define PPMESSAGEBOX__H 33 | 34 | #include "PPModalDialog.h" 35 | 36 | class PPMessageBox : public PPModalDialog 37 | { 38 | private: 39 | PPSystemString caption, content; 40 | 41 | public: 42 | PPMessageBox(PPScreen* screen, const PPSystemString& strCaption, const PPSystemString& strContent) : 43 | PPModalDialog(screen), 44 | caption(strCaption), content(strContent) 45 | { 46 | } 47 | 48 | virtual ReturnCodes runModal(); 49 | }; 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /src/ppui/osinterface/PPModalDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/PPModalDialog.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPModalDialog.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 28.03.05. 28 | * 29 | */ 30 | 31 | #ifndef PPMODALDIALOG__H 32 | #define PPMODALDIALOG__H 33 | 34 | #include "BasicTypes.h" 35 | 36 | class PPScreen; 37 | 38 | class PPModalDialog 39 | { 40 | public: 41 | enum ReturnCodes 42 | { 43 | ReturnCodeOK, 44 | ReturnCodeCANCEL, 45 | ReturnCodeNO 46 | }; 47 | 48 | protected: 49 | PPScreen* screen; 50 | 51 | public: 52 | PPModalDialog(PPScreen* theScreen) : 53 | screen(theScreen) 54 | { 55 | } 56 | 57 | virtual ~PPModalDialog() 58 | { 59 | } 60 | 61 | virtual ReturnCodes runModal() = 0; 62 | }; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /src/ppui/osinterface/PPOpenPanel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/PPOpenPanel.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef __PPOPENPANEL_H__ 24 | #define __PPOPENPANEL_H__ 25 | 26 | #include "PPModalDialog.h" 27 | #include "SimpleVector.h" 28 | 29 | class PPOpenPanel : public PPModalDialog 30 | { 31 | protected: 32 | PPSimpleVector items; 33 | 34 | PPSystemString fileName; 35 | 36 | char* caption; 37 | 38 | public: 39 | PPOpenPanel(PPScreen* screen, const char* caption); 40 | virtual ~PPOpenPanel(); 41 | 42 | // must contain pairs of extensions / description 43 | // terminated by TWO NULL pointers 44 | virtual void addExtensions(const char* const extensions[]) 45 | { 46 | for (pp_uint32 i = 0; extensions[i] != NULL; i+=2) 47 | addExtension(extensions[i], extensions[i+1]); 48 | } 49 | 50 | virtual void addExtension(const PPString& ext, const PPString& desc); 51 | 52 | virtual const PPSystemString& getFileName() { return fileName; } 53 | 54 | virtual ReturnCodes runModal(); 55 | 56 | }; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /src/ppui/osinterface/PPPathFactory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/PPPathFactory.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPPathFactory.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 27.11.06. 28 | * 29 | */ 30 | 31 | #ifndef __PPPATHFACTORY_POSIX_H__ 32 | #define __PPPATHFACTORY_POSIX_H__ 33 | 34 | #include "PPPath.h" 35 | 36 | class PPPathFactory 37 | { 38 | private: 39 | PPPathFactory() { } 40 | 41 | public: 42 | static PPPathEntry* createPathEntry(); 43 | 44 | static PPPath* createPath(); 45 | static PPPath* createPathFromString(const PPSystemString& path); 46 | }; 47 | 48 | #endif // __PPPATH_POSIX_H__ 49 | -------------------------------------------------------------------------------- /src/ppui/osinterface/PPQuitSaveAlert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/PPQuitSaveAlert.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPQuitSaveAlert.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 28.03.05. 28 | * 29 | */ 30 | 31 | #ifndef PPQUITSAVEALERT__H 32 | #define PPQUITSAVEALERT__H 33 | 34 | #include "PPModalDialog.h" 35 | 36 | class PPQuitSaveAlert : public PPModalDialog 37 | { 38 | public: 39 | PPQuitSaveAlert(PPScreen* screen) : 40 | PPModalDialog(screen) 41 | { 42 | } 43 | 44 | virtual ReturnCodes runModal(); 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/ppui/osinterface/PPSavePanel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/PPSavePanel.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPSavePanel.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on Sat Mar 05 2005. 28 | * 29 | */ 30 | 31 | #ifndef PPSAVEPANEL__H 32 | #define PPSAVEPANEL__H 33 | 34 | #include "PPOpenPanel.h" 35 | 36 | class PPSavePanel : public PPOpenPanel 37 | { 38 | protected: 39 | PPSystemString defaultFileName; 40 | 41 | public: 42 | PPSavePanel(PPScreen* screen, const char* caption, const PPSystemString& defaultFileName) : 43 | PPOpenPanel(screen, caption) 44 | { 45 | this->defaultFileName = defaultFileName; 46 | } 47 | 48 | virtual ~PPSavePanel() {} 49 | 50 | virtual ReturnCodes runModal(); 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/ppui/osinterface/PPSystem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/PPSystem.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #if defined(__PPUI_WINDOWS__) 24 | #include "PPSystem_WIN32.h" 25 | #else 26 | #include "PPSystem_POSIX.h" 27 | #endif 28 | -------------------------------------------------------------------------------- /src/ppui/osinterface/carbon/PPMessageBox_CARBON.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/carbon/PPMessageBox_CARBON.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPMessageBox_CARBON.cpp 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 27.09.05. 28 | * 29 | */ 30 | 31 | #include 32 | #include "PPMessageBox.h" 33 | 34 | PPMessageBox::ReturnCodes PPMessageBox::runModal() 35 | { 36 | ReturnCodes res = ReturnCodeOK; 37 | 38 | OSStatus err = noErr; 39 | 40 | SInt16 out; 41 | 42 | Str255 caption, content; 43 | 44 | CopyCStringToPascal(this->caption, caption); 45 | CopyCStringToPascal(this->content, content); 46 | 47 | err = StandardAlert(kAlertNoteAlert, 48 | caption, 49 | content, 50 | NULL, 51 | &out); 52 | return res; 53 | } 54 | -------------------------------------------------------------------------------- /src/ppui/osinterface/cocoa/PPMessageBox_COCOA.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/cocoa/PPMessageBox_COCOA.mm 3 | * 4 | * Copyright 2014 Dale Whinham 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #include 24 | #include "PPMessageBox.h" 25 | 26 | PPMessageBox::ReturnCodes PPMessageBox::runModal() 27 | { 28 | NSAlert *messageBox = [[NSAlert alloc] init]; 29 | 30 | // Set message strings and style 31 | [messageBox setMessageText:[NSString stringWithUTF8String:caption]]; 32 | [messageBox setInformativeText:[NSString stringWithUTF8String:content]]; 33 | [messageBox setAlertStyle:NSCriticalAlertStyle]; 34 | 35 | // Open the dialog 36 | [messageBox runModal]; 37 | 38 | return ReturnCodeOK; 39 | } 40 | -------------------------------------------------------------------------------- /src/ppui/osinterface/haiku/PPMessageBox_Haiku.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #include "PPMessageBox.h" 22 | 23 | #include 24 | 25 | PPMessageBox::ReturnCodes PPMessageBox::runModal() 26 | { 27 | BAlert* alert = new BAlert(caption, content, "OK"); 28 | alert->Go(); 29 | // (Alert deletes itself) 30 | 31 | return ReturnCodeOK; 32 | } 33 | -------------------------------------------------------------------------------- /src/ppui/osinterface/haiku/PPOpenPanel_Haiku.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #include "PPOpenPanel.h" 22 | #include "SynchronousFilePanel.h" 23 | 24 | 25 | PPOpenPanel::PPOpenPanel(PPScreen* screen, const char* caption) 26 | : 27 | PPModalDialog(screen) 28 | { 29 | this->caption = (char*)caption; 30 | } 31 | 32 | 33 | PPOpenPanel::~PPOpenPanel() 34 | { 35 | } 36 | 37 | 38 | void PPOpenPanel::addExtension(const PPString& ext, const PPString& desc) 39 | { 40 | Descriptor* d = new Descriptor(ext, desc); 41 | 42 | items.add(d); 43 | } 44 | 45 | 46 | PPOpenPanel::ReturnCodes PPOpenPanel::runModal() 47 | { 48 | SynchronousFilePanel* openPanel = new SynchronousFilePanel(B_OPEN_PANEL, 49 | caption); 50 | 51 | BString path = openPanel->Go(); 52 | 53 | // Quit() destroys the object 54 | openPanel->Quit(); 55 | 56 | if (path != "") { 57 | fileName = path.String(); 58 | return ReturnCodeOK; 59 | } else 60 | return ReturnCodeCANCEL; 61 | } 62 | -------------------------------------------------------------------------------- /src/ppui/osinterface/haiku/PPQuitSaveAlert_Haiku.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #include "PPQuitSaveAlert.h" 22 | 23 | #include 24 | 25 | 26 | PPQuitSaveAlert::ReturnCodes PPQuitSaveAlert::runModal() 27 | { 28 | BAlert* alert = new BAlert("Save changes?", 29 | "Do you want to save the changes you made to your documents?", 30 | "Cancel", "Don't save", "Save", 31 | B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT); 32 | alert->SetShortcut(0, B_ESCAPE); 33 | 34 | int32 userChoice = alert->Go(); 35 | // (Alert deletes itself) 36 | 37 | switch (userChoice) { 38 | case 0: return ReturnCodeCANCEL; 39 | case 1: return ReturnCodeNO; 40 | case 2: return ReturnCodeOK; 41 | 42 | default: 43 | // This shouldn't be possible 44 | return ReturnCodeCANCEL; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/ppui/osinterface/haiku/PPSavePanel_Haiku.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #include "PPSavePanel.h" 22 | #include "SynchronousFilePanel.h" 23 | 24 | 25 | PPSavePanel::ReturnCodes PPSavePanel::runModal() 26 | { 27 | SynchronousFilePanel* savePanel = new SynchronousFilePanel(B_SAVE_PANEL, 28 | caption); 29 | 30 | savePanel->SetSaveText(defaultFileName); 31 | 32 | BString path = savePanel->Go(); 33 | 34 | // Quit() destroys the object, i.e. lack of delete is not a memory leak 35 | savePanel->Quit(); 36 | 37 | if (path != "") { 38 | fileName = path.String(); 39 | return ReturnCodeOK; 40 | } else 41 | return ReturnCodeCANCEL; 42 | } 43 | -------------------------------------------------------------------------------- /src/ppui/osinterface/haiku/SynchronousFilePanel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #ifndef __HAIKU_SYNCHRONOUSFILEPANEL_H__ 22 | #define __HAIKU_SYNCHRONOUSFILEPANEL_H__ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | 29 | class SynchronousFilePanel : public BLooper 30 | { 31 | public: 32 | SynchronousFilePanel(file_panel_mode mode, 33 | char* caption); 34 | ~SynchronousFilePanel(); 35 | 36 | virtual void MessageReceived(BMessage* message); 37 | virtual void Quit(); 38 | 39 | void SetSaveText(const char* saveText); 40 | BString Go(); 41 | 42 | private: 43 | static BFilePanel* fOpenPanel; 44 | static BFilePanel* fSavePanel; 45 | 46 | BFilePanel* fActivePanel; 47 | 48 | BString fSelectedPath; 49 | 50 | sem_id fPanelClosedSemaphore; 51 | }; 52 | 53 | #endif // __HAIKU_SYNCHRONOUSFILEPANEL_H__ 54 | -------------------------------------------------------------------------------- /src/ppui/osinterface/haiku/WaitView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #ifndef __HAIKU_WAITVIEW_H__ 22 | #define __HAIKU_WAITVIEW_H__ 23 | 24 | #include 25 | #include 26 | 27 | enum { 28 | kNumPolygons = 6 29 | }; 30 | 31 | class WaitView : public BView 32 | { 33 | public: 34 | WaitView(BRect frame); 35 | virtual ~WaitView(); 36 | 37 | virtual void Draw(BRect updateRect); 38 | virtual void Pulse(); 39 | 40 | private: 41 | BPolygon fPolygon; 42 | int32 fPosition[kNumPolygons]; 43 | }; 44 | 45 | #endif // __HAIKU_WAITVIEW_H__ 46 | -------------------------------------------------------------------------------- /src/ppui/osinterface/haiku/WaitWindow.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #include "WaitWindow.h" 22 | #include "WaitView.h" 23 | 24 | 25 | WaitWindow::WaitWindow(int centerX, int centerY) 26 | : 27 | BWindow(BRect(centerX - 100, centerY - 15, centerX + 100, centerY + 15), 28 | "Working...", B_MODAL_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE) 29 | { 30 | fWaitView = new WaitView(Bounds()); 31 | AddChild(fWaitView); 32 | SetPulseRate(20000); 33 | } 34 | 35 | 36 | WaitWindow::~WaitWindow() 37 | { 38 | } 39 | -------------------------------------------------------------------------------- /src/ppui/osinterface/haiku/WaitWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #ifndef __HAIKU_WAITWINDOW_H__ 22 | #define __HAIKU_WAITWINDOW_H__ 23 | 24 | #include 25 | 26 | class WaitView; 27 | 28 | 29 | class WaitWindow : public BWindow 30 | { 31 | public: 32 | WaitWindow(int centerX, int centerY); 33 | virtual ~WaitWindow(); 34 | private: 35 | WaitView* fWaitView; 36 | }; 37 | 38 | #endif // __HAIKU_WAITWINDOW_H__ 39 | -------------------------------------------------------------------------------- /src/ppui/osinterface/posix/PPMutex.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/posix/PPMutex.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPMutex.cpp 25 | * PPUI SDL 26 | * 27 | * Created by Peter Barth on 18.11.05. 28 | * 29 | */ 30 | 31 | #include "PPMutex.h" 32 | #include 33 | 34 | PPMutex::PPMutex() : 35 | mutexpth_p(NULL) 36 | { 37 | mutexpth_p = new pthread_mutex_t; 38 | if (pthread_mutex_init(mutexpth_p, NULL)) 39 | { 40 | delete mutexpth_p; 41 | mutexpth_p = NULL; 42 | } 43 | } 44 | 45 | PPMutex::~PPMutex() 46 | { 47 | delete mutexpth_p; 48 | } 49 | 50 | void PPMutex::lock() 51 | { 52 | if (mutexpth_p) 53 | { 54 | pthread_mutex_lock(mutexpth_p); 55 | } 56 | } 57 | 58 | bool PPMutex::tryLock() 59 | { 60 | if (mutexpth_p) 61 | { 62 | if (pthread_mutex_trylock(mutexpth_p) == EBUSY) 63 | return false; 64 | } 65 | 66 | return true; 67 | } 68 | 69 | void PPMutex::unlock() 70 | { 71 | if (mutexpth_p) 72 | { 73 | pthread_mutex_unlock(mutexpth_p); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/ppui/osinterface/posix/PPMutex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/posix/PPMutex.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPMutex.h 25 | * PPUI SDL 26 | * 27 | * Created by Peter Barth on 18.11.05. 28 | * 29 | */ 30 | 31 | #ifndef PPMUTEX__H 32 | #define PPMUTEX__H 33 | 34 | #include 35 | 36 | class PPMutex 37 | { 38 | private: 39 | pthread_mutex_t* mutexpth_p; 40 | 41 | public: 42 | PPMutex(); 43 | ~PPMutex(); 44 | 45 | void lock(); 46 | bool tryLock(); 47 | void unlock(); 48 | }; 49 | 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /src/ppui/osinterface/posix/PPSystem_POSIX.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/posix/PPSystem_POSIX.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPSystem_POSIX.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on Thu Mar 10 2005. 28 | * 29 | */ 30 | 31 | #ifndef SYSTEM_POSIX_H 32 | #define SYSTEM_POSIX_H 33 | 34 | #include "../../../milkyplay/MilkyPlayCommon.h" 35 | 36 | class System 37 | { 38 | private: 39 | static SYSCHAR buffer[]; 40 | 41 | public: 42 | static const SYSCHAR* getTempFileName(); 43 | 44 | static const SYSCHAR* getConfigFileName(); 45 | 46 | static void msleep(int msecs); 47 | }; 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /src/ppui/osinterface/sdl/PPMessageBox_SDL.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/sdl/PPMessageBox_SDL.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPMessageBox_SDL.cpp 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 27.09.05. 28 | * 29 | */ 30 | 31 | #include "PPMessageBox.h" 32 | #include 33 | #include "SDL_ModalLoop.h" 34 | #include "DialogFileSelector.h" 35 | 36 | PPMessageBox::ReturnCodes PPMessageBox::runModal() 37 | { 38 | // Convert texts 39 | char* captionASCIIZ = this->caption.toASCIIZ(); 40 | char* contentASCIIZ = this->content.toASCIIZ(); 41 | PPString caption(captionASCIIZ); 42 | PPString content(contentASCIIZ); 43 | delete[] captionASCIIZ; 44 | delete[] contentASCIIZ; 45 | 46 | // Create a message box (the message box will invoke the responder) 47 | PPDialogBase* dialog = new PPDialogBase(screen, NULL, PP_DEFAULT_ID, caption, content); 48 | 49 | ReturnCodes result = SDL_runModalLoop(screen, dialog); 50 | 51 | delete dialog; 52 | 53 | return result; 54 | } 55 | -------------------------------------------------------------------------------- /src/ppui/osinterface/sdl/PPMutex.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/sdl/PPMutex.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPMutex.cpp 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 18.11.05. 28 | * 29 | */ 30 | 31 | #include "PPMutex.h" 32 | 33 | PPMutex::PPMutex() 34 | { 35 | mutex = SDL_CreateMutex(); 36 | } 37 | 38 | PPMutex::~PPMutex() 39 | { 40 | SDL_DestroyMutex(mutex); 41 | } 42 | 43 | void PPMutex::lock() 44 | { 45 | SDL_LockMutex(mutex); 46 | } 47 | 48 | void PPMutex::unlock() 49 | { 50 | SDL_UnlockMutex(mutex); 51 | } 52 | -------------------------------------------------------------------------------- /src/ppui/osinterface/sdl/PPMutex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/sdl/PPMutex.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPMutex.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 18.11.05. 28 | * 29 | */ 30 | 31 | #ifndef PPMUTEX__H 32 | #define PPMUTEX__H 33 | 34 | #include 35 | 36 | class PPMutex 37 | { 38 | private: 39 | SDL_mutex* mutex; 40 | 41 | public: 42 | PPMutex(); 43 | ~PPMutex(); 44 | 45 | void lock(); 46 | void unlock(); 47 | }; 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /src/ppui/osinterface/sdl/PPQuitSaveAlert_SDL.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/sdl/PPQuitSaveAlert_SDL.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPQuitSaveAlert_SDL.cpp 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 28.03.05. 28 | * 29 | */ 30 | 31 | #include "PPQuitSaveAlert.h" 32 | #include 33 | #include "SDL_ModalLoop.h" 34 | #include "DialogFileSelector.h" 35 | 36 | PPQuitSaveAlert::ReturnCodes PPQuitSaveAlert::runModal() 37 | { 38 | // Create a message box (the message box will invoke the responder) 39 | PPDialogBase* dialog = new PPDialogBase(screen, NULL, PP_DEFAULT_ID, "Save current changes?", PPDialogBase::MessageBox_YESNOCANCEL); 40 | 41 | ReturnCodes result = SDL_runModalLoop(screen, dialog); 42 | 43 | delete dialog; 44 | 45 | return result; 46 | } 47 | -------------------------------------------------------------------------------- /src/ppui/osinterface/win32/PPMessageBox_WIN32.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/win32/PPMessageBox_WIN32.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #include 24 | #include "PPMessageBox.h" 25 | 26 | extern HWND hWnd; 27 | 28 | PPMessageBox::ReturnCodes PPMessageBox::runModal() 29 | { 30 | ReturnCodes res = ReturnCodeOK; 31 | 32 | ::MessageBox(hWnd, content, caption, MB_OK); 33 | 34 | return res; 35 | } 36 | -------------------------------------------------------------------------------- /src/ppui/osinterface/win32/PPMutex.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/win32/PPMutex.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPMutex.cpp 25 | * PPUI SDL 26 | * 27 | * Created by Peter Barth on 18.11.05. 28 | * 29 | */ 30 | 31 | #include "PPMutex.h" 32 | 33 | PPMutex::PPMutex() 34 | { 35 | InitializeCriticalSection( &m_CS ); 36 | } 37 | 38 | PPMutex::~PPMutex() 39 | { 40 | DeleteCriticalSection( &m_CS ); 41 | } 42 | 43 | void PPMutex::lock() 44 | { 45 | EnterCriticalSection( &m_CS ); 46 | } 47 | 48 | void PPMutex::unlock() 49 | { 50 | LeaveCriticalSection( &m_CS ); 51 | } 52 | -------------------------------------------------------------------------------- /src/ppui/osinterface/win32/PPMutex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/win32/PPMutex.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPMutex.h 25 | * PPUI SDL 26 | * 27 | * Created by Peter Barth on 18.11.05. 28 | * 29 | */ 30 | 31 | #ifndef PPMUTEX__H 32 | #define PPMUTEX__H 33 | 34 | #include 35 | 36 | class PPMutex 37 | { 38 | private: 39 | CRITICAL_SECTION m_CS; 40 | 41 | public: 42 | PPMutex(); 43 | ~PPMutex(); 44 | 45 | void lock(); 46 | void unlock(); 47 | }; 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /src/ppui/osinterface/win32/PPQuitSaveAlert_WIN32.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/win32/PPQuitSaveAlert_WIN32.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PPQuitSaveAlert.cpp 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 28.03.05. 28 | * 29 | */ 30 | 31 | #include 32 | #include 33 | #include "PPQuitSaveAlert.h" 34 | 35 | extern HWND hWnd; 36 | 37 | PPQuitSaveAlert::ReturnCodes PPQuitSaveAlert::runModal() 38 | { 39 | ReturnCodes res = ReturnCodeCANCEL; 40 | 41 | int nID = MessageBox(hWnd, 42 | _T("Do you want to save the changes you made to your documents?"), 43 | _T("Save changes"), MB_YESNOCANCEL | MB_ICONQUESTION); 44 | 45 | if (nID == IDYES) 46 | { 47 | res = ReturnCodeOK; 48 | } 49 | else if (nID == IDNO) 50 | { 51 | res = ReturnCodeNO; 52 | } 53 | else if (nID == IDCANCEL) 54 | { 55 | res = ReturnCodeCANCEL; 56 | } 57 | 58 | return res; 59 | } 60 | -------------------------------------------------------------------------------- /src/ppui/osinterface/win32/PPSystem_WIN32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ppui/osinterface/win32/PPSystem_WIN32.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * System_WIN32.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on Thu Mar 10 2005. 28 | * 29 | */ 30 | 31 | #ifndef SYSTEM_WIN32_H 32 | #define SYSTEM_WIN32_H 33 | 34 | #include "XModule.h" 35 | 36 | class System 37 | { 38 | private: 39 | static SYSCHAR buffer[]; 40 | 41 | public: 42 | static const SYSCHAR* getTempFileName(); 43 | 44 | static const SYSCHAR* getConfigFileName(SYSCHAR* fileName = NULL); 45 | 46 | static void msleep(int msecs); 47 | }; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/tools/TINY.6x5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/src/tools/TINY.6x5 -------------------------------------------------------------------------------- /src/tools/TINY_UPPERCASE.6x5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/src/tools/TINY_UPPERCASE.6x5 -------------------------------------------------------------------------------- /src/tools/compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | g++ test.cpp -------------------------------------------------------------------------------- /src/tools/generateAddons.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -x 3 | { 4 | echo "// generated by src/tools/generateAddons.sh" 5 | echo "// src/tools/addons.txt --> src/tracker/AddonsDefault.h" 6 | xxd -i src/tools/addons.txt 7 | } > src/tracker/Addons.h 8 | -------------------------------------------------------------------------------- /src/tools/generateHelp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -x 3 | printf "\n\n" > milkytracker.help 4 | lynx -dump ./docs/MilkyTracker.html | grep -v "file:" | awk '{ print " "$0"\n" }' | sed 's/Example:/\n Example:\n\n\n /g;s/Explanation:/\n\n Explanation:/g;s/·/\./g' >> milkytracker.help 5 | { 6 | echo "// generated by src/tools/generateHelp.sh" 7 | xxd -i milkytracker.help 8 | } > src/tracker/DialogHelpText.h 9 | -------------------------------------------------------------------------------- /src/tools/milkycli/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(milkycli 2 | milkycli.cpp 3 | ) 4 | 5 | target_include_directories(milkycli 6 | PRIVATE 7 | ${PROJECT_SOURCE_DIR}/src/tracker/wav 8 | ) 9 | 10 | target_link_libraries(milkycli 11 | PRIVATE 12 | commandlib 13 | ) 14 | 15 | install(TARGETS milkycli 16 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 17 | ) -------------------------------------------------------------------------------- /src/tools/milkycli/milkycli.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, const char* argv[]) 5 | { 6 | static CLIParser parser(argc, argv); 7 | auto exporter = WAVExporter::createFromParser(parser); 8 | 9 | if (exporter->hasParseError()) { 10 | parser.printUsage(); 11 | fprintf(stderr, "Error: %s\n", exporter->getErrorMessage()); 12 | return 1; 13 | } 14 | 15 | if (exporter->performExport() != 0) { 16 | fprintf(stderr, "Error: %s\n", exporter->getErrorMessage()); 17 | return 1; 18 | } 19 | 20 | return 0; 21 | } -------------------------------------------------------------------------------- /src/tracker/ASCIISTEP16.h: -------------------------------------------------------------------------------- 1 | static pp_int32 ASCIISTEP16_channel(pp_uint8 ascii) 2 | { 3 | pp_int32 number = -1; 4 | switch (ascii) 5 | { 6 | // ASCIISTEP16 standard (https://gist.github.com/coderofsalvation/8d760b191f4bb5465c8772d5618e5c4b) 7 | case '1': number = 0; break; 8 | case '2': number = 1; break; 9 | case '3': number = 2; break; 10 | case '4': number = 3; break; 11 | case '5': number = 4; break; 12 | case '6': number = 5; break; 13 | case '7': number = 6; break; 14 | case '8': number = 7; break; 15 | case '9': number = 8; break; 16 | case '0': number = 9; break; 17 | case '-': number = 10; break; 18 | case '=': number = 11; break; 19 | } 20 | return number; 21 | } 22 | 23 | static pp_int32 ASCIISTEP16(pp_uint8 ascii,pp_uint16 bar) 24 | { 25 | pp_int32 number = -1; 26 | switch (ascii) 27 | { 28 | // ASCIISTEP16 standard (https://gist.github.com/coderofsalvation/8d760b191f4bb5465c8772d5618e5c4b) 29 | case 'Q': number = 0; break; 30 | case 'W': number = 1; break; 31 | case 'E': number = 2; break; 32 | case 'R': number = 3; break; 33 | case 'T': number = 4; break; 34 | case 'Y': number = 5; break; 35 | case 'U': number = 6; break; 36 | case 'I': number = 7; break; 37 | case 'A': number = 8; break; 38 | case 'S': number = 9; break; 39 | case 'D': number = 10; break; 40 | case 'F': number = 11; break; 41 | case 'G': number = 12; break; 42 | case 'H': number = 13; break; 43 | case 'J': number = 14; break; 44 | case 'K': number = 15; break; 45 | } 46 | return number == -1 ? -1 : number + (bar*16); 47 | } 48 | -------------------------------------------------------------------------------- /src/tracker/ColorExportImport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/ColorExportImport.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * ColorExportImport.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on Sun Mar 13 2005. 28 | * 29 | */ 30 | 31 | #ifndef __COLOREXPORTIMPORT_H__ 32 | #define __COLOREXPORTIMPORT_H__ 33 | 34 | #include "BasicTypes.h" 35 | #include "ColorPaletteContainer.h" 36 | 37 | class ColorExportImport 38 | { 39 | private: 40 | PPSystemString fileName; 41 | 42 | public: 43 | ColorExportImport(const PPSystemString& fileName) : 44 | fileName(fileName) 45 | { 46 | } 47 | 48 | bool importColorPalette(TColorPalette& palette); 49 | bool exportColorPalette(const TColorPalette& palette); 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/tracker/ColorPaletteContainer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/ColorPaletteContainer.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * ColorPaletteContainer.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 21.11.05. 28 | * 29 | */ 30 | 31 | #ifndef COLORPALETTECONTAINER__H 32 | #define COLORPALETTECONTAINER__H 33 | 34 | #include "BasicTypes.h" 35 | 36 | // Verx simple color palette, limited colors 37 | struct TColorPalette 38 | { 39 | // Should be more than enough 40 | pp_uint8 numColors; 41 | PPColor colors[256]; 42 | }; 43 | 44 | class ColorPaletteContainer 45 | { 46 | private: 47 | TColorPalette* palettes; 48 | pp_int32 numPalettes; 49 | 50 | public: 51 | ColorPaletteContainer(pp_int32 num); 52 | ~ColorPaletteContainer(); 53 | 54 | void store(pp_int32 index, const TColorPalette& palette); 55 | const TColorPalette* restore(pp_int32 index); 56 | 57 | static PPString encodePalette(const TColorPalette& palette); 58 | static TColorPalette decodePalette(const PPString& str); 59 | }; 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/tracker/DialogChannelSelector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/DialogChannelSelector.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * DialogChannelSelector.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 25.10.05. 28 | * 29 | */ 30 | 31 | #ifndef __DIALOGCHANNELSELECTOR_H__ 32 | #define __DIALOGCHANNELSELECTOR_H__ 33 | 34 | #include "DialogBase.h" 35 | 36 | class DialogChannelSelector : public PPDialogBase 37 | { 38 | private: 39 | class PPListBox* listBox; 40 | 41 | public: 42 | DialogChannelSelector(PPScreen* screen, 43 | DialogResponder* responder, 44 | pp_int32 id, 45 | const PPString& caption); 46 | 47 | PPListBox* getListBox() { return listBox; } 48 | 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/tracker/DialogGroupSelection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/DialogGroupSelection.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * DialogGroupSelection.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 23.06.06. 28 | * 29 | */ 30 | 31 | #ifndef __DIALOGGROUPSELECTION_H__ 32 | #define __DIALOGGROUPSELECTION_H__ 33 | 34 | #include "DialogBase.h" 35 | 36 | class PPString; 37 | template class PPSimpleVector; 38 | 39 | class DialogGroupSelection : public PPDialogBase 40 | { 41 | private: 42 | pp_uint32 selection; 43 | 44 | public: 45 | DialogGroupSelection(PPScreen* screen, 46 | DialogResponder* responder, 47 | pp_int32 id, 48 | const PPString& caption, 49 | const PPSimpleVector& choices); 50 | 51 | virtual pp_int32 handleEvent(PPObject* sender, PPEvent* event); 52 | 53 | pp_uint32 getSelection() { return selection; } 54 | }; 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /src/tracker/DialogHelp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/DialogHelp.h 3 | * 4 | * Copyright 2022 coderofsalvation / Leon van Kammen 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * DialogHelp.h 25 | * MilkyTracker 26 | * 27 | * Created by coderofsalvation / Leon van Kammen on 13-07-2022 28 | * 29 | */ 30 | 31 | #ifndef __DIALOGHELP_H__ 32 | #define __DIALOGHELP_H__ 33 | 34 | #include "DialogBase.h" 35 | 36 | #define HELP_MAX_LINE 255 37 | 38 | class DialogHelp : public PPDialogBase 39 | { 40 | private: 41 | class PPListBox* listBox; 42 | pp_int32 lineMilkySynth; 43 | pp_int32 lineShortcuts; 44 | pp_int32 linePatternFX; 45 | pp_int32 handleEvent(PPObject* sender, PPEvent* event); 46 | 47 | public: 48 | DialogHelp(PPScreen* screen, 49 | DialogResponder* responder, 50 | pp_int32 id, 51 | const PPString& caption, 52 | bool okCancel = false); 53 | ~DialogHelp(); 54 | 55 | PPListBox* getListBox() { return listBox; } 56 | void show(bool show); 57 | static pp_int32 position; 58 | 59 | }; 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/tracker/DialogListBox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/DialogListBox.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * DialogListBox.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 25.10.05. 28 | * 29 | */ 30 | 31 | #ifndef __DIALOGLISTBOX_H__ 32 | #define __DIALOGLISTBOX_H__ 33 | 34 | #include "DialogBase.h" 35 | 36 | class DialogListBox : public PPDialogBase 37 | { 38 | private: 39 | class PPListBox* listBox; 40 | 41 | public: 42 | DialogListBox(PPScreen* screen, 43 | DialogResponder* responder, 44 | pp_int32 id, 45 | const PPString& caption, 46 | bool okCancel = false); 47 | 48 | PPListBox* getListBox() { return listBox; } 49 | 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/tracker/DialogZap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/DialogZap.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * DialogZap.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 20.2.08. 28 | * 29 | */ 30 | 31 | #ifndef __DIALOGZAP_H__ 32 | #define __DIALOGZAP_H__ 33 | 34 | #include "DialogBase.h" 35 | 36 | class DialogZap : public PPDialogBase 37 | { 38 | public: 39 | DialogZap(PPScreen* screen, 40 | DialogResponder* responder, 41 | pp_int32 id); 42 | }; 43 | 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/tracker/EditModes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/EditModes.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * EditModes.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on Thu May 19 2005. 28 | * 29 | */ 30 | 31 | #ifndef __EDITMODES_H__ 32 | #define __EDITMODES_H__ 33 | 34 | enum EditModes 35 | { 36 | EditModeMilkyTracker, 37 | EditModeFastTracker 38 | }; 39 | 40 | enum ScrollModes 41 | { 42 | ScrollModeToEnd, 43 | ScrollModeToCenter, 44 | ScrollModeStayInCenter 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/tracker/EnvelopeContainer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/EnvelopeContainer.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * EnvelopeContainer.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 20.06.05. 28 | * 29 | */ 30 | 31 | #ifndef ENVELOPECONTAINER__H 32 | #define ENVELOPECONTAINER__H 33 | 34 | #include "BasicTypes.h" 35 | 36 | struct TEnvelope; 37 | 38 | class EnvelopeContainer 39 | { 40 | private: 41 | TEnvelope* envelopes; 42 | pp_int32 numEnvelopes; 43 | 44 | public: 45 | EnvelopeContainer(pp_int32 num); 46 | ~EnvelopeContainer(); 47 | 48 | void store(pp_int32 index, const TEnvelope& env); 49 | const TEnvelope* restore(pp_int32 index); 50 | 51 | static PPString encodeEnvelope(const TEnvelope& env); 52 | static TEnvelope decodeEnvelope(const PPString& str); 53 | }; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/tracker/FileIdentificator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/FileIdentificator.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * FileIdentificator.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 03.05.05. 28 | * 29 | */ 30 | 31 | #ifndef __FILEINDENTIFICATOR_H__ 32 | #define __FILEINDENTIFICATOR_H__ 33 | 34 | #include "BasicTypes.h" 35 | 36 | class XMFile; 37 | 38 | class FileIdentificator 39 | { 40 | public: 41 | enum FileTypes 42 | { 43 | FileTypeUnknown, 44 | FileTypeModule, 45 | FileTypeInstrument, 46 | FileTypeSample, 47 | FileTypePattern, 48 | FileTypeTrack, 49 | FileTypeCompressed 50 | }; 51 | 52 | private: 53 | PPSystemString fileName; 54 | XMFile* f; 55 | 56 | bool isModule(); 57 | bool isInstrument(); 58 | bool isSample(); 59 | bool isPattern(); 60 | bool isTrack(); 61 | bool isCompressed(); 62 | 63 | public: 64 | FileIdentificator(const PPSystemString& fileName); 65 | ~FileIdentificator(); 66 | 67 | bool isValid() { return f != NULL; } 68 | 69 | FileTypes getFileType(); 70 | }; 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /src/tracker/LogoBig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/LogoBig.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef LOGOBIG__H 24 | #define LOGOBIG__H 25 | 26 | #include "BasicTypes.h" 27 | 28 | class LogoBig 29 | { 30 | public: 31 | static const pp_uint32 width; 32 | static const pp_uint32 height; 33 | 34 | static const pp_uint8 rawData[]; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/tracker/LogoSmall.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/LogoSmall.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef LOGOSMALL__H 24 | #define LOGOSMALL__H 25 | 26 | #include "BasicTypes.h" 27 | 28 | class LogoSmall 29 | { 30 | public: 31 | static const pp_uint32 width; 32 | static const pp_uint32 height; 33 | 34 | static const pp_uint8 rawData[]; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/tracker/PlayerCriticalSection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/PlayerCriticalSection.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * PlayerCriticalSection.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 12.12.07. 28 | * 29 | */ 30 | 31 | #ifndef __PLAYERCRITICALSECTION_H__ 32 | #define __PLAYERCRITICALSECTION_H__ 33 | 34 | #include "PlayerController.h" 35 | 36 | class PlayerCriticalSection 37 | { 38 | private: 39 | PlayerController& playerController; 40 | bool enabled; 41 | 42 | public: 43 | PlayerCriticalSection(PlayerController& playerController) : 44 | playerController(playerController), 45 | enabled(false) 46 | { 47 | } 48 | 49 | void enter(bool stopPlaying = true) 50 | { 51 | if (enabled) 52 | return; 53 | playerController.suspendPlayer(false, stopPlaying); 54 | enabled = true; 55 | } 56 | 57 | void leave(bool continuePlaying = true) 58 | { 59 | if (!enabled) 60 | return; 61 | playerController.resumePlayer(continuePlaying); 62 | enabled = false; 63 | } 64 | }; 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /src/tracker/RecPosProvider.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/RecPosProvider.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #include "BasicTypes.h" 24 | 25 | class RecPosProvider 26 | { 27 | private: 28 | class PlayerController& playerController; 29 | 30 | bool roundToClosestRow; 31 | 32 | public: 33 | RecPosProvider(PlayerController& playerController) : 34 | playerController(playerController), 35 | roundToClosestRow(true) 36 | { 37 | } 38 | 39 | RecPosProvider(PlayerController& playerController, bool roundToClosestRow) : 40 | playerController(playerController), 41 | roundToClosestRow(roundToClosestRow) 42 | { 43 | } 44 | 45 | void getPosition(pp_int32& order, pp_int32& row); 46 | bool getPosition(pp_int32& order, pp_int32& row, pp_int32& ticker); 47 | void incrementRow(pp_int32& order, pp_int32& row); 48 | }; 49 | 50 | -------------------------------------------------------------------------------- /src/tracker/ResamplerHelper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/ResamplerHelper.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * ResamplerHelper.h 25 | * milkytracker 26 | * 27 | * Created by Peter Barth on 15.01.08. 28 | * 29 | */ 30 | 31 | #ifndef __RESAMPLERHELPER_H__ 32 | #define __RESAMPLERHELPER_H__ 33 | 34 | #include "BasicTypes.h" 35 | #include "ResamplerFactory.h" 36 | 37 | class ResamplerHelper 38 | { 39 | private: 40 | static const char* resamplerNames[]; 41 | static const char* resamplerNamesShort[]; 42 | 43 | public: 44 | pp_uint32 getNumResamplers(); 45 | 46 | const char* getResamplerName(pp_uint32 index, bool shortName = false); 47 | 48 | ChannelMixer::ResamplerBase* createResamplerFromIndex(pp_uint32 index); 49 | 50 | ChannelMixer::ResamplerTypes getResamplerType(pp_uint32 index, bool ramping); 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/tracker/SampleEditorControlToolHandler.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/src/tracker/SampleEditorControlToolHandler.h -------------------------------------------------------------------------------- /src/tracker/SampleEditorResampler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/SampleEditorResampler.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * SampleEditorResampler.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 06.01.08. 28 | * 29 | */ 30 | 31 | #ifndef __SAMPLEEDITORRESAMPLER_H__ 32 | #define __SAMPLEEDITORRESAMPLER_H__ 33 | 34 | #include "BasicTypes.h" 35 | 36 | class SampleEditorResampler 37 | { 38 | private: 39 | class XModule& module; 40 | struct TXMSample& sample; 41 | pp_uint32 type; 42 | 43 | public: 44 | SampleEditorResampler(XModule& module, TXMSample& sample, pp_uint32 type); 45 | virtual ~SampleEditorResampler(); 46 | 47 | bool resample(float oldRate, float newRate); 48 | }; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/tracker/SectionAbout.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/SectionAbout.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * SectionAbout.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 17.11.05. 28 | * 29 | */ 30 | 31 | #ifndef SECTIONABOUT__H 32 | #define SECTIONABOUT__H 33 | 34 | #include "BasicTypes.h" 35 | #include "Event.h" 36 | #include "SectionUpperLeft.h" 37 | 38 | class PPControl; 39 | class Tracker; 40 | 41 | class SectionAbout : public SectionUpperLeft 42 | { 43 | public: 44 | SectionAbout(Tracker& tracker); 45 | virtual ~SectionAbout(); 46 | 47 | // Derived from SectionAbstract 48 | virtual pp_int32 handleEvent(PPObject* sender, PPEvent* event); 49 | 50 | virtual void init() { SectionUpperLeft::init(); } 51 | virtual void init(pp_int32 x, pp_int32 y); 52 | virtual void show(bool bShow) { SectionUpperLeft::show(bShow); } 53 | virtual void update(bool repaint = true); 54 | 55 | friend class Tracker; 56 | }; 57 | 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/tracker/SongLengthEstimator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/SongLengthEstimator.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * SongLengthEstimator.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 10.11.05. 28 | * 29 | */ 30 | 31 | #ifndef SONGLENGTHESTIMATOR__H 32 | #define SONGLENGTHESTIMATOR__H 33 | 34 | #include "MilkyPlayTypes.h" 35 | 36 | class PlayerGeneric; 37 | class XModule; 38 | 39 | class SongLengthEstimator 40 | { 41 | private: 42 | PlayerGeneric* player; 43 | XModule* module; 44 | 45 | public: 46 | SongLengthEstimator(XModule* theModule); 47 | SongLengthEstimator(const SongLengthEstimator& src); 48 | ~SongLengthEstimator(); 49 | 50 | const SongLengthEstimator& operator=(const SongLengthEstimator& src); 51 | 52 | mp_sint32 estimateSongLengthInSeconds(); 53 | }; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/tracker/SystemMessage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/SystemMessage.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * SystemMessage.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 27.12.07. 28 | * 29 | */ 30 | 31 | #ifndef __SYSTEMMESSAGE_H__ 32 | #define __SYSTEMMESSAGE_H__ 33 | 34 | #include "BasicTypes.h" 35 | 36 | class SystemMessage 37 | { 38 | private: 39 | class PPScreen& screen; 40 | pp_uint32 message; 41 | 42 | public: 43 | enum Messages 44 | { 45 | MessageSoundDriverInitFailed, 46 | MessageFullScreenFailed, 47 | MessageChangeRestart, 48 | MessageLimitedInput 49 | }; 50 | 51 | SystemMessage(PPScreen& screen, Messages message); 52 | 53 | void show(); 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/tracker/TabTitleProvider.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/TabTitleProvider.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * TabTitleProvider.cpp 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 11.12.07. 28 | * 29 | */ 30 | 31 | #include "TabTitleProvider.h" 32 | #include "ModuleEditor.h" 33 | 34 | PPString TabTitleProvider::getTabTitle() 35 | { 36 | char temp[ModuleEditor::MAX_TITLETEXT+1]; 37 | memset(temp, 0, sizeof(temp)); 38 | moduleEditor.getTitle(temp, ModuleEditor::MAX_TITLETEXT); 39 | 40 | PPString tabTitle = temp; 41 | if (tabTitle.length() != 0) 42 | return tabTitle; 43 | 44 | PPSystemString fileName = moduleEditor.getModuleFileName(); 45 | fileName = fileName.stripPath(); 46 | char* nameASCIIZ = moduleEditor.getModuleFileName().toASCIIZ(); 47 | tabTitle = nameASCIIZ; 48 | delete[] nameASCIIZ; 49 | 50 | return tabTitle; 51 | } 52 | -------------------------------------------------------------------------------- /src/tracker/TabTitleProvider.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/TabTitleProvider.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * TabTitleProvider.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 11.12.07. 28 | * 29 | */ 30 | 31 | #ifndef __TABTITLEPROVIDER_H__ 32 | #define __TABTITLEPROVIDER_H__ 33 | 34 | #include "BasicTypes.h" 35 | 36 | class TabTitleProvider 37 | { 38 | private: 39 | class ModuleEditor& moduleEditor; 40 | 41 | public: 42 | TabTitleProvider(ModuleEditor& moduleEditor) : 43 | moduleEditor(moduleEditor) 44 | { 45 | } 46 | 47 | PPString getTabTitle(); 48 | }; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/tracker/TitlePageManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/TitlePageManager.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef __TITLEPAGEMANAGER_H__ 24 | #define __TITLEPAGEMANAGER_H__ 25 | 26 | #include "BasicTypes.h" 27 | 28 | class TitlePageManager 29 | { 30 | private: 31 | class PPScreen& screen; 32 | 33 | public: 34 | TitlePageManager(PPScreen& screen); 35 | 36 | enum Pages 37 | { 38 | PageTitle, 39 | PageTime, 40 | PagePeak 41 | }; 42 | 43 | Pages getCurrentTitlePage(); 44 | void showTitlePage(Pages page, bool update = true); 45 | void showSongTitleEditField(bool update = true); 46 | void showTimeCounter(bool update = true); 47 | void showPeakControl(bool update = true); 48 | 49 | void setPeakControlHeadingColor(const PPColor& color, bool update = true); 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/tracker/VRand.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/VRand.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | // Author: Andrew Simper (andy@vellocet.com) 24 | // 25 | 26 | #include "VRand.h" 27 | 28 | float VPinkNoise[PinkNoiseBins]; 29 | VPinkNoiseGlobal dummy_to_init_pink_noise; 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/tracker/VolumeRampHelper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/VolumeRampHelper.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * VolumeRampHelper.h 25 | * milkytracker 26 | * 27 | * Created by Peter Barth on 15.01.08. 28 | * 29 | */ 30 | 31 | #ifndef __RAMPHELPER_H__ 32 | #define __RAMPHELPER_H__ 33 | 34 | #include "BasicTypes.h" 35 | #include "ChannelMixer.h" 36 | 37 | class VolumeRampHelper 38 | { 39 | private: 40 | static const char* rampNames[]; 41 | static const char* rampNamesShort[]; 42 | 43 | public: 44 | pp_uint32 getNumVolumeRamps(); 45 | 46 | const char* getVolumeRampName(pp_uint32 index, bool shortName = false); 47 | 48 | ChannelMixer::RampTypes getVolumeRampType(pp_uint32 index); 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/tracker/Zapper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/Zapper.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * Zapper.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 26.12.07. 28 | * 29 | */ 30 | 31 | #ifndef __ZAPPER_H__ 32 | #define __ZAPPER_H__ 33 | 34 | class Zapper 35 | { 36 | private: 37 | class Tracker& tracker; 38 | 39 | public: 40 | Zapper(Tracker& tracker) : 41 | tracker(tracker) 42 | { 43 | } 44 | 45 | Zapper(const Zapper& src) : 46 | tracker(src.tracker) 47 | { 48 | } 49 | 50 | void zapAll(); 51 | void zapSong(); 52 | void zapPattern(); 53 | void zapInstruments(); 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/tracker/cocoa/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/cocoa/AppDelegate.h 3 | * 4 | * Copyright 2014 Dale Whinham 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #pragma once 24 | 25 | // -------- Cocoa/OS X -------- 26 | #import 27 | 28 | // ---------- Tracker --------- 29 | #import "BasicTypes.h" 30 | 31 | class CLIParser; // Forward declaration 32 | 33 | // Defined in main.mm 34 | pp_uint32 PPGetTickCount(); 35 | 36 | // Forward declarations 37 | @class MTTrackerView; 38 | 39 | @interface AppDelegate : NSObject 40 | @property (assign) IBOutlet NSWindow* myWindow; 41 | @property (assign) IBOutlet MTTrackerView* myTrackerView; 42 | @property (assign) IBOutlet NSWindow* myProgressWindow; 43 | @property (assign) IBOutlet NSProgressIndicator* myProgressIndicator; 44 | 45 | // CLI handling 46 | + (void)setSharedCLIParser:(CLIParser*)parser; 47 | + (CLIParser*)sharedCLIParser; 48 | 49 | - (void)showProgress:(BOOL)yes; 50 | @end -------------------------------------------------------------------------------- /src/tracker/cocoa/MTKeyTranslator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/cocoa/MTKeyTranslator.h 3 | * 4 | * Copyright 2014 Dale Whinham 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | // ------- Cocoa/OpenGL ------- 24 | #import 25 | #import 26 | 27 | // ---------- Tracker --------- 28 | #import "BasicTypes.h" 29 | #import "ScanCodes.h" 30 | #import "VirtualKeys.h" 31 | 32 | // This keycode is missing from Events.h in SDK versions <10.12 33 | #if !defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 34 | enum 35 | { 36 | kVK_RightCommand = 0x36 37 | }; 38 | #endif 39 | 40 | @interface MTKeyTranslator : NSObject 41 | + (pp_uint16)toVK:(unsigned short) keyCode; 42 | + (pp_uint16)toSC:(unsigned short) keyCode; 43 | @end 44 | -------------------------------------------------------------------------------- /src/tracker/cocoa/MTTrackerView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/cocoa/MTTrackerView.h 3 | * 4 | * Copyright 2014 Dale Whinham 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | // ------- Cocoa/OpenGL ------- 24 | #import 25 | #import 26 | 27 | // ---------- Tracker --------- 28 | #import "Event.h" 29 | #import "MTKeyTranslator.h" 30 | 31 | @interface MTTrackerView : NSOpenGLView 32 | 33 | // ---- Surface Dimensions ---- 34 | @property uint8_t* pixelData; 35 | @property int width; 36 | @property int height; 37 | @property int bpp; 38 | 39 | // ---- Defined in main.mm ---- 40 | void RaiseEventSynchronized(PPEvent* event); 41 | 42 | - (void)initTexture; 43 | @end 44 | -------------------------------------------------------------------------------- /src/tracker/fx/EQConstants.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/EQConstants.cpp 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #include "EQConstants.h" 24 | #include "math.h" 25 | 26 | #define p(e) ldexp(66904.0f, e-4*4) 27 | 28 | const float EQConstants::EQ3bands[3] = 29 | { 30 | p(5), // 32 Hz 31 | p(9), // 522 Hz 32 | p(12), // 4181.5 Hz 33 | }; 34 | 35 | const float EQConstants::EQ3bandwidths[3] = 36 | { 37 | 170.0f, 38 | 600.0f, 39 | 1000.0f 40 | }; 41 | 42 | const float EQConstants::EQ10bands[10] = 43 | { 44 | p(3), // 8 Hz 45 | p(4), // 16 Hz 46 | p(5), // 32 Hz 47 | p(6), // 65 Hz 48 | p(7), // 130 Hz 49 | p(8), // 261 Hz 50 | p(9), // 522 Hz 51 | p(10), // 1 kHz 52 | p(11), // 2 kHz 53 | p(12), // 4181.5 Hz 54 | }; 55 | 56 | const float EQConstants::EQ10bandwidths[10] = 57 | { 58 | 16, 59 | p(3)*1.5f, 60 | p(4)*1.5f, 61 | p(5)*1.5f, 62 | p(6)*1.5f, 63 | p(7)*1.5f, 64 | p(8)*1.0f, 65 | p(9)*1.0f, 66 | 600.0f, 67 | 800.0f 68 | }; 69 | -------------------------------------------------------------------------------- /src/tracker/fx/EQConstants.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/EQConstants.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef __EQCONSTANTS_H__ 24 | #define __EQCONSTANTS_H__ 25 | 26 | class EQConstants 27 | { 28 | public: 29 | static const float EQ3bands[3]; 30 | static const float EQ3bandwidths[3]; 31 | static const float EQ10bands[10]; 32 | static const float EQ10bandwidths[10]; 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/tracker/haiku/Haiku_main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #include "MilkyApplication.h" 22 | 23 | 24 | int main() 25 | { 26 | MilkyApplication* milkyApplication = new MilkyApplication(); 27 | milkyApplication->Run(); 28 | 29 | delete milkyApplication; 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /src/tracker/haiku/MilkySettings/InterfaceSettingsView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #ifndef __HAIKU_INTERFACESETTINGSVIEW_H__ 22 | #define __HAIKU_INTERFACESETTINGSVIEW_H__ 23 | 24 | #include 25 | 26 | class BCheckBox; 27 | 28 | 29 | class InterfaceSettingsView : public BView 30 | { 31 | public: 32 | InterfaceSettingsView(BRect frame); 33 | ~InterfaceSettingsView(); 34 | 35 | virtual void AttachedToWindow(); 36 | virtual void MessageReceived(BMessage* message); 37 | 38 | void AddSettings(BMessage* settings); 39 | void SetSettings(BMessage* settings); 40 | 41 | private: 42 | BCheckBox* fSwitchCommandControlCheckBox; 43 | BCheckBox* fChangeFullscreenResolutionCheckBox; 44 | 45 | bool fFirstAttach; 46 | }; 47 | 48 | #endif // __HAIKU_INTERFACESETTINGSVIEW_H__ 49 | -------------------------------------------------------------------------------- /src/tracker/haiku/MilkySettings/MilkySettingsApplication.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #ifndef __HAIKU_MILKYSETTINGSAPPLICATION_H__ 22 | #define __HAIKU_MILKYSETTINGSAPPLICATION_H__ 23 | 24 | #include 25 | 26 | class BFile; 27 | class BMessenger; 28 | class SettingsWindow; 29 | 30 | 31 | class MilkySettingsApplication : public BApplication 32 | { 33 | public: 34 | MilkySettingsApplication(); 35 | virtual ~MilkySettingsApplication(); 36 | 37 | virtual void MessageReceived(BMessage* message); 38 | 39 | private: 40 | BFile* _OpenSettingsFile(uint32 openMode); 41 | 42 | SettingsWindow* fSettingsWindow; 43 | BMessenger* fMilkyTrackerMessenger; 44 | }; 45 | 46 | #endif // __HAIKU_MILKYSETTINGSAPPLICATION_H__ 47 | -------------------------------------------------------------------------------- /src/tracker/haiku/MilkySettings/SettingsMessages.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #ifndef __HAIKU_MESSAGES_H__ 22 | #define __HAIKU_MESSAGES_H__ 23 | 24 | enum { 25 | // Interface settings 26 | kMsg_SwitchCommandControlToggled = 'scct', 27 | kMsg_ChangeFullscreenResolutionToggled = 'cfrt', 28 | 29 | // MIDI settings 30 | kMsg_MidiInputSelected = 'miis', 31 | kMsg_MidiRecordVelocityToggled = 'rvet', 32 | kMsg_MidiVelocityAmplificationChanged = 'veac' 33 | }; 34 | 35 | #endif // __HAIKU_MESSAGES_H__ 36 | -------------------------------------------------------------------------------- /src/tracker/haiku/MilkySettings/SettingsWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #ifndef __HAIKU_SETTINGSWINDOW_H__ 22 | #define __HAIKU_SETTINGSWINDOW_H__ 23 | 24 | #include 25 | 26 | class InterfaceSettingsView; 27 | class MidiSettingsView; 28 | 29 | 30 | class SettingsWindow : public BWindow 31 | { 32 | public: 33 | SettingsWindow(); 34 | virtual ~SettingsWindow(); 35 | 36 | virtual void MessageReceived(BMessage* message); 37 | 38 | virtual bool QuitRequested(); 39 | 40 | BMessage* GetSettings(); 41 | void SetSettings(BMessage* settings); 42 | 43 | private: 44 | InterfaceSettingsView* fInterfaceSettingsView; 45 | MidiSettingsView* fMidiSettingsView; 46 | }; 47 | 48 | #endif // __HAIKU_SETTINGSWINDOW_H__ 49 | -------------------------------------------------------------------------------- /src/tracker/haiku/MilkySettings/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #include "MilkySettingsApplication.h" 22 | 23 | 24 | int 25 | main() 26 | { 27 | MilkySettingsApplication* settingsApplication = 28 | new MilkySettingsApplication(); 29 | settingsApplication->Run(); 30 | 31 | delete settingsApplication; 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /src/tracker/haiku/Tools.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Julian Harnath 3 | * 4 | * This file is part of Milkytracker. 5 | * 6 | * Milkytracker is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Milkytracker is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Milkytracker. If not, see . 18 | * 19 | */ 20 | 21 | #include "BasicTypes.h" 22 | #include "PPUI.h" 23 | 24 | #include 25 | #include 26 | 27 | 28 | extern bool gSwapCommandControl; 29 | 30 | 31 | pp_uint32 32 | PPGetTickCount() 33 | { 34 | return (system_time() / 1000); 35 | } 36 | 37 | 38 | void 39 | QueryKeyModifiers() 40 | { 41 | uint32 modifiersState = modifiers(); 42 | 43 | if (modifiersState & B_SHIFT_KEY) 44 | setKeyModifier(KeyModifierSHIFT); 45 | else 46 | clearKeyModifier(KeyModifierSHIFT); 47 | 48 | int32 commandModifier = 49 | gSwapCommandControl ? B_CONTROL_KEY : B_COMMAND_KEY; 50 | int32 controlModifier = 51 | gSwapCommandControl ? B_COMMAND_KEY : B_CONTROL_KEY; 52 | 53 | if (modifiersState & commandModifier) 54 | setKeyModifier(KeyModifierALT); 55 | else 56 | clearKeyModifier(KeyModifierALT); 57 | 58 | if (modifiersState & controlModifier) 59 | setKeyModifier(KeyModifierCTRL); 60 | else 61 | clearKeyModifier(KeyModifierCTRL); 62 | } 63 | -------------------------------------------------------------------------------- /src/tracker/sdl/SDL_KeyTranslation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/sdl/SDL_KeyTranslation.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | /* 24 | * KeyTranslation.h 25 | * MilkyTracker 26 | * 27 | * Created by Peter Barth on 19.11.05. 28 | * 29 | * 12/5/14 - Dale Whinham 30 | * - Port to SDL2 31 | * 32 | */ 33 | 34 | #ifndef KEYTRANSLATION__H 35 | #define KEYTRANSLATION__H 36 | 37 | #include 38 | #include "BasicTypes.h" 39 | 40 | pp_uint16 toVK(const SDL_Keysym& keysym); 41 | pp_uint16 toSC(const SDL_Keysym& keysym); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/tracker/version.h.in: -------------------------------------------------------------------------------- 1 | // 0xXYYZZ = X.YY.ZZ 2 | const int MILKYTRACKER_VERSION = 0x${VER_X}${VER_YY}${VER_ZZ}; 3 | // Version string restricted to 20 chars for XM export! 4 | const char MILKYTRACKER_VERSION_STRING[] = "MilkyTracker ${VER_X}.${VER_YY}.${VER_ZZ}"; 5 | // 012345678901234567890 6 | -------------------------------------------------------------------------------- /src/tracker/wav/WAVExportArgs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | class CLIParser; // Forward declaration 10 | 11 | class WAVExportArgs { 12 | public: 13 | class Arguments : public ModuleServices::WAVWriterParameters { 14 | public: 15 | Arguments(); 16 | ~Arguments(); 17 | 18 | // Copy constructor 19 | Arguments(const Arguments& other); 20 | // Copy assignment 21 | Arguments& operator=(const Arguments& other); 22 | 23 | // Only declare fields we add beyond WAVWriterParameters 24 | const char* inputFile; 25 | const char* outputFile; 26 | bool verbose; // Flag for verbose output 27 | pp_uint32 channelCount; // Number of channels in the module 28 | 29 | private: 30 | // Helper to handle deep copying of strings 31 | void copyStrings(const Arguments& other); 32 | }; 33 | 34 | // Initialize Arguments from an already-parsed parser 35 | static Arguments initFromParser(CLIParser& parser, TrackerSettingsDatabase& settingsDB); 36 | 37 | // Helper to register WAV export options with a parser 38 | static void registerOptions(CLIParser& parser); 39 | }; -------------------------------------------------------------------------------- /src/tracker/wav/WAVExporter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "WAVExportArgs.h" 6 | 7 | class CLIParser; // Forward declaration 8 | 9 | class WAVExporter { 10 | public: 11 | // Create from parser 12 | static std::unique_ptr createFromParser(CLIParser& parser); 13 | 14 | // Core functionality 15 | int performExport(); 16 | 17 | // State getters 18 | bool hasOutputFile() const { return params.outputFile != nullptr; } 19 | bool hasInputFile() const { return params.inputFile != nullptr; } 20 | bool hasParseError() const { return parseError; } 21 | bool hasArgumentError() const { return argumentError; } 22 | const char* getErrorMessage() const { return errorMessage.c_str(); } 23 | 24 | virtual ~WAVExporter() = default; 25 | 26 | protected: 27 | bool parseError; 28 | bool argumentError; 29 | std::string errorMessage; 30 | WAVExportArgs::Arguments params; 31 | }; -------------------------------------------------------------------------------- /src/tracker/wav/WAVUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "WAVUtils.h" 2 | #include 3 | 4 | namespace WAVUtils { 5 | 6 | bool isWAVSilent(const char* filename) { 7 | // Create a temporary module to use with SampleLoaderWAV 8 | XModule module; 9 | module.createEmptySong(true, true, 1); // Initialize with 1 channel 10 | 11 | // Ensure we have at least one sample slot 12 | module.header.smpnum = 1; 13 | module.header.insnum = 1; 14 | 15 | // Create WAV loader 16 | SampleLoaderWAV loader(filename, module); 17 | 18 | // First verify this is a valid WAV file 19 | if (!loader.identifySample()) { 20 | return true; // Invalid WAV file, consider it silent 21 | } 22 | 23 | // Load the sample into index 0 24 | if (loader.loadSample(0, -1) != MP_OK) { 25 | return true; // Failed to load, consider it silent 26 | } 27 | 28 | // Get the loaded sample 29 | TXMSample* smp = &module.smp[0]; 30 | if (!smp->sample || smp->samplen == 0) { 31 | return true; // No sample data, consider it silent 32 | } 33 | 34 | // Check for silence based on sample type (8-bit or 16-bit) 35 | if (smp->type & 16) { 36 | // 16-bit samples 37 | mp_sword* samples = (mp_sword*)smp->sample; 38 | for (mp_uint32 i = 0; i < smp->samplen; i++) { 39 | if (samples[i] != 0) { 40 | return false; // Found non-zero sample 41 | } 42 | } 43 | } else { 44 | // 8-bit samples 45 | mp_sbyte* samples = (mp_sbyte*)smp->sample; 46 | for (mp_uint32 i = 0; i < smp->samplen; i++) { 47 | if (samples[i] != 0) { 48 | return false; // Found non-zero sample 49 | } 50 | } 51 | } 52 | 53 | return true; // All samples were zero 54 | } 55 | 56 | } -------------------------------------------------------------------------------- /src/tracker/wav/WAVUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace WAVUtils { 6 | /** 7 | * Check if a WAV file contains only silence (all samples are zero) 8 | * 9 | * @param filename Path to the WAV file to check 10 | * @return true if the file is silent or invalid, false if it contains any non-zero samples 11 | */ 12 | bool isWAVSilent(const char* filename); 13 | } -------------------------------------------------------------------------------- /src/tracker/win32/ThreadTimer.cpp: -------------------------------------------------------------------------------- 1 | #include "ThreadTimer.h" 2 | 3 | CThreadTimer::CThreadTimer():object(0),idEvent(0),elapse(0), isActive(FALSE) 4 | { 5 | InitializeCriticalSection(&lock); 6 | } 7 | 8 | CThreadTimer::~CThreadTimer() 9 | { 10 | DeleteCriticalSection(&lock); 11 | } 12 | 13 | UINT CThreadTimer::SetTimer (void* obj, UINT nIDEvent, UINT uElapse, ThreadTimerProc lpTimerProc) 14 | { 15 | object = obj; 16 | idEvent = nIDEvent; 17 | elapse = uElapse; 18 | proc = lpTimerProc; 19 | 20 | EnterCriticalSection(&lock); 21 | // is it already active? 22 | if (isActive) 23 | { 24 | LeaveCriticalSection(&lock); 25 | return 0; 26 | } 27 | 28 | // Start the thread 29 | DWORD threadId; 30 | HANDLE threadHandle = CreateThread (NULL, 0, CThreadTimer::ThreadFunction, this, 0, &threadId); 31 | //SetThreadPriority(threadHandle,THREAD_PRIORITY_TIME_CRITICAL); // this is optional 32 | isActive = TRUE; 33 | LeaveCriticalSection(&lock); 34 | return nIDEvent; 35 | } 36 | 37 | BOOL CThreadTimer::KillTimer() 38 | { 39 | EnterCriticalSection(&lock); 40 | isActive = FALSE; 41 | LeaveCriticalSection(&lock); 42 | return TRUE; 43 | } 44 | 45 | DWORD WINAPI CThreadTimer::ThreadFunction (LPVOID pParam) 46 | { 47 | // Here is the heart of our little timer 48 | CThreadTimer* obj = (CThreadTimer*) pParam; 49 | BOOLEAN isActive = TRUE; 50 | do 51 | { 52 | Sleep(obj->elapse); 53 | obj->proc (obj->object, obj->idEvent); 54 | 55 | EnterCriticalSection(&obj->lock); 56 | isActive = obj->isActive; 57 | LeaveCriticalSection(&obj->lock); 58 | } while (isActive); 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /src/tracker/win32/ThreadTimer.h: -------------------------------------------------------------------------------- 1 | #ifndef THREADTIMER__H 2 | #define THREADTIMER__H 3 | 4 | #include 5 | 6 | typedef void (*ThreadTimerProc)(void* obj, UINT idEvent); 7 | 8 | class CThreadTimer 9 | { 10 | void* object; // pointer to the "parent" object (like CTimersDlg) 11 | UINT idEvent; // timer ID 12 | UINT elapse; // "Sleep time" in milliseconds 13 | ThreadTimerProc proc; // Callback function, supplied by the user 14 | 15 | BOOL isActive; // Set to FALSE after the call to KillTimer 16 | CRITICAL_SECTION lock; // thread synchronization 17 | 18 | static DWORD WINAPI ThreadFunction (LPVOID pParam); // thread entry point 19 | public: 20 | CThreadTimer(); 21 | virtual ~CThreadTimer(); 22 | 23 | UINT SetTimer (void* obj, UINT nIDEvent, UINT uElapse, ThreadTimerProc lpTimerProc); 24 | BOOL KillTimer(); 25 | }; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/tracker/win32/Win32_resource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/win32/Win32_resource.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | //{{NO_DEPENDENCIES}} 24 | // Microsoft Visual C++ generated include file. 25 | // Used by Win32_resources.rc 26 | // 27 | #define IDD_PROPERTIES 102 28 | #define IDI_APPLICATIONICON 110 29 | #define IDC_COMBO_MIDIDEVICES 1000 30 | #define IDC_CHECK_SAVESETTINGS 1001 31 | #define IDC_CHECK_ENABLE_MIDI 1002 32 | #define IDC_BUTTON_OK 1003 33 | #define IDC_CHECK_RECORD_VELOCITY 1004 34 | #define IDC_BUTTON_CANCEL 1005 35 | #define IDC_SLIDER_MIDITHREADPRIORITY 1006 36 | #define IDC_SLIDER_AMPLIFYVELOCITY 1007 37 | 38 | // Next default values for new objects 39 | // 40 | #ifdef APSTUDIO_INVOKED 41 | #ifndef APSTUDIO_READONLY_SYMBOLS 42 | #define _APS_NEXT_RESOURCE_VALUE 105 43 | #define _APS_NEXT_COMMAND_VALUE 40001 44 | #define _APS_NEXT_CONTROL_VALUE 1005 45 | #define _APS_NEXT_SYMED_VALUE 101 46 | #endif 47 | #endif 48 | -------------------------------------------------------------------------------- /src/tracker/wince/ButtonMapper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/wince/ButtonMapper.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef BUTTONMAPPER__H 24 | #define BUTTONMAPPER__H 25 | 26 | struct TButtonMapping 27 | { 28 | WORD keyModifiers; 29 | WORD virtualKeyCode; 30 | }; 31 | 32 | enum EOrientation 33 | { 34 | eOrientation90CW, 35 | eOrientation90CCW, 36 | eOrientationNormal 37 | }; 38 | 39 | extern TButtonMapping mappings[]; 40 | extern EOrientation orientation; 41 | extern pp_int32 allowVirtualKeys; 42 | extern pp_int32 hideTaskBar; 43 | extern pp_int32 doublePixels; 44 | extern pp_int32 dontTurnOffDevice; 45 | 46 | void InitButtonRemapper(); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/tracker/wince/Logger.h: -------------------------------------------------------------------------------- 1 | // About this class 2 | // ---------------------------------------------------------------------- 3 | // This class is a very simple logger class. It simply logs strings 4 | // in a vector, provides access to the log entries and optionally 5 | // exports the log into a text file. 6 | #ifndef __LOGGER_H__ 7 | #define __LOGGER_H__ 8 | 9 | #include 10 | 11 | class SimpleString; 12 | template class SimpleVector; 13 | 14 | class CLogger 15 | { 16 | private: 17 | // the vector which contains the log data 18 | SimpleVector* m_log; 19 | 20 | LPCTSTR fileName; 21 | 22 | public: 23 | // construct logger instance 24 | CLogger(); 25 | // construct logger instance which writes out to filename on destruction 26 | CLogger(LPCTSTR fileName); 27 | // destruct logger instance 28 | ~CLogger(); 29 | 30 | // clear log 31 | void Clear(); 32 | // log a string 33 | void Log(const SimpleString& logData); 34 | 35 | // return size of log 36 | unsigned int GetSize() const; 37 | // get log entry 38 | const SimpleString& GetEntry(unsigned int i) const; 39 | 40 | // is this log empty? 41 | bool IsEmpty() const { return m_log ? GetSize() == 0 : true; } 42 | 43 | // export log file into a text file 44 | bool Export(LPCTSTR fileName) const; 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/tracker/wince/VirtualKeyToScanCodeTable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/wince/VirtualKeyToScanCodeTable.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef __VIRTUALKEYTOSCANCODETABLE_H__ 24 | #define __VIRTUALKEYTOSCANCODETABLE_H__ 25 | 26 | #include "BasicTypes.h" 27 | 28 | extern const pp_int16 vkeyToScancode[256]; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/tracker/wince/WaitStateThread.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milkytracker/MilkyTracker/9d009c5407a7dc877a3d30e84719190679158b6c/src/tracker/wince/WaitStateThread.cpp -------------------------------------------------------------------------------- /src/tracker/wince/WinCE_NEWRES.H: -------------------------------------------------------------------------------- 1 | #ifndef __NEWRES_H__ 2 | #define __NEWRES_H__ 3 | 4 | #if !defined(UNDER_CE) 5 | #define UNDER_CE _WIN32_WCE 6 | #endif 7 | 8 | #if defined(_WIN32_WCE) 9 | #if !defined(WCEOLE_ENABLE_DIALOGEX) 10 | #define DIALOGEX DIALOG DISCARDABLE 11 | #endif 12 | #include 13 | #define SHMENUBAR RCDATA 14 | #if defined(WIN32_PLATFORM_PSPC) && (_WIN32_WCE >= 300) 15 | #include 16 | #define AFXCE_IDR_SCRATCH_SHMENU 28700 17 | #else 18 | #define I_IMAGENONE (-2) 19 | #define NOMENU 0xFFFF 20 | #define IDS_SHNEW 1 21 | 22 | #define IDM_SHAREDNEW 10 23 | #define IDM_SHAREDNEWDEFAULT 11 24 | #endif // _WIN32_WCE_PSPC 25 | #define AFXCE_IDD_SAVEMODIFIEDDLG 28701 26 | #endif // _WIN32_WCE 27 | 28 | #ifdef RC_INVOKED 29 | #ifndef _INC_WINDOWS 30 | #define _INC_WINDOWS 31 | #include "winuser.h" // extract from windows header 32 | #include "winver.h" 33 | #endif 34 | #endif 35 | 36 | #ifdef IDC_STATIC 37 | #undef IDC_STATIC 38 | #endif 39 | #define IDC_STATIC (-1) 40 | 41 | #endif //__NEWRES_H__ 42 | -------------------------------------------------------------------------------- /src/tracker/wince/WinCE_ThreadTimer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/wince/WinCE_ThreadTimer.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef THREADTIMER__H 24 | #define THREADTIMER__H 25 | 26 | #include 27 | 28 | typedef void (*ThreadTimerProc)(void* obj, UINT idEvent); 29 | 30 | class CThreadTimer 31 | { 32 | void* object; // pointer to the "parent" object (like CTimersDlg) 33 | UINT idEvent; // timer ID 34 | UINT elapse; // "Sleep time" in milliseconds 35 | ThreadTimerProc proc; // Callback function, supplied by the user 36 | 37 | BOOL isActive; // Set to FALSE after the call to KillTimer 38 | CRITICAL_SECTION lock; // thread synchronization 39 | 40 | static DWORD WINAPI ThreadFunction (LPVOID pParam); // thread entry point 41 | public: 42 | CThreadTimer(); 43 | virtual ~CThreadTimer(); 44 | 45 | UINT SetTimer (void* obj, UINT nIDEvent, UINT uElapse, ThreadTimerProc lpTimerProc); 46 | BOOL KillTimer(); 47 | }; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/tracker/wince/WinCE_main.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tracker/wince/WinCE_main.h 3 | * 4 | * Copyright 2009 Peter Barth 5 | * 6 | * This file is part of Milkytracker. 7 | * 8 | * Milkytracker is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Milkytracker is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Milkytracker. If not, see . 20 | * 21 | */ 22 | 23 | 24 | #if !defined(AFX_FIRSTGX_H__239AB522_02E1_4FB5_AA73_76CA32550764__INCLUDED_) 25 | #define AFX_FIRSTGX_H__239AB522_02E1_4FB5_AA73_76CA32550764__INCLUDED_ 26 | 27 | #if _MSC_VER > 1000 28 | #pragma once 29 | #endif // _MSC_VER > 1000 30 | 31 | #include "WinCE_resource.h" 32 | 33 | #define MENU_HEIGHT 26 34 | 35 | #endif // !defined(AFX_FIRSTGX_H__239AB522_02E1_4FB5_AA73_76CA32550764__INCLUDED_) 36 | --------------------------------------------------------------------------------