Commit Graph

104 Commits

Author SHA1 Message Date
Torbjörn Andersson
d8a96c3032 Allowed IHNM to use the opSpeak opcode. Aborting that code path early meant
that the instruction wasn't fully read, so the next opcode would be wrong.
This is what caused it to crash.

To keep the game from hanging, I also allowed the engine to call the
_actors->direct() function for IHNM. This allows AM's intro speech to be
played in its entirety.

Since this includes the "hate" speech, I've removed that part from the
hard-coded intro. To get the right music playing, I've enabled the
sfPlayMusic() function for IHNM. This is pure guesswork, though. Once the
scene changes, the wrong music plays again. However, this is scene music,
i.e. not scripted.

It doesn't play the background sound. Looks like _fxTable[] isn't generated
for IHNM. More noticeably, until the scene changes it doesn't show any
graphics apart from the subtitles, which are drawn in the wrong colour and
(I believe) the wrong font.

svn-id: r18712
2005-08-26 12:07:31 +00:00
Eugene Sandulenko
2230d4b037 More debug output for IHNM
svn-id: r18656
2005-08-11 14:00:26 +00:00
Eugene Sandulenko
0af7371717 More IHNM fixes. Now it tries to start Ellen part but crashes at invalid
opcode because it tries to execute string data.

svn-id: r18654
2005-08-10 19:12:10 +00:00
Eugene Sandulenko
37f2a10ef6 Rename Actor class members to _members.
svn-id: r18645
2005-08-10 14:53:17 +00:00
Eugene Sandulenko
67b4b2c0d4 Implement part of chapter selection panel.
svn-id: r18643
2005-08-10 13:56:51 +00:00
Eugene Sandulenko
c6c5c8f868 o Fix some game parameters for IHNM
o Load voices LUT for IHNM

svn-id: r18640
2005-08-09 16:01:04 +00:00
Eugene Sandulenko
aebd226028 oops. debug output slipped in.
svn-id: r18638
2005-08-08 19:46:33 +00:00
Eugene Sandulenko
ccfedf0654 Fix bug #1252277 "ITE: Actions not performed under OS X"
svn-id: r18637
2005-08-08 19:40:55 +00:00
Eugene Sandulenko
215a94ae30 WIP on metaResources. Most resources are load. Now we start correct
scene. But there are following problems:

  o Inclomplete support for actors speech, so opSpeak is skipped
  o For some weird reason actors do not appear at all. Actually code seems to
    be trying to read only protagonist frames
  o It crashes on reading sprites due to wrong input

svn-id: r18624
2005-08-07 00:00:43 +00:00
Andrew Kurushin
b4bd032f54 fixed DUMMY resource in old mac cd
fixed intro voice at endscene

svn-id: r18616
2005-08-04 14:49:04 +00:00
Torbjörn Andersson
f69544ebd2 Prevent infinite loop in executeThreads() for IHNM. I don't know if this is
the correct behaviour, but surely it's less evil now?

svn-id: r18606
2005-07-31 16:38:15 +00:00
Eugene Sandulenko
6b4484472b Remove trailing whitespaces.
svn-id: r18604
2005-07-30 21:11:48 +00:00
Eugene Sandulenko
372a483ceb Thread-related IHNM differences.
svn-id: r18602
2005-07-30 14:41:25 +00:00
Eugene Sandulenko
ec4f7d3d7c Whitespaces
svn-id: r18595
2005-07-29 17:58:00 +00:00
Andrew Kurushin
fbc04b1ac7 assign sf94 name
svn-id: r18579
2005-07-24 13:41:49 +00:00
Eugene Sandulenko
a641c3add7 More IHNM differences
svn-id: r18574
2005-07-21 22:13:06 +00:00
Eugene Sandulenko
6c9f6e8def Partially implemented differences in IHNM script functions.
svn-id: r18573
2005-07-21 01:33:28 +00:00
Torbjörn Andersson
a818b83858 Removed unused variable.
svn-id: r18564
2005-07-19 20:31:10 +00:00
Andrew Kurushin
50c2d8954d finally Resource manager rewritten:
-adds patch file support
-global _vm removed

cleanups

svn-id: r18560
2005-07-19 19:05:52 +00:00
Andrew Kurushin
97337c4623 implemented sfGetNumber
now use MagicHat (be carefull not to exceed overall scene number)

svn-id: r18410
2005-06-19 14:06:20 +00:00
Torbjörn Andersson
b5b4d3d997 Don't access the thread after sfScriptGotoScene. As the comment points out,
the thread has been destroyed. This fixes a crash when leaving the ferret
guild lodge, and probably other places as well.

svn-id: r18399
2005-06-15 20:07:56 +00:00
Andrew Kurushin
e0d9d4eb4a some renames
svn-id: r18397
2005-06-15 19:26:32 +00:00
Eugene Sandulenko
4f2cfd5feb Fix crash on chasm.
svn-id: r18383
2005-06-13 13:40:28 +00:00
Andrew Kurushin
91ff7f7a31 fixed interpreter bug (negative address offset - may crush system)
implemented inventory save-load

svn-id: r18071
2005-05-12 15:11:32 +00:00
Andrew Kurushin
a909052c8d fixed object frawing
implemented sfGetObjImage, sfSetObjImage, sfSetObjName

svn-id: r17789
2005-04-24 15:17:38 +00:00
Andrew Kurushin
d52032c75c converse support improved (still has some bugs)
fixed: now protagonist can't be target object
fixed: statusbar color
added: *mouseButtonPressed in SagaEngine

svn-id: r17672
2005-04-18 20:03:14 +00:00
Torbjörn Andersson
20aeccc383 Slightly more informative error message. (I get this if I try to speak to
one of the faire animals. I believe it's the one the original source code
calls "FaireRam - 65", but I haven't verified that.)

svn-id: r17544
2005-04-11 15:34:13 +00:00
Andrew Kurushin
db61624fd2 -fixed interpreter bug: on opCall now pushes additional data for compatibly
ps:doors can be opened

svn-id: r17350
2005-04-03 17:23:02 +00:00
Andrew Kurushin
8ea88c95d6 - fixed tile doors drawing
- right mouse action fixed

svn-id: r17347
2005-04-03 15:32:04 +00:00
Andrew Kurushin
6bc301810b fixed gcc ISO C++ error
svn-id: r17287
2005-03-29 19:16:46 +00:00
Andrew Kurushin
1b4b92c0f5 endScene now aborts all running threads (fixing Okk stuckiness on way out of tent)
svn-id: r17286
2005-03-29 17:54:53 +00:00
Eugene Sandulenko
285f6a6a2b Let IHNM run again. It has 105 script functions.
svn-id: r16653
2005-01-28 03:47:12 +00:00
Andrew Kurushin
01a863414e - removed returning value from scriptFunctions
- implement some scriptFunctions

svn-id: r16618
2005-01-22 19:21:38 +00:00
Andrew Kurushin
8543306e56 all opcodes revisited
all ITE opcodes supported (now we should go through scriptFunctions)

svn-id: r16617
2005-01-22 16:32:30 +00:00
Andrew Kurushin
0030e821fe another 19 opcodes
svn-id: r16616
2005-01-22 15:28:24 +00:00
Andrew Kurushin
4e7d58c843 rewritten 15 opcodes
svn-id: r16615
2005-01-22 14:43:49 +00:00
Torbjörn Andersson
f3b62a9ed7 Whitespace and indentation.
svn-id: r16614
2005-01-22 14:16:00 +00:00
Andrew Kurushin
93a64d3ebd some opcode fixes:
opReturnV

svn-id: r16609
2005-01-21 23:44:34 +00:00
Eugene Sandulenko
1e07013f7f Fix portability
svn-id: r16608
2005-01-21 23:35:33 +00:00
Andrew Kurushin
899e476f01 now you can try to:
- talk to someone
 - look at something

svn-id: r16607
2005-01-21 23:25:54 +00:00
Andrew Kurushin
58ec0f0aad problems solved:
- Allow more than one script work at once
- Proper implementation of address methods

some opcodes may be broken - cause work in progress
todo: rewrite opcodes with new address functionality

svn-id: r16604
2005-01-21 21:55:54 +00:00
Eugene Sandulenko
001bb7c74e o Made ITEColors enum public in interface.h. Please use them. These colors
stay in each scene except intro and fade-in/fade-outs.
o Implemented status text coloring during work of auxiliary scripts.

svn-id: r16598
2005-01-19 11:29:29 +00:00
Andrew Kurushin
0b4fd4adbf - merged ActionMap and ObjectMap
- remove ActionMap.h & ActionMap.cpp
- ObjectMap names move to Scene::_sceneStrings as in original engine
- fix wrong StringsTable::stringsCount calculation

svn-id: r16592
2005-01-18 11:55:31 +00:00
Eugene Sandulenko
dab894fdd4 First batch of converse implementation in scripts. To see it type
'scene_change 33' in debugger.

svn-id: r16588
2005-01-17 20:17:06 +00:00
Torbjörn Andersson
bf827cde1d Some more untested opcode fixes. (By the way, I was wrong the other day:
The first IHNM script does not use random branching after all.)

svn-id: r16573
2005-01-16 17:07:27 +00:00
Andrew Kurushin
2f20dd57c2 some work in progress on verb stuff:
- many structers and fields renamed to proper names
- added missing functions

svn-id: r16562
2005-01-15 20:12:49 +00:00
Torbjörn Andersson
e38b689078 Fixed the "random branch" opcode, I hope. I haven't tested it. The first
IHNM script seems to use it, but doesn't get that far because it terminates
on an unknown script function.

svn-id: r16558
2005-01-14 10:10:23 +00:00
Andrew Kurushin
244b227b19 - remove game.h & image.h
- all display information of current game goes to SagaEngine
- remove GameFontIds
- hide SagaEngine _gameId,_gameType & etc with methods getGameId(), getGameType()

svn-id: r16545
2005-01-11 21:10:36 +00:00
Andrew Kurushin
bdb1b1eb1c begining of verb implementation
introduced getObjectName

svn-id: r16491
2005-01-08 20:30:07 +00:00
Eugene Sandulenko
26d5810b81 Next batch of panel-related fixes. Still wrong.
NOTE: lines which start with `;' should contain calls to not yet
implemented subsystems like Conversation subsystem

svn-id: r16443
2005-01-06 14:02:53 +00:00