Commit Graph

263 Commits

Author SHA1 Message Date
Johannes Schickel
71bdb86e02 Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16

Conflicts:
	graphics/png.cpp
2011-05-01 16:54:45 +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
Ori Avtalion
cd6ee0589d JANITORIAL: Format forward declarations to follow convention 2011-04-28 12:20:34 +03:00
spookypeanut
db24f1e068 GROOVIE: fix for bug #3093310
Instead of crashing if the save game isn't writable, popup a
gui message and then skip
2011-04-25 08:51:21 +01:00
Scott Thomas
accb0c2a5d GROOVIE: Add timer for MusicPlayerMPEG4 (required for music fade in/out) 2011-04-20 23:40:03 +09:30
Scott Thomas
daede376e1 GROOVIE: Tweak supernatural teeth detection (for VDX playback speed) 2011-04-20 23:40:02 +09:30
Scott Thomas
2cc7b80b34 GROOVIE: Set some T7G iOS m4a files to loop based on DOS XMI looping 2011-04-20 23:40:01 +09:30
Johannes Schickel
8ff527ac4e GROOVIE: Replace TODO about YUV data with a comment.
Since the surfaces in question are never used outside the ROQ code it is fine
to use a faked RGB pixel format even when they are actually YUV data.
2011-04-19 15:05:18 +02:00
Johannes Schickel
89fe3ff141 GROOVIE: Do not access Surface::bytesPerPixel anymore. 2011-04-17 20:56:16 +02:00
Johannes Schickel
aca6733721 GROOVIE: Prefer Surface::create taking a PixelFormat over the one taking a byte depth.
Groovie seems to use Graphics::Surface also to store YUV data, I used a fake
PixelFormat setup there and added a TODO about it.
2011-04-17 16:26:30 +02:00
Scott Thomas
f33810a8c0 GROOVIE: Implement resource search-by-name for v2 games 2011-04-15 21:46:08 +09:30
Scott Thomas
8e9dbe5c3d GROOVIE: Use uint32 when searching for a video id by name
This brings ResMan::getRef into line with the rest of the engine.
2011-04-15 21:46:06 +09:30
Max Horn
2e095e25f2 ALL: centre -> center 2011-04-14 14:34:28 +02:00
Max Horn
84184aabc0 ALL: colour -> color 2011-04-14 14:12:35 +02:00
Matthew Hoops
6d153f311c Merge remote branch 'upstream/master' into t7g-ios
Conflicts:
	video/qt_decoder.cpp
2011-04-13 16:04:29 -04:00
Scott Thomas
47c2a9adbe GROOVIE: MPEG4 player should override unload so scripts can stop music 2011-04-13 22:22:19 +09:30
Scott Thomas
f54769f987 GROOVIE: Use provided OCReMix song for T7G iOS credits 2011-04-13 22:19:21 +09:30
Max Horn
0ce2ca4e00 COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
2011-04-12 16:53:15 +02:00
Scott Thomas
2e59957471 GROOVIE: T7G iOS isn't a CD game - don't check or prompt user 2011-04-11 19:33:01 +09:30
Scott Thomas
412a152e6b GROOVIE: T7G iOS patches in 7/11 soundtrack files during intro sequence 2011-04-11 19:27:28 +09:30
Scott Thomas
5c4d7baa06 GROOVIE: Determine correct MPEG4 resource to load for based on fileref 2011-04-08 21:08:47 +09:30
Scott Thomas
c44b509b05 GROOVIE: Store resource name in ResInfo struct 2011-04-08 21:00:59 +09:30
Matthew Hoops
25236ebde1 GROOVIE: Implement MusicPlayerMPEG4::updateVolume() 2011-04-07 20:34:54 -04:00
Matthew Hoops
9c2fc6721d GROOVIE: Hook into the new QuickTimeAudioStream code 2011-04-07 19:40:07 -04:00
Scott Thomas
d40874d6f4 GROOVIE: Add detection for T7G iOS based on m4a files 2011-04-08 07:21:21 +09:30
Matthew Hoops
af59f33b7b GROOVIE: Add a stub MPEG4 music player 2011-04-07 10:52:58 -04:00
Scott Thomas
d5ff478100 GROOVIE: Fix brace formatting. 2011-04-08 00:17:59 +09:30
Scott Thomas
7c39b844b8 GROOVIE: Add additional play-speed modes to T7G.
These two speed modes enable faster movement throughout the mansion.
iOS mode matches the behavior of the official iOS release while
tweaked mode additionally uses original framerate for 'teeth'
animations.
2011-04-07 23:38:35 +09:30
Max Horn
e70fd59b35 ENGINES: Further simplify pseudo MidiDrivers; fix some regressions
The regression affected AGOS and maybe some others; specifically,
the real MidiDriver would have been deleted twice -- I previously
missed that the Engine instances takes care of freeing the real
MidiDriver, not the MidiPlayer wrapping it.

This commit should clarify the ownership of the real MidiDriver for
most pseudo MidiDrivers.
2011-03-23 16:49:41 +01:00
Max Horn
29847ea42d AUDIO: Change several fake MidiDrivers to MidiDriver_BASE subclasses
Many engines follow the advice in audio/midiparser.h and create a
"pseudo-MidiDriver" subclass. But MidiParser really only needs a tiny
subset of the MidiDriver capabilities, namely those found in
MidiDriver_BASE. So we try to subclass from that whenever possible; this
allows us to remove many stub methods, and enables further future
simplifications.
2011-03-23 15:25:47 +01:00
Max Horn
8982fff1b7 AUDIO: Add pure virtual MidiDriver::isOpen() method
This in turn enables modifying MidiDriver_MPU401::close() to allow
it to be called on a midi driver that has not yet been opened.

The specific issue that triggered me to make these changes was a
crash-upon-quit in HUGO, caused by it instantiating a midi driver,
then encountering an error (missing hugo.dat) *before* having
opened the new midi driver; the general cleanup code then tries
to close the (not yet opened) midi driver -> kaboom

Also fixed some engines which were leaking MidiDriver instances.
2011-03-22 23:51:47 +01:00
dhewg
79ba16a89d GROOVIE: Set global volume levels 2011-03-19 16:04:52 +01:00
dhewg
12a561f119 GROOVIE: Mark overwritten members as virtual 2011-03-04 21:31:14 +01:00
Jordi Vilalta Prat
dd43dfc81c GROOVIE: Simplify the cursor palette reading. 2011-02-16 12:25:11 +01:00
Johannes Schickel
5d9e69146c GROOVIE: Adapt to setPalette/grabPalette RGBA->RGB change. 2011-02-14 17:08:32 +01:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn
ab039812e7 COMMON: OSystem now has a PaletteManager
svn-id: r55806
2011-02-07 17:52:38 +00:00
Matthew Hoops
c18035c07a GROOVIE: Disable other T7G Mac entries as they should no longer be needed
svn-id: r55765
2011-02-04 15:42:58 +00:00
Matthew Hoops
2be57434a1 COMMON: Only take the md5 of the resource fork data section
Since various apps can modify the type/creator of the files, we can't rely on the header of the resource fork to take the md5. I've therefore also recalculated all of the detector entries (all 5 of them) that use the Mac resource fork code.

svn-id: r55764
2011-02-04 15:27:56 +00:00
Jordi Vilalta Prat
2f7c04e54b GROOVIE: Fix a memory leak reported by cppcheck.
svn-id: r55150
2011-01-07 17:44:20 +00:00
Henry Bush
49d529cb7a GROOVIE: Add two new t7g detection entries, one from bug tracker, one from me
svn-id: r54961
2010-12-19 08:56:42 +00:00
Max Horn
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03:07 +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
Max Horn
82e473bc3b BACKENDS: Partial merge of gsoc2010-opengl: Audio CD changes only
This commit contains the AudioCDManager changes from the gsoc2010-opengl
branch. The other changes in that branch are restricted to the backends
directory only (plus configure).

The Nintendo DS and Dreamcast ports still need to be ported over to
the new Audio CD system, but that should be fairly easy to do.

svn-id: r54147
2010-11-08 22:53:36 +00:00
Max Horn
aa54388de0 ENGINES: Do not include engines/savestate.h from engines/game.h
svn-id: r54119
2010-11-07 17:15:46 +00:00
Max Horn
e27b05ef35 COMMON: Rename String::printf() to String::format()
This is a first step towards getting rid of all uses of regular printf,
fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase.

The name format() reflects the purpose of the function, and parallels
String.format() in Java, boost::format, and others.

svn-id: r54004
2010-11-01 16:02:28 +00:00
Jordi Vilalta Prat
9ab69ab6f4 GROOVIE: Fix bug #3095031 (regression in Russian T7G).
Additionally fixed some NEWS file punctuation.

svn-id: r53874
2010-10-27 14:31:20 +00:00
Max Horn
4ccce19876 ENGINES: Enhance namespace comments a bit
svn-id: r53484
2010-10-15 12:48:19 +00:00
Johannes Schickel
75e8452b6e OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend
changes into the branch. I suppose the gp2x backend and probably all new
backends, i.e. gph, dingux etc., might not compile anymore.

Since I have no way of testing those it would be nice if porters could look
into getting those up to speed in this branch.

svn-id: r53399
2010-10-13 03:57:44 +00:00
Johannes Schickel
6588398ce6 MIDI: Send a reset MIDI device signal on startup.
This is currently done in the engine code. I adapted AGI, AGOS, DRACI,
GROOVIE, LURE, MADE, QUEEN, SAGA, SKY, TINSEL and TOUCHE to send a reset
device on startup. The sound output still works fine (started up a game
from every engine), so this should hopefully not introduce any regressions.

As far as I can tell it seems that SCUMM does send a proper device reset, so
I did not touch it. KYRA only sends a proper reset for MT-32 currently. I am
not sure about SCI though.

This fixes bug #3066826 "SIMON: MIDI notes off when using RTL after SCI".

svn-id: r52736
2010-09-15 22:00:20 +00:00
Jordi Vilalta Prat
806ee79a7b GROOVIE: Improve sound handling.
- Obey the mute setting.
- Report the supported music types.

svn-id: r52633
2010-09-08 09:37:33 +00:00
Alejandro Marzini
fb4086cadb Merged from trunk, from Rev 50841 to HEAD
svn-id: r51495
2010-07-30 05:28:09 +00:00
Filippos Karapetis
8145fea6b9 Silenced false positive warning in MSVC
svn-id: r51274
2010-07-25 13:32:15 +00:00
Jordi Vilalta Prat
8cc6d8d0eb GROOVIE: Fix compilation.
svn-id: r51206
2010-07-23 13:05:16 +00:00
Jordi Vilalta Prat
a92576f08b GROOVIE: Optimize the VDX player.
- Make some small optimizations to the VDX player. The changes aren't
  noticeable on desktop computers, but it showed changes on the profiler.
  Let's see if it helps limited platforms.
- Clarify a few variable names and clean their usage.

svn-id: r51205
2010-07-23 12:56:57 +00:00
Max Horn
1d4c82885d DEBUGGER: Simplify how our console debugger works / is used
* Remove _isAttached member var and isAttached method
* Engines now always call the onFrame method; whether it does
  something is decided by the debugger class resp. its subclasses
* Make detach() protected instead of private, so that subclasses
  can invoke it
* Remove _detach_now member var (call detach() instead).
* Rename _frame_countdown to _frameCountdown and properly
  document it.
* Add more doxygen comments
* Cleanup

svn-id: r50963
2010-07-17 18:38:42 +00:00
Alejandro Marzini
609e08d5db Merged from trunk, from Rev 49499 to HEAD
svn-id: r50840
2010-07-13 04:31:15 +00:00
Alejandro Marzini
3c607ef289 Cleanup and documentation.
svn-id: r50667
2010-07-05 01:10:29 +00:00
Alejandro Marzini
86fbe02933 Fixed "declared class seen before as struct" warning on MSVC.
svn-id: r50611
2010-07-03 00:44:05 +00:00
Matthew Hoops
1a675dcd86 Add support for the 'fallback' MIDI in T7G's intro when the CD track cannot be found. The intro music in the Mac version now plays.
svn-id: r50564
2010-07-01 18:47:27 +00:00
Florian Kagerer
c35e350531 AUDIO: get rid of MDT_PREFER_MIDI since it should be sufficient to either select MDT_PREFER_MT32 or MDT_PREFER_GM
svn-id: r50288
2010-06-25 20:51:57 +00:00
Matthew Hoops
99807b8894 Fix uncompressed MIDI in T7G Mac.
svn-id: r50165
2010-06-22 19:39:30 +00:00
Jordi Vilalta Prat
33b991ee9d Groovie: Add support for the compressed MIDI files of T7G Mac.
svn-id: r50163
2010-06-22 19:21:05 +00:00
Max Horn
bbad3f333a Patch #1956501: "GUI/LAUNCHER: Midi device selection"
svn-id: r50128
2010-06-21 21:36:36 +00:00
Matthew Hoops
faef4ab349 Check against the signature of Groovie v2 cursors with MKID_BE, makes it easier to see what it's doing.
svn-id: r50114
2010-06-21 14:44:18 +00:00
Torbjörn Andersson
f10b1a23f8 Fixed a few cppcheck errors.
svn-id: r49919
2010-06-17 05:40:48 +00:00
Filippos Karapetis
9938661ffa Surface is a struct, not a class
svn-id: r49883
2010-06-15 18:36:05 +00:00
Eugene Sandulenko
44a39ffbc6 AdvancedDetector: Add new parameter directoryGlobs.
Without this parameter mass detection gave tons of false alarms.
Use globbing for narrowing down the depth search.

svn-id: r49788
2010-06-15 10:59:23 +00:00
Alejandro Marzini
e1ef3cd9fc Renamed getAudioCD to getAudioCDManager.
svn-id: r49678
2010-06-15 04:13:12 +00:00
Eugene Sandulenko
4d517ed0e9 Extended advancedDetector with depth parameter.
Now AD can search nested directories. By default it is turned off,
but there is new parameter to ADParameters struct. Usually value
of 2 is good enough for all purposes.

svn-id: r49653
2010-06-14 14:50:23 +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
Jordi Vilalta Prat
0e95d8a5fa Groovie:
- Rewritten T7G's font code to subclass Graphics::Font and make it cleaner.
- Use theme fonts for the Mac version of T7G (which used ugly system fonts
  originally). With this the Mac version should be completable.
- Cleanup include interdependencies.

svn-id: r49487
2010-06-07 17:14:42 +00:00
Matthew Hoops
f76f64774a Add initial support for T7G Mac MIDIs. Compressed MIDI is not yet supported.
svn-id: r49119
2010-05-20 17:22:45 +00:00
Jordi Vilalta Prat
fd5000fb79 Groovie: Add support for MT-32 custom instruments
svn-id: r49117
2010-05-20 15:16:09 +00:00
Jordi Vilalta Prat
75992f856c Groovie: Tweak a filename of the Mac version of T7G
svn-id: r49112
2010-05-20 00:10:53 +00:00
Matthew Hoops
1c0ffdc42d Add support for loading T7G Mac resources using the MacResManager.
svn-id: r49005
2010-05-11 15:41:31 +00:00
Max Horn
2149a2383d Reduce indirect header dependencies further
svn-id: r48936
2010-05-04 12:00:16 +00:00
Max Horn
970745e60c Move DebugChannel related code to new header
svn-id: r48935
2010-05-04 11:59:22 +00:00
Max Horn
b3e404109c Move initGraphics and initCommonGFX from to new header.
These functions are only used internally be Engine subclasses, and
by moving them to a separate header we can reduce indirect header
dependencies.

svn-id: r48934
2010-05-04 11:58:12 +00:00
Max Horn
5568a8473b Get rid of Engine::_gameDataDir.
This greatly reduces indirect dependencies on several header files
from common.

svn-id: r48933
2010-05-04 11:56:52 +00:00
Max Horn
460d69e885 COMMON: Move DebugChannel stuff into a new DebugMan singleton
svn-id: r48821
2010-04-27 21:40:52 +00:00
Max Horn
a1840bd573 AUDIO: Rename Mixer::playInputStream to playStream
svn-id: r48637
2010-04-12 09:14:17 +00:00
Max Horn
92c896d883 Patch #2973290: Semicolon cleanup
svn-id: r48359
2010-03-22 20:28:08 +00:00
Max Horn
cac0ac66e2 COMMON: Get rid of Common::StringList
svn-id: r48287
2010-03-18 15:54:40 +00:00
Max Horn
c934642bdb COMMON: Move typedef StringList from str.h to new header str-array.h
This removes the dependency on array.h from str.h.
Also, begun migration from the confusing type name "StringList" to
the more appropriate StringArray.

svn-id: r48282
2010-03-18 15:09:24 +00:00
Max Horn
d78dba3bca COMMON: Move Common::RandomSource to common/random.*
svn-id: r48279
2010-03-18 15:07:11 +00:00
Max Horn
1565f14bc1 Moved audio stream implementations (for MP3, FLAC, etc.) to new dir sound/decoders/
svn-id: r47579
2010-01-26 22:48:45 +00:00
Johannes Schickel
aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Max Horn
dc5e08e623 Move raw audio flags from sound/mixer.h to sound/raw.h
svn-id: r47395
2010-01-19 22:30:33 +00:00
Max Horn
557bb394de Get rid of Mixer::FLAG_AUTOFREE.
Also fix several recently introduced new/delete vs. malloc/free mismatches.

svn-id: r47369
2010-01-19 00:56:29 +00:00
Max Horn
b8f2a3a342 cleanup
svn-id: r47333
2010-01-16 21:34:36 +00:00
Johannes Schickel
0d995c5920 Rename all "Adlib" uses to "AdLib" to match the real name of the sound card / company.
Check this for reference:
http://en.wikipedia.org/wiki/Ad_Lib,_Inc.
http://www.crossfire-designs.de/images/articles/soundcards/adlib.jpg (note the upper left of the card)

This commit does not touch "adlib" and "ADLIB" uses!

Also it does not update all the SCUMM detection entries, which still use "Adlib".

svn-id: r47279
2010-01-12 21:07:56 +00:00
Max Horn
be8371fb07 Replace AppendableAudioStream by QueuingAudioStream
svn-id: r47189
2010-01-09 00:19:13 +00:00
Max Horn
0cf53b025d Move DisposeAfterUse::Flag from Common to global namespace, and into a new header common/types.h
svn-id: r47180
2010-01-08 22:07:35 +00:00
Torbjörn Andersson
72eb9ec9ea Fixed a bunch of cppcheck warnings. Mostly about checking if a pointer is null
before freeing it, which isn't necessary.

svn-id: r46941
2010-01-03 19:37:43 +00:00
Jordi Vilalta Prat
a22fd021e9 Move the LZSS code to the Groovie namespace.
svn-id: r46867
2010-01-02 00:07:20 +00:00
Scott Thomas
a55e0531e8 11H: Add some more opcode stubs
svn-id: r46524
2009-12-24 08:35:11 +00:00
Scott Thomas
b2ae0e56c5 Tweak Groovie2 video buffer handling
svn-id: r46523
2009-12-24 08:33:37 +00:00
Max Horn
c8873d8492 Changed MidiDriver::createMidi to take a MidiDriverType instead of an int
svn-id: r46316
2009-12-09 18:12:51 +00:00
Max Horn
5f178e8650 Fix some MSVC warnings (part of patch #2909981)
svn-id: r46291
2009-12-08 20:44:57 +00:00