ASYLUM: formatting

This commit is contained in:
alxpnv 2021-05-03 13:53:40 +03:00 committed by Eugene Sandulenko
parent 48e164b2d7
commit ac43968c47
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
25 changed files with 46 additions and 49 deletions

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -500,7 +500,7 @@ bool Console::cmdListObjects(int32 argc, const char **argv) {
debugPrintf("Total: %d\n", getWorld()->objects.size());
} else if (Common::String(argv[1]) == "*"){
} else if (Common::String(argv[1]) == "*") {
for (uint32 i = 0; i < getWorld()->objects.size(); i++)
debugPrintf("%s", getWorld()->objects[i]->toString().c_str());

View File

@ -43,7 +43,7 @@ enum kDebugLevels {
kDebugLevelActor = 1 << 10,
kDebugLevelEncounter = 1 << 11,
kDebugLevelVideo = 1 << 12,
kDebugLevelCommands = 1 << 13,
kDebugLevelCommands = 1 << 13
};
class AsylumEngine;

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -3491,7 +3491,7 @@ bool Actor::processAction(const Common::Point &source, Common::Array<int> *actio
Common::Point src = source;
uint32 frameNumber = _frameNumber;
switch (direction){
switch (direction) {
default:
return false;

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
@ -41,8 +41,7 @@ Object::Object(AsylumEngine *engine) : x(0), y(0), flags(0), actionType(0),
_id(kObjectNone), _resourceId(kResourceNone), _field_20(0), _frameIndex(0), _frameCount(0),
_field_2C(0), _field_30(0), _field_34(0), _field_3C(0), _polygonIndex(0), _field_B4(0),
_tickCount(0), _tickCount2(0), _field_C0(0), _priority(0), _scriptIndex(0), _transparency(0),
_field_688(0), _soundResourceId(kResourceNone), _field_6A4(kDirectionN)
{
_field_688(0), _soundResourceId(kResourceNone), _field_6A4(kDirectionN) {
memset(&_name, 0, sizeof(_name));
memset(&_gameFlags, 0, sizeof(_gameFlags));
memset(&_randomResourceIds, 0, sizeof(_randomResourceIds));
@ -217,27 +216,25 @@ bool Object::isOnScreen() {
}
bool Object::isVisible() const {
if (flags & kObjectFlagEnabled) {
if (!(flags & kObjectFlagEnabled))
return false;
// Check each game flag
for (int32 i = 0; i < 10; i++) {
int32 flag = _gameFlags[i];
bool ok = false;
// Check each game flag
for (int32 i = 0; i < 10; i++) {
int32 flag = _gameFlags[i];
bool ok = false;
if (flag <= 0)
ok = _vm->isGameFlagNotSet((GameFlag)-flag);
else
ok = _vm->isGameFlagSet((GameFlag)flag);
if (flag <= 0)
ok = _vm->isGameFlagNotSet((GameFlag)-flag);
else
ok = _vm->isGameFlagSet((GameFlag)flag);
if (!ok)
return false;
}
// All flags were ok, we are done!
return true;
if (!ok)
return false;
}
return false;
// All flags were ok, we are done!
return true;
}
void Object::adjustCoordinates(Common::Point *point) {

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -812,10 +812,10 @@ enum PuzzleId {
//////////////////////////////////////////////////////////////////////////
// Sub-integer partial access macros
//////////////////////////////////////////////////////////////////////////
#define LOBYTE(d) (*((char*)&(d)))
#define BYTE1(d) (*((char*)&(d)+1)) // Same as HIBYTE()
#define BYTE2(d) (*((char*)&(d)+2))
#define LOWORD(x) (*((int16*)&(x)))
#define LOBYTE(d) (*((char *)&(d)))
#define BYTE1(d) (*((char *)&(d) + 1)) // Same as HIBYTE()
#define BYTE2(d) (*((char *)&(d) + 2))
#define LOWORD(x) (*((int16 *)&(x)))
//////////////////////////////////////////////////////////////////////////
// Resource ID macros

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
@ -1699,7 +1699,7 @@ void Menu::clickSaveGame() {
//////////////////////////////////////////////////////////////////////////
// Previous page
if (cursor.x >= 30 && cursor.x <= (30 + getText()->getWidth(MAKE_RESOURCE(kResourcePackText, 1336)))
&& cursor.y >= 340 && cursor.y <= (340 + 24)) {
&& cursor.y >= 340 && cursor.y <= (340 + 24)) {
if (_startIndex) {
_startIndex -= 12;
if (_startIndex < 0)

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
@ -2715,8 +2715,8 @@ void Scene::checkVisibleActorsPriority() {
}
void Scene::adjustActorPriority(ActorIndex index) {
Actor* actor0 = getActor(0);
Actor* actor = getActor(index);
Actor *actor0 = getActor(0);
Actor *actor = getActor(index);
if (rectIntersect(actor0->getPoint1()->x,
actor0->getPoint1()->y,

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License

View File

@ -11,7 +11,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License