aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2013-09-08 12:39:33 +0200
committeruruk2013-09-08 12:39:33 +0200
commitc6183993f2dc0732d5b480f502355f3843c5588c (patch)
tree55d0cd5a0f63e2740c64112af694e287322899fb
parent0f20e7fe37f1b9db18e6ba25d879a7c794c4c719 (diff)
parent2eb4002e365ab79870f68f09c030770e632c1166 (diff)
downloadscummvm-rg350-c6183993f2dc0732d5b480f502355f3843c5588c.tar.gz
scummvm-rg350-c6183993f2dc0732d5b480f502355f3843c5588c.tar.bz2
scummvm-rg350-c6183993f2dc0732d5b480f502355f3843c5588c.zip
AVALANCHE: Merge branch 'avalanche' of https://github.com/urukgit/scummvm into avalanche
Conflicts: engines/avalanche/animation.h
-rw-r--r--engines/avalanche/acci2.cpp2
-rw-r--r--engines/avalanche/animation.cpp38
-rw-r--r--engines/avalanche/animation.h8
-rw-r--r--engines/avalanche/avalanche.cpp2
-rw-r--r--engines/avalanche/gyro2.cpp2
-rw-r--r--engines/avalanche/lucerna2.cpp2
-rw-r--r--engines/avalanche/timer.cpp10
7 files changed, 32 insertions, 32 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp
index 10b32cf7c0..939f50f712 100644
--- a/engines/avalanche/acci2.cpp
+++ b/engines/avalanche/acci2.cpp
@@ -1571,7 +1571,7 @@ void Acci::doThat() {
if (_vm->_animation->_sprites[0]._id != i) {
int16 x = _vm->_animation->_sprites[0]._x;
int16 y = _vm->_animation->_sprites[0]._y;
- _vm->_animation->_sprites[0].done();
+ _vm->_animation->_sprites[0].remove();
_vm->_animation->_sprites[0].init(i, true, _vm->_animation);
_vm->_animation->_sprites[0].appear(x, y, Animation::kDirLeft);
_vm->_animation->_sprites[0]._visible = false;
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp
index 204121b3bc..15e8bd7cb0 100644
--- a/engines/avalanche/animation.cpp
+++ b/engines/avalanche/animation.cpp
@@ -264,7 +264,7 @@ void AnimationType::bounce() {
_tr->_vm->_gyro->_onCanDoPageSwap = true;
}
-int8 AnimationType::sgn(int16 val) {
+int8 AnimationType::getSign(int16 val) {
if (val > 0)
return 1;
else if (val < 0)
@@ -275,13 +275,13 @@ int8 AnimationType::sgn(int16 val) {
void AnimationType::walkTo(byte pednum) {
pednum--; // Pascal -> C conversion: different array indexes.
- speed(sgn(_tr->_vm->_gyro->_peds[pednum]._x - _x) * 4, sgn(_tr->_vm->_gyro->_peds[pednum]._y - _y));
+ setSpeed(getSign(_tr->_vm->_gyro->_peds[pednum]._x - _x) * 4, getSign(_tr->_vm->_gyro->_peds[pednum]._y - _y));
_homingX = _tr->_vm->_gyro->_peds[pednum]._x - _info._xLength / 2;
_homingY = _tr->_vm->_gyro->_peds[pednum]._y - _info._yLength;
_homing = true;
}
-void AnimationType::stophoming() {
+void AnimationType::stopHoming() {
_homing = false;
}
@@ -315,7 +315,7 @@ void AnimationType::homeStep() {
}
}
-void AnimationType::speed(int8 xx, int8 yy) {
+void AnimationType::setSpeed(int8 xx, int8 yy) {
_moveX = xx;
_moveY = yy;
if ((_moveX == 0) && (_moveY == 0))
@@ -347,7 +347,7 @@ void AnimationType::chatter() {
_tr->_vm->_gyro->_talkBackgroundColor = _stat._bgBubbleCol;
}
-void AnimationType::done() {
+void AnimationType::remove() {
_animCount--;
_info._xWidth = _info._xLength / 8;
if ((_info._xLength % 8) > 0)
@@ -372,7 +372,7 @@ Animation::Animation(AvalancheEngine *vm) {
Animation::~Animation() {
for (int16 i = 0; i < kSpriteNumbMax; i++) {
if (_sprites[i]._quick)
- _sprites[i].done();
+ _sprites[i].remove();
}
}
@@ -791,7 +791,7 @@ void Animation::callSpecial(uint16 which) {
// _vm->_gyro->special 5: Room 42: touched tree, and get tied up.
_vm->_gyro->_magics[4]._operation = _vm->_gyro->kMagicBounce; // Boundary effect is now working again.
_vm->_visa->displayScrollChain('q', 35);
- _sprites[0].done();
+ _sprites[0].remove();
//tr[1].vanishifstill:=true;
_vm->_celer->drawBackgroundSprite(-1, -1, 2);
_vm->_visa->displayScrollChain('q', 36);
@@ -835,7 +835,7 @@ void Animation::callSpecial(uint16 which) {
return; // DOESN'T COUNT: no Geida.
_sprites[1]._callEachStepFl = false; // She no longer follows Avvy around.
_sprites[1].walkTo(4); // She walks to somewhere...
- _sprites[0].done(); // Lose Avvy.
+ _sprites[0].remove(); // Lose Avvy.
_vm->_gyro->_dna._userMovesAvvy = false;
_vm->_timer->addTimer(40, _vm->_timer->kProcRobinHoodAndGeida, _vm->_timer->kReasonRobinHoodAndGeida);
break;
@@ -980,28 +980,28 @@ void Animation::updateSpeed() {
void Animation::changeDirection(byte t, byte dir) {
switch (dir) {
case kDirUp:
- _sprites[t].speed(0, -_sprites[t]._speedY);
+ _sprites[t].setSpeed(0, -_sprites[t]._speedY);
break;
case kDirDown:
- _sprites[t].speed(0, _sprites[t]._speedY);
+ _sprites[t].setSpeed(0, _sprites[t]._speedY);
break;
case kDirLeft:
- _sprites[t].speed(-_sprites[t]._speedX, 0);
+ _sprites[t].setSpeed(-_sprites[t]._speedX, 0);
break;
case kDirRight:
- _sprites[t].speed(_sprites[t]._speedX, 0);
+ _sprites[t].setSpeed(_sprites[t]._speedX, 0);
break;
case kDirUpLeft:
- _sprites[t].speed(-_sprites[t]._speedX, -_sprites[t]._speedY);
+ _sprites[t].setSpeed(-_sprites[t]._speedX, -_sprites[t]._speedY);
break;
case kDirUpRight:
- _sprites[t].speed(_sprites[t]._speedX, -_sprites[t]._speedY);
+ _sprites[t].setSpeed(_sprites[t]._speedX, -_sprites[t]._speedY);
break;
case kDirDownLeft:
- _sprites[t].speed(-_sprites[t]._speedX, _sprites[t]._speedY);
+ _sprites[t].setSpeed(-_sprites[t]._speedX, _sprites[t]._speedY);
break;
case kDirDownRight:
- _sprites[t].speed(_sprites[t]._speedX, _sprites[t]._speedY);
+ _sprites[t].setSpeed(_sprites[t]._speedX, _sprites[t]._speedY);
break;
}
}
@@ -1067,7 +1067,7 @@ void Animation::arrowProcs(byte tripnum) {
_sprites[1]._callEachStepFl = false; // prevent recursion.
_vm->_visa->displayScrollChain('Q', 47); // Complaint!
- _sprites[tripnum].done(); // Deallocate the arrow.
+ _sprites[tripnum].remove(); // Deallocate the arrow.
#if 0
tr[1].done; { Deallocate normal pic of Avvy. }
@@ -1085,7 +1085,7 @@ void Animation::arrowProcs(byte tripnum) {
_vm->_timer->addTimer(55, _vm->_timer->kProcNaughtyDuke, _vm->_timer->kReasonNaughtyDuke);
}
} else { // Arrow has hit the wall!
- _sprites[tripnum].done(); // Deallocate the arrow.
+ _sprites[tripnum].remove(); // Deallocate the arrow.
_vm->_celer->drawBackgroundSprite(-1, -1, 3); // Show pic of arrow stuck into the door.
_vm->_gyro->_dna._arrowInTheDoor = true; // So that we can pick it up.
}
@@ -1338,7 +1338,7 @@ void Animation::flipRoom(byte room, byte ped) {
for (int16 i = 1; i < kSpriteNumbMax; i++) {
if (_sprites[i]._quick)
- _sprites[i].done();
+ _sprites[i].remove();
} // Deallocate sprite
if (_vm->_gyro->_dna._room == r__lustiesroom)
diff --git a/engines/avalanche/animation.h b/engines/avalanche/animation.h
index d6a87dc547..7b00bc9ec9 100644
--- a/engines/avalanche/animation.h
+++ b/engines/avalanche/animation.h
@@ -74,18 +74,18 @@ public:
void bounce(); // Bounces off walls.
void walk(); // Prepares for andexor, etc.
void walkTo(byte pednum); // Home in on a point.
- void stophoming(); // Self-explanatory.
+ void stopHoming(); // Self-explanatory.
void homeStep(); // Calculates ix & iy for one homing step.
- void speed(int8 xx, int8 yy); // Sets ix & iy, non-homing, etc.
+ void setSpeed(int8 xx, int8 yy); // Sets ix & iy, non-homing, etc.
void stopWalk(); // Stops the sprite from moving.
void chatter(); // Sets up talk vars.
- void done();
+ void remove();
private:
Animation *_tr;
bool checkCollision();
- int8 sgn(int16 val);
+ int8 getSign(int16 val);
};
class Animation {
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 195ddef50d..d59c18b23e 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -292,7 +292,7 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) {
if (sz.isLoading()) {
for (int16 i = 0; i < _animation->kSpriteNumbMax; i++) { // Deallocate sprites.
if (_animation->_sprites[i]._quick)
- _animation->_sprites[i].done();
+ _animation->_sprites[i].remove();
}
}
diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp
index c80ac4bc82..513052fd19 100644
--- a/engines/avalanche/gyro2.cpp
+++ b/engines/avalanche/gyro2.cpp
@@ -229,7 +229,7 @@ void Gyro::drawShadowBox(int16 x1, int16 y1, int16 x2, int16 y2, Common::String
void Gyro::newGame() {
for (byte i = 0; i < kMaxSprites; i++) {
if (_vm->_animation->_sprites[i]._quick)
- _vm->_animation->_sprites[i].done();
+ _vm->_animation->_sprites[i].remove();
}
// Deallocate sprite. Sorry, beta testers!
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index 2ec32b2ca0..390c13bfa9 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -1198,7 +1198,7 @@ void Lucerna::gameOver() {
int16 sx = _vm->_animation->_sprites[0]._x;
int16 sy = _vm->_animation->_sprites[0]._y;
- _vm->_animation->_sprites[0].done();
+ _vm->_animation->_sprites[0].remove();
_vm->_animation->_sprites[0].init(12, true, _vm->_animation); // 12 = Avalot falls
_vm->_animation->_sprites[0]._stepNum = 0;
_vm->_animation->_sprites[0].appear(sx, sy, 0);
diff --git a/engines/avalanche/timer.cpp b/engines/avalanche/timer.cpp
index cb765e1a88..7eee3fc31f 100644
--- a/engines/avalanche/timer.cpp
+++ b/engines/avalanche/timer.cpp
@@ -308,7 +308,7 @@ void Timer::getTiedUp() {
_vm->_gyro->_dna._beenTiedUp = true;
_vm->_animation->stopWalking();
_vm->_animation->_sprites[1].stopWalk();
- _vm->_animation->_sprites[1].stophoming();
+ _vm->_animation->_sprites[1].stopHoming();
_vm->_animation->_sprites[1]._callEachStepFl = true;
_vm->_animation->_sprites[1]._eachStepProc = _vm->_animation->kProcGrabAvvy;
addTimer(70, kProcGetTiedUp2, kReasonGettingTiedUp);
@@ -337,8 +337,8 @@ void Timer::hangAround2() {
_vm->_animation->_sprites[1].walkTo(4);
_vm->_gyro->_whereIs[_vm->_gyro->kPeopleFriarTuck - 150] = r__robins;
_vm->_visa->displayScrollChain('q', 41);
- _vm->_animation->_sprites[0].done();
- _vm->_animation->_sprites[1].done(); // Get rid of Robin Hood and Friar Tuck.
+ _vm->_animation->_sprites[0].remove();
+ _vm->_animation->_sprites[1].remove(); // Get rid of Robin Hood and Friar Tuck.
addTimer(1, kProcAfterTheShootemup, kReasonHangingAround);
// Immediately call the following proc (when you have a chance).
@@ -592,8 +592,8 @@ void Timer::robinHoodAndGeidaTalk() {
}
void Timer::avalotReturns() {
- _vm->_animation->_sprites[0].done();
- _vm->_animation->_sprites[1].done();
+ _vm->_animation->_sprites[0].remove();
+ _vm->_animation->_sprites[1].remove();
_vm->_animation->_sprites[0].init(0, true, _vm->_animation);
_vm->_animation->appearPed(1, 1);
_vm->_visa->displayScrollChain('q', 67);