Commit Graph

72 Commits

Author SHA1 Message Date
Filippos Karapetis
72a523059f SAGA: Fix odd memcmp() conditions, as reported by clang
Thanks to LordHoto for pointing those out - they followed the incorrect
paradigm of previous code
2013-07-02 03:53:09 +03:00
Torbjörn Andersson
b77a516414 SAGA: Fix memory leak in Mac version of IHNM
CID 1004123. Unfortunately, I do not have this version of the game
so I cannot verify that this fix is correct, but it should be.
2013-04-27 06:38:48 +02:00
Christoph Mallon
e618e6794d JANITORIAL: Remove unnecessary empty default constructors/destructors. 2012-03-13 15:42:30 +01:00
Matthew Hoops
d876dddd45 SAGA: Rework the way audio is buffered
The streams that are created are now used directly instead of SAGA creating its own RawStream after decoding it. In addition, this should fix ADPCM-compressed sounds on big endian systems (as the code was treating the result of readBuffer() to always be LE, whereas it's actual native endian).

I've also clarified the bugfix to bug #1256701. It only applies to 16-bit PCM data and the size for other data is no longer truncated too ;)
2011-12-24 11:09:54 -05:00
Matthew Hoops
4164b31e4a SAGA: Properly handle ITE Mac sound resources 2011-12-24 11:09:54 -05:00
Filippos Karapetis
0d3a2267c7 SAGA: Removed several game flags, which are now found more reliably on the fly
- The logo screens of all ITE versions are shown correctly now
- Wyrmkeep versions, demo versions with scene substitutes, demos with
mono music and demo versions with LE VOX encoded voices are all found
automatically now
2011-07-09 15:59:30 +03:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Andrew Kurushin
67cc1b8a84 SAGA: replace Resource:loadResource malloc with ByteArray class
svn-id: r53779
2010-10-24 22:17:44 +00:00
Andrew Kurushin
e3ea3b5b7e SAGA: replace Scene::_resourceList, Interface::_inventory malloc arrays with Common::Array
svn-id: r53773
2010-10-24 20:22:21 +00:00
Andrew Kurushin
f24394b85f SAGA: replace Actor::_pathCell, Anim::*, Converse::text, IsoMap::*, Music::_songTable, ObjectMap::*, PalAnim::*, Scene::sceneLut, SndRes::_fxTable* malloc based arrays with Common::Array implementation
add ByteArray type
fix debug Tile Hittest frame drawing
debug 0x%x => 0x%X

svn-id: r53719
2010-10-22 23:13:17 +00:00
Eugene Sandulenko
8dca57e4e9 SAGA: Fix bug #3065113 with patched sound glitch
Bug #3065113: "ITE demo: patched sound at intro is not played correctly"

svn-id: r52975
2010-10-02 09:08:05 +00:00
Willem Jan Palenstijn
c81f009e8f SAGA: Fix audio flags for VOC sounds
This is a regression from r43470 and fixes the speech in the intro.
Bug #3065113.

svn-id: r52727
2010-09-14 22:16:31 +00:00
Eugene Sandulenko
d1c34efad9 SAGA: Fix bug #2886141.
Bug #2886141: "ITE: Cumulative Snoring sounds in Prince's Bedroom".
Implemented safeguard against running same looped sound more
than once.

svn-id: r49725
2010-06-15 10:25:34 +00:00
Filippos Karapetis
80acb21a56 Added automatic detection of the IHNM demo
svn-id: r49047
2010-05-16 10:36:21 +00:00
Max Horn
21e1cc4cf8 Switch makeADPCMStream to DisposeAfterUse::Flag
svn-id: r47736
2010-01-31 02:11:41 +00:00
Filippos Karapetis
8606982590 Moved the Shorten decoder inside the SAGA engine, as it's the only one using it (and it's still unfinished, too)
svn-id: r47592
2010-01-27 08:40:48 +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
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
Andrew Kurushin
aa147a2f5a refactor resource module:
- struct ResourceContext => class ResourceContext
- replace "*alloc","free" with array templates
- simplify createContexts routines

svn-id: r46254
2009-12-04 17:52:42 +00:00
Filippos Karapetis
a9eb98c218 Simplified the sound playing code by removing the boolean variables for signed, stereo, endian and sample bit information - now sound flags are used instead. Some cleanup.
svn-id: r43470
2009-08-17 11:49:07 +00:00
Filippos Karapetis
3dfb1c3a96 Made sound effect playing code consistent for compressed and uncompressed sounds. MemoryReadStream is used again instead of SeekableSubReadStream, as there will be issues when multiple sound effects or voices are played simultaneously
svn-id: r43466
2009-08-17 11:06:27 +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
ba4b872a20 Silenced MSVC warning
svn-id: r35883
2009-01-17 21:17:58 +00:00
Filippos Karapetis
cfec23cf0d Use skip instead of seek
svn-id: r35763
2009-01-06 23:33:01 +00:00
Filippos Karapetis
80832ffb8f Got rid of explicit game sound info
svn-id: r35727
2009-01-04 15:44:33 +00:00
Filippos Karapetis
203358bcb7 Improved handling of sound resources
svn-id: r35724
2009-01-04 14:38:03 +00:00
Filippos Karapetis
90d762c261 Wrapped more engine-specific code around appropriate ifdefs
svn-id: r35679
2009-01-02 19:10:51 +00:00
Filippos Karapetis
d5b6996c45 - Split the IHNM script functions into a different file
- Added two new defines, ENABLE_IHNM and ENABLE_SAGA2 (enabled by default), which can be used to remove the parts of the SAGA engine which are specific to IHNM and SAGA 2 games. Hopefully, this will reduce the size of the engine even more for platforms with little memory (e.g. the Nintendo DS)

svn-id: r35672
2009-01-02 16:52:38 +00:00
Filippos Karapetis
41dce61a30 Simplified sound resource loading
svn-id: r35649
2009-01-01 16:02:43 +00:00
Eugene Sandulenko
696897b058 Whoa! Removing trailing spaces.
svn-id: r35648
2009-01-01 15:06:43 +00:00
Filippos Karapetis
94548ed27c Several fixes and cleanup for sound resource loading. Sound information for sound types that are detected automatically is read from the files themselves
svn-id: r35644
2008-12-31 22:10:09 +00:00
Filippos Karapetis
cae6bdac08 Preliminary Shorten audio support for SAGA 2 games. It's still very wrong and needs further work, but it's a start
svn-id: r35626
2008-12-31 11:46:21 +00:00
Filippos Karapetis
14434659bc - Removed game sound information for sound types that it can be determined automatically. The game sound information left is now used as override info for certain sound types (e.g. PCM)
- Added stubs for Shorten audio type, used in SAGA2 games

svn-id: r35616
2008-12-29 18:35:18 +00:00
Filippos Karapetis
9a5f45a40c - IHNM Mac loads correctly again
- Removed isBigEndian from GameSoundInfo
- Removed GF_BIG_ENDIAN_DATA
- Stopped loading the options panel for non-interactive ITE demos (it doesn't exist)
- Fixed crash when exiting from non-interactive ITE demos

svn-id: r35615
2008-12-29 17:30:29 +00:00
Filippos Karapetis
437384a838 - Split the SAGA resource manager in 3 different ones, depending on the resource type (RSC for ITE, RES for IHNM and HRS for DINO/FTA2). The SAGA 2 HRS resource manager is still a stub
- Added detection for the voice file of FTA2

svn-id: r35484
2008-12-22 14:13:15 +00:00
Filippos Karapetis
2257db88d3 - Added some stubs for the SAGA2 games dino and fta2
- Stopped loading the isomap and puzzle game modules for IHNM, as they are not used for that game (this saves some memory for IHNM)
- Removed getDisplayWidth() and getDisplayHeight()

svn-id: r35473
2008-12-21 22:52:44 +00:00
Filippos Karapetis
d0f4f97ea9 Cleaned up the mess with game IDs and game types: removed game types, reduced the game IDs and added game features where necessary
svn-id: r35467
2008-12-21 15:59:05 +00:00
Filippos Karapetis
c6947285d2 Fixed a regression of commit #34458. Sound data for compressed sounds was read incorrectly. Fixes bugs #2422371 - "ITE: Talk animation takes longer than speaking" and #2111496 - "IHNM: Speech is garbled"
svn-id: r35320
2008-12-12 22:56:56 +00:00
Max Horn
6aa12974bd SAGA: Some code cleanup
svn-id: r34703
2008-09-30 12:58:27 +00:00
Filippos Karapetis
726e7e7ef9 Committed patch #2100962 - "Saga engine reduced memory usage"
svn-id: r34458
2008-09-09 07:05:47 +00:00
Filippos Karapetis
966239fc52 Code cleanup:
- Removed sagaresnames.h
- Moved all special scenes to scene.h, and named them consistently (e.g. RID_ITE_OVERMAP_SCENE -> ITE_SCENE_OVERMAP)
- Moved all resources which were used by the ITE intro into ite_introproc.cpp
- Removed several defines which were only used once (e.g. the SFX names)
- Reordered the GameResourceDescription resources so that ITE and IHNM specific resources are placed in the end
- Updated the comment about the IHNM Mac music
- Changed the callocs in loadPalAnim to mallocs, like in the rest of the code
- Removed the MEM error

svn-id: r32282
2008-05-26 11:10:46 +00:00
Torbjörn Andersson
5a5d5c02e1 Fixed warning. (You shouldn't have to use floor() to simulate integer math
anyway.)

svn-id: r31411
2008-04-05 16:02:28 +00:00
Filippos Karapetis
44ba7f97a9 Fixed regression from previous commit
svn-id: r31410
2008-04-05 14:28:24 +00:00
Eugene Sandulenko
c8061850ed Simplify code
svn-id: r31409
2008-04-05 14:18:32 +00:00
Filippos Karapetis
2da922081c Speech is now played correctly in the Macintosh version of IHNM
svn-id: r31405
2008-04-05 13:19:12 +00:00
Filippos Karapetis
99283e9e54 Sound effects in the Macintosh version of IHNM are now working
svn-id: r31404
2008-04-05 12:36:52 +00:00
Filippos Karapetis
99a5d11544 Don't change the voice bank when no voice files are present. This will stop SAGA games from crashing when no voice files are present in talkie versions of ITE and IHNM (regression from commit #30648)
svn-id: r30989
2008-02-27 18:17:50 +00:00
Jordi Vilalta Prat
66e9d4f5e8 Removed trailing spaces.
svn-id: r30664
2008-01-27 19:47:41 +00:00
Filippos Karapetis
5b6dbecb62 Limit the number of simultaneous open files in IHNM to 7, down from 12. This is necessary for devices that can keep a limited amount of files open simultaneously, like the PSP
svn-id: r30648
2008-01-27 14:32:08 +00:00