[Scummvm-cvs-logs] SF.net SVN: scummvm:[44429] scummvm/trunk/engines/sci/engine
waltervn at users.sourceforge.net
waltervn at users.sourceforge.net
Mon Sep 28 01:06:53 CEST 2009
Revision: 44429
http://scummvm.svn.sourceforge.net/scummvm/?rev=44429&view=rev
Author: waltervn
Date: 2009-09-27 23:06:39 +0000 (Sun, 27 Sep 2009)
Log Message:
-----------
SCI: Fix scrolling in SCI1 list controls.
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/engine/script.cpp
scummvm/trunk/engines/sci/engine/vm.h
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-09-27 22:43:32 UTC (rev 44428)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-09-27 23:06:39 UTC (rev 44429)
@@ -1625,12 +1625,21 @@
case K_CONTROL_CONTROL:
case K_CONTROL_CONTROL_ALIAS: {
int entries_nr;
- int lsTop = GET_SEL32V(obj, lsTop) - text_pos.offset;
+ int lsTop;
int list_top = 0;
int selection = 0;
int entry_size = GET_SEL32V(obj, x);
int i;
+ if (s->_kernel->_selectorCache.topString != -1) {
+ // Games from early SCI1 onwards use topString
+ lsTop = GET_SEL32V(obj, topString);
+ } else {
+ // Earlier games use lsTop
+ lsTop = GET_SEL32V(obj, lsTop);
+ }
+ lsTop -= text_pos.offset;
+
debugC(2, kDebugLevelGraphics, "drawing list control %04x:%04x to %d,%d, diff %d\n", PRINT_REG(obj), x, y, SCI_MAX_SAVENAME_LENGTH);
cursor = GET_SEL32V(obj, cursor) - text_pos.offset;
Modified: scummvm/trunk/engines/sci/engine/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/script.cpp 2009-09-27 22:43:32 UTC (rev 44428)
+++ scummvm/trunk/engines/sci/engine/script.cpp 2009-09-27 23:06:39 UTC (rev 44429)
@@ -241,6 +241,7 @@
FIND_SELECTOR(parseLang);
FIND_SELECTOR(motionCue);
FIND_SELECTOR(setCursor);
+ FIND_SELECTOR(topString);
}
void Kernel::dumpScriptObject(char *data, int seeker, int objsize) {
Modified: scummvm/trunk/engines/sci/engine/vm.h
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.h 2009-09-27 22:43:32 UTC (rev 44428)
+++ scummvm/trunk/engines/sci/engine/vm.h 2009-09-27 23:06:39 UTC (rev 44429)
@@ -157,6 +157,7 @@
Selector elements; /**< Used by SetSynonyms() */
Selector lsTop, lsBottom, lsRight, lsLeft; /**< Used by Animate() subfunctions and scroll list controls */
+ Selector topString; /**< SCI1 scroll lists use this instead of lsTop */
Selector looper, mover, isBlocked, heading; /**< Used in DoAvoider */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list