Commit Graph

73 Commits

Author SHA1 Message Date
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
Torbjörn Andersson
935f320e1a Fixed bad speech/script regression.
svn-id: r16436
2005-01-05 07:13:15 +00:00
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