Commit Graph

65 Commits

Author SHA1 Message Date
D G Turner
9c2759c1a7 SAGA: Replace snprintf() usage with Common::String::format()
Safer and less portability issues.
2011-06-02 20:54:49 +01:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
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
Andrew Kurushin
67cc1b8a84 SAGA: replace Resource:loadResource malloc with ByteArray class
svn-id: r53779
2010-10-24 22:17:44 +00:00
Andrew Kurushin
b10cd22d51 SAGA: replace Events malloc base linked list with Common::List
svn-id: r53751
2010-10-23 23:07:10 +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
Andrew Kurushin
521eb95aea SAGA: fix gcc warn
svn-id: r53679
2010-10-21 22:35:57 +00:00
Andrew Kurushin
8b72f49460 SAGA: replace Script and Thread "::*alloc" & "::free" with Common::Array
svn-id: r53678
2010-10-21 22:32:50 +00:00
Andrew Kurushin
6be5d2554d SAGA: replace StringTable "::realloc" with Common::Array; reduce amount of memory for every string table
svn-id: r53651
2010-10-20 20:53:32 +00:00
Torbjörn Andersson
54b2a8c98d JANITORIAL: Cleanup (mostly whitespace)
svn-id: r53161
2010-10-12 04:19:58 +00:00
Torbjörn Andersson
aa631a64dc Removed unused variable. I believe thread->_instructionOffset serves the same
purpose that 'addr' was inteded to.

svn-id: r50951
2010-07-16 23:23:30 +00:00
Filippos Karapetis
b57bab8e3b Added automatic detection for the non-interactive ITE demos
svn-id: r49046
2010-05-16 10:23:44 +00:00
Filippos Karapetis
3f2471418d Fixed the music in some Mac versions of ITE and disabled some unused code for the original DOS demo of ITE
svn-id: r48139
2010-02-26 22:24:48 +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
Max Horn
51933629d1 Changed foo(void) to foo() in almost all non-backend source files
svn-id: r45616
2009-11-02 21:54:57 +00:00
Johannes Schickel
b3c6751b9b Strip trailing whitespaces in the whole code base.
svn-id: r40867
2009-05-24 15:17:42 +00:00
Max Horn
41bd7cd94b SAGA: changed _threadList back to a list of ScriptThread objs, instead of ptrs to instances.
svn-id: r39944
2009-04-11 21:38:41 +00:00
Filippos Karapetis
b3b8624869 Plugged another memory leak introduced with rev #39934
svn-id: r39936
2009-04-11 14:44:03 +00:00
Filippos Karapetis
7886aedebb Fixed a nasty regression from the script system rewrite (commit #35670), which will cause crashes under certain conditions, and probably makes SAGA games non-completable.
When a script thread is waiting for another thread, the current instruction offset should not be modified. The thread processing function would incorrectly continue in some special cases, and would incorrectly alter the current instruction offset. This becomes apparent in some special cases only, which made it hard to spot - plus, SAGA games have not been tested for 0.13.0, so there weren't any reports for this.

This change SHOULD go to the 0.13.0 branch, but we've already tagged...

svn-id: r38581
2009-02-20 10:49:43 +00:00
Filippos Karapetis
e504c0d8ab Removed unused code
svn-id: r36210
2009-02-03 17:02:57 +00:00
Filippos Karapetis
40d6a3c1e5 Split the script module into two parts, for SAGA1 and SAGA2 games
svn-id: r35689
2009-01-02 23:16:08 +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
32f73fd34c Rewrote the SAGA script system to use an opcode table, like in other engines
svn-id: r35670
2009-01-02 13:59:34 +00:00
Eugene Sandulenko
696897b058 Whoa! Removing trailing spaces.
svn-id: r35648
2009-01-01 15:06:43 +00:00
Filippos Karapetis
dd7ea11ac4 SAGA2 HRS resources should be loaded correctly now
svn-id: r35539
2008-12-25 15:19:33 +00:00
Filippos Karapetis
c8ca4d59bc - Implemented the SAGA2 resource loader
- Some cleanup

svn-id: r35536
2008-12-25 12:09:24 +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
f3db2bf1c3 Added some more stubs for FTA2
svn-id: r35475
2008-12-21 23:43:12 +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
Christopher Page
dd423f803b SAGA: Fixed memory leaks in the SAGA engine
svn-id: r32673
2008-06-12 16:58:02 +00:00
Jordi Vilalta Prat
66e9d4f5e8 Removed trailing spaces.
svn-id: r30664
2008-01-27 19:47:41 +00:00
Paul Gilbert
6eb64102a4 Fix to remove a tab character from the GPL header
svn-id: r30238
2008-01-05 12:45:14 +00:00
Filippos Karapetis
71d54d1d36 Added a workaround for a problematic object in Gorrister's chapter (Edna's key)
svn-id: r29486
2007-11-12 19:49:42 +00:00
Filippos Karapetis
6e6a864c17 Don't draw objects with negative x/y values. Now, "ghost" objects are no longer created in the top left corner of the screen when picked up/used. The creation of such ghost objects is a script bug which exists in the original interpreter of IHNM as well. Also, removed a relevant workaround for the note in the first screen of Gorrister's chapter, as it's no longer needed
svn-id: r29477
2007-11-11 18:12:55 +00:00
Filippos Karapetis
e375e983ba Added a workaround for a bug in the original game scripts of IHNM with Edna, when the knife is used with her. Fixes bug #1826871 - "IHNM: Edna's got two hearts but loves to be on the hook"
svn-id: r29461
2007-11-09 17:06:22 +00:00
Filippos Karapetis
87e2f43273 It's now possible to exit the screens with Gorrister's heart in IHNM normally (i.e by walking to the exit, not using it) - like the original
svn-id: r29349
2007-11-01 00:33:12 +00:00
Filippos Karapetis
b225f01d14 Added a workaround for an incorrect hitzone in IHNM, (Gorrister's chapter). Now, the graffiti to the left in the toilet screen can be examined correctly. Also, performed some clean-up
svn-id: r29264
2007-10-27 11:42:17 +00:00
Filippos Karapetis
cc76fbee56 Added a workaround for a script bug in IHNM, which occurs in the original as well. An invisible note will no longer be created in the top left corner of the screen, when the note in the first screen of Gorrister's chapter is read
svn-id: r29247
2007-10-22 20:41:58 +00:00
Filippos Karapetis
f002fcf98a IHNM does not have excuse texts
svn-id: r29145
2007-09-30 13:19:31 +00:00
Eugene Sandulenko
9a9e9d21a8 Moved MemoryStreamEndian from Saga to Common.
svn-id: r29038
2007-09-23 09:59:10 +00:00
Filippos Karapetis
7524244581 Added a workaround for a bug with Gorrister's heart, which exists in the original game scripts of IHNM
svn-id: r29024
2007-09-22 17:57:45 +00:00
Filippos Karapetis
990e9a7828 Script modules are now unloaded correctly when changing chapters in IHNM
svn-id: r28918
2007-09-16 04:22:52 +00:00
Filippos Karapetis
5fa2b1a3c5 Palette fade in when a cutaway starts in IHNM is working now. Also, the fade mode is properly set in all cases where palette fadeout is used. Some code formatting
svn-id: r28904
2007-09-15 12:09:56 +00:00
Filippos Karapetis
fef707a2dd The right button verb in IHNM will no longer be invalid for some hitzones (e.g. "Quit game the door")
svn-id: r28903
2007-09-15 03:08:58 +00:00
Filippos Karapetis
05ba86577e Added a note on mouse right button action for IHNM
svn-id: r28721
2007-08-25 13:01:22 +00:00
Filippos Karapetis
4722075da3 Removed an obsolete TODO
svn-id: r28642
2007-08-17 05:57:32 +00:00
Filippos Karapetis
617a500ef2 IHNM and ITE: ScummVM will no longer crash when loading games from the command line
svn-id: r28394
2007-08-01 21:47:17 +00:00
Filippos Karapetis
9c07235a93 Auto-use no-walk hitzones in IHNM, like the original. This fixes the pathfinding problems in Benny's chapter
svn-id: r27370
2007-06-12 01:30:15 +00:00
Filippos Karapetis
2084bd4610 When using some items in IHNM, it was possible that the verb would incorrectly change from "use" to "use with" (e.g. the jukebox in the honky-tonk). This has been fixed
svn-id: r27356
2007-06-11 12:12:59 +00:00