306 Commits

Author SHA1 Message Date
Torbjörn Andersson
f4443646e5 Oops, now it plays the correct music again, I hope. The sound effects seem
a bit better now, too. At least the crowd is no longer cheering when the
fair is closed.

svn-id: r15617
2004-10-19 18:45:42 +00:00
Torbjörn Andersson
20e57d8bd5 Cleanup. No need to have a lookup table for something that can be expressed
by simple arithmetics.

svn-id: r15615
2004-10-19 18:11:50 +00:00
Torbjörn Andersson
82b6902b56 Initial, and slightly buggy, support for sound effects.
svn-id: r15614
2004-10-19 17:12:53 +00:00
Torbjörn Andersson
d37a55ef19 Increased debug level in the name of sanity.
svn-id: r15613
2004-10-19 16:51:26 +00:00
Paweł Kołodziejski
c9a552bebc fixed warnings
svn-id: r15574
2004-10-16 20:38:37 +00:00
Torbjörn Andersson
cebce0f536 Introduced script events to fix the "actors appear before fade-out" bug.
There are some minor music-related changes here as well, but that's just
cleanup.

svn-id: r15567
2004-10-16 07:46:52 +00:00
Torbjörn Andersson
4840c16c1b Oops, forgot to remove these lines. Now all three forms of music (XMIDI,
MIDI and digitized music) use the same method to decide whether or not to
loop.

svn-id: r15566
2004-10-16 07:46:04 +00:00
Torbjörn Andersson
ec413cc8f9 Added support for digitized music, plus some other music-related fixes.
Note that I've only tried this with the music.rsc file from the full Linux
version. It seems likely that the Mac version uses the same file format,
but I have no way of verifying this. I'm told the demos use compressed
audio, so the music files from them probably won't work yet.

svn-id: r15527
2004-10-12 11:45:53 +00:00
Torbjörn Andersson
bb5ed19d3e Added missing word in subtitle.
svn-id: r15509
2004-10-10 13:48:49 +00:00
Torbjörn Andersson
4aa55a188a Fixed the nasty "pop" when playing the standalone VOC file in the intro.
Fixed the overlap when playing the standalone IAF file in the intro.

svn-id: r15508
2004-10-10 12:27:43 +00:00
Torbjörn Andersson
353741ebee The thread variables I added yesterdays will be accessed by scripts, so
byte order will matter.

svn-id: r15507
2004-10-10 12:26:49 +00:00
Torbjörn Andersson
64a91605a1 Initial attempt at fixing the SData problem. I'm still not sure exactly how
to fix the script "static" area, though.

In addition, initialise a few variables, and test for NULL-ness of a few
pointers. This fixes a few crashes I saw with yesterday's CVS snapshot.

There's still an unexpected scene change in the intro (I think it triggers
on Rhene walking too close to the exit), but at least it no longer crashes.

svn-id: r15484
2004-10-09 07:39:46 +00:00
Gregory Montoir
43a62296cd pass arguments by reference-to-const rather than by value, it's usually more efficient...
svn-id: r15477
2004-10-08 19:58:49 +00:00
Chris Apers
757f2fdcef Prevent double slash in path
svn-id: r15473
2004-10-08 16:09:52 +00:00
Eugene Sandulenko
94d9a2149b Implement scene change via exits. You still cannot leave first scene
because it goes to now buggy isometric level. Use debugger to switch
to some word, say, in Dog Castle and there you may go between rooms.

svn-id: r15462
2004-10-08 01:22:39 +00:00
Eugene Sandulenko
bf905b2eeb More de-C'fying. Pass Point object instead of direct reference.
svn-id: r15458
2004-10-07 23:26:41 +00:00
Eugene Sandulenko
4dc49e713b Turn ObjectMap into real object.
svn-id: r15457
2004-10-07 23:02:19 +00:00
Eugene Sandulenko
29a5f6bbd3 Remove duplicated code in actor walk code.
Turn ActionMap into real object.
Rename ActionMap variables to conform our code guidelines.

svn-id: r15456
2004-10-07 22:31:39 +00:00
Eugene Sandulenko
f1ffeaf3ec o Convert some objectMap methods to more C++-like.
o Add stubs for unhandled scene resources in first scene
o Fix object map entry structure
o Fix bug with objject_info() debug command

All this was done in attempt to make room exits work until I realized that
they are different hit zone list which is activate at end of walk sequence.

svn-id: r15416
2004-10-05 02:16:26 +00:00
Eugene Sandulenko
53d807ab16 Fix button clicking. Now actor walks to correct spot and interface buttons
work.

svn-id: r15415
2004-10-04 23:51:23 +00:00
Eugene Sandulenko
8b7740d8af R_POINT -> Common::Point, R_RECT -> Common::Rect. Less R_ prefixes.
svn-id: r15414
2004-10-04 23:09:38 +00:00
Torbjörn Andersson
ff1cf82089 A few, mostly untested, fixes to the SAGA script engine:
* The frame pointer is updated. This won't make any difference since we
  don't actually *use* the frame pointer yet.
* Return values from script functions are handled like in the original now,
  i.e. the function sets thread->retVal and lets the call instruction push
  it onto the stack. (There are two call instructions, one that handles
  return values and one that doesn't, so the script function doesn't know
  if it should push or not.)
* Script return values are handled.

None of this makes any noticeable difference to the ITE intro.

svn-id: r15393
2004-10-03 17:11:23 +00:00
Torbjörn Andersson
54cec2e011 Set up file paths to handle the differences between the file layout of the
Windows and Linux versions. (TODO: Handle game detection.)

Added preliminary support for the P2_A.aif file that the Linux version
uses, where the Windows version uses p2_a.voc. Someone will have to verify
the actual format of it, and we have a silly bug in playVoice() which will
have to be fixed before things work properly.

svn-id: r15365
2004-10-01 06:45:13 +00:00
Max Horn
ce8c99bf62 Rename remaining OSystem methods to match our coding guidelines
svn-id: r15332
2004-09-28 20:19:37 +00:00
Max Horn
61b7e2155a Fix doxygen warnings
svn-id: r15277
2004-09-25 23:26:46 +00:00
Torbjörn Andersson
05829b6edb Enough stubs and pops to make the intro scene script finish properly.
svn-id: r15263
2004-09-25 10:11:17 +00:00
Torbjörn Andersson
caed46c816 Added support for scene music and the music-playing opcode to make the
opening scene a bit nicer.

svn-id: r15241
2004-09-23 06:53:46 +00:00
Torbjörn Andersson
c7338cccdb Replaced the standard stack with a custom-made. In the original SAGA engine
it appears that scripts are allowed to access the stack like any other
memory area, so it's probably important that our stacks behave as closely
to the original as possible.

I don't know if this implementation does that yet, but it's a start.

svn-id: r15240
2004-09-23 06:46:44 +00:00
Torbjörn Andersson
7389ca8884 Start the scene script as well, just to make things more interesting. This
doesn't do anything to fix any of the underlying problems, but it still
runs pretty well.

svn-id: r15232
2004-09-22 07:05:23 +00:00
Torbjörn Andersson
d49f0b90a0 The TourneySetup script now runs and finishes cleanly. However, this is not
as exciting as it first sounds, because even before this patch the script
would run in its entirety - it just didn't know when to stop.

I guess the exciting things don't happen until the next script is triggered
(TorneyScene?). I think it will be easier to start fixing the numerous
deficiencies (stack handling, SData, missing script functions, etc.) when
we have something more concrete to work with.

svn-id: r15215
2004-09-21 06:35:00 +00:00
Torbjörn Andersson
c1671bdbca Update the script's program counter in a more sane way. The opening script
runs for much longer now, but - unsurprisingly - it doesn't work yet.

svn-id: r15192
2004-09-19 14:49:00 +00:00
Jonathan Gray
d1d308ff74 R_GAMETYPE -> GID, remove unused supported flag and trim some unused bits of GAME
svn-id: r14793
2004-08-27 01:32:10 +00:00
Jonathan Gray
d71604c20c add some comments about unimplemented opcodes
svn-id: r14790
2004-08-26 23:28:10 +00:00
Eugene Sandulenko
bfd0b42700 o Eliminate all structure _tags.
o Fix RSCFile on MSVC8.
 o Started fixing script opcodes.

svn-id: r14686
2004-08-22 18:28:42 +00:00
Paweł Kołodziejski
d62ff5dca7 fixed warnings
svn-id: r14603
2004-08-14 09:10:14 +00:00
Eugene Sandulenko
3fe739efb2 Merge SDEBUG_*, SF_* and STHREAD_* into Script class.
svn-id: r14568
2004-08-12 23:57:45 +00:00
Eugene Sandulenko
ec5d498703 Drop SSTACK_ in favor of common/stack.h implementation.
svn-id: r14566
2004-08-12 21:39:11 +00:00
Eugene Sandulenko
f2c3731f7b Launch scene start script.
svn-id: r14561
2004-08-12 01:11:11 +00:00
Eugene Sandulenko
a8ea40756f Move ITE_* and IHNM_* to Scene class.
svn-id: r14560
2004-08-11 23:42:02 +00:00
Eugene Sandulenko
f9b1c3991c Start animations too.
svn-id: r14559
2004-08-11 22:47:45 +00:00
Eugene Sandulenko
94b377ce73 Handle fades in scene load routine.
Introduce immediate events.

svn-id: r14558
2004-08-11 22:27:39 +00:00
Eugene Sandulenko
39137da10d Fix scene description structure data types and rename it.
svn-id: r14556
2004-08-11 18:02:03 +00:00
Eugene Sandulenko
23d5d1fb82 Move SYSINPUT_* and TRANSITION_* to SagaEngine class
svn-id: r14555
2004-08-11 14:04:12 +00:00
Eugene Sandulenko
57b1582149 Move CF_ commands to class and call them from wrappers. This will let us
remove global _vm later.

svn-id: r14552
2004-08-11 00:27:43 +00:00
Eugene Sandulenko
aba3176b0e Correct ESC key behaviour.
svn-id: r14551
2004-08-11 00:16:23 +00:00
Eugene Sandulenko
6c060161e6 Correct scene transitions. Now intro seems to be complete.
svn-id: r14548
2004-08-10 23:52:19 +00:00
Eugene Sandulenko
6e87774d33 oops
svn-id: r14545
2004-08-10 23:07:05 +00:00
Eugene Sandulenko
b13fc9f366 Improved intro. Now it correctly shows game title.
svn-id: r14544
2004-08-10 23:04:52 +00:00
Eugene Sandulenko
720ea20bed Moved PALANIM_* to a class.
svn-id: r14540
2004-08-10 19:20:33 +00:00
Eugene Sandulenko
fe7ac87bc7 Move EVENT_* to a class.
svn-id: r14539
2004-08-10 19:00:30 +00:00