Commit Graph

53 Commits

Author SHA1 Message Date
Andrew Kurushin
c0d25cbae1 - script execution stops properly
- placard should work over way:
   set Wait flag for thread (as in opSpeak)
   remove inner loop (processInput...)

svn-id: r16418
2005-01-03 21:17:32 +00:00
Torbjörn Andersson
5f6108052e Changed "sizeof x" to "sizeof(x)" for consistency with the rest of ScummVM,
and used ARRAYSIZE() instead in two cases.

svn-id: r16408
2005-01-02 14:52:11 +00:00
Max Horn
2664ca7eb1 oops, correct copyright string
svn-id: r16399
2005-01-01 16:20:17 +00:00
Max Horn
47280d9433 Updated copyright
svn-id: r16398
2005-01-01 16:09:25 +00:00
Andrew Kurushin
2289ea371b - remove old stuff
- work on "walking" in progress

svn-id: r16298
2004-12-24 20:44:39 +00:00
Andrew Kurushin
573da1e79c - opCCall* on debuglevel==9 shows script function name
svn-id: r16289
2004-12-24 11:11:01 +00:00
Andrew Kurushin
53852dd52d - fix of 8 to 4 direction conversion
- added sfSetActorState function

svn-id: r16288
2004-12-24 10:22:01 +00:00
Andrew Kurushin
3d9784f94d - rewriten actors action handling (now uses all original flags etc)
- added some script functions (swapactors...)
- many things were renamed according scummvm covention
- resource id definintions should begin with "RID_" prefix

- intro temporary broken - work in progress
todo:
- walking hanling also should be rewriten
- timings for speech and actor cycling should be more accurate

svn-id: r16263
2004-12-22 21:04:50 +00:00
Eugene Sandulenko
ab4734dcf6 o Fix regression with Mac versions
o Normalize GIDs and GTypes
o Introduce MD5-based game detection. Now only 2 games should be ordered.
  Linux demo should go before Win32 newer demo
o Fix sound in Mac versions

svn-id: r16262
2004-12-22 19:34:41 +00:00
Eugene Sandulenko
2fb8a8e453 o Moved GAME_* to SagaEngine object
o Renamed GAME_ITE_* to GID_ITE_*
o Renamed GID_ITE and GID_IHNM to GType_ITE and GType_IHNM

svn-id: r16258
2004-12-22 13:09:47 +00:00
Andrew Kurushin
ea3b0d1100 - rewritten actors speech engine :
1) there are three types of speech: one acor, multiple actor, non actor
  2) slow speech implemented
  3) uses native engine flags (async,noanimate...) instead of semaphores
- proper timings implemented

svn-id: r16237
2004-12-21 06:49:07 +00:00
Andrew Kurushin
79ce4de942 - all actors creates on start
- many parts renamed to proper names

regression: unexpected actor apeared while intro is played

svn-id: r16104
2004-12-17 20:38:17 +00:00
Andrew Kurushin
28e5422fd8 actors rearrangement bugfix
svn-id: r16094
2004-12-17 11:18:56 +00:00
Eugene Sandulenko
502b279d24 Patch #1081904 ITE: MAC demo support
o Endianness-aware resource loading
o Removed ys_dl_list in favor of our object implementation
o Cleanup in actor code
o Partial support for ITE Mac rereleased demo

svn-id: r16051
2004-12-15 00:24:12 +00:00
Torbjörn Andersson
c64c7eb4d4 First pass at migrating from the old Reinherit console to the ScummVM
console.

Some things are likely to have broken. For instance, I believe the old
console was could be visible during gameplay, while ScummVM's is modal. So
any place where we output something to the console during gameplay should
probably be removed.

Some things I've stubbed out. Basically any code that registers a variable.

Most of the debugging commands are untested.

Syntax may have changed because of different command-line parsing. (I never
actually used the old console, so I don't know for sure. :-)

Actually, I'm not that interested in reproducing the old console commands
faithfully. What we should do now is to make the immediately useful console
stuff work. Anything that remains unimplemented should probably be removed.

svn-id: r15976
2004-12-03 19:15:44 +00:00
Oliver Kiehl
61efd5ff0e Fix stub a bit. Might garble rest of script otherwise.
svn-id: r15806
2004-11-14 13:15:26 +00:00
Eugene Sandulenko
74704a4d95 Add stub for every script function
svn-id: r15722
2004-11-06 22:33:08 +00:00
Paweł Kołodziejski
1d6de6f5e4 replaced printf usage in saga
svn-id: r15693
2004-10-28 06:55:50 +00:00
Eugene Sandulenko
213c4093ba Implement some script functions and report stubs.
svn-id: r15691
2004-10-27 22:17:11 +00:00
Paweł Kołodziejski
c7e5ab1f2d removed R_ prefix with few r_ too
svn-id: r15690
2004-10-27 21:32:28 +00:00
Eugene Sandulenko
b4df9bb2c1 Started to rework script threads. Partially moved to thread flags.
Scene skipping now works, but scripts aren't chained yet.

svn-id: r15688
2004-10-27 02:27:54 +00:00
Torbjörn Andersson
4115b54b00 Fixed two of my own stupid bugs:
* The length of a script data buffer is measured in words, not bytes.
* In the long run, I'm sure it'll work better if the data buffers do not
  point to recently freed data.

svn-id: r15640
2004-10-22 07:18:01 +00:00
Torbjörn Andersson
1e062a6d89 A bunch of mostly panel-related fixes for the ITE intro. Apart from the
numerous animation glitches, it's looking almost like the real thing now.

It's no longer possible to walk away during the intro. This should provide
a great incentive to implement the "Escape" feature. ;-)

svn-id: r15626
2004-10-21 06:49:11 +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
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
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
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
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
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
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
632042dae4 Move CON_* to a class.
svn-id: r14538
2004-08-10 18:31:33 +00:00
Eugene Sandulenko
415400f24e Move TEXT_* to SagaEngine class.
svn-id: r14450
2004-08-03 00:40:16 +00:00
Eugene Sandulenko
166b05aed4 Fix #include paths.
svn-id: r14443
2004-08-02 16:20:35 +00:00
Eugene Sandulenko
98816ad3ae Objectize actor.cpp
svn-id: r14441
2004-08-02 15:47:42 +00:00
Joost Peters
2a7f885477 Clean up Script class a bit; add get/set functions
svn-id: r14428
2004-08-01 23:47:19 +00:00
Eugene Sandulenko
873c886910 Made all MemoryReadStream local variables. This plugged a giantic constant
leakage in the engine.

svn-id: r14427
2004-08-01 23:24:22 +00:00
Joost Peters
4aaea2131e create Script class from SCRIPT_* and ScriptModule
svn-id: r14425
2004-08-01 22:48:40 +00:00
Joost Peters
48cddda4b9 move SDATA_* into seperate class
svn-id: r14424
2004-08-01 19:53:29 +00:00
Jonathan Gray
0bbeb61f5e merge gfx_mod.h into gfx.h and stick functions into a class
svn-id: r14419
2004-08-01 11:48:53 +00:00
Jonathan Gray
182dd48bd4 merge reinherit.h into saga.h and gfx_mod.h, note the error loading animations wasn't caused by this commit :)
svn-id: r14405
2004-08-01 01:56:22 +00:00
Max Horn
a1b82d8e13 Cleanup for MemoryReadStream; made it match the File-class interface
svn-id: r14086
2004-06-27 21:30:33 +00:00
Eugene Sandulenko
1b78dc468f Added more stubs from script fucntions, some renames for consistency with
disassembly.

svn-id: r13835
2004-05-13 01:41:23 +00:00
Torbjörn Andersson
148872d1fd Replaced R_printf() with debug() and warning(). There are still a couple of
standard printf()s left, though.

svn-id: r13791
2004-05-05 13:05:45 +00:00
Eugene Sandulenko
8de181f4f0 Move from ys_binread.cpp and ys_binwrite.cpp to MemoryReadStream.
In fact there were no binary writes at all.

svn-id: r13773
2004-05-04 03:33:03 +00:00
Eugene Sandulenko
c0772498b6 All graphics and input now is in OSystem.
Only timers left.

svn-id: r13723
2004-05-01 19:41:47 +00:00
Paweł Kołodziejski
0af53f3c97 indent
svn-id: r13715
2004-05-01 16:15:55 +00:00