[Scummvm-cvs-logs] CVS: scummvm/sky control.cpp,1.31,1.32 control.h,1.15,1.16
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Wed Jul 9 10:52:18 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sky/music adlibmusic.cpp,1.4,1.5
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky control.cpp,1.32,1.33 control.h,1.16,1.17 logic.cpp,1.116,1.117 sky.cpp,1.81,1.82 sky.h,1.39,1.40
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv31055/sky
Modified Files:
control.cpp control.h
Log Message:
activated speed slider in SkyControl, fixed different charsets in control panel when entering from LINC terminal, etc.
Index: control.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/control.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- control.cpp 9 Jul 2003 00:35:41 -0000 1.31
+++ control.cpp 9 Jul 2003 17:50:57 -0000 1.32
@@ -230,8 +230,8 @@
memset(_screenBuf, 0, GAME_SCREEN_WIDTH * FULL_SCREEN_HEIGHT);
uint16 volY = (127 - _skyMusic->giveVolume()) / 4 + 59 - MPNL_Y; // volume slider's Y coordinate
- uint16 spdY = 12 - (SkyState::_systemVars.gameSpeed / SPEED_MULTIPLY);
- spdY += MPNL_Y + 93; // speed slider's initial position
+ uint16 spdY = (SkyState::_systemVars.gameSpeed - 2) / SPEED_MULTIPLY;
+ spdY += MPNL_Y + 83; // speed slider's initial position
_sprites.controlPanel = _skyDisk->loadFile(60500, NULL);
_sprites.button = _skyDisk->loadFile(60501, NULL);
@@ -437,6 +437,9 @@
}
initPanel();
+ _savedCharSet = _skyText->giveCurrentCharSet();
+ _skyText->fnSetFont(0);
+
_skyScreen->clearScreen();
if (SkyState::_systemVars.gameVersion < 331)
_skyScreen->setPalette(60509);
@@ -490,6 +493,7 @@
_skyScreen->setPalette((uint8 *)SkyState::fetchCompact(SkyState::_systemVars.currentPalette));
removePanel();
_skyMouse->spriteMouse(_savedMouse, 0, 0);
+ _skyText->fnSetFont(_savedCharSet);
}
uint16 SkyControl::handleClick(SkyConResource *pButton) {
@@ -660,28 +664,30 @@
uint16 SkyControl::doSpeedSlide(void) {
- /*int ofsY = _slide->_y - _mouseY;
- uint16 speedDelay = 12 - (_slide->_y - (MPNL_Y + 93));
+ int ofsY = _slide->_y - _mouseY;
+ uint16 speedDelay = _slide->_y - (MPNL_Y + 93);
speedDelay *= SPEED_MULTIPLY;
+ speedDelay += 2;
while (_mouseClicked) {
delay(50);
int newY = ofsY + _mouseY;
if (newY < MPNL_Y + 93) newY = MPNL_Y + 93;
if (newY > MPNL_Y + 104) newY = MPNL_Y + 104;
+ if ((newY == 110) || (newY == 108)) newY = 109;
if (newY != _slide->_y) {
_slode->drawToScreen(NO_MASK);
_slide->setXY(_slide->_x, (uint16)newY);
_slide->drawToScreen(WITH_MASK);
_slide2->drawToScreen(WITH_MASK);
- speedDelay = 12 - (newY - (MPNL_Y + 93));
+ speedDelay = newY - (MPNL_Y + 93);
speedDelay *= SPEED_MULTIPLY;
+ speedDelay += 2;
}
buttonControl(_slide);
_text->drawToScreen(WITH_MASK);
_system->update_screen();
}
SkyState::_systemVars.gameSpeed = speedDelay;
- printf("New delay: %d\n",speedDelay);*/
return SPEED_CHANGED;
}
@@ -1143,7 +1149,7 @@
STOSW(destPos, _skySound->_saveSounds[1]);
STOSD(destPos, _skyMusic->giveCurrentMusic());
- STOSD(destPos, _skyText->giveCurrentCharSet());
+ STOSD(destPos, _savedCharSet);
STOSD(destPos, _savedMouse);
STOSD(destPos, SkyState::_systemVars.currentPalette);
for (cnt = 0; cnt < 838; cnt++)
@@ -1320,7 +1326,7 @@
return RESTORE_FAILED;
}
- uint32 music, charSet, mouseType, palette, gameVersion;
+ uint32 music, mouseType, palette, gameVersion;
if (saveRev >= 3) {
LODSD(srcPos, gameVersion);
@@ -1340,7 +1346,7 @@
}
freeMemList(); // memory from last restore isn't needed anymore
LODSD(srcPos, music);
- LODSD(srcPos, charSet);
+ LODSD(srcPos, _savedCharSet);
LODSD(srcPos, mouseType);
LODSD(srcPos, palette);
@@ -1366,7 +1372,6 @@
_skyLogic->fnEnterSection(SkyLogic::_scriptVariables[CUR_SECTION], 0, 0);
_skyDisk->refreshFilesList(reloadList);
_skyMusic->startMusic((uint16)music);
- _skyText->fnSetFont(charSet);
_savedMouse = (uint16)mouseType;
SkyState::_systemVars.currentPalette = palette; // will be set when doControlPanel ends
SkyState::_systemVars.systemFlags |= SF_GAME_RESTORED; // what's that for?
@@ -1475,6 +1480,7 @@
void SkyControl::showGameQuitMsg(bool useScreen) {
SkyState::_systemVars.quitting = true;
+ _skyText->fnSetFont(0);
uint8 *textBuf1 = (uint8 *)malloc(GAME_SCREEN_WIDTH * 14 + sizeof(dataFileHeader));
uint8 *textBuf2 = (uint8 *)malloc(GAME_SCREEN_WIDTH * 14 + sizeof(dataFileHeader));
uint8 textNum;
Index: control.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/control.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- control.h 5 Jul 2003 16:40:12 -0000 1.15
+++ control.h 9 Jul 2003 17:50:57 -0000 1.16
@@ -252,6 +252,7 @@
uint32 _curButtonText;
uint16 _firstText;
uint16 _savedMouse;
+ uint32 _savedCharSet;
uint16 _enteredTextWidth;
SkyConResource *createResource(void *pSpData, uint32 pNSprites, uint32 pCurSprite, int16 pX, int16 pY, uint32 pText, uint8 pOnClick, uint8 panelType);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sky/music adlibmusic.cpp,1.4,1.5
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky control.cpp,1.32,1.33 control.h,1.16,1.17 logic.cpp,1.116,1.117 sky.cpp,1.81,1.82 sky.h,1.39,1.40
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list