Commit Graph

131 Commits

Author SHA1 Message Date
D G Turner
d11c61db14 SCI: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-12-01 05:06:31 +00:00
Martin Kiewitz
cfcaba9284 SCI: kDoBresen adjustments for SCI<=1_EGA, thx wjp 2015-04-21 14:55:05 +02:00
Johannes Schickel
8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Filippos Karapetis
d2bdcf8051 SCI: Removed the old kDoAvoider code 2011-10-09 19:16:04 +03:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Willem Jan Palenstijn
dda6df668a SCI: Avoid (unused) sqrt of a negative number
This fixes bug #3289799.
2011-04-21 22:14:05 +02:00
dhewg
2def212de7 ALL: s/PI/M_PI/
Tip of the day: git grep -w PI
2011-03-19 11:24:06 +01:00
md5
58498dca8e SCI: Removed obsolete comment about kDoBresen() 2011-03-14 13:15:00 +02:00
Willem Jan Palenstijn
5b820cee64 SCI: Restore full object state after collision in DoBresen
This makes the workaround for the hang in the Colonel's Bequest
shower scene (bug #3122075) unnecessary.
2011-03-13 14:48:38 +01:00
Willem Jan Palenstijn
d7112b5bbc SCI: Remove kDoBresen special case for SCI_VERSION_1_EGA_ONLY
Confirmed with QfG2 disassembly (the only 1_EGA_ONLY game)
that it behaves the same as SCI_VERSION_1_EARLY games, except
for the uninitialized read already mentioned in kDoBresen.
2011-02-27 15:52:19 +01:00
md5
72f65b3946 SCI: Renamed SCI_VERSION_1_EGA to SCI_VERSION_1_EGA_ONLY
This renaming allows us to better distinguish that this version is for games
that only had an EGA version, and avoid confusion with newer SCI1 game releases
with EGA graphics (e.g. KQ5 EGA). The only game with this SCI version is QFG2,
a SCI1 EGA game with a parser. Also, added some games for each SCI version.
2011-02-27 16:48:53 +02:00
md5
37d610efd3 SCI: Improved the readability of the kDoBresen code a bit 2011-02-27 16:15:33 +02:00
Willem Jan Palenstijn
db89e9a42c SCI: Don't set b_movCnt to moveSpeed while walking
This fixes moonwalking in LSL1 and movement speed in KQ5.
It appears to be have been a RE bug.
2011-02-27 14:52:13 +01:00
Filippos Karapetis
f680e24146 SCI: Added a hack to fix bug #3122075 - "LB1: Game play freezes when taking shower"
This is a regression from the new kInitBresen/kDoBresen functions, enabled in r52467.
Many thanks to waltervn for his work in bisecting this. The actual bug should be
found, but since only this death scene has an issue, it's not really worth the
effort. The old functions are based on observations, so there are many differences in
the way that they behave. If another test case is found, then this shall be examined
further. Until then, this simple and unobtrusive hack will do.

svn-id: r55251
2011-01-15 18:25:10 +00:00
Filippos Karapetis
32d7e687ee SCI: debugC calls no longer require a debug level of 2 to show output
svn-id: r55086
2011-01-01 12:48:12 +00:00
Martin Kiewitz
4766cc5bb5 SCI: reuse kGetAngle from kDoAvoider
svn-id: r52560
2010-09-05 13:51:47 +00:00
Martin Kiewitz
e55c928075 SCI: kDoBresen changes for sci1early+
including change to compare dest and current position directly, otherwise we would trigger ::moveDone one cycle too late in case the current move completed - fixes lsl5 patti upside down bug #3059336 and lb2cd (cd only!) laura bow getting transformed into a boiler-flame (bug #3050602) - lsl5 was not a real regression, the timing of previous kDoBresen way just off, so it didn't happen in that scene, but happened in lb2cd

svn-id: r52531
2010-09-04 18:23:37 +00:00
Martin Kiewitz
7836bb87fd SCI: fixing typo in kDoAvoider
svn-id: r52520
2010-09-04 11:27:03 +00:00
Martin Kiewitz
acc294c7a8 SCI: properly reversed kDoAvoider
getAngle()-code is missing though. Still fixes lsl2early hang on airport (bug #3037036), fixes kq4early unicorn doing moonwalk (kq4late still works as well)

svn-id: r52512
2010-09-04 07:29:27 +00:00
Martin Kiewitz
e4c07925ec SCI: kDirLoop freshly reversed
svn-id: r52510
2010-09-03 22:15:08 +00:00
Martin Kiewitz
839945795e SCI: enable new kDoBresen/InitBresen
enable replacement of save/load dialogs per default
add config-var "sci_originalsaveload" for not replacing dialogs
add config-var "sci_dither" for enabling dithering in EGA games
new kDoBresen fix qfg2 walk against wall bug (#3053131) and hoyle3 unreadable dice bug (#3036922)

svn-id: r52467
2010-08-31 10:53:27 +00:00
Martin Kiewitz
6d09028607 SCI: ability to ignore movecount for new DoBresen
fixes later sci games, when using new kDoBresen/kInitBresen

svn-id: r52454
2010-08-30 14:36:37 +00:00
Martin Kiewitz
d02628a0dc SCI: freshly reversed kDoBresen/kInitBresen
fixes qfg2 walking against wall, etc. BUT its currently disabled by default. You need to comment out the #define USE_OLD_BRESEN line in kmovement.cpp

svn-id: r52453
2010-08-30 14:06:18 +00:00
Martin Kiewitz
80b405ecb4 SCI: adding comments for kDoBresen
svn-id: r52452
2010-08-30 10:49:32 +00:00
Martin Kiewitz
b53d4dcd96 SCI: cleanup kDoBresen (no real code change)
svn-id: r52446
2010-08-29 21:11:36 +00:00
Martin Kiewitz
4f8daaf596 SCI: fix typo in comment
svn-id: r52445
2010-08-29 20:26:30 +00:00
Filippos Karapetis
aa3cefa2c6 SCI: Fixed bug #3039768 - "QFG3: Glitch When Making Thief Sign to Rope Maker", by fixing the implementation of kSetJump, based on Greg's SCI code. kSetJump returned an incorrect result, causing the actor to jump outside the screen
svn-id: r52207
2010-08-19 11:41:13 +00:00
Filippos Karapetis
1ca946caf0 SCI: Cleanup
svn-id: r52181
2010-08-18 06:59:31 +00:00
Torbjörn Andersson
b49761b6ea SCI: Change abs() to ABS()
I'm not sure why we define our own ABS(), but I assume we have some
compelling reason for it.

svn-id: r52105
2010-08-15 19:01:18 +00:00
Martin Kiewitz
d2d22de911 SCI: removing kDoBresen hack for sq5
adding detailed comment about sq5 scrubbing issue
not 100% fixed (waltervn should look into it), but at least it works now

svn-id: r51833
2010-08-07 13:56:31 +00:00
Filippos Karapetis
d0ff92e2a0 SCI: Fixed an off-by one error in the kDoBresen sanity check
svn-id: r51804
2010-08-06 21:18:43 +00:00
Filippos Karapetis
0850f3dcea SCI: Added bug number for the floor scrubbing bug
svn-id: r51770
2010-08-05 22:58:16 +00:00
Filippos Karapetis
4ae7427eed Added a sanity check inside kDoBresen, thanks to lskovlun. Fixes the random crashes in the floor scrubbing scene in SQ5
svn-id: r51768
2010-08-05 21:48:30 +00:00
Johannes Schickel
e29d6e681a SCI: Switch to Common::RandomSource.
Since I got no response to my mail to -devel, I just assume that there is
no specific reason for using rand() in SCI.

As explained in my mail to -devel about why SCI uses rand, this might allow
SCI to work with our event recording, when that ever gets finished.

I adapted kRandom so that it also supports negative random numbers. And
furthermore that the toNumber argument is smaller than the fromNumber
argument. I am not sure whether that really happens though, but it should
be safer to have this. I marked that place with an TODO/CHECKME.

svn-id: r51521
2010-07-30 22:47:01 +00:00
Martin Kiewitz
2c9d30290e SCI: fixing hoyle 3
hoyle 3 is using kCanBeHere, but it has cantBeHere and canBeHere selectors so our auto detection would fail
it also has a cantBeHere stub in Actor, thus it won't set acc at all. We reset acc because of that before calling cantBeHere selector (!) of the actors (canBeHere isnt used) so that we wont get a collision otherwise because acc is non zero when calling kDoBresen (fixes all sorts of bugs, clone2727 should clean it up :P

svn-id: r51485
2010-07-29 22:52:48 +00:00
Martin Kiewitz
df9f4b5bfe SCI: reverting r51479 and adding TODOs for fixing the hoyle issue (fixing this properly should make credits etc. appear and solve all the other issues that clone submitted)
svn-id: r51484
2010-07-29 22:04:23 +00:00
Filippos Karapetis
e9234b61d6 SCI: Fixed Hoyle 3 bugs #3035077, #3035080, #3035081 and #3035242, by using the "completed" case removed in rev #50921 for Hoyle 3
svn-id: r51479
2010-07-29 19:48:17 +00:00
Martin Kiewitz
6240e5353e SCI: kDoBresen - check xLast/yLast selectors
fixed mixed-up fairy tales demo

svn-id: r51035
2010-07-19 17:27:56 +00:00
Martin Kiewitz
b062488987 SCI: enable r50931 for sci1late+ only, lsl1vga doesn't like it (ego gets stuck)
svn-id: r50935
2010-07-16 10:12:31 +00:00
Martin Kiewitz
1e4261bab4 SCI: added comments about when xLast/yLast were exactly introduced
svn-id: r50934
2010-07-16 10:00:58 +00:00
Martin Kiewitz
5356a61338 SCI: only use xLast/yLast in kDoBresen for sci1middle+ only. qfg1 ega has those selector names, but doesn't use them inside mover objects
svn-id: r50933
2010-07-16 09:51:57 +00:00
Martin Kiewitz
90763f6e24 SCI: kDoBresen - save last position of client inside mover - fixes lsl6 tram still shaking while gotten stopped due ego
svn-id: r50931
2010-07-16 05:46:07 +00:00
Martin Kiewitz
30238347e9 SCI: kDoBresen now returns result of CantBeHere() like sierra sci does it, also adding another comment about r50921
svn-id: r50922
2010-07-15 21:28:48 +00:00
Martin Kiewitz
d78eba3d18 SCI: solved lsl1 casino door, lsl6 tram disappearing and qfg1 vga gate issue - i hope this won't cause regressions, but calling the method in collision case is definitely wrong
svn-id: r50921
2010-07-15 21:10:50 +00:00
Max Horn
bb528d894c SCI: Rewrap some overlong comments
svn-id: r50012
2010-06-18 09:37:06 +00:00
Filippos Karapetis
db70d66e4a Strict mode: Changed several warnings due to logic bugs into errors. If an error pops up from these ones, please add the game where it occurred and the steps to reproduce the error before turning it into a warning
svn-id: r49973
2010-06-17 23:50:28 +00:00
Filippos Karapetis
944b511633 Fixed regression from commit #49564
svn-id: r49569
2010-06-10 11:35:15 +00:00
Filippos Karapetis
cc6f5eb3e4 Unified invokeSelector() and invokeSelectorArgv(), and removed the INV_SEL kludge. Also, removed the selectorInvocation parameter - if invokeSelector() fails, the error is in most cases unrecoverable, and the error description thrown covers all cases where kContinueOnInvalidSelector was used. This uncovered a bug too: in some places, non reg_t parameters were parsed
svn-id: r49564
2010-06-10 09:22:30 +00:00
Filippos Karapetis
67de5b1bd3 Mass renaming of selector-related functions, and removed some defines which were just cloaking functions with a different name
- GET_SEL32 -> readSelector
- GET_SEL32V -> readSelectorValue
- PUT_SEL32 -> writeSelector
- PUT_SEL32V -> writeSelectorValue
Also, changed some selector-related function names and variables to CamelCase

svn-id: r49317
2010-05-29 23:37:15 +00:00