BLADERUNNER: JANITORIAL: Code formatting fixes
This commit is contained in:
parent
bd75898894
commit
a81e3add2f
42 changed files with 70 additions and 70 deletions
|
@ -344,12 +344,12 @@ Common::Error BladeRunnerEngine::run() {
|
|||
// when loading from ScummVM main menu, we should emulate
|
||||
// the Kia pause/resume in order to get a valid "current" time when the game
|
||||
// is actually loaded (assuming delays can be introduced by a popup warning dialogue)
|
||||
if(!_time->isLocked()) {
|
||||
if (!_time->isLocked()) {
|
||||
_time->pause();
|
||||
}
|
||||
loadGameState(ConfMan.getInt("save_slot"));
|
||||
ConfMan.set("save_slot", "-1");
|
||||
if(_time->isLocked()) {
|
||||
if (_time->isLocked()) {
|
||||
_time->resume();
|
||||
}
|
||||
} else if (hasSavegames) {
|
||||
|
@ -1925,7 +1925,7 @@ void BladeRunnerEngine::playerDied() {
|
|||
bool BladeRunnerEngine::saveGame(Common::WriteStream &stream, Graphics::Surface &thumbnail) {
|
||||
if ( !_gameIsAutoSaving
|
||||
&& ( !playerHasControl() || _sceneScript->isInsideScript() || _aiScripts->isInsideScript())
|
||||
){
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2037,7 +2037,7 @@ bool BladeRunnerEngine::loadGame(Common::SeekableReadStream &stream) {
|
|||
|
||||
if ((_gameFlags->query(kFlagGamePlayedInRestoredContentMode) && !_cutContent)
|
||||
|| (!_gameFlags->query(kFlagGamePlayedInRestoredContentMode) && _cutContent)
|
||||
){
|
||||
) {
|
||||
Common::String warningMsg;
|
||||
if (!_cutContent) {
|
||||
warningMsg = _("WARNING: This game was saved in Restored Cut Content mode, but you are playing in Original Content mode. The mode will be adjusted to Restored Cut Content for this session until you completely Quit the game.");
|
||||
|
|
|
@ -43,7 +43,7 @@ bool Chapters::enterChapter(int chapter) {
|
|||
for (int chi = 1; chi < 4; ++chi) {
|
||||
if (!_vm->isArchiveOpen(Common::String::format("%d.TLK", chi))
|
||||
&& !_vm->openArchive(Common::String::format("%d.TLK", chi))
|
||||
){
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ void Combat::reset() {
|
|||
}
|
||||
|
||||
void Combat::activate() {
|
||||
if(_enabled) {
|
||||
if (_enabled) {
|
||||
_vm->_playerActor->combatModeOn(-1, true, -1, -1, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, _vm->_combat->_ammoDamage[_vm->_settings->getAmmoType()], 0, false);
|
||||
_active = true;
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ Debugger::Debugger(BladeRunnerEngine *vm) : GUI::Debugger() {
|
|||
}
|
||||
|
||||
Debugger::~Debugger() {
|
||||
if(!_specificDrawnObjectsList.empty()) {
|
||||
if (!_specificDrawnObjectsList.empty()) {
|
||||
_specificDrawnObjectsList.clear();
|
||||
}
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ bool Debugger::cmdDraw(int argc, const char **argv) {
|
|||
debugPrintf("Drawing Z buffer = %s\n", _viewZBuffer? "true" : "false");
|
||||
} else if (arg == "reset") {
|
||||
|
||||
if(!_specificDrawnObjectsList.empty()) {
|
||||
if (!_specificDrawnObjectsList.empty()) {
|
||||
_specificDrawnObjectsList.clear();
|
||||
}
|
||||
|
||||
|
@ -1203,7 +1203,7 @@ bool Debugger::cmdOverlay(int argc, const char **argv) {
|
|||
if ( (overlaysList[itemIter].resourceId == chapterIdOverlaysAvailableInt)
|
||||
|| ( modeMixOverlaysAvailableFlg && overlaysList[itemIter].resourceId == 6)
|
||||
) {
|
||||
if (strcmp(overlaysList[itemIter].name, overlayName.c_str()) == 0){
|
||||
if (strcmp(overlaysList[itemIter].name, overlayName.c_str()) == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1218,7 +1218,7 @@ bool Debugger::cmdOverlay(int argc, const char **argv) {
|
|||
// Attempt to load the overlay in an empty slot
|
||||
// even if it's not already loaded for the scene (in _vm->_overlays->_videos)
|
||||
int overlayVideoIdx = _vm->_overlays->play(overlayName, overlayAnimationId, loopForever, startNowFlag, 0);
|
||||
if( overlayVideoIdx == -1 ) {
|
||||
if ( overlayVideoIdx == -1 ) {
|
||||
debugPrintf("Could not load the overlay animation: %s in this scene. Try reseting overlays first to free up slots!\n", overlayName.c_str());
|
||||
} else {
|
||||
debugPrintf("Loading overlay animation: %s...\n", overlayName.c_str());
|
||||
|
@ -1464,7 +1464,7 @@ bool Debugger::cmdObject(int argc, const char **argv) {
|
|||
Vector3 positionBottomRight(atof(argv[3]), atof(argv[4]), atof(argv[5]));
|
||||
Vector3 positionTopLeft(atof(argv[6]), atof(argv[7]), atof(argv[8]));
|
||||
_vm->_scene->_set->_objects[objectId].bbox.setXYZ(positionBottomRight.x, positionBottomRight.y, positionBottomRight.z, positionTopLeft.x, positionTopLeft.y, positionTopLeft.z);
|
||||
if (!_vm->_sceneIsLoading && _vm->_sceneObjects->remove(objectId + kSceneObjectOffsetObjects)){
|
||||
if (!_vm->_sceneIsLoading && _vm->_sceneObjects->remove(objectId + kSceneObjectOffsetObjects)) {
|
||||
_vm->_sceneObjects->addObject(objectId + kSceneObjectOffsetObjects,
|
||||
_vm->_scene->_set->_objects[objectId].bbox,
|
||||
_vm->_scene->_set->_objects[objectId].isClickable,
|
||||
|
@ -1676,7 +1676,7 @@ bool Debugger::cmdRegion(int argc, const char **argv) {
|
|||
debugPrintf("A region id has to be an integer within [0, 9]\n");
|
||||
return true;
|
||||
}
|
||||
if (modeName == "add" && ((regionTypeName == "reg" && argc == 8) || (regionTypeName == "exit" && argc == 9)) ){
|
||||
if (modeName == "add" && ((regionTypeName == "reg" && argc == 8) || (regionTypeName == "exit" && argc == 9)) ) {
|
||||
// add region mode
|
||||
if (!regions->_regions[regionID].present) {
|
||||
int type = 0;
|
||||
|
@ -2061,7 +2061,7 @@ bool Debugger::cmdList(int argc, const char **argv) {
|
|||
int count = 0;
|
||||
for (int i = 0; i < _vm->_waypoints->_count; i++) {
|
||||
Waypoints::Waypoint *waypoint = &_vm->_waypoints->_waypoints[i];
|
||||
if(waypoint->setId != _vm->_scene->getSetId()) {
|
||||
if (waypoint->setId != _vm->_scene->getSetId()) {
|
||||
continue;
|
||||
}
|
||||
char waypointText[40];
|
||||
|
@ -2358,7 +2358,7 @@ void Debugger::drawWaypoints() {
|
|||
//draw world waypoints
|
||||
for (int i = 0; i < _vm->_waypoints->_count; i++) {
|
||||
Waypoints::Waypoint *waypoint = &_vm->_waypoints->_waypoints[i];
|
||||
if(waypoint->setId != _vm->_scene->getSetId()) {
|
||||
if (waypoint->setId != _vm->_scene->getSetId()) {
|
||||
continue;
|
||||
}
|
||||
if (_viewWaypointsNormalToggle
|
||||
|
@ -2506,7 +2506,7 @@ int Debugger::findInDbgDrawList(DebuggerDrawnObjectType drObjType, int drObjId,
|
|||
&& (drObjId == -1 || drObjId == _specificDrawnObjectsList[i].objId)
|
||||
&& (drObjSetId == -1 || _specificDrawnObjectsList[i].setId == -1 || drObjSetId == _specificDrawnObjectsList[i].setId)
|
||||
&& (drObjSceneId == -1 || _specificDrawnObjectsList[i].sceneId == -1 || drObjSceneId == _specificDrawnObjectsList[i].sceneId)
|
||||
){
|
||||
) {
|
||||
// TODO for actors, 3d objects, items and waypoints it's probably preferable to ignore the sceneId (?)
|
||||
return i;
|
||||
}
|
||||
|
|
|
@ -343,7 +343,7 @@ void DialogueMenu::draw(Graphics::Surface &s) {
|
|||
|
||||
if (_items[i].colorIntensity < targetColorIntensity) {
|
||||
_items[i].colorIntensity += 4;
|
||||
if(_items[i].colorIntensity > targetColorIntensity) {
|
||||
if (_items[i].colorIntensity > targetColorIntensity) {
|
||||
_items[i].colorIntensity = targetColorIntensity;
|
||||
}
|
||||
} else if (_items[i].colorIntensity > targetColorIntensity) {
|
||||
|
|
|
@ -115,7 +115,7 @@ void Light::readVqa(Common::ReadStream *stream, int frameCount, int frame, int a
|
|||
|
||||
int size = stream->readUint32LE();
|
||||
|
||||
if(_animationData != nullptr) {
|
||||
if (_animationData != nullptr) {
|
||||
delete[] _animationData;
|
||||
}
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ void Mouse::draw(Graphics::Surface &surface, int x, int y) {
|
|||
|
||||
if (!_randomCountdownX)
|
||||
setMouseJitterDown();
|
||||
} else if (_randomCountdownY > 0){
|
||||
} else if (_randomCountdownY > 0) {
|
||||
_randomCountdownY--;
|
||||
x += _randomX;
|
||||
y += _randomY;
|
||||
|
|
|
@ -727,7 +727,7 @@ bool Obstacles::findFarthestAvailablePathVertex(Vector2 *path, int pathSize, Vec
|
|||
}
|
||||
|
||||
// neighboring vertices are always available
|
||||
if (foundVertexNeighbor){
|
||||
if (foundVertexNeighbor) {
|
||||
farthestPathIndex = pathVertexIdx;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ ScreenEffects::~ScreenEffects() {
|
|||
delete[] _data;
|
||||
#if BLADERUNNER_ORIGINAL_BUGS
|
||||
#else
|
||||
if(!_skipEntries.empty()) {
|
||||
if (!_skipEntries.empty()) {
|
||||
_skipEntries.clear();
|
||||
}
|
||||
#endif // BLADERUNNER_ORIGINAL_BUGS
|
||||
|
@ -65,7 +65,7 @@ void ScreenEffects::toggleEntry(int effectId, bool skip) {
|
|||
}
|
||||
}
|
||||
_skipEntries.insert_at(newSlot, effectId);
|
||||
} else if (!skip && foundAt >= 0 ){
|
||||
} else if (!skip && foundAt >= 0 ) {
|
||||
_skipEntries.remove_at(foundAt);
|
||||
}
|
||||
} else if (effectId == -1 && !skip) {
|
||||
|
@ -155,7 +155,7 @@ void ScreenEffects::readVqa(Common::SeekableReadStream *stream) {
|
|||
// if (entry.width < (width >> 1) + xx) {
|
||||
// if (entry.width + entry.x > xx) {
|
||||
// if (entry.height < (height >> 1) + yy) {
|
||||
// if(entry.height + entry.y > yy) {
|
||||
// if (entry.height + entry.y > yy) {
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
|
|
|
@ -219,7 +219,7 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) {
|
|||
_animationFrame = 0;
|
||||
break;
|
||||
case kGenericWalkerAStatesWalk:
|
||||
switch (Global_Variable_Query(kVariableGenericWalkerAModel)){
|
||||
switch (Global_Variable_Query(kVariableGenericWalkerAModel)) {
|
||||
case 0:
|
||||
*animation = 424;
|
||||
break;
|
||||
|
|
|
@ -205,7 +205,7 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) {
|
|||
_animationFrame = 0;
|
||||
break;
|
||||
case kGenericWalkerBStatesWalk:
|
||||
switch (Global_Variable_Query(kVariableGenericWalkerBModel)){
|
||||
switch (Global_Variable_Query(kVariableGenericWalkerBModel)) {
|
||||
case 0:
|
||||
*animation = 424;
|
||||
break;
|
||||
|
|
|
@ -206,7 +206,7 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) {
|
|||
_animationFrame = 0;
|
||||
break;
|
||||
case kGenericWalkerCStatesWalk:
|
||||
switch (Global_Variable_Query(kVariableGenericWalkerCModel)){
|
||||
switch (Global_Variable_Query(kVariableGenericWalkerCModel)) {
|
||||
case 0:
|
||||
*animation = 424;
|
||||
break;
|
||||
|
|
|
@ -500,7 +500,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
|
|||
break;
|
||||
|
||||
case kGoalGordoNR02NextAct:
|
||||
switch(Global_Variable_Query(kVariableGordosJoke)) {
|
||||
switch (Global_Variable_Query(kVariableGordosJoke)) {
|
||||
case 0:
|
||||
Global_Variable_Increment(kVariableGordosJoke, 1);
|
||||
Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TellJoke1);
|
||||
|
@ -1634,7 +1634,7 @@ void AIScriptGordo::talkToMcCoyInCity() {
|
|||
Game_Flag_Set(kFlagGordoTalk2);
|
||||
AI_Movement_Track_Unpause(kActorGordo);
|
||||
} else {
|
||||
switch(Random_Query(1, 4)) {
|
||||
switch (Random_Query(1, 4)) {
|
||||
case 1:
|
||||
Actor_Says(kActorMcCoy, 6460, 13);
|
||||
break;
|
||||
|
|
|
@ -113,7 +113,7 @@ bool AIScriptLucy::Update() {
|
|||
void AIScriptLucy::TimerExpired(int timer) {
|
||||
if (timer == kActorTimerAIScriptCustomTask0) { // rephrased this to be more expandable (if required)
|
||||
AI_Countdown_Timer_Reset(kActorLucy, kActorTimerAIScriptCustomTask0);
|
||||
if(Actor_Query_Goal_Number(kActorLucy) == kGoalLucyGoToHF03) {
|
||||
if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyGoToHF03) {
|
||||
if (Player_Query_Current_Scene() == kSceneHF03) {
|
||||
AI_Countdown_Timer_Start(kActorLucy, kActorTimerAIScriptCustomTask0, 20);
|
||||
} else {
|
||||
|
|
|
@ -87,7 +87,7 @@ void AIScriptRachael::ClickedByPlayer() {
|
|||
// the structure is simplified (maintaining the same logic flow)
|
||||
if ((Player_Query_Agenda() == kPlayerAgendaSurly || Player_Query_Agenda() == kPlayerAgendaErratic)
|
||||
|| (Player_Query_Agenda() != kPlayerAgendaPolite && Actor_Query_Friendliness_To_Other(kActorSteele, kActorMcCoy) > Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy))
|
||||
){
|
||||
) {
|
||||
dialogue_agenda2();
|
||||
} else {
|
||||
dialogue_agenda1();
|
||||
|
@ -155,7 +155,7 @@ bool AIScriptRachael::GoalChanged(int currentGoalNumber, int newGoalNumber) {
|
|||
// the structure is simplified (maintaining the same logic flow)
|
||||
if ((Player_Query_Agenda() == kPlayerAgendaSurly || Player_Query_Agenda() == kPlayerAgendaErratic)
|
||||
|| (Player_Query_Agenda() != kPlayerAgendaPolite && Actor_Query_Friendliness_To_Other(kActorSteele, kActorMcCoy) > Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy))
|
||||
){
|
||||
) {
|
||||
dialogue_agenda2();
|
||||
} else {
|
||||
dialogue_agenda1();
|
||||
|
@ -392,7 +392,7 @@ void AIScriptRachael::dialogue_start() {
|
|||
if (_vm->_cutContent) {
|
||||
Actor_Face_Actor(kActorRachael, kActorMcCoy, true);
|
||||
Loop_Actor_Walk_To_Actor(kActorRachael, kActorMcCoy, 84, false, false);
|
||||
if(_vm->_cutContent) {
|
||||
if (_vm->_cutContent) {
|
||||
Actor_Says(kActorMcCoy, 2735, 14); // MetAtYourUnclesOffice
|
||||
}
|
||||
Actor_Says(kActorRachael, 0, 15); // RememberYouMisterMcCoy
|
||||
|
|
|
@ -490,7 +490,7 @@ bool AIScriptZuben::GoalChanged(int currentGoalNumber, int newGoalNumber) {
|
|||
AI_Movement_Track_Append_With_Facing(kActorZuben, 470, 3, 506);
|
||||
AI_Movement_Track_Append(kActorZuben, 471, 5);
|
||||
AI_Movement_Track_Append(kActorZuben, 472, 0);
|
||||
} else if (rnd2 == 3){
|
||||
} else if (rnd2 == 3) {
|
||||
AI_Movement_Track_Flush(kActorZuben);
|
||||
AI_Movement_Track_Append(kActorZuben, 468, 0);
|
||||
AI_Movement_Track_Append(kActorZuben, 469, 3);
|
||||
|
|
|
@ -192,7 +192,7 @@ void AIScripts::clickedByPlayer(int actor) {
|
|||
}
|
||||
|
||||
|
||||
if(_vm->_actors[actor]->inCombat()) {
|
||||
if (_vm->_actors[actor]->inCombat()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ void SceneScriptCT01::InitializeScene() {
|
|||
if ( Global_Variable_Query(kVariableChapter) < 4
|
||||
&& Actor_Query_Which_Set_In(kActorGordo) != kSetCT01_CT12
|
||||
&& Random_Query(1, 2) == 1
|
||||
){
|
||||
) {
|
||||
// enhancement: don't always play
|
||||
Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kCT01LoopInshot, false);
|
||||
}
|
||||
|
@ -512,7 +512,7 @@ void SceneScriptCT01::PlayerWalkedIn() {
|
|||
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -330.0f, -6.5f, 221.0f, 0, false, false, false);
|
||||
if (_vm->_cutContent) {
|
||||
// unpause generic walkers here, less chance to collide with McCOy while he enters the scene
|
||||
if( Game_Flag_Query(kFlagArrivedFromSpinner1)
|
||||
if (Game_Flag_Query(kFlagArrivedFromSpinner1)
|
||||
&& Global_Variable_Query(kVariableGenericWalkerConfig) < 0
|
||||
) {
|
||||
Global_Variable_Set(kVariableGenericWalkerConfig, 2);
|
||||
|
|
|
@ -115,7 +115,7 @@ void SceneScriptMA06::PlayerWalkedIn() {
|
|||
//
|
||||
if ((Game_Flag_Query(kFlagMA07toMA06) || Game_Flag_Query(kFlagMA01toMA06))
|
||||
&& Actor_Query_Goal_Number(kActorRachael) == kGoalRachaelIsInsideMcCoysElevatorAct3
|
||||
){
|
||||
) {
|
||||
normalElevatorBusiness = false;
|
||||
// Act 3 Deleted scene (can happen within the elevator or outside the building)
|
||||
// Skip floor panel selection - force go to MCCOY 88F
|
||||
|
@ -154,7 +154,7 @@ void SceneScriptMA06::PlayerWalkedIn() {
|
|||
Sound_Play(kSfxELDOORO2, 100, 50, 50, 50);
|
||||
} else if (Game_Flag_Query(kFlagMA02toMA06)
|
||||
&& Actor_Query_Goal_Number(kActorRachael) == kGoalRachaelIsInsideMcCoysElevatorAct4
|
||||
){
|
||||
) {
|
||||
normalElevatorBusiness = false;
|
||||
// Act 4 deleted scene case with Rachael
|
||||
//
|
||||
|
|
|
@ -54,7 +54,7 @@ void SceneScriptMA07::InitializeScene() {
|
|||
|
||||
void SceneScriptMA07::SceneLoaded() {
|
||||
Obstacle_Object("BARRICADE", true);
|
||||
if(_vm->_cutContent) {
|
||||
if (_vm->_cutContent) {
|
||||
if (Actor_Query_Goal_Number(kActorRachael) == kGoalRachaelShouldBeOutsideMcCoysAct3) {
|
||||
Actor_Set_Goal_Number(kActorRachael, kGoalRachaelIsOutsideMcCoysBuildingAct3);
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ bool SceneScriptNR02::ClickedOnItem(int itemId, bool a2) {
|
|||
if (itemId == kItemGordosLighterReplicant
|
||||
|| itemId == kItemGordosLighterHuman
|
||||
) {
|
||||
if(!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 109.38f, -24.0f, 420.5f, 0, true, false, false)) {
|
||||
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 109.38f, -24.0f, 420.5f, 0, true, false, false)) {
|
||||
Actor_Face_Heading(kActorMcCoy, 423, false);
|
||||
if (itemId == kItemGordosLighterReplicant) {
|
||||
Item_Remove_From_World(kItemGordosLighterReplicant);
|
||||
|
|
|
@ -230,7 +230,7 @@ bool SceneScriptNR03::ClickedOn2DRegion(int region) {
|
|||
if (region == 0) {
|
||||
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 79.2f, -70.19f, -984.0f, 12, true, false, false)) {
|
||||
Actor_Face_Actor(kActorMcCoy, kActorHysteriaPatron1, true);
|
||||
switch(Random_Query(0, 4)) {
|
||||
switch (Random_Query(0, 4)) {
|
||||
case 0:
|
||||
Actor_Says(kActorMcCoy, 1055, kAnimationModeTalk);
|
||||
break;
|
||||
|
@ -248,8 +248,8 @@ bool SceneScriptNR03::ClickedOn2DRegion(int region) {
|
|||
break;
|
||||
#else
|
||||
case 4:
|
||||
if(_vm->_cutContent) {
|
||||
switch(Random_Query(1, 10)) {
|
||||
if (_vm->_cutContent) {
|
||||
switch (Random_Query(1, 10)) {
|
||||
case 1:
|
||||
// fall through
|
||||
case 2:
|
||||
|
|
|
@ -323,7 +323,7 @@ void SceneScriptNR05::talkToEarlyQ() {
|
|||
int answer = Dialogue_Menu_Query_Input();
|
||||
Dialogue_Menu_Disappear();
|
||||
|
||||
switch(answer){
|
||||
switch (answer) {
|
||||
case 890: // JEWELRY
|
||||
Actor_Says(kActorMcCoy, 3505, kAnimationModeTalk);
|
||||
Actor_Modify_Friendliness_To_Other(kActorEarlyQ, kActorMcCoy, -1);
|
||||
|
|
|
@ -726,7 +726,7 @@ void SceneScriptRC01::PlayerWalkedOut() {
|
|||
if (!Game_Flag_Query(kFlagRC01toRC02)
|
||||
&& !Game_Flag_Query(kFlagRC01toRC03)
|
||||
) {
|
||||
if(Global_Variable_Query(kVariableChapter) == 1) {
|
||||
if (Global_Variable_Query(kVariableChapter) == 1) {
|
||||
if (_vm->_cutContent) {
|
||||
Outtake_Play(kOuttakeAscent, true, -1);
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ void SceneScriptUG04::SceneLoaded() {
|
|||
#else
|
||||
if ((Global_Variable_Query(kVariableChapter) == 3)
|
||||
|| (Global_Variable_Query(kVariableChapter) > 3 && Random_Query(1, 4) == 1)
|
||||
){
|
||||
) {
|
||||
// Enhancement: don't always play the overground train after chapter 3
|
||||
// Bug fix: don't remove control from player. There is no chance to glitch into the scenery
|
||||
// while the video is playing and rats may attack!
|
||||
|
|
|
@ -200,7 +200,7 @@ void SceneScriptUG05::PlayerWalkedIn() {
|
|||
Actor_Put_In_Set(kActorDektora, kSetUG05);
|
||||
Actor_Set_At_XYZ(kActorDektora, -100.0f, -10.31f, -906.0f, 866);
|
||||
Actor_Force_Stop_Walking(kActorDektora);
|
||||
} else if (affectionTowardsActor == kActorLucy){
|
||||
} else if (affectionTowardsActor == kActorLucy) {
|
||||
Actor_Put_In_Set(kActorLucy, kSetUG05);
|
||||
Actor_Set_At_XYZ(kActorLucy, -100.0f, -10.31f, -906.0f, 866);
|
||||
Actor_Force_Stop_Walking(kActorLucy);
|
||||
|
|
|
@ -265,7 +265,7 @@ void SceneScript::sceneFrameAdvanced(int frame) {
|
|||
|
||||
void SceneScript::actorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
|
||||
_inScriptCounter++;
|
||||
if(_currentScript)
|
||||
if (_currentScript)
|
||||
_currentScript->ActorChangedGoal(actorId, newGoal, oldGoal, currentSet);
|
||||
_inScriptCounter--;
|
||||
}
|
||||
|
|
|
@ -1199,7 +1199,7 @@ void ScriptBase::Ambient_Sounds_Remove_Sound(int sfxId, bool stopPlaying) {
|
|||
_vm->_ambientSounds->removeNonLoopingSound(sfxId, stopPlaying);
|
||||
}
|
||||
|
||||
void ScriptBase::Ambient_Sounds_Add_Speech_Sound(int actorId, int sentenceId, int timeMin, int timeMax, int volumeMin, int volumeMax, int panStartMin, int panStartMax, int panEndMin, int panEndMax, int priority, int unk){
|
||||
void ScriptBase::Ambient_Sounds_Add_Speech_Sound(int actorId, int sentenceId, int timeMin, int timeMax, int volumeMin, int volumeMax, int panStartMin, int panStartMax, int panEndMin, int panEndMax, int priority, int unk) {
|
||||
debugC(kDebugScript, "Ambient_Sounds_Add_Speech_Sound(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)", actorId, sentenceId, timeMin, timeMax, volumeMin, volumeMax, panStartMin, panStartMax, panEndMin, panEndMax, priority, unk);
|
||||
_vm->_ambientSounds->addSpeech(actorId, sentenceId, timeMin, timeMax, volumeMin, volumeMax, panStartMin, panStartMax, panEndMin, panEndMax, priority, unk);
|
||||
}
|
||||
|
@ -1231,7 +1231,7 @@ void ScriptBase::Ambient_Sounds_Adjust_Looping_Sound(int sfxId, int volume, int
|
|||
_vm->_ambientSounds->adjustLoopingSound(sfxId, volume, pan, delay);
|
||||
}
|
||||
|
||||
void ScriptBase::Ambient_Sounds_Remove_Looping_Sound(int sfxId, int delay){
|
||||
void ScriptBase::Ambient_Sounds_Remove_Looping_Sound(int sfxId, int delay) {
|
||||
debugC(kDebugScript, "Ambient_Sounds_Remove_Looping_Sound(%d, %d)", sfxId, delay);
|
||||
_vm->_ambientSounds->removeLoopingSound(sfxId, delay);
|
||||
}
|
||||
|
@ -1507,7 +1507,7 @@ void ScriptBase::ESPER_Flag_To_Activate() {
|
|||
}
|
||||
}
|
||||
|
||||
void ScriptBase::Voight_Kampff_Activate(int actorId, int calibrationRatio){
|
||||
void ScriptBase::Voight_Kampff_Activate(int actorId, int calibrationRatio) {
|
||||
debugC(kDebugScript, "Voight_Kampff_Activate(%d, %d)", actorId, calibrationRatio);
|
||||
_vm->_vk->open(actorId, calibrationRatio);
|
||||
while (_vm->_vk->isOpen() && _vm->_gameIsRunning) {
|
||||
|
|
|
@ -483,7 +483,7 @@ void VKScript::SCRIPT_VK_DLL_McCoy_Asks_Question(int actorId, int questionId) {
|
|||
|
||||
if ( _vm->_debugger->_playFullVk ) {
|
||||
if (++_questionCounter >= 40) {
|
||||
switch(actorId) {
|
||||
switch (actorId) {
|
||||
case kActorLucy:
|
||||
//debug("Last Lucy Question!");
|
||||
if (Game_Flag_Query(kFlagLucyIsReplicant)) {
|
||||
|
|
|
@ -155,7 +155,7 @@ bool SliceAnimations::openFrames(int fileNumber) {
|
|||
) {
|
||||
// For Chapter1 we try both CDFRAMES.DAT and CDFRAMES1.DAT
|
||||
return false;
|
||||
} else if(i != 1 &&
|
||||
} else if (i != 1 &&
|
||||
!_framesPageFile.open(Common::String::format("CDFRAMES%d.DAT", i), i)
|
||||
) {
|
||||
return false;
|
||||
|
@ -176,7 +176,7 @@ bool SliceAnimations::PageFile::open(const Common::String &name, int8 fileIdx) {
|
|||
return false;
|
||||
|
||||
if (!_sliceAnimations->_vm->_cutContent
|
||||
|| (_pageOffsets.size() < _sliceAnimations->_pageCount) ){
|
||||
|| (_pageOffsets.size() < _sliceAnimations->_pageCount) ) {
|
||||
_pageOffsets.resize(_sliceAnimations->_pageCount);
|
||||
_pageOffsetsFileIdx.resize(_sliceAnimations->_pageCount);
|
||||
for (uint32 i = 0; i != _sliceAnimations->_pageCount; ++i) {
|
||||
|
|
|
@ -266,7 +266,7 @@ const char *Subtitles::getOuttakeSubsText(const Common::String &outtakesName, in
|
|||
// Search in the requested TextResource at the fileIdx index of the _vqaSubsTextResourceEntries table for a quote that corresponds to the specified video frame
|
||||
// debug("Number of resource quotes to search: %d, requested frame: %u", _vqaSubsTextResourceEntries[fileIdx]->getCount(), (uint32)frame );
|
||||
const Common::String &text = _vqaSubsTextResourceEntries[fileIdx]->getOuttakeTextByFrame((uint32)frame);
|
||||
//if(text != "") {
|
||||
//if (text != "") {
|
||||
// debug("Text = %s", text.c_str());
|
||||
//}
|
||||
if (_currentSubtitleTextFull != Common::String(text)) {
|
||||
|
|
|
@ -107,7 +107,7 @@ const char *TextResource::getText(uint32 id) const {
|
|||
const char *TextResource::getOuttakeTextByFrame(uint32 frame) const {
|
||||
for (uint32 i = 0; i != _count; ++i) {
|
||||
//debug("Checking %d - so within: %d , %d", _ids[i], (0x0000FFFF & _ids[i]), ((_ids[i] >> 16) & 0x0000FFFF ) );
|
||||
if ((frame >= (0x0000FFFF & _ids[i]) ) && (frame < ((_ids[i] >> 16) & 0x0000FFFF ) )){
|
||||
if ((frame >= (0x0000FFFF & _ids[i]) ) && (frame < ((_ids[i] >> 16) & 0x0000FFFF ) )) {
|
||||
// we found an id with lower 16bits smaller or equal to our frame key
|
||||
// and with higher 16 bits higher than the frame key
|
||||
return _strings + _offsets[i];
|
||||
|
|
|
@ -823,7 +823,7 @@ void ESPER::drawPhotoSharpening(Graphics::Surface &surface) {
|
|||
surface.hLine(_screen.left, _photoOpeningHeight - 1, _screen.right - 1, surface.format.RGBToColor(0, 144, 0));
|
||||
surface.vLine(_photoOpeningWidth - 1, _screen.top, _screen.bottom - 1, surface.format.RGBToColor(0, 144, 0));
|
||||
if (!needMoreSharpening) {
|
||||
if (_regionSelectedAck && !_regions[_regionSelected].name.empty()){
|
||||
if (_regionSelectedAck && !_regions[_regionSelected].name.empty()) {
|
||||
setStatePhoto(kEsperPhotoStateVideoShow);
|
||||
} else {
|
||||
setStatePhoto(kEsperPhotoStateShow);
|
||||
|
@ -1467,7 +1467,7 @@ int ESPER::findEmptyRegion() {
|
|||
|
||||
int ESPER::findRegion(Common::Rect where) {
|
||||
for (int i = 0; i < kRegionCount; ++i) {
|
||||
if (_regions[i].isPresent && _regions[i].rectOuter.contains(where) && where.contains(_regions[i].rectInner)){
|
||||
if (_regions[i].isPresent && _regions[i].rectOuter.contains(where) && where.contains(_regions[i].rectInner)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -610,7 +610,7 @@ void KIA::mouseDownCallback(int buttonId, void *callbackData) {
|
|||
case 13:
|
||||
case 14:
|
||||
self->_vm->_audioPlayer->playAud(self->_vm->_gameInfo->getSfxTrack(kSfxBUTN5P), 70, 0, 0, 50, 0);
|
||||
if (buttonId == 12){
|
||||
if (buttonId == 12) {
|
||||
self->_vm->_audioPlayer->playAud(self->_vm->_gameInfo->getSfxTrack(kSfxSHUTDOWN), 70, 0, 0, 50, 0);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -386,7 +386,7 @@ void KIASectionClues::populateClues() {
|
|||
int assetType = _vm->_crimesDatabase->getAssetType(i);
|
||||
int crimeId = _vm->_crimesDatabase->getCrime(i);
|
||||
if (assetType != -1 || _debugIntangible) {
|
||||
if(_filters[getLineIdForAssetType(assetType)] && _filters[getLineIdForCrimeId(crimeId)]) {
|
||||
if (_filters[getLineIdForAssetType(assetType)] && _filters[getLineIdForCrimeId(crimeId)]) {
|
||||
int flags = 0x30;
|
||||
if (_clues->isPrivate(i)) {
|
||||
flags = 0x08;
|
||||
|
|
|
@ -438,7 +438,7 @@ void KIASectionCrimes::nextCrime() {
|
|||
if (_crimesFoundCount >= 2) {
|
||||
while (true) {
|
||||
++_crimeSelected;
|
||||
if (_crimeSelected >= (int)_vm->_gameInfo->getCrimeCount()){
|
||||
if (_crimeSelected >= (int)_vm->_gameInfo->getCrimeCount()) {
|
||||
_crimeSelected = 0;
|
||||
}
|
||||
|
||||
|
@ -470,7 +470,7 @@ void KIASectionCrimes::nextSuspect() {
|
|||
if (_suspectsFoundCount >= 2) {
|
||||
while (true) {
|
||||
++_suspectSelected;
|
||||
if (_suspectSelected >= (int)_vm->_gameInfo->getSuspectCount()){
|
||||
if (_suspectSelected >= (int)_vm->_gameInfo->getSuspectCount()) {
|
||||
_suspectSelected = 0;
|
||||
}
|
||||
|
||||
|
@ -486,7 +486,7 @@ void KIASectionCrimes::prevSuspect() {
|
|||
if (_suspectsFoundCount >= 2) {
|
||||
while (true) {
|
||||
--_suspectSelected;
|
||||
if (_suspectSelected < 0){
|
||||
if (_suspectSelected < 0) {
|
||||
_suspectSelected = _vm->_gameInfo->getSuspectCount() - 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ void KIASectionHelp::close() {
|
|||
_scrollBox->hide();
|
||||
}
|
||||
|
||||
void KIASectionHelp::draw(Graphics::Surface &surface){
|
||||
void KIASectionHelp::draw(Graphics::Surface &surface) {
|
||||
_vm->_kia->_shapes->get(69)->draw(surface, 501, 123);
|
||||
_uiContainer->draw(surface);
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ void KIASectionLoad::close() {
|
|||
_saveList.clear();
|
||||
}
|
||||
|
||||
void KIASectionLoad::draw(Graphics::Surface &surface){
|
||||
void KIASectionLoad::draw(Graphics::Surface &surface) {
|
||||
_vm->_kia->_shapes->get(69)->draw(surface, 501, 123);
|
||||
|
||||
_uiContainer->draw(surface);
|
||||
|
|
|
@ -143,7 +143,7 @@ void KIASectionSave::close() {
|
|||
_saveList.clear();
|
||||
}
|
||||
|
||||
void KIASectionSave::draw(Graphics::Surface &surface){
|
||||
void KIASectionSave::draw(Graphics::Surface &surface) {
|
||||
_vm->_kia->_shapes->get(69)->draw(surface, 501, 123);
|
||||
_buttons->draw(surface);
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ const char *KIASectionSuspects::scrambleSuspectsName(const char *name) {
|
|||
for (int i = 0 ; i < 6; ++i) {
|
||||
if (Common::isAlpha(*namePtr)) {
|
||||
char upper = toupper(*namePtr);
|
||||
if ( upper < 'J' ){
|
||||
if ( upper < 'J' ) {
|
||||
*bufferPtr++ = upper - 16;
|
||||
} else {
|
||||
*bufferPtr++ = upper - 9;
|
||||
|
@ -530,7 +530,7 @@ void KIASectionSuspects::nextSuspect() {
|
|||
if (_suspectsFoundCount >= 2) {
|
||||
while (true) {
|
||||
++_suspectSelected;
|
||||
if (_suspectSelected >= (int)_vm->_gameInfo->getSuspectCount()){
|
||||
if (_suspectSelected >= (int)_vm->_gameInfo->getSuspectCount()) {
|
||||
_suspectSelected = 0;
|
||||
}
|
||||
|
||||
|
@ -546,7 +546,7 @@ void KIASectionSuspects::prevSuspect() {
|
|||
if (_suspectsFoundCount >= 2) {
|
||||
while (true) {
|
||||
--_suspectSelected;
|
||||
if (_suspectSelected < 0){
|
||||
if (_suspectSelected < 0) {
|
||||
_suspectSelected = _vm->_gameInfo->getSuspectCount() - 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -302,7 +302,7 @@ void Spinner::reset() {
|
|||
}
|
||||
|
||||
void Spinner::resume() {
|
||||
if(_vqaPlayer == nullptr) {
|
||||
if (_vqaPlayer == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ void UIScrollBox::hide() {
|
|||
_isVisible = false;
|
||||
}
|
||||
|
||||
void UIScrollBox::clearLines(){
|
||||
void UIScrollBox::clearLines() {
|
||||
_lineCount = 0;
|
||||
_firstLineVisible = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue