diff options
author | Filippos Karapetis | 2009-10-29 19:32:27 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-29 19:32:27 +0000 |
commit | 89811d1ea45d51732daa7490fe678eca2c1d651d (patch) | |
tree | 4c24e39125c26ab4bb4494aad424f72ae3a01b75 /engines | |
parent | cbf2b03c221a8e1206a266af6ade1dcbd325a69e (diff) | |
download | scummvm-rg350-89811d1ea45d51732daa7490fe678eca2c1d651d.tar.gz scummvm-rg350-89811d1ea45d51732daa7490fe678eca2c1d651d.tar.bz2 scummvm-rg350-89811d1ea45d51732daa7490fe678eca2c1d651d.zip |
Cleanup
svn-id: r45506
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 35d8642791..0fe1d40e38 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -621,17 +621,6 @@ reg_t kAssertPalette(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } -static void disableCertainButtons(SegManager *segMan, reg_t obj) { - Common::String objName = segMan->getObjectName(obj); - - // Disable the "Change Directory" button, as we don't allow the game engine to - // change the directory where saved games are placed - if (objName == "changeDirI") { - int state = GET_SEL32V(segMan, obj, state); - PUT_SEL32V(segMan, obj, state, (state | kControlStateDisabled) & ~kControlStateEnabled); - } -} - void _k_GenericDrawControl(EngineState *s, reg_t controlObject, bool hilite) { SegManager *segMan = s->_segMan; int16 type = GET_SEL32V(segMan, controlObject, type); @@ -752,8 +741,15 @@ void _k_GenericDrawControl(EngineState *s, reg_t controlObject, bool hilite) { reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) { reg_t controlObject = argv[0]; + Common::String objName = s->_segMan->getObjectName(controlObject); + + // Disable the "Change Directory" button, as we don't allow the game engine to + // change the directory where saved games are placed + if (objName == "changeDirI") { + int state = GET_SEL32V(s->_segMan, controlObject, state); + PUT_SEL32V(s->_segMan, controlObject, state, (state | kControlStateDisabled) & ~kControlStateEnabled); + } - disableCertainButtons(s->_segMan, controlObject); _k_GenericDrawControl(s, controlObject, false); return NULL_REG; } |