AVALANCHE: Some more renaming in Animation

This commit is contained in:
Strangerke 2013-09-07 20:02:14 +02:00
parent d96555406e
commit 9198b166f7
7 changed files with 46 additions and 37 deletions

@ -708,7 +708,7 @@ void Acci::openBox(bool isOpening) {
_vm->_celer->drawBackgroundSprite(-1, -1, 5);
_vm->_celer->updateBackgroundSprites();
_vm->_animation->trippancy_link();
_vm->_animation->animLink();
_vm->_graphics->refreshScreen();
_vm->_system->delayMillis(55);
@ -716,7 +716,7 @@ void Acci::openBox(bool isOpening) {
if (!isOpening) {
_vm->_celer->drawBackgroundSprite(-1, -1, 6);
_vm->_celer->updateBackgroundSprites();
_vm->_animation->trippancy_link();
_vm->_animation->animLink();
_vm->_graphics->refreshScreen();
}
}
@ -1704,7 +1704,7 @@ void Acci::doThat() {
_vm->_animation->apped(2, 4);
_vm->_animation->tr[1].walkto(5);
_vm->_animation->tr[1].call_eachstep = true;
_vm->_animation->tr[1].eachstep = _vm->_animation->procback_and_forth;
_vm->_animation->tr[1].eachstep = _vm->_animation->kProcBackAndForth;
_vm->_gyro->_dna._avariciusTalk = 14;
_vm->_timeout->set_up_timer(177, _vm->_timeout->procavaricius_talks, _vm->_timeout->reason_avariciustalks);
}

@ -170,13 +170,18 @@ void AnimationType::appear(int16 wx, int16 wy, byte wf) {
iy = 0;
}
bool AnimationType::collision_check() {
for (byte fv = 0; fv < _tr->kSpriteNumbMax; fv++)
if (_tr->tr[fv].quick && (_tr->tr[fv].whichsprite != whichsprite) &&
((_x + _info._xLength) > _tr->tr[fv]._x) &&
(_x < (_tr->tr[fv]._x + _tr->tr[fv]._info._xLength)) &&
(_tr->tr[fv]._y == _y))
/**
* Check collision
* @remarks Originally called 'collision_check'
*/
bool AnimationType::checkCollision() {
for (byte i = 0; i < _tr->kSpriteNumbMax; i++) {
if (_tr->tr[i].quick && (_tr->tr[i].whichsprite != whichsprite) &&
((_x + _info._xLength) > _tr->tr[i]._x) &&
(_x < (_tr->tr[i]._x + _tr->tr[i]._info._xLength)) &&
(_tr->tr[i]._y == _y))
return true;
}
return false;
}
@ -207,7 +212,7 @@ void AnimationType::walk() {
}
if (check_me) {
if (collision_check()) {
if (checkCollision()) {
bounce();
return;
}
@ -833,7 +838,7 @@ void Animation::catamove(byte ped) {
tr[1].init(5, true, this); // ...Load Geida.
apped(2, geida_ped(ped));
tr[1].call_eachstep = true;
tr[1].eachstep = procgeida_procs;
tr[1].eachstep = kProcGeida;
}
}
@ -878,7 +883,7 @@ void Animation::call_special(uint16 which) {
// OK!
tr[1].call_eachstep = true;
tr[1].eachstep = procarrow_procs;
tr[1].eachstep = kProcArrow;
}
break;
case 4: // This is the ghost room link.
@ -1373,7 +1378,11 @@ void Animation::call_andexors() {
}
}
void Animation::trippancy_link() {
/**
* Animation links
* @remarks Originally called 'trippancy_link'
*/
void Animation::animLink() {
byte fv;
if (_vm->_gyro->_dropdownActive | _vm->_gyro->_onToolbar | _vm->_gyro->_seeScroll)
@ -1388,23 +1397,23 @@ void Animation::trippancy_link() {
for (fv = 0; fv < kSpriteNumbMax; fv++) {
if (tr[fv].quick && tr[fv].call_eachstep) {
switch (tr[fv].eachstep) {
case procfollow_avvy_y :
case kProcFollowAvvyY :
follow_avvy_y(fv);
break;
case procback_and_forth :
case kProcBackAndForth :
back_and_forth(fv);
break;
case procface_avvy :
case kProcFaceAvvy :
face_avvy(fv);
break;
case procarrow_procs :
case kProcArrow :
arrow_procs(fv);
break;
// PROCSpludwick_procs : spludwick_procs(fv);
case procgrab_avvy :
case kProcGrabAvvy :
grab_avvy(fv);
break;
case procgeida_procs :
case kProcGeida :
geida_procs(fv);
break;
}

@ -119,7 +119,7 @@ public:
private:
Animation *_tr;
bool collision_check();
bool checkCollision();
int8 sgn(int16 val);
};
@ -152,18 +152,18 @@ public:
static const int16 kSpriteNumbMax = 5; // current max no. of sprites
static const int16 procfollow_avvy_y = 1;
static const int16 procback_and_forth = 2;
static const int16 procface_avvy = 3;
static const int16 procarrow_procs = 4;
static const int16 procspludwick_procs = 5;
static const int16 procgrab_avvy = 6;
static const int16 procgeida_procs = 7;
static const int16 kProcFollowAvvyY = 1;
static const int16 kProcBackAndForth = 2;
static const int16 kProcFaceAvvy = 3;
static const int16 kProcArrow = 4;
static const int16 kProcsPludwick = 5; // Unused
static const int16 kProcGrabAvvy = 6;
static const int16 kProcGeida = 7;
Animation(AvalancheEngine *vm);
~Animation();
void trippancy_link();
void animLink();
void get_back_loretta();
void loadtrip();
void call_special(uint16 which);

@ -475,7 +475,7 @@ bool AvalancheEngine::loadGame(const int16 slot) {
_lucerna->drawDirection();
_gyro->_onToolbar = false;
_animation->trippancy_link();
_animation->animLink();
_celer->updateBackgroundSprites();

@ -203,7 +203,7 @@ void Avalot::run(Common::String arg) {
_vm->_gyro->forceNumlock();
_vm->_animation->get_back_loretta();
_vm->_celer->updateBackgroundSprites();
_vm->_animation->trippancy_link();
_vm->_animation->animLink();
_vm->_lucerna->checkClick();
_vm->_timeout->one_tick();

@ -399,7 +399,7 @@ void Lucerna::putGeidaAt(byte whichPed, byte &ped) {
_vm->_animation->tr[1].init(5, false, _vm->_animation); // load Geida
_vm->_animation->apped(2, whichPed);
_vm->_animation->tr[1].call_eachstep = true;
_vm->_animation->tr[1].eachstep = _vm->_animation->procgeida_procs;
_vm->_animation->tr[1].eachstep = _vm->_animation->kProcGeida;
}
void Lucerna::enterRoom(byte room, byte ped) {
@ -452,7 +452,7 @@ void Lucerna::enterRoom(byte room, byte ped) {
}
_vm->_animation->tr[1].call_eachstep = true;
_vm->_animation->tr[1].eachstep = _vm->_animation->procface_avvy; // He always faces Avvy.
_vm->_animation->tr[1].eachstep = _vm->_animation->kProcFaceAvvy; // He always faces Avvy.
} else _vm->_gyro->_whereIs[_vm->_gyro->kPeopleCrapulus - 150] = r__nowhere;
@ -484,7 +484,7 @@ void Lucerna::enterRoom(byte room, byte ped) {
_vm->_gyro->_dna._dogFoodPos = 0; // _vm->_gyro->also Spludwick pos.
_vm->_animation->tr[1].call_eachstep = true;
_vm->_animation->tr[1].eachstep = _vm->_animation->procgeida_procs;
_vm->_animation->tr[1].eachstep = _vm->_animation->kProcGeida;
} else
_vm->_gyro->_whereIs[1] = r__nowhere;
break;
@ -499,7 +499,7 @@ void Lucerna::enterRoom(byte room, byte ped) {
if (ped > 0) {
_vm->_animation->tr[1].init(4, false, _vm->_animation); // 4 = Cwytalot
_vm->_animation->tr[1].call_eachstep = true;
_vm->_animation->tr[1].eachstep = _vm->_animation->procfollow_avvy_y;
_vm->_animation->tr[1].eachstep = _vm->_animation->kProcFollowAvvyY;
_vm->_gyro->_whereIs[_vm->_gyro->kPeopleCwytalot - 150] = r__brummieroad;
if (_vm->_gyro->_dna._roomCount[r__brummieroad] == 1) { // First time here...
@ -713,7 +713,7 @@ void Lucerna::enterRoom(byte room, byte ped) {
}
_vm->_animation->tr[1].call_eachstep = true;
_vm->_animation->tr[1].eachstep = _vm->_animation->procface_avvy; // She always faces Avvy.
_vm->_animation->tr[1].eachstep = _vm->_animation->kProcFaceAvvy; // She always faces Avvy.
break;
case r__insidecardiffcastle:
@ -1234,7 +1234,7 @@ void Lucerna::spriteRun() {
_vm->_gyro->_doingSpriteRun = true;
_vm->_animation->get_back_loretta();
_vm->_animation->trippancy_link();
_vm->_animation->animLink();
_vm->_gyro->_doingSpriteRun = false;
}

@ -302,7 +302,7 @@ void Timeout::get_tied_up() {
_vm->_animation->tr[1].stopwalk();
_vm->_animation->tr[1].stophoming();
_vm->_animation->tr[1].call_eachstep = true;
_vm->_animation->tr[1].eachstep = _vm->_animation->procgrab_avvy;
_vm->_animation->tr[1].eachstep = _vm->_animation->kProcGrabAvvy;
set_up_timer(70, procget_tied_up2, reason_getting_tied_up);
}