196 Commits

Author SHA1 Message Date
Johannes Schickel
8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Sven Hesse
989ea7cb56 JANITORIAL: Remove trailing whitespace 2013-07-14 19:01:47 +02:00
Matthew Hoops
829847cb88 SCI: Fix kMessage REF subop ordering
Thanks to waltervn for testing values from running in DOSBox.

Fixes bug #3034704
2013-04-23 22:34:37 -04:00
Willem Jan Palenstijn
f5e43484a0 SCI: Fix kReadNumber sign/hex behaviour
Negative numbers now work, and hex overflow is handled like SSCI.
Thanks to waltervn for testing.
2013-01-25 00:57:50 +01:00
Willem Jan Palenstijn
498fe75dc5 SCI: Fix shadow warning 2013-01-24 22:12:15 +01:00
Filippos Karapetis
0143a5d938 SCI: Bugfix for commit 0968acc: only filter out missing messages for the jar
This is to properly fix bug #3601090 without removing any functionality.
The additional check ensures that the look and hand icons work with the
jar. Many thanks to lskovlun for debugging this and providing a fix
2013-01-23 21:31:26 +02:00
Filippos Karapetis
0968acccfd SCI: Fix script bug #3601090 - "SCI: Pepper's Adventures in Time: Game becomes unsolvable"
Many thanks to lskovlun for debugging this problem and finding the
offending script code that caused it.
2013-01-23 03:17:10 +02:00
Filippos Karapetis
b1ff5ba247 SCI: Slight cleanup in kMessage() 2013-01-23 03:17:10 +02:00
Willem Jan Palenstijn
ba1307b0ce SCI: Add kReadNumber fixme
Thanks to Walter for noticing this.
2012-10-05 16:41:02 +02:00
Filippos Karapetis
99b1c73639 SCI: Fix silly typo
Thanks to digitall for spotting this
2012-06-21 22:57:00 +03:00
Filippos Karapetis
76f3f1b136 SCI: Fix warnings 2012-06-21 22:24:22 +03:00
Filippos Karapetis
2b50824133 SCI: Add setter/getter methods to reg_t's
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
2012-06-18 05:24:06 +03:00
Matthew Hoops
ef8239df48 SCI: Fix comment in kString(at) 2012-06-11 20:10:49 -04:00
Filippos Karapetis
b812ed50c8 SCI: Bugfix for negative numbers in kString(at)
Fixes one of the bugs in the savegame selection screen in Phantasmagoria
2012-06-11 11:54:11 +03:00
Max Horn
4f8665fc83 COMMON: Move isFoo functions to namespace Common, add doxygen comments 2012-02-20 16:18:27 +01:00
Max Horn
658080deed ALL: Avoid using is* macros from ctype.h
On some systems, passing signed chars to macros like isspace() etc. lead
to a runtime error. Hence, mark these macros as forbidden by default,
and introduce otherwise equivalent alternatives for them.
2012-02-15 16:51:37 +01:00
Willem Jan Palenstijn
c60394eb3f SCI: Remove outdated comment 2012-01-16 16:07:48 +01:00
Filippos Karapetis
7560007ba9 SCI: Simplify kString(Dup) using the overloaded = operator
Thanks to wjp for his suggestion
2012-01-15 21:42:09 +02:00
Filippos Karapetis
cbe7527805 SCI: Use fromString() in kString(Dup) to simplify code 2012-01-15 21:05:10 +02:00
Filippos Karapetis
34b297748c SCI: Fix a nasty bug in kString(Dup)
The rawString variable is no longer pointing to invalidated data. This
fixes cases where strings are manipulated by game scripts, such as the
graveyard and rada drum puzzles in GK1
2012-01-15 20:11:30 +02:00
Lars Skovlund
40e22d9e33 SCI32: kString: Move variable declaration to prevent problems
with object lifetimes.
2011-10-30 13:56:37 +01:00
Filippos Karapetis
ecddcc12b7 SCI2: kString(Format) uses %d for unsigned integers. Some cleanup 2011-09-25 23:55:44 +03:00
Filippos Karapetis
d570b41561 SCI: Fixed bug #3396887 - "SCI: pq2-pc98-jp - Listing of items / Inventory not working"
Thanks to wjp for his valuable help on this
2011-08-26 01:25:41 +03:00
Willem Jan Palenstijn
85a056f382 SCI: Fix kFormat's handling of %c with a 0 argument
SSCI used a sprintf to handle %c, appending the result to the output,
which is effectively a nop for a zero argument.

This is bug #3368821. Thanks to digitall for tracing it to KFormat
and testing this patch.
2011-07-18 23:36:56 +02:00
Filippos Karapetis
72da8ef5ad SCI: Applied patch #3357096 with minor modifications
This prevents a string pointer from getting invalidated under some
circumstances in kString(Dup).
Thanks to lephilousophe for the patch.
2011-07-07 03:43:06 +03:00
Littleboy
b694a78f62 ANALYSIS: Add static casts to is* functions
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results.
See http://msdn.microsoft.com/en-us/library/ms245348.aspx
2011-06-23 08:52:52 -04: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
md5
1ea96002b8 SCI: Added a more generalized fix for bug #3306417 2011-05-29 21:12:37 +03:00
md5
a010884c9b SCI: Fixed bug #3306417 - "LAURA BOW 2: segmentation fault while talking to Dr. Myklos" 2011-05-27 02:32:22 +03:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn
2e095e25f2 ALL: centre -> center 2011-04-14 14:34:28 +02:00
Matthew Hoops
0b9e6675ef SCI: Add workaround for a QFG1 VGA Mac kFormat bug
Also, fix the kernel signature for kFormat to require two parameters
2011-03-13 22:01:41 -04:00
Walter van Niftrik
f96e93047a SCI: Use BE string handling for Mac games. 2011-03-04 21:12:00 +01:00
md5
18c0dae5fc SCI: Removed warning from kReadNumber 2011-03-04 01:42:09 +02:00
Filippos Karapetis
1796e7afdd SCI2.1: Kernel function changes (after looking through all of the SCI2.1 games)
- Replaced the stub kWinDLL (unused), as well as the not fully implemented kPrintDebug
functions with empty function calls
- Marked several unused or debug kernel functions as stub
- Added some games where the rest of the unimplemented SCI2.1 kernel functions are used

svn-id: r55138
2011-01-07 00:12:18 +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
Filippos Karapetis
de2ef2edc0 SCI: Removed the system strings code and replaced it with a much more simplified version, thus greatly simplifying handling of system strings
svn-id: r54805
2010-12-07 00:47:05 +00:00
Filippos Karapetis
0b5f6d4c97 SCI: Fixed bug #3034471 - "SCI, Castlebrain/Amiga: Invisible text in word search"
Fixed some endianness issues in Amiga versions, thanks to wjp. Amiga
versions expect a BE VM, thus we adjust accordingly in the places
where memory is accessed directly (i.e. kStrAt, kMemory and all places
that set/get characters from memory)

svn-id: r54521
2010-11-28 14:57:56 +00:00
Filippos Karapetis
57d9de00f8 SCI: Removed the correct subops from kString in late SCI2.1/SCI3 games (thanks to waltervn)
svn-id: r54403
2010-11-21 02:07:55 +00:00
Filippos Karapetis
cd69472be9 SCI: Adapted kArray/kString to use the new heuristic for late SCI2.1/SCI3 games, and updated their subops accordingly
svn-id: r54399
2010-11-21 00:47:56 +00:00
Lars Skovlund
5ecac66c6a Some subfunctions changed positions in SCI3 kString. WIP.
And with this, LSL7 starts up. Yeah, baby!

svn-id: r54374
2010-11-19 12:52:17 +00:00
Filippos Karapetis
34272e2529 SCI: Added a stub for a new subop in kString, and disabled trackOriginAndFindWorkaround() for SCI3 games for now
svn-id: r54352
2010-11-18 22:46:29 +00:00
Lars Skovlund
b2be003722 SCI: In kFormat, handle arguments pointing to text resource 0 correctly.
Fixes Colonel's Bequest inventory formatting.

svn-id: r52676
2010-09-11 13:30:42 +00:00
Filippos Karapetis
f446dbc8d5 SCI: Implemented the kPrintDebug SCI2.1 kernel function, used in Shivers (demo)
svn-id: r52665
2010-09-09 20:09:32 +00:00
Lars Skovlund
065e19092a SCI: Support push and pop subfunctions in kMessage()
Glossary seems to work now.

svn-id: r52654
2010-09-09 12:44:34 +00:00
Filippos Karapetis
c40b9801df SCI: Silenced warning when exiting in LSL6 (bug report #3035533), and commented out a related unused variable in kSetQuitStr
svn-id: r51456
2010-07-29 07:58:48 +00:00
Matthew Hoops
828434456f SCI: Better fix for bug #3035058 - ECOQUEST demo: Missing subtitles
The demo really uses kGetMessage and not kMessage. We now detect which version of the message function is used. Thanks to Walter for pointing this out.

svn-id: r51384
2010-07-27 19:07:39 +00:00
Matthew Hoops
cf26b88e54 SCI: Fix bug #3035058 - ECOQUEST demo: Missing subtitles
The demo uses a special version of kMessage to get its messages.

svn-id: r51376
2010-07-27 15:45:21 +00:00
Filippos Karapetis
9862f3fe24 SCI: Moved the SCI32 kernel functions out of kernel32.cpp and into their respective files
svn-id: r51108
2010-07-21 21:18:21 +00:00
Willem Jan Palenstijn
a03afd1898 SCI: Make kStrAt clear segment when writing characters
This is necessary since the uninitialized value detection from r50211,
and is analogous to seg_manager.cpp's setChar.
(Triggered in LSL3 age verification.)

svn-id: r50234
2010-06-24 21:09:38 +00:00