mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 10:17:14 +00:00
FULLPIPE: Renames in Behavior code
This commit is contained in:
parent
499e5ab3ea
commit
f68ef3ce28
@ -40,8 +40,8 @@ BehaviorManager::~BehaviorManager() {
|
||||
|
||||
void BehaviorManager::clear() {
|
||||
for (uint i = 0; i < _behaviors.size(); i++) {
|
||||
for (int j = 0; j < _behaviors[i]->_itemsCount; j++)
|
||||
delete _behaviors[i]->_bheItems[j];
|
||||
for (int j = 0; j < _behaviors[i]->_animsCount; j++)
|
||||
delete _behaviors[i]->_behaviorAnims[j];
|
||||
|
||||
delete _behaviors[i];
|
||||
}
|
||||
@ -90,7 +90,7 @@ void BehaviorManager::updateBehaviors() {
|
||||
if (!beh->_ani) {
|
||||
beh->_counter++;
|
||||
if (beh->_counter >= beh->_counterMax)
|
||||
updateBehavior(beh, beh->_bheItems[0]);
|
||||
updateBehavior(beh, beh->_behaviorAnims[0]);
|
||||
|
||||
continue;
|
||||
}
|
||||
@ -104,15 +104,15 @@ void BehaviorManager::updateBehaviors() {
|
||||
beh->_counter++;
|
||||
if (beh->_counter >= beh->_counterMax) {
|
||||
if (beh->_subIndex >= 0 && !(beh->_flags & 1) && beh->_ani->_messageQueueId <= 0)
|
||||
updateStaticAniBehavior(beh->_ani, beh->_counter, beh->_bheItems[beh->_subIndex]);
|
||||
updateStaticAniBehavior(beh->_ani, beh->_counter, beh->_behaviorAnims[beh->_subIndex]);
|
||||
}
|
||||
} else {
|
||||
beh->_staticsId = beh->_ani->_statics->_staticsId;
|
||||
beh->_counter = 0;
|
||||
beh->_subIndex = -1;
|
||||
|
||||
for (int j = 0; j < beh->_itemsCount; j++)
|
||||
if (beh->_bheItems[j]->_staticsId == beh->_staticsId) {
|
||||
for (int j = 0; j < beh->_animsCount; j++)
|
||||
if (beh->_behaviorAnims[j]->_staticsId == beh->_staticsId) {
|
||||
beh->_subIndex = j;
|
||||
break;
|
||||
}
|
||||
@ -121,10 +121,10 @@ void BehaviorManager::updateBehaviors() {
|
||||
}
|
||||
}
|
||||
|
||||
void BehaviorManager::updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *entry) {
|
||||
debug(4, "BehaviorManager::updateBehavior() %d", entry->_itemsCount);
|
||||
for (int i = 0; i < entry->_itemsCount; i++) {
|
||||
BehaviorEntryInfo *bhi = entry->_items[i];
|
||||
void BehaviorManager::updateBehavior(BehaviorInfo *behaviorInfo, BehaviorAnim *entry) {
|
||||
debug(4, "BehaviorManager::updateBehavior() %d", entry->_movesCount);
|
||||
for (int i = 0; i < entry->_movesCount; i++) {
|
||||
BehaviorMove *bhi = entry->_behaviorMoves[i];
|
||||
if (!(bhi->_flags & 1)) {
|
||||
if (bhi->_flags & 2) {
|
||||
MessageQueue *mq = new MessageQueue(bhi->_messageQueue, 0, 1);
|
||||
@ -132,7 +132,7 @@ void BehaviorManager::updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *
|
||||
mq->sendNextCommand();
|
||||
|
||||
bhi->_flags &= 0xFFFFFFFD;
|
||||
} else if (behaviorInfo->_counter >= bhi->_delay && bhi->_percent && g_fp->_rnd->getRandomNumber(32767) <= entry->_items[i]->_percent) {
|
||||
} else if (behaviorInfo->_counter >= bhi->_delay && bhi->_percent && g_fp->_rnd->getRandomNumber(32767) <= entry->_behaviorMoves[i]->_percent) {
|
||||
MessageQueue *mq = new MessageQueue(bhi->_messageQueue, 0, 1);
|
||||
|
||||
mq->sendNextCommand();
|
||||
@ -143,7 +143,7 @@ void BehaviorManager::updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *
|
||||
}
|
||||
}
|
||||
|
||||
void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, int delay, BehaviorEntry *bhe) {
|
||||
void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, int delay, BehaviorAnim *bhe) {
|
||||
debug(4, "BehaviorManager::updateStaticAniBehavior(%s)", transCyrillic((byte *)ani->_objectName));
|
||||
|
||||
MessageQueue *mq = 0;
|
||||
@ -151,21 +151,21 @@ void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, int delay, B
|
||||
if (bhe->_flags & 1) {
|
||||
uint rnd = g_fp->_rnd->getRandomNumber(32767);
|
||||
uint runPercent = 0;
|
||||
for (int i = 0; i < bhe->_itemsCount; i++) {
|
||||
if (!(bhe->_items[i]->_flags & 1) && bhe->_items[i]->_percent) {
|
||||
if ((rnd >= runPercent && rnd <= runPercent + bhe->_items[i]->_percent) || i == bhe->_itemsCount - 1) {
|
||||
mq = new MessageQueue(bhe->_items[i]->_messageQueue, 0, 1);
|
||||
for (int i = 0; i < bhe->_movesCount; i++) {
|
||||
if (!(bhe->_behaviorMoves[i]->_flags & 1) && bhe->_behaviorMoves[i]->_percent) {
|
||||
if ((rnd >= runPercent && rnd <= runPercent + bhe->_behaviorMoves[i]->_percent) || i == bhe->_movesCount - 1) {
|
||||
mq = new MessageQueue(bhe->_behaviorMoves[i]->_messageQueue, 0, 1);
|
||||
break;
|
||||
}
|
||||
runPercent += bhe->_items[i]->_percent;
|
||||
runPercent += bhe->_behaviorMoves[i]->_percent;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < bhe->_itemsCount; i++) {
|
||||
if (!(bhe->_items[i]->_flags & 1) && delay >= bhe->_items[i]->_delay) {
|
||||
if (bhe->_items[i]->_percent) {
|
||||
if (g_fp->_rnd->getRandomNumber(32767) <= bhe->_items[i]->_percent) {
|
||||
mq = new MessageQueue(bhe->_items[i]->_messageQueue, 0, 1);
|
||||
for (int i = 0; i < bhe->_movesCount; i++) {
|
||||
if (!(bhe->_behaviorMoves[i]->_flags & 1) && delay >= bhe->_behaviorMoves[i]->_delay) {
|
||||
if (bhe->_behaviorMoves[i]->_percent) {
|
||||
if (g_fp->_rnd->getRandomNumber(32767) <= bhe->_behaviorMoves[i]->_percent) {
|
||||
mq = new MessageQueue(bhe->_behaviorMoves[i]->_messageQueue, 0, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -180,7 +180,7 @@ void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, int delay, B
|
||||
}
|
||||
|
||||
bool BehaviorManager::setBehaviorEnabled(StaticANIObject *obj, int aniId, int quId, int flag) {
|
||||
BehaviorEntryInfo *entry = getBehaviorEntryInfoByMessageQueueDataId(obj, aniId, quId);
|
||||
BehaviorMove *entry = getBehaviorMoveByMessageQueueDataId(obj, aniId, quId);
|
||||
|
||||
if (entry) {
|
||||
if (flag)
|
||||
@ -206,14 +206,14 @@ void BehaviorManager::setFlagByStaticAniObject(StaticANIObject *ani, int flag) {
|
||||
}
|
||||
}
|
||||
|
||||
BehaviorEntryInfo *BehaviorManager::getBehaviorEntryInfoByMessageQueueDataId(StaticANIObject *ani, int id1, int id2) {
|
||||
BehaviorMove *BehaviorManager::getBehaviorMoveByMessageQueueDataId(StaticANIObject *ani, int id1, int id2) {
|
||||
for (uint i = 0; i < _behaviors.size(); i++) {
|
||||
if (_behaviors[i]->_ani == ani) {
|
||||
for (uint j = 0; j < _behaviors[i]->_bheItems.size(); j++) {
|
||||
if (_behaviors[i]->_bheItems[j]->_staticsId == id1) {
|
||||
for (int k = 0; k < _behaviors[i]->_bheItems[j]->_itemsCount; k++) {
|
||||
if (_behaviors[i]->_bheItems[j]->_items[k]->_messageQueue->_dataId == id2)
|
||||
return _behaviors[i]->_bheItems[j]->_items[k];
|
||||
for (uint j = 0; j < _behaviors[i]->_behaviorAnims.size(); j++) {
|
||||
if (_behaviors[i]->_behaviorAnims[j]->_staticsId == id1) {
|
||||
for (int k = 0; k < _behaviors[i]->_behaviorAnims[j]->_movesCount; k++) {
|
||||
if (_behaviors[i]->_behaviorAnims[j]->_behaviorMoves[k]->_messageQueue->_dataId == id2)
|
||||
return _behaviors[i]->_behaviorAnims[j]->_behaviorMoves[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -230,32 +230,32 @@ void BehaviorInfo::clear() {
|
||||
_counterMax = 0;
|
||||
_flags = 0;
|
||||
_subIndex = 0;
|
||||
_itemsCount = 0;
|
||||
_animsCount = 0;
|
||||
|
||||
_bheItems.clear();
|
||||
_behaviorAnims.clear();
|
||||
}
|
||||
|
||||
void BehaviorInfo::initAmbientBehavior(GameVar *var, Scene *sc) {
|
||||
debug(4, "BehaviorInfo::initAmbientBehavior(%s)", transCyrillic((byte *)var->_varName));
|
||||
|
||||
clear();
|
||||
_itemsCount = 1;
|
||||
_animsCount = 1;
|
||||
_counterMax = -1;
|
||||
|
||||
BehaviorEntry *bi = new BehaviorEntry();
|
||||
BehaviorAnim *bi = new BehaviorAnim();
|
||||
|
||||
_bheItems.push_back(bi);
|
||||
_behaviorAnims.push_back(bi);
|
||||
|
||||
bi->_itemsCount = var->getSubVarsCount();
|
||||
bi->_movesCount = var->getSubVarsCount();
|
||||
|
||||
bi->_items = (BehaviorEntryInfo**)calloc(bi->_itemsCount, sizeof(BehaviorEntryInfo *));
|
||||
bi->_behaviorMoves = (BehaviorMove **)calloc(bi->_movesCount, sizeof(BehaviorMove *));
|
||||
|
||||
for (int i = 0; i < bi->_itemsCount; i++) {
|
||||
for (int i = 0; i < bi->_movesCount; i++) {
|
||||
int delay;
|
||||
bi->_items[i] = new BehaviorEntryInfo(var->getSubVarByIndex(i), sc, &delay);
|
||||
bi->_behaviorMoves[i] = new BehaviorMove(var->getSubVarByIndex(i), sc, &delay);
|
||||
|
||||
if (bi->_items[i]->_delay <_counterMax)
|
||||
_counterMax = bi->_items[i]->_delay;
|
||||
if (bi->_behaviorMoves[i]->_delay <_counterMax)
|
||||
_counterMax = bi->_behaviorMoves[i]->_delay;
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ void BehaviorInfo::initObjectBehavior(GameVar *var, Scene *sc, StaticANIObject *
|
||||
|
||||
clear();
|
||||
|
||||
_itemsCount = var->getSubVarsCount();
|
||||
_animsCount = var->getSubVarsCount();
|
||||
_counterMax = -1;
|
||||
|
||||
while (var->_varType == 2) {
|
||||
@ -278,54 +278,54 @@ void BehaviorInfo::initObjectBehavior(GameVar *var, Scene *sc, StaticANIObject *
|
||||
sc = g_fp->accessScene(ani->_sceneId);
|
||||
clear();
|
||||
var = v1;
|
||||
_itemsCount = var->getSubVarsCount();
|
||||
_animsCount = var->getSubVarsCount();
|
||||
_counterMax = -1;
|
||||
}
|
||||
|
||||
for (int i = 0; i < _itemsCount; i++) {
|
||||
for (int i = 0; i < _animsCount; i++) {
|
||||
int maxDelay = 0;
|
||||
|
||||
_bheItems.push_back(new BehaviorEntry(var->getSubVarByIndex(i), sc, ani, &maxDelay));
|
||||
_behaviorAnims.push_back(new BehaviorAnim(var->getSubVarByIndex(i), sc, ani, &maxDelay));
|
||||
|
||||
if (maxDelay < _counterMax)
|
||||
_counterMax = maxDelay;
|
||||
}
|
||||
}
|
||||
|
||||
BehaviorEntry::BehaviorEntry() {
|
||||
BehaviorAnim::BehaviorAnim() {
|
||||
_staticsId = 0;
|
||||
_itemsCount = 0;
|
||||
_movesCount = 0;
|
||||
_flags = 0;
|
||||
_items = 0;
|
||||
_behaviorMoves = NULL;
|
||||
}
|
||||
|
||||
BehaviorEntry::BehaviorEntry(GameVar *var, Scene *sc, StaticANIObject *ani, int *minDelay) {
|
||||
BehaviorAnim::BehaviorAnim(GameVar *var, Scene *sc, StaticANIObject *ani, int *minDelay) {
|
||||
_staticsId = 0;
|
||||
_itemsCount = 0;
|
||||
_movesCount = 0;
|
||||
|
||||
*minDelay = 100000000;
|
||||
|
||||
int totalPercent = 0;
|
||||
_flags = 0;
|
||||
_items = 0;
|
||||
_behaviorMoves = 0;
|
||||
|
||||
Statics *st = ani->getStaticsByName(var->_varName);
|
||||
if (st)
|
||||
_staticsId = st->_staticsId;
|
||||
|
||||
_itemsCount = var->getSubVarsCount();
|
||||
if (_itemsCount) {
|
||||
_items = (BehaviorEntryInfo**)calloc(_itemsCount, sizeof(BehaviorEntryInfo *));
|
||||
_movesCount = var->getSubVarsCount();
|
||||
if (_movesCount) {
|
||||
_behaviorMoves = (BehaviorMove **)calloc(_movesCount, sizeof(BehaviorMove *));
|
||||
|
||||
for (int i = 0; i < _itemsCount; i++) {
|
||||
for (int i = 0; i < _movesCount; i++) {
|
||||
GameVar *subvar = var->getSubVarByIndex(i);
|
||||
int delay = 0;
|
||||
|
||||
_items[i] = new BehaviorEntryInfo(subvar, sc, &delay);
|
||||
_behaviorMoves[i] = new BehaviorMove(subvar, sc, &delay);
|
||||
totalPercent += delay;
|
||||
|
||||
if (_items[i]->_delay < *minDelay)
|
||||
*minDelay = _items[i]->_delay;
|
||||
if (_behaviorMoves[i]->_delay < *minDelay)
|
||||
*minDelay = _behaviorMoves[i]->_delay;
|
||||
}
|
||||
|
||||
if (!*minDelay && totalPercent == 1000)
|
||||
@ -333,7 +333,7 @@ BehaviorEntry::BehaviorEntry(GameVar *var, Scene *sc, StaticANIObject *ani, int
|
||||
}
|
||||
}
|
||||
|
||||
BehaviorEntryInfo::BehaviorEntryInfo(GameVar *subvar, Scene *sc, int *delay) {
|
||||
BehaviorMove::BehaviorMove(GameVar *subvar, Scene *sc, int *delay) {
|
||||
_messageQueue = 0;
|
||||
_delay = 0;
|
||||
_percent = 0;
|
||||
|
@ -25,23 +25,23 @@
|
||||
|
||||
namespace Fullpipe {
|
||||
|
||||
struct BehaviorEntryInfo {
|
||||
struct BehaviorMove {
|
||||
MessageQueue *_messageQueue;
|
||||
int _delay;
|
||||
uint32 _percent;
|
||||
int _flags;
|
||||
|
||||
BehaviorEntryInfo(GameVar *subvar, Scene *sc, int *delay);
|
||||
BehaviorMove(GameVar *subvar, Scene *sc, int *delay);
|
||||
};
|
||||
|
||||
struct BehaviorEntry {
|
||||
struct BehaviorAnim {
|
||||
int _staticsId;
|
||||
int _itemsCount;
|
||||
int _movesCount;
|
||||
int _flags;
|
||||
BehaviorEntryInfo **_items;
|
||||
BehaviorMove **_behaviorMoves;
|
||||
|
||||
BehaviorEntry();
|
||||
BehaviorEntry(GameVar *var, Scene *sc, StaticANIObject *ani, int *minDelay);
|
||||
BehaviorAnim();
|
||||
BehaviorAnim(GameVar *var, Scene *sc, StaticANIObject *ani, int *minDelay);
|
||||
};
|
||||
|
||||
struct BehaviorInfo {
|
||||
@ -51,8 +51,8 @@ struct BehaviorInfo {
|
||||
int _counterMax;
|
||||
int _flags;
|
||||
int _subIndex;
|
||||
int _itemsCount;
|
||||
Common::Array<BehaviorEntry *> _bheItems;
|
||||
int _animsCount;
|
||||
Common::Array<BehaviorAnim *> _behaviorAnims;
|
||||
|
||||
BehaviorInfo() { clear(); }
|
||||
|
||||
@ -75,14 +75,14 @@ class BehaviorManager : public CObject {
|
||||
void initBehavior(Scene *scene, GameVar *var);
|
||||
|
||||
void updateBehaviors();
|
||||
void updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *entry);
|
||||
void updateStaticAniBehavior(StaticANIObject *ani, int delay, BehaviorEntry *beh);
|
||||
void updateBehavior(BehaviorInfo *behaviorInfo, BehaviorAnim *entry);
|
||||
void updateStaticAniBehavior(StaticANIObject *ani, int delay, BehaviorAnim *beh);
|
||||
|
||||
bool setBehaviorEnabled(StaticANIObject *obj, int aniId, int quId, int flag);
|
||||
|
||||
void setFlagByStaticAniObject(StaticANIObject *ani, int flag);
|
||||
|
||||
BehaviorEntryInfo *getBehaviorEntryInfoByMessageQueueDataId(StaticANIObject *ani, int id1, int id2);
|
||||
BehaviorMove *getBehaviorMoveByMessageQueueDataId(StaticANIObject *ani, int id1, int id2);
|
||||
};
|
||||
|
||||
} // End of namespace Fullpipe
|
||||
|
@ -26,7 +26,7 @@
|
||||
namespace Fullpipe {
|
||||
|
||||
struct Bat;
|
||||
struct BehaviorEntryInfo;
|
||||
struct BehaviorMove;
|
||||
struct Hanger;
|
||||
class MGM;
|
||||
class MctlLadder;
|
||||
@ -346,12 +346,12 @@ public:
|
||||
int scene06_sceneClickX;
|
||||
int scene06_sceneClickY;
|
||||
int scene06_mumsyPos;
|
||||
BehaviorEntryInfo *scene06_mumsyJumpBk;
|
||||
BehaviorEntryInfo *scene06_mumsyJumpFw;
|
||||
BehaviorMove *scene06_mumsyJumpBk;
|
||||
BehaviorMove *scene06_mumsyJumpFw;
|
||||
int scene06_mumsyJumpBkPercent;
|
||||
int scene06_mumsyJumpFwPercent;
|
||||
|
||||
BehaviorEntryInfo *scene07_lukeAnim;
|
||||
BehaviorMove *scene07_lukeAnim;
|
||||
int scene07_lukePercent;
|
||||
StaticANIObject *scene07_plusMinus;
|
||||
|
||||
|
@ -38,8 +38,8 @@
|
||||
namespace Fullpipe {
|
||||
|
||||
void scene06_initMumsy() {
|
||||
g_vars->scene06_mumsyJumpFw = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene06_mumsy, ST_MOM_STANDS, QU_MOM_JUMPFW);
|
||||
g_vars->scene06_mumsyJumpBk = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene06_mumsy, ST_MOM_STANDS, QU_MOM_JUMPBK);
|
||||
g_vars->scene06_mumsyJumpFw = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene06_mumsy, ST_MOM_STANDS, QU_MOM_JUMPFW);
|
||||
g_vars->scene06_mumsyJumpBk = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene06_mumsy, ST_MOM_STANDS, QU_MOM_JUMPBK);
|
||||
g_vars->scene06_mumsyJumpFwPercent = g_vars->scene06_mumsyJumpFw->_percent;
|
||||
g_vars->scene06_mumsyJumpBkPercent = g_vars->scene06_mumsyJumpBk->_percent;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ void sceneHandler07_openLuke() {
|
||||
} else {
|
||||
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_CORNERSITTER, -1);
|
||||
|
||||
g_vars->scene07_lukeAnim = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(ani, ST_CST_HANDLELESS, QU_CST_CLOSELUKE);
|
||||
g_vars->scene07_lukeAnim = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(ani, ST_CST_HANDLELESS, QU_CST_CLOSELUKE);
|
||||
|
||||
g_vars->scene07_lukeAnim->_percent = g_vars->scene07_lukePercent;
|
||||
}
|
||||
@ -78,7 +78,7 @@ void sceneHandler07_closeLuke() {
|
||||
if (!g_vars->scene07_lukeAnim) {
|
||||
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_CORNERSITTER, -1);
|
||||
|
||||
g_vars->scene07_lukeAnim = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(ani, ST_CST_HANDLELESS, QU_CST_CLOSELUKE);
|
||||
g_vars->scene07_lukeAnim = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(ani, ST_CST_HANDLELESS, QU_CST_CLOSELUKE);
|
||||
}
|
||||
|
||||
g_vars->scene07_lukePercent = g_vars->scene07_lukeAnim->_percent;
|
||||
|
@ -178,14 +178,14 @@ void sceneHandler13_openFast() {
|
||||
}
|
||||
|
||||
void sceneHandler13_uneatGum() {
|
||||
BehaviorEntryInfo *beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT, QU_STR_CHEW);
|
||||
BehaviorMove *beh = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT, QU_STR_CHEW);
|
||||
|
||||
if (beh) {
|
||||
beh->_percent = 0;
|
||||
beh->_delay = 36;
|
||||
}
|
||||
|
||||
beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT, QU_STR_PLUU);
|
||||
beh = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT, QU_STR_PLUU);
|
||||
if (beh) {
|
||||
beh->_percent = 0;
|
||||
beh->_delay = 36;
|
||||
@ -193,7 +193,7 @@ void sceneHandler13_uneatGum() {
|
||||
}
|
||||
|
||||
void sceneHandler13_eatGum() {
|
||||
BehaviorEntryInfo *beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT, QU_STR_CHEW);
|
||||
BehaviorMove *beh = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT, QU_STR_CHEW);
|
||||
|
||||
if (beh) {
|
||||
beh->_percent = 10922;
|
||||
@ -216,7 +216,7 @@ void sceneHandler13_showGum() {
|
||||
chainQueue(QU_SC13_SHOWGUM, 0);
|
||||
}
|
||||
|
||||
void sceneHandler13_setBehFlag(BehaviorEntryInfo *beh, bool flag) {
|
||||
void sceneHandler13_setBehFlag(BehaviorMove *beh, bool flag) {
|
||||
if (!flag) {
|
||||
beh->_percent = 327;
|
||||
beh->_flags |= 1;
|
||||
@ -229,11 +229,11 @@ void sceneHandler13_setBehFlag(BehaviorEntryInfo *beh, bool flag) {
|
||||
}
|
||||
|
||||
void sceneHandler13_walkForward(bool flag) {
|
||||
BehaviorEntryInfo *beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT, QU_STR_RTOL);
|
||||
BehaviorMove *beh = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT, QU_STR_RTOL);
|
||||
|
||||
sceneHandler13_setBehFlag(beh, flag);
|
||||
|
||||
beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_LEFT, QU_STR_TURNR);
|
||||
beh = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene13_guard, ST_STR_LEFT, QU_STR_TURNR);
|
||||
|
||||
sceneHandler13_setBehFlag(beh, flag);
|
||||
|
||||
@ -241,11 +241,11 @@ void sceneHandler13_walkForward(bool flag) {
|
||||
}
|
||||
|
||||
void sceneHandler13_walkBackward(bool flag) {
|
||||
BehaviorEntryInfo *beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT|0x4000, QU_STR_LTOR);
|
||||
BehaviorMove *beh = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT|0x4000, QU_STR_LTOR);
|
||||
|
||||
sceneHandler13_setBehFlag(beh, flag);
|
||||
|
||||
beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_LEFT|0x4000, QU_STR_TURNR_L);
|
||||
beh = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene13_guard, ST_STR_LEFT|0x4000, QU_STR_TURNR_L);
|
||||
|
||||
sceneHandler13_setBehFlag(beh, flag);
|
||||
|
||||
|
@ -266,8 +266,8 @@ void sceneHandler14_showBallFly() {
|
||||
}
|
||||
|
||||
void sceneHandler14_grandmaJump() {
|
||||
BehaviorEntryInfo *beh1 = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene14_grandma, ST_GMA_SIT, QU_GMA_JUMPFW);
|
||||
BehaviorEntryInfo *beh2 = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene14_grandma, ST_GMA_SIT, QU_GMA_JUMPBK);
|
||||
BehaviorMove *beh1 = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene14_grandma, ST_GMA_SIT, QU_GMA_JUMPFW);
|
||||
BehaviorMove *beh2 = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene14_grandma, ST_GMA_SIT, QU_GMA_JUMPBK);
|
||||
|
||||
if (beh1) {
|
||||
if (beh2) {
|
||||
@ -286,11 +286,11 @@ void sceneHandler14_endArcade() {
|
||||
getGameLoaderInteractionController()->enableFlag24();
|
||||
getCurrSceneSc2MotionController()->activate();
|
||||
|
||||
BehaviorEntryInfo *beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene14_grandma, ST_GMA_SIT, QU_GMA_BLINK);
|
||||
BehaviorMove *beh = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene14_grandma, ST_GMA_SIT, QU_GMA_BLINK);
|
||||
if (beh)
|
||||
beh->_percent = 327;
|
||||
|
||||
beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene14_grandma, ST_GMA_SIT, QU_GMA_THROW);
|
||||
beh = g_fp->_behaviorManager->getBehaviorMoveByMessageQueueDataId(g_vars->scene14_grandma, ST_GMA_SIT, QU_GMA_THROW);
|
||||
if (beh)
|
||||
beh->_percent = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user