ILLUSIONS: Formatting fixes
Simplified some point arithmetic Lock fixedpoint calcs to float rather than double
This commit is contained in:
parent
fee1f3d8cb
commit
8e43261d13
12 changed files with 19 additions and 33 deletions
|
@ -618,7 +618,6 @@ void Control::startTalkActor(uint32 sequenceId, byte *entryTblPtr, uint32 thread
|
|||
}
|
||||
|
||||
void Control::sequenceActor() {
|
||||
|
||||
if (_actor->_pauseCtr > 0)
|
||||
return;
|
||||
|
||||
|
@ -665,7 +664,6 @@ void Control::sequenceActor() {
|
|||
//debug(1, "Sequence has finished");
|
||||
_actor->_seqCodeIp = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Control::setActorIndex(int actorIndex) {
|
||||
|
|
|
@ -531,10 +531,7 @@ void BbdouSpecialCode::setCursorControlRoutine(uint32 objectId, int num) {
|
|||
}
|
||||
|
||||
Common::Point BbdouSpecialCode::getBackgroundCursorPos(Common::Point cursorPos) {
|
||||
Common::Point pt = _vm->_camera->getScreenOffset();
|
||||
pt.x += cursorPos.x;
|
||||
pt.y += cursorPos.y;
|
||||
return pt;
|
||||
return _vm->_camera->getScreenOffset() + cursorPos;
|
||||
}
|
||||
|
||||
void BbdouSpecialCode::showBubble(uint32 objectId, uint32 overlappedObjectId, uint32 holdingObjectId,
|
||||
|
|
|
@ -140,7 +140,6 @@ SaveStateList IllusionsMetaEngine::listSaves(const char *target) const {
|
|||
pattern += ".???";
|
||||
Common::StringArray filenames;
|
||||
filenames = saveFileMan->listSavefiles(pattern.c_str());
|
||||
Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
|
||||
SaveStateList saveList;
|
||||
for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
|
||||
// Obtain the last 3 digits of the filename, since they correspond to the save slot
|
||||
|
@ -155,6 +154,7 @@ SaveStateList IllusionsMetaEngine::listSaves(const char *target) const {
|
|||
}
|
||||
}
|
||||
}
|
||||
Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
|
||||
return saveList;
|
||||
}
|
||||
|
||||
|
|
|
@ -983,10 +983,7 @@ uint32 IllusionsEngine_Duckman::getObjectActorTypeId(uint32 objectId) {
|
|||
}
|
||||
|
||||
Common::Point IllusionsEngine_Duckman::convertMousePos(Common::Point mousePos) {
|
||||
Common::Point screenOffsPt = _camera->getScreenOffset();
|
||||
mousePos.x += screenOffsPt.x;
|
||||
mousePos.y += screenOffsPt.y;
|
||||
return mousePos;
|
||||
return mousePos + _camera->getScreenOffset();
|
||||
}
|
||||
|
||||
void IllusionsEngine_Duckman::startCursorSequence() {
|
||||
|
|
|
@ -52,7 +52,7 @@ int16 fixedTrunc(FixedPoint16 value) {
|
|||
FixedPoint16 fixedDistance(FixedPoint16 x1, FixedPoint16 y1, FixedPoint16 x2, FixedPoint16 y2) {
|
||||
float xd = fixedToFloat(x1) - fixedToFloat(x2);
|
||||
float yd = fixedToFloat(y1) - fixedToFloat(y2);
|
||||
if (xd != 0.0 || yd != 0.0)
|
||||
if (xd != 0.0f || yd != 0.0f)
|
||||
return floatToFixed(sqrt(xd * xd + yd * yd));
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -76,8 +76,7 @@ void NamedPoints::load(uint count, Common::SeekableReadStream &stream) {
|
|||
void loadPoint(Common::SeekableReadStream &stream, Common::Point &pt) {
|
||||
pt.x = stream.readSint16LE();
|
||||
pt.y = stream.readSint16LE();
|
||||
debug(0, "loadPoint() x: %d; y: %d",
|
||||
pt.x, pt.y);
|
||||
debug(0, "loadPoint() x: %d; y: %d", pt.x, pt.y);
|
||||
}
|
||||
|
||||
} // End of namespace Illusions
|
||||
|
|
|
@ -171,11 +171,6 @@ protected:
|
|||
virtual void playSoundEffect(int sfxId) = 0;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
|
||||
*/
|
||||
|
||||
class MenuTextBuilder {
|
||||
public:
|
||||
MenuTextBuilder();
|
||||
|
|
|
@ -30,7 +30,7 @@ PointArray *PathFinder::findPath(Camera *camera, Common::Point sourcePt, Common:
|
|||
PointArray *walkPoints, PathLines *walkRects, WidthHeight bgDimensions) {
|
||||
Common::Point cameraPt = camera->getScreenOffset();
|
||||
_screenRect.p0 = cameraPt;
|
||||
_screenRect.p1.x = cameraPt.x + 320; //TODO fix me get screen dimentions here.
|
||||
_screenRect.p1.x = cameraPt.x + 320; //TODO fix me get screen dimensions here.
|
||||
_screenRect.p1.y = cameraPt.y + 200;
|
||||
_walkPoints = walkPoints;
|
||||
_walkRects = walkRects;
|
||||
|
|
|
@ -74,7 +74,7 @@ int TalkThread_Duckman::onUpdate() {
|
|||
if (_vm->checkActiveTalkThreads())
|
||||
return kTSYield;
|
||||
_status = 3;
|
||||
// Fallthrough to status 2
|
||||
// fall through
|
||||
|
||||
case 2:
|
||||
talkEntry = getTalkResourceEntry(_talkId);
|
||||
|
@ -101,13 +101,13 @@ int TalkThread_Duckman::onUpdate() {
|
|||
if (_objectId == 0 || _durationMult == 0)
|
||||
_flags |= 8;
|
||||
_status = 3;
|
||||
// Fallthrough to status 3
|
||||
// fall through
|
||||
|
||||
case 3:
|
||||
if (!(_flags & 4) && !_vm->_soundMan->isVoiceCued())
|
||||
return kTSYield;
|
||||
_status = 4;
|
||||
// Fallthrough to status 4
|
||||
// fall through
|
||||
|
||||
case 4:
|
||||
if (!(_flags & 8) ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue