Commit Graph
75 Commits
Author SHA1 Message Date
Donovan Watteau 5b1ec56f96 JANITORIAL: Fix some lost or outdated URLs in comments 2022-05-19 07:57:31 +03:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh 6333092801 MADE: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Coen Rampen 5369ed6ecc MADE: Add option for MIDI introduction music
The Return to Zork installer has an option to turn off the digital music during
the introduction and play MIDI music instead. ScummVM would always play the
digital music. This commit adds the installer option to the launcher GUI.
2021-10-09 16:59:45 +02:00
Coen Rampen 30a6c8428c MADE: Fix audible gap when sounds loop
For looping sounds the game script regularly checks if the sound has finished
playing, then plays it again. This works in the original interpreter (possibly
because it checks the first buffer of double-buffered sound output); it does
not work in ScummVM because the mixer will return if the sound has actually
stopped playing. This causes an audible gap when the sound loops.

This commit alters the sfSoundPlaying function to check if the current elapsed
playing time is less than 100ms before the end of the sound, which fixes the
issue. Not sure if this change is necessary or desirable for games other than
Return to Zork. This fixes issue #6443.
2021-10-09 16:59:45 +02:00
Coen Rampen 69629944e5 MADE: Use SFX sound type for sampled audio
The engine used the plain sound type for sampled sound effects and movie audio
and applied the SFX user volume control to the plain sound type. This caused
emulators like the AdLib emulator and Munt to be affected by the SFX user
volume control, because they use the plain sound type. This commit fixes this
by using the SFX sound type instead of the plain sound type. User volume is
applied by Engine::syncSoundSettings.

This commit also fixes the setSoundVolume script function. Volume was
previously applied to the SFX and speech sound types, which were not used.
Also, by directly using Mixer::setVolumeForSoundType, it would override the
user volume setting. This is fixed by storing the game sound volume in a field
and applying this to the current and future audio streams. This fixes bug
#6444.
2021-10-09 16:59:44 +02:00
Strangerke 849f383169 MADE: Initialize some variables, remove a useless variable 2015-01-27 07:14:55 +01:00
Johannes Schickel 5b70d34479 MADE: Make GPL headers consistent in themselves. 2014-02-18 02:39:36 +01:00
Johannes Schickel 66fe0181ff MADE: Take advantage of Surface::getPixels. 2013-08-03 04:02:51 +02:00
Johannes Schickel 8f73027d82 MADE: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 02:52:32 +02:00
Johannes Schickel 57e0381b62 MADE: Get rid of casts on CursorManager::replaceCursor calls. 2012-06-16 03:28:43 +02:00
Johannes Schickel 7b126c5f24 MADE: Minimize #include usage. 2011-10-09 22:58:37 +02:00
Max Horn 080b590261 MADE: Remove all instances of s(n)printf 2011-06-02 10:49:09 +02:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion 9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn 42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn 059944e59c COMMON: Push #include audiocd.h in system.h out to .cpp files
svn-id: r54148
2010-11-08 23:07:42 +00:00
Alejandro Marzini fb4086cadb Merged from trunk, from Rev 50841 to HEAD
svn-id: r51495
2010-07-30 05:28:09 +00:00
Matthew Hoops 14c2fb2f08 Implement PlayNote/StopNote and PlayTele/StopTele for The Manhole.
svn-id: r51066
2010-07-20 16:05:25 +00:00
Alejandro Marzini e1ef3cd9fc Renamed getAudioCD to getAudioCDManager.
svn-id: r49678
2010-06-15 04:13:12 +00:00
Alejandro Marzini e991cd8c53 - Revised abstract AudioCDManager.
- Removed AudioCDManager Singleton, and changed code for using AudioCDManager in OSystem.
- Added initialization code for new AudioCDManager in BaseBackend and OSystem_SDL.

svn-id: r49548
2010-06-09 20:09:57 +00:00
Max Horn a1840bd573 AUDIO: Rename Mixer::playInputStream to playStream
svn-id: r48637
2010-04-12 09:14:17 +00:00
Johannes Schickel aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Max Horn 590481b12d Improve support for negative Timestamps, and add + and - operators
svn-id: r47244
2010-01-11 10:17:55 +00:00
Max Horn 87cdc86580 MADE: Use Mixer::getElapsedTime and Audio::Timestamp instead of Mixer::getSoundElapsedTime
svn-id: r47243
2010-01-11 10:17:23 +00:00
Filippos Karapetis decdc5771a Applied patch #2872409 "MADE engine fixes" by agent-q, with one small modification (initialized _soundStarted in the ScriptFunctions constructor)
svn-id: r44589
2009-10-04 09:31:37 +00:00
Max Horn 7140dda5e5 MADE: cleanup
svn-id: r41070
2009-05-31 15:07:55 +00:00
Johannes Schickel b3c6751b9b Strip trailing whitespaces in the whole code base.
svn-id: r40867
2009-05-24 15:17:42 +00:00
Filippos Karapetis 498a355a74 Reduced CPU usage of the MADE engine by about 10% (by profiling the code)
- Added delays in places where the screen gets updated
- Moved event polling inside sfPollEvent() (cause that's where events are polled), instead of after each opcode

svn-id: r39392
2009-03-14 14:58:19 +00:00
Max Horn f9ecd95d69 Whitespace cleanup: Convert space followed by tab to just tab
svn-id: r39203
2009-03-07 19:24:31 +00:00
Benjamin Haisch 22812367aa - Fixed/completed cd audio support (sfPlayCd and sfGetCdTime) for Manhole:N&E and RtZ CD
svn-id: r36217
2009-02-04 19:15:12 +00:00
Filippos Karapetis 79709646fb Added some unused opcodes in Rodney
svn-id: r36057
2009-01-25 10:46:48 +00:00
Filippos Karapetis 3fb9e1e23a Added some information on sfPlayNote, sfStopNote, sfPlayTele, sfStopTele
svn-id: r36056
2009-01-25 10:16:00 +00:00
Benjamin Haisch a8562cf64b - Implemented sfGetMusicBeat (used in several games as some kind of timer)
svn-id: r36023
2009-01-23 12:17:12 +00:00
Benjamin Haisch 5b8105afb3 - Added support for The Manhole EGA version
- Support for 'chunked' picture resources and EGA pictures
- Improved the mouth sync in RtZ (still not perfect, though)
- Removed obsolete TODOs
- Fixed sfPlayMovie to return if the movie playback was aborted or not; this is used by RtZ to determine if it should display the credits screen after the intro movie

svn-id: r35997
2009-01-22 13:04:29 +00:00
Filippos Karapetis fa755b3729 Some updates/observations on script functions
svn-id: r35850
2009-01-13 21:08:22 +00:00
Filippos Karapetis 305954d34a Save game headers are now verified
svn-id: r35848
2009-01-13 19:29:55 +00:00
Benjamin Haisch 78776638d3 Reworked the sound energy code
svn-id: r35845
2009-01-13 16:18:22 +00:00
Filippos Karapetis c2db2b91a5 - Music now works in LGoP2
- Changed the default music volume to 127, down from 255
- Added an explanation/FIXME for the out of sync mouth animations in RTZ
- Added some TODOs and removed some obsolete ones

svn-id: r35843
2009-01-13 10:11:52 +00:00
Filippos Karapetis ef78bbdf0d The sound energy buffer is now cleared inside decompressSound()
svn-id: r35753
2009-01-06 13:09:16 +00:00
Filippos Karapetis de7721c638 Sound energy values are now stored in a list, to account for the fact that the original decompressed sounds on the fly, but we're decompressing them when the sound is being loaded
svn-id: r35752
2009-01-06 12:33:59 +00:00
Paul Gilbert e2463f77cd Changed sfGetSoundEnergy to use the correct soundEnergy value from decompressing sounds for proper lip-sync
svn-id: r35751
2009-01-06 10:40:38 +00:00
Eugene Sandulenko 696897b058 Whoa! Removing trailing spaces.
svn-id: r35648
2009-01-01 15:06:43 +00:00
Benjamin Haisch 99f8add65c - Declared all stack functions as inline
- Sleep some ms after 500 opcodes to reduce CPU load
- Fixed odd bug in LGoP2 where text disappeared quickly without waiting for user input by returning 0x38 in sfShowPage

svn-id: r34746
2008-10-04 21:40:14 +00:00
Benjamin Haisch cea848303b Return 32000 in sfGetCdTime instead of 0; this fixes the Manhole intro/credits (until the function is actually implemented)
svn-id: r34671
2008-09-28 20:02:01 +00:00
Benjamin Haisch 7bceafb3f2 - Fixed sprite drawing in Rodney's Funscreen
- Handle mouse button up events and event number fixes in MadeEngine::handleEvents()
- Use milliseconds -> game ticks calculation based on Windows version of the original engine
- "Rodney's Fun Screen" -> "Rodney's Funscreen"

svn-id: r32731
2008-06-18 11:01:51 +00:00
Benjamin Haisch fb31c62ad8 - Added support for Rodney's Fun Screen
- Added audio cd playback (still kinda broken though)
- Renamed getObjectPropertyPtr to findObjectProperty

svn-id: r32669
2008-06-12 11:09:04 +00:00
Benjamin Haisch b9776d46b2 - Implemented opcodes: sfHomeText, sfDrawAnimPic
- Comments on unneeded opcodes
- Simplified getting/setting strings in Objects

svn-id: r32361
2008-05-29 12:57:11 +00:00
Benjamin Haisch 4afd19ad0f Fixed premature stopping of sounds/voices.
svn-id: r32354
2008-05-28 22:15:10 +00:00
Benjamin Haisch aa02a6758a - Hopefully fixed 'responsiveness' of the mouse cursor/event handling
- Disabled auto dirty rects which caused major gfx problems
- Added default mouse cursor for Manhole: N&E
- Fixed sound rate for Manhole: N&E
- Don't automatically show mouse cursor when a new cursor was loaded

svn-id: r32279
2008-05-26 07:27:46 +00:00