Minor style-related changes
svn-id: r47839
This commit is contained in:
parent
887ca3145e
commit
d4949d03d4
9 changed files with 24 additions and 24 deletions
|
@ -650,7 +650,7 @@ bool Draw::winOverlap(int16 idWin1, int16 idWin2) {
|
||||||
(_fascinWin[idWin2].top + _fascinWin[idWin2].height <= _fascinWin[idWin1].top ))
|
(_fascinWin[idWin2].top + _fascinWin[idWin2].height <= _fascinWin[idWin1].top ))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Draw::closeWin(int16 i) {
|
void Draw::closeWin(int16 i) {
|
||||||
|
@ -704,7 +704,7 @@ void Draw::restoreWin(int16 i) {
|
||||||
|
|
||||||
void Draw::saveWin(int16 id) {
|
void Draw::saveWin(int16 id) {
|
||||||
warning("saveWin");
|
warning("saveWin");
|
||||||
_vm->_video->drawSprite(*_backSurface, *_fascinWin[id].savedSurface,
|
_vm->_video->drawSprite(*_backSurface, *_fascinWin[id].savedSurface,
|
||||||
_fascinWin[id].left, _fascinWin[id].top,
|
_fascinWin[id].left, _fascinWin[id].top,
|
||||||
_fascinWin[id].left + _fascinWin[id].width - 1,
|
_fascinWin[id].left + _fascinWin[id].width - 1,
|
||||||
_fascinWin[id].top + _fascinWin[id].height - 1,
|
_fascinWin[id].top + _fascinWin[id].height - 1,
|
||||||
|
@ -743,7 +743,7 @@ void Draw::winTrace(int16 left, int16 top, int16 width, int16 height) {
|
||||||
// TODO: Implement proper behavior for the trace of the Window. In short,
|
// TODO: Implement proper behavior for the trace of the Window. In short,
|
||||||
// - drawline currently use the wrong surface, to be fixed
|
// - drawline currently use the wrong surface, to be fixed
|
||||||
// - dirtiedRect should be put after the 4 drawlines when the surface is fixed <- Not in 256 col version
|
// - dirtiedRect should be put after the 4 drawlines when the surface is fixed <- Not in 256 col version
|
||||||
// - drawline should be replaced by a drawline with palette inversion
|
// - drawline should be replaced by a drawline with palette inversion
|
||||||
// - Shift skipped as always set to zero (?)
|
// - Shift skipped as always set to zero (?)
|
||||||
|
|
||||||
int16 right, bottom;
|
int16 right, bottom;
|
||||||
|
@ -818,7 +818,7 @@ void Draw::handleWinBorder(int16 id) {
|
||||||
_vm->_util->setMousePos(_vm->_global->_inter_mouseX, _vm->_global->_inter_mouseY);
|
_vm->_util->setMousePos(_vm->_global->_inter_mouseX, _vm->_global->_inter_mouseY);
|
||||||
}
|
}
|
||||||
|
|
||||||
winTrace(_cursorX,_cursorY, _fascinWin[id].width, _fascinWin[id].height);
|
winTrace(_cursorX, _cursorY, _fascinWin[id].width, _fascinWin[id].height);
|
||||||
winTrace(_vm->_global->_inter_mouseX, _vm->_global->_inter_mouseY, _fascinWin[id].width, _fascinWin[id].height);
|
winTrace(_vm->_global->_inter_mouseX, _vm->_global->_inter_mouseY, _fascinWin[id].width, _fascinWin[id].height);
|
||||||
_cursorX = _vm->_global->_inter_mouseX;
|
_cursorX = _vm->_global->_inter_mouseX;
|
||||||
_cursorY = _vm->_global->_inter_mouseY;
|
_cursorY = _vm->_global->_inter_mouseY;
|
||||||
|
@ -837,7 +837,7 @@ int16 Draw::handleCurWin() {
|
||||||
if ((_vm->_game->_mouseButtons != 1) || ((_vm->_draw->_renderFlags & 128) == 0))
|
if ((_vm->_game->_mouseButtons != 1) || ((_vm->_draw->_renderFlags & 128) == 0))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
if (_fascinWin[i].id != -1) {
|
if (_fascinWin[i].id != -1) {
|
||||||
if ((_vm->_global->_inter_mouseX >= _fascinWin[i].left) &&
|
if ((_vm->_global->_inter_mouseX >= _fascinWin[i].left) &&
|
||||||
(_vm->_global->_inter_mouseX < _fascinWin[i].left + _fascinWin[i].width) &&
|
(_vm->_global->_inter_mouseX < _fascinWin[i].left + _fascinWin[i].width) &&
|
||||||
|
@ -916,12 +916,12 @@ void Draw::winDraw(int16 fct) {
|
||||||
int16 width;
|
int16 width;
|
||||||
int16 height;
|
int16 height;
|
||||||
|
|
||||||
warning("winDraw %d", fct);
|
warning("winDraw %d", fct);
|
||||||
bool found = false;
|
bool found = false;
|
||||||
int len;
|
int len;
|
||||||
Resource *resource;
|
Resource *resource;
|
||||||
int table[10];
|
int table[10];
|
||||||
SurfaceDescPtr tempSrf;
|
SurfaceDescPtr tempSrf;
|
||||||
|
|
||||||
if (_destSurface == 21) {
|
if (_destSurface == 21) {
|
||||||
|
|
||||||
|
@ -1298,7 +1298,7 @@ int16 Draw::isOverWin(int16 &dx, int16 &dy) {
|
||||||
if ((_vm->_draw->_renderFlags & 128) == 0)
|
if ((_vm->_draw->_renderFlags & 128) == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
if (_fascinWin[i].id != -1) {
|
if (_fascinWin[i].id != -1) {
|
||||||
if ((_vm->_global->_inter_mouseX >= _fascinWin[i].left) &&
|
if ((_vm->_global->_inter_mouseX >= _fascinWin[i].left) &&
|
||||||
(_vm->_global->_inter_mouseX < _fascinWin[i].left + _fascinWin[i].width) &&
|
(_vm->_global->_inter_mouseX < _fascinWin[i].left + _fascinWin[i].width) &&
|
||||||
|
@ -1309,15 +1309,15 @@ int16 Draw::isOverWin(int16 &dx, int16 &dy) {
|
||||||
dx = _fascinWin[i].left;
|
dx = _fascinWin[i].left;
|
||||||
dy = _fascinWin[i].top;
|
dy = _fascinWin[i].top;
|
||||||
return(i);
|
return(i);
|
||||||
} else
|
} else
|
||||||
if (_fascinWin[i].id > bestMatch)
|
if (_fascinWin[i].id > bestMatch)
|
||||||
bestMatch = _fascinWin[i].id;
|
bestMatch = _fascinWin[i].id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bestMatch != -1)
|
if (bestMatch != -1)
|
||||||
return(0);
|
return(0);
|
||||||
else
|
else
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
int32 Draw::getSpriteRectSize(int16 index) {
|
int32 Draw::getSpriteRectSize(int16 index) {
|
||||||
|
|
|
@ -200,7 +200,7 @@ public:
|
||||||
void handleWinBorder(int16 id);
|
void handleWinBorder(int16 id);
|
||||||
void winDraw(int16 fct);
|
void winDraw(int16 fct);
|
||||||
void winTrace(int16 left, int16 top, int16 width, int16 height);
|
void winTrace(int16 left, int16 top, int16 width, int16 height);
|
||||||
int16 isOverWin(int16 &dx, int16 &dy);
|
int16 isOverWin(int16 &dx, int16 &dy);
|
||||||
|
|
||||||
int32 getSpriteRectSize(int16 index);
|
int32 getSpriteRectSize(int16 index);
|
||||||
void forceBlit(bool backwards = false);
|
void forceBlit(bool backwards = false);
|
||||||
|
|
|
@ -76,7 +76,7 @@ class PauseDialog : public GUI::Dialog {
|
||||||
public:
|
public:
|
||||||
PauseDialog();
|
PauseDialog();
|
||||||
|
|
||||||
virtual void reflowLayout();
|
virtual void reflowLayout();
|
||||||
virtual void handleKeyDown(Common::KeyState state);
|
virtual void handleKeyDown(Common::KeyState state);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -558,7 +558,7 @@ uint16 Hotspots::checkMouse(Type type, uint16 &id, uint16 &index) const {
|
||||||
if (_vm->getGameType() == kGameTypeFascination)
|
if (_vm->getGameType() == kGameTypeFascination)
|
||||||
winId = _vm->_draw->isOverWin(dx, dy);
|
winId = _vm->_draw->isOverWin(dx, dy);
|
||||||
|
|
||||||
warning("checkmouse %d - %d %d",winId, dx, dy);
|
warning("checkmouse %d - %d %d", winId, dx, dy);
|
||||||
|
|
||||||
if (winId < 0) {
|
if (winId < 0) {
|
||||||
winId = 0;
|
winId = 0;
|
||||||
|
|
|
@ -223,7 +223,7 @@ void Inter_Fascination::oFascin_activeWin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Inter_Fascination::oFascin_openWin() {
|
void Inter_Fascination::oFascin_openWin() {
|
||||||
int16 retVal,id;
|
int16 retVal, id;
|
||||||
_vm->_game->_script->evalExpr(&id);
|
_vm->_game->_script->evalExpr(&id);
|
||||||
retVal = _vm->_game->_script->readVarIndex();
|
retVal = _vm->_game->_script->readVarIndex();
|
||||||
WRITE_VAR((retVal / 4), (int32) _vm->_draw->openWin(id));
|
WRITE_VAR((retVal / 4), (int32) _vm->_draw->openWin(id));
|
||||||
|
|
|
@ -721,7 +721,7 @@ bool Inter_v1::o1_loadCursor(OpFuncParams ¶ms) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Inter_v1::o1_switch (OpFuncParams ¶ms) {
|
bool Inter_v1::o1_switch(OpFuncParams ¶ms) {
|
||||||
uint32 offset;
|
uint32 offset;
|
||||||
|
|
||||||
checkSwitchTable(offset);
|
checkSwitchTable(offset);
|
||||||
|
|
|
@ -614,7 +614,7 @@ void MDYPlayer::interpret() {
|
||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
instr = *_playPos;
|
instr = *_playPos;
|
||||||
debugC(6, kDebugSound,"MDYPlayer::interpret instr 0x%X", instr);
|
debugC(6, kDebugSound, "MDYPlayer::interpret instr 0x%X", instr);
|
||||||
switch (instr) {
|
switch (instr) {
|
||||||
case 0xF8:
|
case 0xF8:
|
||||||
_wait = *(_playPos++);
|
_wait = *(_playPos++);
|
||||||
|
@ -627,7 +627,7 @@ void MDYPlayer::interpret() {
|
||||||
_playPos++;
|
_playPos++;
|
||||||
ctrlByte1 = *(_playPos++);
|
ctrlByte1 = *(_playPos++);
|
||||||
ctrlByte2 = *(_playPos++);
|
ctrlByte2 = *(_playPos++);
|
||||||
debugC(6, kDebugSound,"MDYPlayer::interpret ctrlBytes 0x%X 0x%X", ctrlByte1, ctrlByte2);
|
debugC(6, kDebugSound, "MDYPlayer::interpret ctrlBytes 0x%X 0x%X", ctrlByte1, ctrlByte2);
|
||||||
if (ctrlByte1 != 0x7F || ctrlByte2 != 0) {
|
if (ctrlByte1 != 0x7F || ctrlByte2 != 0) {
|
||||||
_playPos -= 2;
|
_playPos -= 2;
|
||||||
while (*(_playPos++) != 0xF7)
|
while (*(_playPos++) != 0xF7)
|
||||||
|
|
|
@ -95,7 +95,7 @@ private:
|
||||||
uint32 _size;
|
uint32 _size;
|
||||||
byte *_vars;
|
byte *_vars;
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
};
|
};
|
||||||
|
|
||||||
class VariablesLE : public Variables {
|
class VariablesLE : public Variables {
|
||||||
|
|
|
@ -621,7 +621,7 @@ void Video::initOSD() {
|
||||||
171, 0, 0, 0
|
171, 0, 0, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
g_system->setPalette(palOSD, 0, 5);
|
g_system->setPalette(palOSD, 0, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Video::drawOSDText(const char *text) {
|
void Video::drawOSDText(const char *text) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue