[Scummvm-git-logs] scummvm master -> 27573e74fa8a12d0bd313fc1c8b9045dba2ef02e
Strangerke
noreply at scummvm.org
Sun Jan 19 00:43:48 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
27573e74fa GOT: Renaming in boss3, init, main
Commit: 27573e74fa8a12d0bd313fc1c8b9045dba2ef02e
https://github.com/scummvm/scummvm/commit/27573e74fa8a12d0bd313fc1c8b9045dba2ef02e
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-19T01:43:41+01:00
Commit Message:
GOT: Renaming in boss3, init, main
Changed paths:
engines/got/game/back.cpp
engines/got/game/boss1.cpp
engines/got/game/boss2.cpp
engines/got/game/boss3.cpp
engines/got/game/boss3.h
engines/got/game/init.cpp
engines/got/game/init.h
engines/got/game/main.cpp
engines/got/game/main.h
engines/got/game/move.cpp
engines/got/game/move.h
engines/got/game/move_patterns.cpp
engines/got/game/shot_movement.cpp
engines/got/got.cpp
engines/got/views/dialogs/main_menu.cpp
engines/got/views/dialogs/select_game.cpp
engines/got/views/game.cpp
engines/got/views/game_content.cpp
diff --git a/engines/got/game/back.cpp b/engines/got/game/back.cpp
index ed4ece6ad98..8c72e557e64 100644
--- a/engines/got/game/back.cpp
+++ b/engines/got/game/back.cpp
@@ -161,12 +161,12 @@ void showLevelDone() {
if (_G(new_level) == BOSS_LEVEL3) {
if (!_G(setup)._bossDead[2]) {
if (!_G(auto_load))
- boss_level3();
+ boss3SetupLevel();
f = false;
}
}
if (_G(current_level) == ENDING_SCREEN) {
- ending_screen();
+ endingScreen();
f = false;
}
}
diff --git a/engines/got/game/boss1.cpp b/engines/got/game/boss1.cpp
index 643a3607869..c8b2290ff10 100644
--- a/engines/got/game/boss1.cpp
+++ b/engines/got/game/boss1.cpp
@@ -148,7 +148,7 @@ done:
d -= 2;
done0:
- next_frame(actor);
+ nextFrame(actor);
if (actor->_nextFrame == 3)
actor->_nextFrame = 0;
@@ -205,7 +205,7 @@ void boss1CheckHit(const Actor *actor, int x1, int y1, int x2, int y2, int act_n
}
void boss1SetupLevel() {
- setup_boss(1);
+ setupBoss(1);
_G(boss_active) = true;
music_pause();
play_sound(BOSS11, true);
diff --git a/engines/got/game/boss2.cpp b/engines/got/game/boss2.cpp
index 383a57731f8..db608707e69 100644
--- a/engines/got/game/boss2.cpp
+++ b/engines/got/game/boss2.cpp
@@ -209,7 +209,7 @@ void boss2CheckHit(Actor *actor, int x1, int y1, int x2, int y2, int act_num) {
}
void boss2SetupLevel() {
- setup_boss(2);
+ setupBoss(2);
_G(boss_active) = true;
music_pause();
play_sound(BOSS11, true);
@@ -262,7 +262,7 @@ static int boss2Die() {
// Boss - skull (explode)
static int boss2MovementExplode(Actor *actor) {
- next_frame(actor);
+ nextFrame(actor);
_G(actor[4])._nextFrame = actor->_nextFrame;
_G(actor[5])._nextFrame = actor->_nextFrame;
_G(actor[6])._nextFrame = actor->_nextFrame;
@@ -379,7 +379,7 @@ static int boss2MovementShake(Actor *actor) {
}
done:
- next_frame(actor);
+ nextFrame(actor);
bossSet(actor->_dir, actor->_x, actor->_y);
return 0;
}
diff --git a/engines/got/game/boss3.cpp b/engines/got/game/boss3.cpp
index e9545eaea81..5065bc7d0e2 100644
--- a/engines/got/game/boss3.cpp
+++ b/engines/got/game/boss3.cpp
@@ -33,98 +33,104 @@ namespace Got {
#define LFC 10
-static int boss_mode;
-static int num_pods1;
-static byte pod_speed;
static const byte EXPLOSION[4][8] = {
{126, 127, 128, 129, 130, 131, 132, 133},
{146, 147, 148, 149, 150, 151, 152, 153},
{166, 167, 168, 169, 170, 171, 172, 173},
- {186, 187, 188, 189, 190, 191, 192, 193}};
+ {186, 187, 188, 189, 190, 191, 192, 193}
+};
+static int bossMode;
+static int numPods1;
+static byte podSpeed;
static bool expf[4][8];
-static byte expcnt;
-
-static int boss_die();
-static void check_boss_hit();
-static void boss_change_mode();
-
-static void set_boss(Actor *actr) {
- _G(actor[4])._nextFrame = actr->_nextFrame;
- _G(actor[5])._nextFrame = actr->_nextFrame;
- _G(actor[6])._nextFrame = actr->_nextFrame;
-
- _G(actor[4])._lastDir = actr->_dir;
- _G(actor[5])._lastDir = actr->_dir;
- _G(actor[6])._lastDir = actr->_dir;
- _G(actor[4])._dir = actr->_dir;
- _G(actor[5])._dir = actr->_dir;
- _G(actor[6])._dir = actr->_dir;
-
- _G(actor[4])._x = actr->_x + 16;
- _G(actor[4])._y = actr->_y;
- _G(actor[5])._x = actr->_x;
- _G(actor[5])._y = actr->_y + 16;
- _G(actor[6])._x = actr->_x + 16;
- _G(actor[6])._y = actr->_y + 16;
+static byte expCounter;
+
+static int bossDie();
+static void boss3CheckHit();
+static void bossChangeMode();
+
+static void setBoss(Actor *actor) {
+ _G(actor[4])._nextFrame = actor->_nextFrame;
+ _G(actor[5])._nextFrame = actor->_nextFrame;
+ _G(actor[6])._nextFrame = actor->_nextFrame;
+
+ _G(actor[4])._lastDir = actor->_dir;
+ _G(actor[5])._lastDir = actor->_dir;
+ _G(actor[6])._lastDir = actor->_dir;
+ _G(actor[4])._dir = actor->_dir;
+ _G(actor[5])._dir = actor->_dir;
+ _G(actor[6])._dir = actor->_dir;
+
+ _G(actor[4])._x = actor->_x + 16;
+ _G(actor[4])._y = actor->_y;
+ _G(actor[5])._x = actor->_x;
+ _G(actor[5])._y = actor->_y + 16;
+ _G(actor[6])._x = actor->_x + 16;
+ _G(actor[6])._y = actor->_y + 16;
}
// Boss - Loki-2
-static int boss_movement_one(Actor *actr) {
+static int boss3Movement1(Actor *actor) {
int rx, ry, i, numPods = 0;
int fcount;
- actr->_numMoves = 2;
- pod_speed = 2;
+ actor->_numMoves = 2;
+ podSpeed = 2;
switch (_G(setup)._difficultyLevel) {
case 0:
numPods = 3;
break;
+
case 1:
numPods = 5;
break;
+
case 2:
numPods = 8;
break;
+
+ default:
+ break;
}
- if (!actr->_temp1) {
+ if (!actor->_temp1) {
// Disappear
- actr->_dir = 1;
- actr->_frameCount = LFC;
- actr->_nextFrame = 0;
- actr->_temp1 = 1;
- actr->_i6 = 1;
- actr->_solid |= 128;
+ actor->_dir = 1;
+ actor->_frameCount = LFC;
+ actor->_nextFrame = 0;
+ actor->_temp1 = 1;
+ actor->_i6 = 1;
+ actor->_solid |= 128;
_G(actor[4])._solid |= 128;
_G(actor[5])._solid |= 128;
_G(actor[6])._solid |= 128;
play_sound(EXPLODE, true);
goto done;
}
- if (actr->_i6) {
+ if (actor->_i6) {
// Fade out
- fcount = actr->_frameCount - 1;
+ fcount = actor->_frameCount - 1;
if (fcount <= 0) {
- actr->_nextFrame++;
- if (actr->_nextFrame > 2) {
- actr->_i6 = 0;
- actr->_temp3 = 160;
+ actor->_nextFrame++;
+ if (actor->_nextFrame > 2) {
+ actor->_i6 = 0;
+ actor->_temp3 = 160;
}
- actr->_frameCount = 3;
+ actor->_frameCount = 3;
} else
- actr->_frameCount = fcount;
+ actor->_frameCount = fcount;
goto done1;
}
- if (actr->_temp3 > 1) {
- actr->_temp3--;
+ if (actor->_temp3 > 1) {
+ actor->_temp3--;
goto done1;
}
- if (actr->_temp3) {
- for (i = 0; i < num_pods1; i++)
+ if (actor->_temp3) {
+ for (i = 0; i < numPods1; i++)
if (_G(actor[19 + i])._active)
goto done1;
@@ -136,119 +142,119 @@ static int boss_movement_one(Actor *actr) {
break;
}
- actr->_x = rx;
- actr->_y = ry;
- actr->_frameCount = LFC;
- actr->_temp4 = 40;
- actr->_temp3 = 0;
+ actor->_x = rx;
+ actor->_y = ry;
+ actor->_frameCount = LFC;
+ actor->_temp4 = 40;
+ actor->_temp3 = 0;
play_sound(EXPLODE, true);
goto done1;
}
- if (actr->_temp4) {
+ if (actor->_temp4) {
// Fade in
- fcount = actr->_frameCount - 1;
+ fcount = actor->_frameCount - 1;
if (fcount <= 0) {
- actr->_nextFrame--;
- if (actr->_nextFrame > 254) {
- actr->_nextFrame = 0;
- actr->_dir = 0;
- actr->_temp4 = 0;
- actr->_temp5 = 80;
- actr->_solid &= 0x7f;
+ actor->_nextFrame--;
+ if (actor->_nextFrame > 254) {
+ actor->_nextFrame = 0;
+ actor->_dir = 0;
+ actor->_temp4 = 0;
+ actor->_temp5 = 80;
+ actor->_solid &= 0x7f;
_G(actor[4])._solid &= 0x7f;
_G(actor[5])._solid &= 0x7f;
_G(actor[6])._solid &= 0x7f;
}
- actr->_frameCount = 3;
+ actor->_frameCount = 3;
} else
- actr->_frameCount = fcount;
+ actor->_frameCount = fcount;
goto done1;
}
- if (actr->_temp5) {
+ if (actor->_temp5) {
// Shoot
- actr->_temp5--;
- if (actr->_temp5 == 20) {
- actr->_nextFrame = 3;
+ actor->_temp5--;
+ if (actor->_temp5 == 20) {
+ actor->_nextFrame = 3;
goto done1;
}
- if (!actr->_temp5) {
+ if (!actor->_temp5) {
if (_G(actor[4])._currNumShots < _G(actor[4])._numShotsAllowed) {
actor_always_shoots(&_G(actor[4]), 0);
const byte shot_actor = _G(actor[4])._shotActor;
- _G(actor[shot_actor])._numMoves = pod_speed;
- _G(actor[shot_actor])._x = actr->_x + 8;
- _G(actor[shot_actor])._y = actr->_y + 16;
+ _G(actor[shot_actor])._numMoves = podSpeed;
+ _G(actor[shot_actor])._x = actor->_x + 8;
+ _G(actor[shot_actor])._y = actor->_y + 16;
_G(actor[shot_actor])._temp5 = 0;
for (i = 0; i < numPods; i++)
_G(actor[20 + i]) = _G(actor[19]);
- num_pods1 = numPods;
- actr->_temp1 = 0;
+ numPods1 = numPods;
+ actor->_temp1 = 0;
}
}
- if (actr->_temp5 < 31)
+ if (actor->_temp5 < 31)
goto done1;
}
done:
- fcount = actr->_frameCount - 1;
+ fcount = actor->_frameCount - 1;
if (fcount <= 0) {
- actr->_nextFrame++;
- if (actr->_nextFrame > 2)
- actr->_nextFrame = 0;
- actr->_frameCount = LFC;
+ actor->_nextFrame++;
+ if (actor->_nextFrame > 2)
+ actor->_nextFrame = 0;
+ actor->_frameCount = LFC;
} else
- actr->_frameCount = fcount;
+ actor->_frameCount = fcount;
done1:
- set_boss(actr);
- return actr->_dir;
+ setBoss(actor);
+ return actor->_dir;
}
// Boss - Loki-1
-int boss3_movement(Actor *actr) {
+int boss3Movement(Actor *actor) {
int x1, y1, ox, oy;
int fcount;
- if (actr->_temp2)
- actr->_temp2--;
+ if (actor->_temp2)
+ actor->_temp2--;
if (_G(boss_dead))
- return boss_die();
- check_boss_hit();
+ return bossDie();
+ boss3CheckHit();
- if (!boss_mode)
- return boss_movement_one(actr);
- num_pods1 = 10;
+ if (!bossMode)
+ return boss3Movement1(actor);
+ numPods1 = 10;
switch (_G(setup)._difficultyLevel) {
case 0:
- actr->_numMoves = 3;
- actr->_speed = 2;
+ actor->_numMoves = 3;
+ actor->_speed = 2;
break;
case 1:
- actr->_numMoves = 2;
- actr->_speed = 1;
+ actor->_numMoves = 2;
+ actor->_speed = 1;
break;
case 2:
- actr->_numMoves = 5;
- actr->_speed = 2;
+ actor->_numMoves = 5;
+ actor->_speed = 2;
break;
}
- int d = actr->_lastDir;
- actr->_temp3++;
+ int d = actor->_lastDir;
+ actor->_temp3++;
int f = 0;
- if (actr->_temp4) {
- actr->_temp4--;
- if (!actr->_temp4) {
- actr->_temp3 = 0;
+ if (actor->_temp4) {
+ actor->_temp4--;
+ if (!actor->_temp4) {
+ actor->_temp3 = 0;
_G(actor[3])._frameSpeed = 4;
_G(actor[3])._dir = 0;
_G(actor[3])._lastDir = 0;
@@ -260,17 +266,17 @@ int boss3_movement(Actor *actr) {
goto skip_move;
}
- if (actr->_edgeCounter)
- actr->_edgeCounter--;
+ if (actor->_edgeCounter)
+ actor->_edgeCounter--;
else
goto new_dir;
- if (overlap(actr->_x + 2, actr->_y + 8, actr->_x + 30, actr->_y + 30, _G(thor)->_x, _G(thor)->_y + 4, _G(thor)->_x + 15, _G(thor)->_y + 15))
- thor_damaged(actr);
+ if (overlap(actor->_x + 2, actor->_y + 8, actor->_x + 30, actor->_y + 30, _G(thor)->_x, _G(thor)->_y + 4, _G(thor)->_x + 15, _G(thor)->_y + 15))
+ thor_damaged(actor);
- ox = actr->_x;
- oy = actr->_y;
- switch (actr->_temp5) {
+ ox = actor->_x;
+ oy = actor->_y;
+ switch (actor->_temp5) {
case 0:
x1 = _G(actor[3])._x;
y1 = _G(actor[3])._y - 2;
@@ -280,7 +286,7 @@ int boss3_movement(Actor *actr) {
}
if (!check_move2(x1 + 16, y1, &_G(actor[4])))
f = 1;
- actr->_y = oy - 2;
+ actor->_y = oy - 2;
break;
case 1:
x1 = _G(actor[5])._x;
@@ -291,7 +297,7 @@ int boss3_movement(Actor *actr) {
}
if (!check_move2(x1 + 16, y1, &_G(actor[6])))
f = 1;
- actr->_y = oy + 2;
+ actor->_y = oy + 2;
break;
case 2:
x1 = _G(actor[3])._x - 2;
@@ -302,7 +308,7 @@ int boss3_movement(Actor *actr) {
}
if (!check_move2(x1, y1 + 16, &_G(actor[5])))
f = 1;
- actr->_x = ox - 2;
+ actor->_x = ox - 2;
break;
case 3:
x1 = _G(actor[4])._x + 2;
@@ -313,7 +319,7 @@ int boss3_movement(Actor *actr) {
}
if (!check_move2(x1, y1 + 16, &_G(actor[6])))
f = 1;
- actr->_x = ox + 2;
+ actor->_x = ox + 2;
break;
case 4: //ul
x1 = _G(actor[3])._x - 2;
@@ -322,8 +328,8 @@ int boss3_movement(Actor *actr) {
f = 1;
break;
}
- actr->_x = ox - 2;
- actr->_y = oy - 2;
+ actor->_x = ox - 2;
+ actor->_y = oy - 2;
break;
case 5:
x1 = _G(actor[4])._x + 2;
@@ -332,8 +338,8 @@ int boss3_movement(Actor *actr) {
f = 1;
break;
}
- actr->_x = ox + 2;
- actr->_y = oy - 2;
+ actor->_x = ox + 2;
+ actor->_y = oy - 2;
break;
case 6:
x1 = _G(actor[6])._x + 2;
@@ -342,8 +348,8 @@ int boss3_movement(Actor *actr) {
f = 1;
break;
}
- actr->_x = ox + 2;
- actr->_y = oy + 2;
+ actor->_x = ox + 2;
+ actor->_y = oy + 2;
break;
case 7:
x1 = _G(actor[5])._x - 2;
@@ -352,56 +358,58 @@ int boss3_movement(Actor *actr) {
f = 1;
break;
}
- actr->_x = ox - 2;
- actr->_y = oy + 2;
+ actor->_x = ox - 2;
+ actor->_y = oy + 2;
+ break;
+
+ default:
break;
}
- fcount = actr->_frameCount - 1;
+
+ fcount = actor->_frameCount - 1;
if (fcount) {
- actr->_nextFrame++;
- if (actr->_nextFrame > 2)
- actr->_nextFrame = 0;
- actr->_frameCount = 30;
+ actor->_nextFrame++;
+ if (actor->_nextFrame > 2)
+ actor->_nextFrame = 0;
+ actor->_frameCount = 30;
} else
- actr->_frameCount = fcount;
+ actor->_frameCount = fcount;
skip_move:
- set_boss(actr);
+ setBoss(actor);
if (!f)
goto done;
new_dir:
- if (actr->_temp3 < 120)
+ if (actor->_temp3 < 120)
goto new_dir1;
_G(actor[3])._frameSpeed = 8;
_G(actor[3])._nextFrame = 3;
_G(actor[4])._nextFrame = 3;
- actr->_temp4 = 120;
- actor_always_shoots(actr, 0);
- _G(actor[actr->_shotActor])._x = actr->_x + 8;
- _G(actor[actr->_shotActor])._y = actr->_y - 8;
- _G(actor[actr->_shotActor])._temp1 = g_events->getRandomNumber(90, 189);
- _G(actor[actr->_shotActor])._temp5 = 30;
- _G(actor[actr->_shotActor])._speed = 2;
+ actor->_temp4 = 120;
+ actor_always_shoots(actor, 0);
+ _G(actor[actor->_shotActor])._x = actor->_x + 8;
+ _G(actor[actor->_shotActor])._y = actor->_y - 8;
+ _G(actor[actor->_shotActor])._temp1 = g_events->getRandomNumber(90, 189);
+ _G(actor[actor->_shotActor])._temp5 = 30;
+ _G(actor[actor->_shotActor])._speed = 2;
play_sound(BOSS12, true);
new_dir1:
- actr->_temp5 = _G(rand1) % 8;
- actr->_edgeCounter = _G(rand2) + 60;
+ actor->_temp5 = _G(rand1) % 8;
+ actor->_edgeCounter = _G(rand2) + 60;
done:
- if (actr->_directions == 1)
+ if (actor->_directions == 1)
return 0;
return d;
}
-static void check_boss_hit() {
- int rep;
-
+static void boss3CheckHit() {
if (_G(actor[3])._solid & 128) {
- for (rep = 3; rep < 7; rep++)
+ for (int rep = 3; rep < 7; rep++)
_G(actor[rep])._magicHit = 0;
return;
@@ -420,7 +428,7 @@ static void check_boss_hit() {
_G(actor[3])._vulnerableCountdown = 50;
play_sound(BOSS13, true);
- for (rep = 4; rep < 7; rep++) {
+ for (int rep = 4; rep < 7; rep++) {
_G(actor[rep])._magicHit = 0;
_G(actor[rep])._nextFrame = 1;
_G(actor[rep])._moveCountdown = 50;
@@ -428,14 +436,14 @@ static void check_boss_hit() {
if (_G(actor[3])._health == 0) {
_G(boss_dead) = true;
- for (rep = 7; rep < MAX_ACTORS; rep++) {
+ for (int rep = 7; rep < MAX_ACTORS; rep++) {
if (_G(actor[rep])._active)
actor_destroyed(&_G(actor[rep]));
}
}
if (_G(actor[3])._health == 50) {
- boss_change_mode();
+ bossChangeMode();
_G(actor[3])._temp1 = 0;
_G(actor[3])._temp2 = 0;
_G(actor[3])._temp3 = 0;
@@ -447,22 +455,23 @@ static void check_boss_hit() {
_G(actor[3])._temp2 = 40;
}
}
- for (rep = 3; rep < 7; rep++)
+ for (int rep = 3; rep < 7; rep++)
_G(actor[rep])._magicHit = 0;
}
}
-static void boss_change_mode() {
+static void bossChangeMode() {
if (!_G(boss_intro2)) {
Gfx::Pics loki("FACE18", 262);
execute_script(1003, loki);
_G(boss_intro2) = true;
}
- boss_mode = 0;
+
+ bossMode = 0;
}
-void boss_level3() {
- setup_boss(3);
+void boss3SetupLevel() {
+ setupBoss(3);
_G(boss_active) = true;
music_pause();
play_sound(BOSS11, true);
@@ -478,10 +487,10 @@ void boss_level3() {
music_play(7, true);
_G(apple_drop) = 0;
- boss_mode = 1;
+ bossMode = 1;
}
-static int boss_die() {
+static int bossDie() {
if (_G(boss_dead)) {
for (int rep = 0; rep < 4; rep++) {
int x1 = _G(actor[3 + rep])._lastX[_G(pge)];
@@ -517,16 +526,16 @@ static int boss_die() {
return _G(actor[3])._lastDir;
}
-void closing_sequence3() {
+void boss3ClosingSequence1() {
music_play(6, true);
odinSpeaks(1001, 0, "CLOSING");
}
-void closing_sequence3_2() {
+void boss3ClosingSequence2() {
fill_score(20, "CLOSING");
}
-void closing_sequence3_3() {
+void boss3ClosingSequence3() {
fill_health();
fill_magic();
@@ -549,7 +558,7 @@ void closing_sequence3_3() {
_G(thor)->_dir = 1;
}
-void ending_screen() {
+void endingScreen() {
for (int i = 3; i < MAX_ACTORS; i++)
_G(actor[i])._moveType = 1;
@@ -560,7 +569,7 @@ void ending_screen() {
_G(endgame) = 1;
_G(exprow) = 0;
- expcnt = 0;
+ expCounter = 0;
_G(actor[34]) = _G(explosion);
_G(actor[34])._active = false;
@@ -607,10 +616,10 @@ int endgame_one() {
}
// Explode
-int endgame_movement() {
+int endGameMovement() {
if (!_G(endgame))
return 0;
- if (expcnt > 3) {
+ if (expCounter > 3) {
endgame_one();
return 0;
}
@@ -643,8 +652,8 @@ int endgame_movement() {
if (_G(endgame) > 8) {
_G(endgame) = 1;
_G(exprow++);
- expcnt++;
- if (expcnt > 3) {
+ expCounter++;
+ if (expCounter > 3) {
memset(expf, 0, 32);
}
}
diff --git a/engines/got/game/boss3.h b/engines/got/game/boss3.h
index 844055bd692..cfca1d94821 100644
--- a/engines/got/game/boss3.h
+++ b/engines/got/game/boss3.h
@@ -27,13 +27,13 @@
namespace Got {
// Boss 3 - Loki
-extern int boss3_movement(Actor *actr);
-extern void boss_level3();
-extern void ending_screen();
-extern void closing_sequence3();
-extern void closing_sequence3_2();
-extern void closing_sequence3_3();
-extern int endgame_movement();
+extern int boss3Movement(Actor *actor);
+extern void boss3SetupLevel();
+extern void endingScreen();
+extern void boss3ClosingSequence1();
+extern void boss3ClosingSequence2();
+extern void boss3ClosingSequence3();
+extern int endGameMovement();
} // namespace Got
diff --git a/engines/got/game/init.cpp b/engines/got/game/init.cpp
index 9f99bbe63a1..2d16698fd71 100644
--- a/engines/got/game/init.cpp
+++ b/engines/got/game/init.cpp
@@ -31,7 +31,7 @@
namespace Got {
-void setup_player() {
+void setupPlayer() {
_G(thor_info).clear();
_G(thor_info)._inventory = 0;
if (_G(area) > 1)
@@ -73,9 +73,9 @@ void setup_player() {
}
}
-void initialize_game() {
+void initGame() {
load_standard_actors();
- setup_player();
+ setupPlayer();
if (_G(demo)) {
g_vars->setArea(1);
@@ -115,7 +115,7 @@ void initialize_game() {
_G(startup) = false;
}
-int setup_boss(int num) {
+int setupBoss(int num) {
if (_G(boss_loaded) == num)
return 1;
@@ -128,27 +128,27 @@ int setup_boss(int num) {
}
}
- Common::String ress = Common::String::format("BOSSV%d1", num);
- _G(boss_sound[0]) = (byte *)res_falloc_read(ress);
+ Common::String ressourceName = Common::String::format("BOSSV%d1", num);
+ _G(boss_sound[0]) = (byte *)res_falloc_read(ressourceName);
if (!_G(boss_sound[0]))
return 0;
_G(dig_sound[NUM_SOUNDS - 3]) = _G(boss_sound[0]);
- ress = Common::String::format("BOSSV%d2", num);
- _G(boss_sound[1]) = (byte *)res_falloc_read(ress);
+ ressourceName = Common::String::format("BOSSV%d2", num);
+ _G(boss_sound[1]) = (byte *)res_falloc_read(ressourceName);
if (!_G(boss_sound[1]))
return 0;
_G(dig_sound[NUM_SOUNDS - 2]) = _G(boss_sound[1]);
- ress = Common::String::format("BOSSV%d3", num);
- _G(boss_sound[2]) = (byte *)res_falloc_read(ress);
+ ressourceName = Common::String::format("BOSSV%d3", num);
+ _G(boss_sound[2]) = (byte *)res_falloc_read(ressourceName);
if (!_G(boss_sound[2]))
return 0;
_G(dig_sound[NUM_SOUNDS - 1]) = _G(boss_sound[2]);
Common::String prefix = (num == 2) ? "BOSSP1" : Common::String::format("BOSSP%d", num);
- ress = prefix + "1";
- _G(boss_pcsound[0]) = (byte *)res_falloc_read(ress);
+ ressourceName = prefix + "1";
+ _G(boss_pcsound[0]) = (byte *)res_falloc_read(ressourceName);
if (!_G(boss_pcsound[0]))
return 0;
@@ -157,13 +157,13 @@ int setup_boss(int num) {
_G(pc_sound[NUM_SOUNDS - 3][1]) = 0;
Common::File f;
- if (!f.open(Common::Path(ress)))
+ if (!f.open(Common::Path(ressourceName)))
return 0;
_G(pcsound_length[NUM_SOUNDS - 3]) = f.size();
f.close();
- ress = prefix + "2";
- _G(boss_pcsound[1]) = (byte *)res_falloc_read(ress);
+ ressourceName = prefix + "2";
+ _G(boss_pcsound[1]) = (byte *)res_falloc_read(ressourceName);
if (!_G(boss_pcsound[1]))
return 0;
@@ -171,20 +171,20 @@ int setup_boss(int num) {
_G(pc_sound[NUM_SOUNDS - 2][0]) = 0;
_G(pc_sound[NUM_SOUNDS - 2][1]) = 0;
- if (!f.open(Common::Path(ress)))
+ if (!f.open(Common::Path(ressourceName)))
return 0;
_G(pcsound_length[NUM_SOUNDS - 2]) = f.size();
f.close();
- ress = prefix + "3";
- _G(boss_pcsound[2]) = (byte *)res_falloc_read(ress);
+ ressourceName = prefix + "3";
+ _G(boss_pcsound[2]) = (byte *)res_falloc_read(ressourceName);
if (!_G(boss_pcsound[2]))
return 0;
_G(pc_sound[NUM_SOUNDS - 1]) = _G(boss_pcsound[2]);
_G(pc_sound[NUM_SOUNDS - 1][0]) = 0;
_G(pc_sound[NUM_SOUNDS - 1][1]) = 0;
- if (!f.open(Common::Path(ress)))
+ if (!f.open(Common::Path(ressourceName)))
return 0;
_G(pcsound_length[NUM_SOUNDS - 1]) = f.size();
f.close();
diff --git a/engines/got/game/init.h b/engines/got/game/init.h
index bf8b87048b0..c83132f6d7b 100644
--- a/engines/got/game/init.h
+++ b/engines/got/game/init.h
@@ -27,8 +27,8 @@ namespace Got {
/**
* Handles in-game initialization the first time
*/
-extern void initialize_game();
-extern int setup_boss(int num);
+extern void initGame();
+extern int setupBoss(int num);
} // namespace Got
diff --git a/engines/got/game/main.cpp b/engines/got/game/main.cpp
index bd32031e7be..d829b5a6314 100644
--- a/engines/got/game/main.cpp
+++ b/engines/got/game/main.cpp
@@ -25,7 +25,7 @@
namespace Got {
-void setup_load() {
+void setupLoad() {
_G(thor)->_active = true;
_G(new_level) = _G(thor_info)._lastScreen;
_G(thor)->_x = (_G(thor_info)._lastIcon % 20) * 16;
diff --git a/engines/got/game/main.h b/engines/got/game/main.h
index 210d829879d..17ff43fc5ba 100644
--- a/engines/got/game/main.h
+++ b/engines/got/game/main.h
@@ -24,7 +24,7 @@
namespace Got {
-extern void setup_load();
+extern void setupLoad();
extern void pause(int delay);
} // namespace Got
diff --git a/engines/got/game/move.cpp b/engines/got/game/move.cpp
index 7ebac71eca2..0c3558a3da5 100644
--- a/engines/got/game/move.cpp
+++ b/engines/got/game/move.cpp
@@ -30,7 +30,7 @@
namespace Got {
-void next_frame(Actor *actr) {
+void nextFrame(Actor *actr) {
const int fcount = actr->_frameCount - 1;
if (fcount <= 0) {
diff --git a/engines/got/game/move.h b/engines/got/game/move.h
index c1f9aff45b3..ed5d1474a9c 100644
--- a/engines/got/game/move.h
+++ b/engines/got/game/move.h
@@ -26,7 +26,7 @@
namespace Got {
-extern void next_frame(Actor *actr);
+extern void nextFrame(Actor *actr);
extern bool point_within(int x, int y, int x1, int y1, int x2, int y2);
extern bool overlap(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
extern int reverse_direction(Actor *actr);
diff --git a/engines/got/game/move_patterns.cpp b/engines/got/game/move_patterns.cpp
index 62460e2f0a1..a4c81061ebc 100644
--- a/engines/got/game/move_patterns.cpp
+++ b/engines/got/game/move_patterns.cpp
@@ -717,7 +717,7 @@ int movement_zero(Actor *actr) {
_G(diag) = 1;
_G(diag_flag) = true;
if (check_thor_move(x - 2, y - 2, actr)) {
- next_frame(actr);
+ nextFrame(actr);
return d;
}
} else if (_G(key_flag[key_up]) && _G(key_flag[key_right])) {
@@ -726,7 +726,7 @@ int movement_zero(Actor *actr) {
_G(diag) = 2;
_G(diag_flag) = true;
if (check_thor_move(x + 2, y - 2, actr)) {
- next_frame(actr);
+ nextFrame(actr);
return d;
}
} else if (_G(key_flag[key_down]) && _G(key_flag[key_left])) {
@@ -735,7 +735,7 @@ int movement_zero(Actor *actr) {
_G(diag) = 4;
_G(diag_flag) = true;
if (check_thor_move(x - 2, y + 2, actr)) {
- next_frame(actr);
+ nextFrame(actr);
return d;
}
} else if (_G(key_flag[key_down]) && _G(key_flag[key_right])) {
@@ -744,7 +744,7 @@ int movement_zero(Actor *actr) {
_G(diag) = 3;
_G(diag_flag) = true;
if (check_thor_move(x + 2, y + 2, actr)) {
- next_frame(actr);
+ nextFrame(actr);
return d;
}
}
@@ -754,7 +754,7 @@ int movement_zero(Actor *actr) {
d = 3;
actr->_dir = d;
if (check_thor_move(x + 2, y, actr)) {
- next_frame(actr);
+ nextFrame(actr);
return d;
}
}
@@ -764,7 +764,7 @@ int movement_zero(Actor *actr) {
d = 2;
actr->_dir = d;
if (check_thor_move(x - 2, y, actr)) {
- next_frame(actr);
+ nextFrame(actr);
return d;
}
}
@@ -774,7 +774,7 @@ int movement_zero(Actor *actr) {
d = 1;
actr->_dir = d;
if (check_thor_move(x, y + 2, actr)) {
- next_frame(actr);
+ nextFrame(actr);
return d;
}
}
@@ -784,7 +784,7 @@ int movement_zero(Actor *actr) {
d = 0;
actr->_dir = d;
if (check_thor_move(x, y - 2, actr)) {
- next_frame(actr);
+ nextFrame(actr);
return d;
}
}
@@ -925,7 +925,7 @@ int special_movement_one(Actor *actr) {
}
break;
}
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
return 1;
}
@@ -1097,7 +1097,7 @@ int special_movement_eleven(Actor *actr) {
// No movement - frame cycle
int movement_one(Actor *actr) {
- next_frame(actr);
+ nextFrame(actr);
return actr->_dir;
}
@@ -1134,7 +1134,7 @@ int movement_two(Actor *actr) {
_G(tornado_used) = false;
}
}
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1173,7 +1173,7 @@ int movement_three(Actor *actr) {
}
break;
}
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1222,7 +1222,7 @@ int movement_four(Actor *actr) {
if (!f)
check_move2(actr->_x, actr->_y, actr);
}
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1265,7 +1265,7 @@ int movement_five(Actor *actr) {
x1 += xd;
y1 += yd;
if (check_move2(x1, y1, actr)) {
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1293,7 +1293,7 @@ int movement_five(Actor *actr) {
d = 3;
else
d = 2;
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1308,7 +1308,7 @@ int movement_five(Actor *actr) {
d = 1;
else
d = 0;
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1323,7 +1323,7 @@ int movement_five(Actor *actr) {
d = 1;
else
d = 0;
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1338,7 +1338,7 @@ int movement_five(Actor *actr) {
d = 3;
else
d = 2;
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1347,7 +1347,7 @@ int movement_five(Actor *actr) {
}
}
check_move2(actr->_x, actr->_y, actr);
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1373,7 +1373,7 @@ int movement_six(Actor *actr) {
}
}
- next_frame(actr);
+ nextFrame(actr);
return 0;
}
@@ -1393,7 +1393,7 @@ int movement_eight(Actor *actr) {
else
actr->_x = _G(thor)->_x;
actr->_y = _G(thor)->_y;
- next_frame(actr);
+ nextFrame(actr);
return 0;
}
@@ -1435,7 +1435,7 @@ int movement_nine(Actor *actr) {
actr->_counter = g_events->getRandomNumber(10, 99);
d = g_events->getRandomNumber(3);
}
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1480,7 +1480,7 @@ int movement_ten(Actor *actr) {
if (lastDir > 1)
lastDir -= 2;
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = lastDir;
if (actr->_directions == 1)
return 0;
@@ -1526,7 +1526,7 @@ int movement_eleven(Actor *actr) {
break;
}
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1551,7 +1551,7 @@ int movement_twelve(Actor *actr) {
d = 2;
break;
}
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1621,7 +1621,7 @@ int movement_fourteen(Actor *actr) {
}
break;
}
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1658,7 +1658,7 @@ int movement_sixteen(Actor *actr) {
d = g_events->getRandomNumber(3);
}
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1703,7 +1703,7 @@ int movement_seventeen(Actor *actr) {
d = 1;
break;
}
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -1749,7 +1749,7 @@ int movement_eighteen(Actor *actr) {
d = reverse_direction(actr);
}
}
- next_frame(actr);
+ nextFrame(actr);
return d;
}
@@ -1864,7 +1864,7 @@ redo:
// Spinball counter-clockwise
int movement_twentythree(Actor *actr) {
int d = actr->_lastDir;
- next_frame(actr);
+ nextFrame(actr);
if (actr->_passValue & 2)
actr->_numMoves = 2;
@@ -1960,7 +1960,7 @@ int movement_twentythree(Actor *actr) {
// Spinball clockwise
int movement_twentyfour(Actor *actr) {
int d = actr->_lastDir;
- next_frame(actr);
+ nextFrame(actr);
if (actr->_passValue & 2)
actr->_numMoves = 2;
@@ -2080,7 +2080,7 @@ int movement_twentysix(Actor *actr) {
if (GAME2)
return boss2Movement(actr);
if (GAME3)
- return boss3_movement(actr);
+ return boss3Movement(actr);
return movement_one(actr);
}
@@ -2117,7 +2117,7 @@ int movement_twentyeight(Actor *actr) {
actr->_frameSpeed = 4;
}
- next_frame(actr);
+ nextFrame(actr);
if (actr->_nextFrame == 3) {
if (actr->_currNumShots < actr->_numShotsAllowed)
actor_shoots(actr, 0);
@@ -2214,7 +2214,7 @@ int movement_thirty(Actor *actr) {
if (!check_move2(x1, y1, actr))
d ^= 1;
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -2243,7 +2243,7 @@ int movement_thirtyone(Actor *actr) {
}
done:
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -2274,7 +2274,7 @@ int movement_thirtyfive(Actor *actr) {
// Acid drop
int movement_thirtysix(Actor *actr) {
actr->_speed = actr->_passValue;
- next_frame(actr);
+ nextFrame(actr);
if (actr->_nextFrame == 0 && actr->_frameCount == actr->_frameSpeed) {
actor_always_shoots(actr, 1);
_G(actor[actr->_shotActor])._x -= 2;
@@ -2320,7 +2320,7 @@ int movement_thirtyseven(Actor *actr) {
actr->_counter = g_events->getRandomNumber(10, 99);
d = g_events->getRandomNumber(3);
}
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -2410,7 +2410,7 @@ int movement_thirtyeight(Actor *actr) {
goto done;
}
}
- next_frame(actr);
+ nextFrame(actr);
done:
actr->_lastDir = d;
@@ -2453,7 +2453,7 @@ int movement_thirtynine(Actor *actr) {
_G(actor[5])._x -= 2;
_G(actor[6])._x -= 2;
}
- next_frame(actr);
+ nextFrame(actr);
if (actr->_nextFrame == 3)
actr->_nextFrame = 0;
_G(actor[4])._nextFrame = _G(actor[3])._nextFrame;
@@ -2494,7 +2494,7 @@ int movement_forty(Actor *actr) {
_G(actor[actr->_shotActor])._x += 6;
}
- next_frame(actr);
+ nextFrame(actr);
_G(actor[a - 2])._nextFrame = actr->_nextFrame;
_G(actor[a - 1])._nextFrame = actr->_nextFrame;
_G(actor[a + 1])._nextFrame = actr->_nextFrame;
diff --git a/engines/got/game/shot_movement.cpp b/engines/got/game/shot_movement.cpp
index e4cdec359c1..482bca57895 100644
--- a/engines/got/game/shot_movement.cpp
+++ b/engines/got/game/shot_movement.cpp
@@ -265,7 +265,7 @@ int shot_movement_four(Actor *actr) {
x1 += xd;
y1 += yd;
if (check_move3(x1, y1, actr)) {
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -292,7 +292,7 @@ int shot_movement_four(Actor *actr) {
d = 3;
else
d = 2;
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -307,7 +307,7 @@ int shot_movement_four(Actor *actr) {
d = 1;
else
d = 0;
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -322,7 +322,7 @@ int shot_movement_four(Actor *actr) {
d = 1;
else
d = 0;
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -337,7 +337,7 @@ int shot_movement_four(Actor *actr) {
d = 3;
else
d = 2;
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -346,7 +346,7 @@ int shot_movement_four(Actor *actr) {
}
}
check_move3(actr->_x, actr->_y, actr);
- next_frame(actr);
+ nextFrame(actr);
actr->_lastDir = d;
if (actr->_directions == 1)
return 0;
@@ -590,7 +590,7 @@ int shot_movement_eleven(Actor *actr) {
_G(actor[actr->_creator])._currNumShots--;
actor_destroyed(actr);
} else
- next_frame(actr);
+ nextFrame(actr);
if (actr->_directions == 1)
return 0;
diff --git a/engines/got/got.cpp b/engines/got/got.cpp
index 993ca86d665..4d70712455f 100644
--- a/engines/got/got.cpp
+++ b/engines/got/got.cpp
@@ -76,7 +76,7 @@ Common::Error GotEngine::run() {
// General initialization
if (_G(demo))
- initialize_game();
+ initGame();
syncSoundSettings();
runGame();
@@ -117,7 +117,7 @@ Common::Error GotEngine::syncGame(Common::Serializer &s) {
// For savegames loaded directly from the ScummVM launcher,
// take care of initializing game defaults before rest of loading
if (!firstView() || firstView()->getName() != "Game")
- initialize_game();
+ initGame();
int area = _G(setup)._areaNum;
if (area == 0)
@@ -174,7 +174,7 @@ void GotEngine::savegameLoaded() {
_G(slow_mode) = _G(setup)._slowMode != 0;
g_events->replaceView("Game", true);
- setup_load();
+ setupLoad();
}
bool GotEngine::canLoadGameStateCurrently(Common::U32String *msg) {
diff --git a/engines/got/views/dialogs/main_menu.cpp b/engines/got/views/dialogs/main_menu.cpp
index f6f07b79b09..d0ad3c96641 100644
--- a/engines/got/views/dialogs/main_menu.cpp
+++ b/engines/got/views/dialogs/main_menu.cpp
@@ -67,7 +67,7 @@ void MainMenu::selected() {
case 4:
if (gDebugLevel > 0) {
_G(demo) = true;
- initialize_game();
+ initGame();
replaceView("PartTitle", true, true);
} else {
addView("Quit");
diff --git a/engines/got/views/dialogs/select_game.cpp b/engines/got/views/dialogs/select_game.cpp
index a1e63a54e8c..3f3dedfcb38 100644
--- a/engines/got/views/dialogs/select_game.cpp
+++ b/engines/got/views/dialogs/select_game.cpp
@@ -42,7 +42,7 @@ void SelectGame::selected() {
g_vars->setArea(_selectedItem + 1);
// Switch to the story view for the selected game area
- initialize_game();
+ initGame();
replaceView("Story", true, true);
}
diff --git a/engines/got/views/game.cpp b/engines/got/views/game.cpp
index 460634c2530..e4fa14f282f 100644
--- a/engines/got/views/game.cpp
+++ b/engines/got/views/game.cpp
@@ -60,14 +60,14 @@ bool Game::msgKeypress(const KeypressMessage &msg) {
else if (GAME2 && _G(current_level) == BOSS_LEVEL2)
boss2ClosingSequence1();
else if (GAME3 && _G(current_level) == BOSS_LEVEL3)
- closing_sequence3();
+ boss3ClosingSequence1();
}
break;
case Common::KEYCODE_e:
if (gDebugLevel > 0 && GAME3)
// Launch endgame screen
- closing_sequence3_3();
+ boss3ClosingSequence3();
break;
case Common::KEYCODE_s:
diff --git a/engines/got/views/game_content.cpp b/engines/got/views/game_content.cpp
index d20d286c145..50e117b7b43 100644
--- a/engines/got/views/game_content.cpp
+++ b/engines/got/views/game_content.cpp
@@ -148,7 +148,7 @@ bool GameContent::tick() {
checkForCheats();
if (_G(endgame))
- endgame_movement();
+ endGameMovement();
break;
case MODE_THOR_DIES:
@@ -406,7 +406,7 @@ void GameContent::checkForBossDead() {
boss2ClosingSequence1();
break;
case 3:
- closing_sequence3();
+ boss3ClosingSequence1();
break;
default:
break;
@@ -705,7 +705,7 @@ void GameContent::closingSequence() {
boss2ClosingSequence2();
break;
case 3:
- closing_sequence3_2();
+ boss3ClosingSequence2();
break;
default:
break;
@@ -721,7 +721,7 @@ void GameContent::closingSequence() {
boss2ClosingSequence3();
break;
case 3:
- closing_sequence3_3();
+ boss3ClosingSequence3();
break;
default:
break;
More information about the Scummvm-git-logs
mailing list