DRAGONS: More renames for the class variables
This commit is contained in:
parent
89e9e76efa
commit
df7102298e
23 changed files with 513 additions and 510 deletions
|
@ -265,7 +265,7 @@ void DragonsEngine::gameLoop() {
|
||||||
DragonINI *pDVar8;
|
DragonINI *pDVar8;
|
||||||
|
|
||||||
_cursor->_cursorActivationSeqOffset = 0;
|
_cursor->_cursorActivationSeqOffset = 0;
|
||||||
bit_flags_8006fbd8 = 0;
|
_bit_flags_8006fbd8 = 0;
|
||||||
_counter = 0;
|
_counter = 0;
|
||||||
setFlags(ENGINE_FLAG_8);
|
setFlags(ENGINE_FLAG_8);
|
||||||
actorId = 0;
|
actorId = 0;
|
||||||
|
@ -304,7 +304,7 @@ void DragonsEngine::gameLoop() {
|
||||||
_counter = 0;
|
_counter = 0;
|
||||||
clearFlags(ENGINE_FLAG_80000000);
|
clearFlags(ENGINE_FLAG_80000000);
|
||||||
}
|
}
|
||||||
if (bit_flags_8006fbd8 == 0) {
|
if (_bit_flags_8006fbd8 == 0) {
|
||||||
setFlags(ENGINE_FLAG_8);
|
setFlags(ENGINE_FLAG_8);
|
||||||
}
|
}
|
||||||
if (_dragonINIResource->getFlickerRecord()->sceneId == getCurrentSceneId()) {
|
if (_dragonINIResource->getFlickerRecord()->sceneId == getCurrentSceneId()) {
|
||||||
|
@ -370,8 +370,8 @@ void DragonsEngine::gameLoop() {
|
||||||
// continue;
|
// continue;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (bit_flags_8006fbd8 == 3) {
|
if (_bit_flags_8006fbd8 == 3) {
|
||||||
bit_flags_8006fbd8 = 0;
|
_bit_flags_8006fbd8 = 0;
|
||||||
DragonINI *flicker = _dragonINIResource->getFlickerRecord();
|
DragonINI *flicker = _dragonINIResource->getFlickerRecord();
|
||||||
if (flicker->sceneId == getCurrentSceneId() && flicker->actor->_sequenceID2 != -1) {
|
if (flicker->sceneId == getCurrentSceneId() && flicker->actor->_sequenceID2 != -1) {
|
||||||
uVar6 = _scriptOpcodes->_scriptTargetINI;
|
uVar6 = _scriptOpcodes->_scriptTargetINI;
|
||||||
|
@ -398,7 +398,7 @@ void DragonsEngine::gameLoop() {
|
||||||
if (_inventory->getType() < 2) {
|
if (_inventory->getType() < 2) {
|
||||||
if (_inventory->getType() == 0) {
|
if (_inventory->getType() == 0) {
|
||||||
if ((checkForInventoryButtonRelease() && isInputEnabled()) &&
|
if ((checkForInventoryButtonRelease() && isInputEnabled()) &&
|
||||||
((bit_flags_8006fbd8 & 3) != 1)) {
|
((_bit_flags_8006fbd8 & 3) != 1)) {
|
||||||
sequenceId = _dragonVAR->getVar(7);
|
sequenceId = _dragonVAR->getVar(7);
|
||||||
uVar7 = _inventory->_old_showing_value;
|
uVar7 = _inventory->_old_showing_value;
|
||||||
_inventory->_old_showing_value = _inventory->getType();
|
_inventory->_old_showing_value = _inventory->getType();
|
||||||
|
@ -433,7 +433,7 @@ void DragonsEngine::gameLoop() {
|
||||||
if (_cursor->_iniUnderCursor == 0x8002) {
|
if (_cursor->_iniUnderCursor == 0x8002) {
|
||||||
LAB_80027294:
|
LAB_80027294:
|
||||||
if (_cursor->_iniItemInHand == 0) {
|
if (_cursor->_iniItemInHand == 0) {
|
||||||
if ((bit_flags_8006fbd8 & 3) != 1) {
|
if ((_bit_flags_8006fbd8 & 3) != 1) {
|
||||||
sequenceId = _dragonVAR->getVar(7);
|
sequenceId = _dragonVAR->getVar(7);
|
||||||
uVar7 = _inventory->_old_showing_value;
|
uVar7 = _inventory->_old_showing_value;
|
||||||
_inventory->_old_showing_value = _inventory->getType();
|
_inventory->_old_showing_value = _inventory->getType();
|
||||||
|
@ -469,14 +469,14 @@ void DragonsEngine::gameLoop() {
|
||||||
if (_cursor->_sequenceID < 5) {
|
if (_cursor->_sequenceID < 5) {
|
||||||
_cursor->_data_800728b0_cursor_seqID = _cursor->_sequenceID;
|
_cursor->_data_800728b0_cursor_seqID = _cursor->_sequenceID;
|
||||||
walkFlickerToObject();
|
walkFlickerToObject();
|
||||||
if (bit_flags_8006fbd8 != 0) {
|
if (_bit_flags_8006fbd8 != 0) {
|
||||||
clearFlags(ENGINE_FLAG_8);
|
clearFlags(ENGINE_FLAG_8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_cursor->_data_800728b0_cursor_seqID = _cursor->_sequenceID;
|
_cursor->_data_800728b0_cursor_seqID = _cursor->_sequenceID;
|
||||||
walkFlickerToObject();
|
walkFlickerToObject();
|
||||||
if (bit_flags_8006fbd8 != 0) {
|
if (_bit_flags_8006fbd8 != 0) {
|
||||||
clearFlags(ENGINE_FLAG_8);
|
clearFlags(ENGINE_FLAG_8);
|
||||||
}
|
}
|
||||||
_scriptOpcodes->_scriptTargetINI = _cursor->_data_80072890;
|
_scriptOpcodes->_scriptTargetINI = _cursor->_data_80072890;
|
||||||
|
@ -861,8 +861,8 @@ void DragonsEngine::engineFlag0x20UpdateFunction() {
|
||||||
//LAB_80027d40:
|
//LAB_80027d40:
|
||||||
// if ((flickerINI->sceneId == currentSceneId)
|
// if ((flickerINI->sceneId == currentSceneId)
|
||||||
// && (uVar5 != 0xffff)) {
|
// && (uVar5 != 0xffff)) {
|
||||||
// actors[(uint)uVar5]._sequenceID = 8;
|
// actors[(uint)uVar5]._sequenceID = 8;
|
||||||
// actors[(uint)uVar5]._priorityLayer_maybe = 0;
|
// actors[(uint)uVar5]._priorityLayer_maybe = 0;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -870,22 +870,22 @@ void DragonsEngine::engineFlag0x20UpdateFunction() {
|
||||||
if ((flickerINI == NULL) || flickerINI->actor->isFlagSet(ACTOR_FLAG_10)) {
|
if ((flickerINI == NULL) || flickerINI->actor->isFlagSet(ACTOR_FLAG_10)) {
|
||||||
if ((flickerINI->sceneId == currentSceneId)
|
if ((flickerINI->sceneId == currentSceneId)
|
||||||
&& (uVar5 != 0xffff)) {
|
&& (uVar5 != 0xffff)) {
|
||||||
// actors[(uint)uVar5]._sequenceID = 8;
|
// actors[(uint)uVar5]._sequenceID = 8;
|
||||||
// actors[(uint)uVar5]._priorityLayer_maybe = 0;
|
// actors[(uint)uVar5]._priorityLayer_maybe = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((bit_flags_8006fbd8 & 2) == 0) {
|
if ((_bit_flags_8006fbd8 & 2) == 0) {
|
||||||
bit_flags_8006fbd8 = bit_flags_8006fbd8 | 2;
|
_bit_flags_8006fbd8 = _bit_flags_8006fbd8 | 2;
|
||||||
}
|
}
|
||||||
// if (((((actors[actorId]._flags & 0x2000) == 0) && ((actors[actorId]._flags & 4) != 0)) &&
|
// if (((((actors[actorId]._flags & 0x2000) == 0) && ((actors[actorId]._flags & 4) != 0)) &&
|
||||||
// (actors[actorId]._sequenceID2 != actors[actorId]._sequenceID)) &&
|
// (actors[actorId]._sequenceID2 != actors[actorId]._sequenceID)) &&
|
||||||
// (actors[actorId]._sequenceID2 != -1)) {
|
// (actors[actorId]._sequenceID2 != -1)) {
|
||||||
// actor_update_sequenceID(actorId,actors[actorId]._sequenceID2);
|
// actor_update_sequenceID(actorId,actors[actorId]._sequenceID2);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//actors[(uint)uVar5]._priorityLayer_maybe = 0;
|
//actors[(uint)uVar5]._priorityLayer_maybe = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -934,8 +934,8 @@ void DragonsEngine::engineFlag0x20UpdateFunction() {
|
||||||
//error("LAB_80027d40"); //TODO is this logic required?
|
//error("LAB_80027d40"); //TODO is this logic required?
|
||||||
// if ((flickerINI->sceneId == currentSceneId)
|
// if ((flickerINI->sceneId == currentSceneId)
|
||||||
// && (uVar5 != 0xffff)) {
|
// && (uVar5 != 0xffff)) {
|
||||||
// actors[(uint)uVar5]._sequenceID = 8;
|
// actors[(uint)uVar5]._sequenceID = 8;
|
||||||
// actors[(uint)uVar5]._priorityLayer_maybe = 0;
|
// actors[(uint)uVar5]._priorityLayer_maybe = 0;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -946,8 +946,8 @@ void DragonsEngine::engineFlag0x20UpdateFunction() {
|
||||||
_inventory->setPriority(0);
|
_inventory->setPriority(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((bit_flags_8006fbd8 & 2) == 0) {
|
if ((_bit_flags_8006fbd8 & 2) == 0) {
|
||||||
bit_flags_8006fbd8 = bit_flags_8006fbd8 | 2;
|
_bit_flags_8006fbd8 = _bit_flags_8006fbd8 | 2;
|
||||||
}
|
}
|
||||||
if (flickerINI->actor->isFlagClear(ACTOR_FLAG_2000)
|
if (flickerINI->actor->isFlagClear(ACTOR_FLAG_2000)
|
||||||
&& flickerINI->actor->isFlagSet(ACTOR_FLAG_4)
|
&& flickerINI->actor->isFlagSet(ACTOR_FLAG_4)
|
||||||
|
@ -1172,11 +1172,11 @@ void DragonsEngine::walkFlickerToObject()
|
||||||
}
|
}
|
||||||
flickerINI->actor->startWalk((int)(((uint)targetX + (uint)targetINI->field_1c) * 0x10000) >> 0x10,
|
flickerINI->actor->startWalk((int)(((uint)targetX + (uint)targetINI->field_1c) * 0x10000) >> 0x10,
|
||||||
(int)(((uint)targetY + (uint)targetINI->field_1e) * 0x10000) >> 0x10,0);
|
(int)(((uint)targetY + (uint)targetINI->field_1e) * 0x10000) >> 0x10,0);
|
||||||
bit_flags_8006fbd8 = 1;
|
_bit_flags_8006fbd8 = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isFlagSet(ENGINE_FLAG_200000)) {
|
if (isFlagSet(ENGINE_FLAG_200000)) {
|
||||||
bit_flags_8006fbd8 = 3;
|
_bit_flags_8006fbd8 = 3;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
flickerINI = _dragonINIResource->getFlickerRecord();
|
flickerINI = _dragonINIResource->getFlickerRecord();
|
||||||
|
@ -1187,7 +1187,7 @@ void DragonsEngine::walkFlickerToObject()
|
||||||
flickerINI->field_20_actor_field_14 = targetINI->field_e;
|
flickerINI->field_20_actor_field_14 = targetINI->field_e;
|
||||||
flickerINI->actor->_sequenceID2 = targetINI->field_e;
|
flickerINI->actor->_sequenceID2 = targetINI->field_e;
|
||||||
}
|
}
|
||||||
bit_flags_8006fbd8 = 3;
|
_bit_flags_8006fbd8 = 3;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (_inventory->getType() == 0 && !isFlagSet(ENGINE_FLAG_200000)) {
|
if (_inventory->getType() == 0 && !isFlagSet(ENGINE_FLAG_200000)) {
|
||||||
|
@ -1201,11 +1201,11 @@ void DragonsEngine::walkFlickerToObject()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (_cursor->_data_80072890 != 0) {
|
if (_cursor->_data_80072890 != 0) {
|
||||||
bit_flags_8006fbd8 = 3;
|
_bit_flags_8006fbd8 = 3;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bit_flags_8006fbd8 = 0;
|
_bit_flags_8006fbd8 = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ private:
|
||||||
uint32 _unkFlags1;
|
uint32 _unkFlags1;
|
||||||
Common::Point _cursorPosition;
|
Common::Point _cursorPosition;
|
||||||
uint32 _counter;
|
uint32 _counter;
|
||||||
uint32 bit_flags_8006fbd8;
|
uint32 _bit_flags_8006fbd8;
|
||||||
//unk
|
//unk
|
||||||
|
|
||||||
uint16 _run_func_ptr_unk_countdown_timer;
|
uint16 _run_func_ptr_unk_countdown_timer;
|
||||||
|
|
|
@ -69,10 +69,10 @@ Inventory::Inventory(DragonsEngine *vm) : _vm(vm) {
|
||||||
_old_showing_value = 0;
|
_old_showing_value = 0;
|
||||||
_bag = NULL;
|
_bag = NULL;
|
||||||
|
|
||||||
inventionBookPrevSceneUpdateFunc = NULL;
|
_inventionBookPrevSceneUpdateFunc = NULL;
|
||||||
inventionBookPrevSceneId = 0;
|
_inventionBookPrevSceneId = 0;
|
||||||
inventionBookPrevFlickerINISceneId = 0;
|
_inventionBookPrevFlickerINISceneId = 0;
|
||||||
inventionBookPrevFlickerINIPosition = Common::Point(0,0);
|
_inventionBookPrevFlickerINIPosition = Common::Point(0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Inventory::init(ActorManager *actorManager, BackgroundResourceLoader *backgroundResourceLoader, Bag *bag, DragonINIResource *dragonIniResource) {
|
void Inventory::init(ActorManager *actorManager, BackgroundResourceLoader *backgroundResourceLoader, Bag *bag, DragonINIResource *dragonIniResource) {
|
||||||
|
@ -172,11 +172,11 @@ void Inventory::openInventory() {
|
||||||
item->_x_pos = item->_walkDestX = invXPosTable[i] + 0x10;
|
item->_x_pos = item->_walkDestX = invXPosTable[i] + 0x10;
|
||||||
item->_y_pos = item->_walkDestY = invYPosTable[i] + 0xc;
|
item->_y_pos = item->_walkDestY = invYPosTable[i] + 0xc;
|
||||||
|
|
||||||
if (inventoryItemTbl[i]) {
|
if (_inventoryItemTbl[i]) {
|
||||||
item->_flags = 0; //clear all flags
|
item->_flags = 0; //clear all flags
|
||||||
item->_scale = DRAGONS_ENGINE_SPRITE_100_PERCENT_SCALE;
|
item->_scale = DRAGONS_ENGINE_SPRITE_100_PERCENT_SCALE;
|
||||||
item->_priorityLayer = 0;
|
item->_priorityLayer = 0;
|
||||||
item->updateSequence(_vm->getINI(inventoryItemTbl[i] - 1)->field_8 * 2 + 10);
|
item->updateSequence(_vm->getINI(_inventoryItemTbl[i] - 1)->field_8 * 2 + 10);
|
||||||
item->setFlag(ACTOR_FLAG_200);
|
item->setFlag(ACTOR_FLAG_200);
|
||||||
item->setFlag(ACTOR_FLAG_100);
|
item->setFlag(ACTOR_FLAG_100);
|
||||||
item->setFlag(ACTOR_FLAG_80);
|
item->setFlag(ACTOR_FLAG_80);
|
||||||
|
@ -259,11 +259,11 @@ void Inventory::draw() {
|
||||||
|
|
||||||
uint16 Inventory::getIniAtPosition(int16 x, int16 y) {
|
uint16 Inventory::getIniAtPosition(int16 x, int16 y) {
|
||||||
for (int i = 0; i < DRAGONS_MAX_INVENTORY_ITEMS; i++) {
|
for (int i = 0; i < DRAGONS_MAX_INVENTORY_ITEMS; i++) {
|
||||||
if (inventoryItemTbl[i]) {
|
if (_inventoryItemTbl[i]) {
|
||||||
Actor *item = _vm->_actorManager->getActor(i + ACTOR_INVENTORY_OFFSET);
|
Actor *item = _vm->_actorManager->getActor(i + ACTOR_INVENTORY_OFFSET);
|
||||||
if (item->_x_pos - 0x10 <= x && x < item->_x_pos + 0x10
|
if (item->_x_pos - 0x10 <= x && x < item->_x_pos + 0x10
|
||||||
&& item->_y_pos - 0xc <= y && y < item->_y_pos + 0xc) {
|
&& item->_y_pos - 0xc <= y && y < item->_y_pos + 0xc) {
|
||||||
return inventoryItemTbl[i];
|
return _inventoryItemTbl[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -271,27 +271,27 @@ uint16 Inventory::getIniAtPosition(int16 x, int16 y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Inventory::loadInventoryItemsFromSave() {
|
void Inventory::loadInventoryItemsFromSave() {
|
||||||
memset(inventoryItemTbl, 0, sizeof(inventoryItemTbl));
|
memset(_inventoryItemTbl, 0, sizeof(_inventoryItemTbl));
|
||||||
int j = 0;
|
int j = 0;
|
||||||
for (int i = 0; i < _vm->_dragonINIResource->totalRecords() && j < DRAGONS_MAX_INVENTORY_ITEMS; i++ ) {
|
for (int i = 0; i < _vm->_dragonINIResource->totalRecords() && j < DRAGONS_MAX_INVENTORY_ITEMS; i++ ) {
|
||||||
DragonINI *ini = _vm->_dragonINIResource->getRecord(i);
|
DragonINI *ini = _vm->_dragonINIResource->getRecord(i);
|
||||||
if (ini->sceneId == 1) {
|
if (ini->sceneId == 1) {
|
||||||
inventoryItemTbl[j++] = i + 1;
|
_inventoryItemTbl[j++] = i + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Inventory::openInventionBook() {
|
void Inventory::openInventionBook() {
|
||||||
inventionBookPrevSceneUpdateFunc = _vm->getSceneUpdateFunction();
|
_inventionBookPrevSceneUpdateFunc = _vm->getSceneUpdateFunction();
|
||||||
_vm->setSceneUpdateFunction(NULL);
|
_vm->setSceneUpdateFunction(NULL);
|
||||||
// fade_related_calls_with_1f();
|
// fade_related_calls_with_1f();
|
||||||
_sequenceId = 2;
|
_sequenceId = 2;
|
||||||
_actor->updateSequence(2);
|
_actor->updateSequence(2);
|
||||||
inventionBookPrevSceneId = _vm->getCurrentSceneId();
|
_inventionBookPrevSceneId = _vm->getCurrentSceneId();
|
||||||
DragonINI *flicker = _vm->_dragonINIResource->getFlickerRecord();
|
DragonINI *flicker = _vm->_dragonINIResource->getFlickerRecord();
|
||||||
if (flicker && flicker->actor) {
|
if (flicker && flicker->actor) {
|
||||||
inventionBookPrevFlickerINISceneId = flicker->sceneId;
|
_inventionBookPrevFlickerINISceneId = flicker->sceneId;
|
||||||
inventionBookPrevFlickerINIPosition = Common::Point(flicker->actor->_x_pos, flicker->actor->_y_pos);
|
_inventionBookPrevFlickerINIPosition = Common::Point(flicker->actor->_x_pos, flicker->actor->_y_pos);
|
||||||
flicker->sceneId = 0;
|
flicker->sceneId = 0;
|
||||||
}
|
}
|
||||||
_vm->_scene->setSceneId(2);
|
_vm->_scene->setSceneId(2);
|
||||||
|
@ -306,15 +306,15 @@ void Inventory::closeInventionBook() {
|
||||||
|
|
||||||
DragonINI *flicker = _vm->_dragonINIResource->getFlickerRecord();
|
DragonINI *flicker = _vm->_dragonINIResource->getFlickerRecord();
|
||||||
if (flicker && flicker->actor) {
|
if (flicker && flicker->actor) {
|
||||||
flicker->actor->_x_pos = inventionBookPrevFlickerINIPosition.x;
|
flicker->actor->_x_pos = _inventionBookPrevFlickerINIPosition.x;
|
||||||
flicker->actor->_y_pos = inventionBookPrevFlickerINIPosition.y;
|
flicker->actor->_y_pos = _inventionBookPrevFlickerINIPosition.y;
|
||||||
flicker->sceneId = inventionBookPrevFlickerINISceneId;
|
flicker->sceneId = _inventionBookPrevFlickerINISceneId;
|
||||||
}
|
}
|
||||||
_vm->_scene->setSceneId(inventionBookPrevSceneId);
|
_vm->_scene->setSceneId(_inventionBookPrevSceneId);
|
||||||
|
|
||||||
_sequenceId = 0;
|
_sequenceId = 0;
|
||||||
setActorSequenceId(0);
|
setActorSequenceId(0);
|
||||||
setPositionFromSceneId(inventionBookPrevSceneId);
|
setPositionFromSceneId(_inventionBookPrevSceneId);
|
||||||
uVar2 = _vm->_scene->getSceneId();
|
uVar2 = _vm->_scene->getSceneId();
|
||||||
if (((((uVar2 == 0x23) || (uVar2 == 0x2d)) || (uVar2 == 0x2e)) || ((uVar2 == 0x31 || (uVar2 == 0x32)))) || (uVar2 == 0x28)) {
|
if (((((uVar2 == 0x23) || (uVar2 == 0x2d)) || (uVar2 == 0x2e)) || ((uVar2 == 0x31 || (uVar2 == 0x32)))) || (uVar2 == 0x28)) {
|
||||||
LAB_80038b9c:
|
LAB_80038b9c:
|
||||||
|
@ -331,7 +331,7 @@ void Inventory::closeInventionBook() {
|
||||||
uVar1 = (uint)_vm->_scene->getSceneId();
|
uVar1 = (uint)_vm->_scene->getSceneId();
|
||||||
LAB_80038be8:
|
LAB_80038be8:
|
||||||
_vm->_scene->loadScene(uVar1,0x1e);
|
_vm->_scene->loadScene(uVar1,0x1e);
|
||||||
_vm->setSceneUpdateFunction(inventionBookPrevSceneUpdateFunc);
|
_vm->setSceneUpdateFunction(_inventionBookPrevSceneUpdateFunc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,8 +347,8 @@ void Inventory::setPositionFromSceneId(uint32 sceneId) {
|
||||||
|
|
||||||
bool Inventory::addItem(uint16 initId) {
|
bool Inventory::addItem(uint16 initId) {
|
||||||
for (int i = 0; i < DRAGONS_MAX_INVENTORY_ITEMS; i++) {
|
for (int i = 0; i < DRAGONS_MAX_INVENTORY_ITEMS; i++) {
|
||||||
if (inventoryItemTbl[i] == 0) {
|
if (_inventoryItemTbl[i] == 0) {
|
||||||
inventoryItemTbl[i] = initId;
|
_inventoryItemTbl[i] = initId;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -358,7 +358,7 @@ bool Inventory::addItem(uint16 initId) {
|
||||||
|
|
||||||
Actor *Inventory::getInventoryItemActor(uint16 iniId) {
|
Actor *Inventory::getInventoryItemActor(uint16 iniId) {
|
||||||
for (int i = 0; i < DRAGONS_MAX_INVENTORY_ITEMS; i++) {
|
for (int i = 0; i < DRAGONS_MAX_INVENTORY_ITEMS; i++) {
|
||||||
if (inventoryItemTbl[i] == iniId) {
|
if (_inventoryItemTbl[i] == iniId) {
|
||||||
return _vm->_actorManager->getActor(i + ACTOR_INVENTORY_OFFSET);
|
return _vm->_actorManager->getActor(i + ACTOR_INVENTORY_OFFSET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -367,8 +367,8 @@ Actor *Inventory::getInventoryItemActor(uint16 iniId) {
|
||||||
|
|
||||||
void Inventory::replaceItem(uint16 existingIniId, uint16 newIniId) {
|
void Inventory::replaceItem(uint16 existingIniId, uint16 newIniId) {
|
||||||
for (int i = 0; i < DRAGONS_MAX_INVENTORY_ITEMS; i++) {
|
for (int i = 0; i < DRAGONS_MAX_INVENTORY_ITEMS; i++) {
|
||||||
if (inventoryItemTbl[i] == existingIniId) {
|
if (_inventoryItemTbl[i] == existingIniId) {
|
||||||
inventoryItemTbl[i] = newIniId;
|
_inventoryItemTbl[i] = newIniId;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -381,7 +381,7 @@ bool Inventory::addItemIfPositionIsEmpty(uint16 iniId, uint16 x, uint16 y) {
|
||||||
(x < actor->_x_pos + 0x10)) &&
|
(x < actor->_x_pos + 0x10)) &&
|
||||||
(actor->_y_pos - 0xc <= y)) &&
|
(actor->_y_pos - 0xc <= y)) &&
|
||||||
(y < actor->_y_pos + 0xc)) {
|
(y < actor->_y_pos + 0xc)) {
|
||||||
inventoryItemTbl[i] = iniId;
|
_inventoryItemTbl[i] = iniId;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -390,8 +390,8 @@ bool Inventory::addItemIfPositionIsEmpty(uint16 iniId, uint16 x, uint16 y) {
|
||||||
|
|
||||||
bool Inventory::clearItem(uint16 iniId) {
|
bool Inventory::clearItem(uint16 iniId) {
|
||||||
for (int i = 0; i < DRAGONS_MAX_INVENTORY_ITEMS; i++) {
|
for (int i = 0; i < DRAGONS_MAX_INVENTORY_ITEMS; i++) {
|
||||||
if (inventoryItemTbl[i] == iniId) {
|
if (_inventoryItemTbl[i] == iniId) {
|
||||||
inventoryItemTbl[i] = 0;
|
_inventoryItemTbl[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -49,12 +49,12 @@ private:
|
||||||
int16 _type;
|
int16 _type;
|
||||||
Bag *_bag;
|
Bag *_bag;
|
||||||
|
|
||||||
void (*inventionBookPrevSceneUpdateFunc)();
|
void (*_inventionBookPrevSceneUpdateFunc)();
|
||||||
uint16 inventionBookPrevSceneId;
|
uint16 _inventionBookPrevSceneId;
|
||||||
uint16 inventionBookPrevFlickerINISceneId;
|
uint16 _inventionBookPrevFlickerINISceneId;
|
||||||
Common::Point inventionBookPrevFlickerINIPosition;
|
Common::Point _inventionBookPrevFlickerINIPosition;
|
||||||
|
|
||||||
uint16 inventoryItemTbl[DRAGONS_MAX_INVENTORY_ITEMS];
|
uint16 _inventoryItemTbl[DRAGONS_MAX_INVENTORY_ITEMS];
|
||||||
public:
|
public:
|
||||||
Inventory(DragonsEngine *vm);
|
Inventory(DragonsEngine *vm);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
namespace Dragons {
|
namespace Dragons {
|
||||||
|
|
||||||
Minigame2::Minigame2(DragonsEngine *vm) : _vm(vm), DAT_80093c70(false), DAT_80093c72(false), DAT_80093c74(0), DAT_80093ca8(false) {}
|
Minigame2::Minigame2(DragonsEngine *vm) : _vm(vm), _dat_80093c70(false), _dat_80093c72(false), _dat_80093c74(0), _dat_80093ca8(false) {}
|
||||||
|
|
||||||
static const uint16 unkArray[5] = {
|
static const uint16 unkArray[5] = {
|
||||||
0xC, 0xA, 0x8, 0x6, 0x4
|
0xC, 0xA, 0x8, 0x6, 0x4
|
||||||
|
@ -134,25 +134,25 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
if (4 < param_2) {
|
if (4 < param_2) {
|
||||||
local_2e6 = 4;
|
local_2e6 = 4;
|
||||||
}
|
}
|
||||||
DAT_80093ca4 = unkArray[local_2e6];
|
_dat_80093ca4 = unkArray[local_2e6];
|
||||||
DAT_80093c90 = unkArray[local_2e6];
|
_dat_80093c90 = unkArray[local_2e6];
|
||||||
DAT_80093c94 = 0;
|
_dat_80093c94 = 0;
|
||||||
_vm->_inventory->setType(0);
|
_vm->_inventory->setType(0);
|
||||||
DAT_80093cb4 = 2;
|
_dat_80093cb4 = 2;
|
||||||
DAT_80093cbc = 0;
|
_dat_80093cbc = 0;
|
||||||
DAT_80093cb8 = 2;
|
_dat_80093cb8 = 2;
|
||||||
DAT_80093cc0 = 0;
|
_dat_80093cc0 = 0;
|
||||||
DAT_80093cac = 0;
|
_dat_80093cac = 0;
|
||||||
DAT_80093cb0 = false;
|
_dat_80093cb0 = false;
|
||||||
DAT_80093c9c = 0;
|
_dat_80093c9c = 0;
|
||||||
_vm->_talk->DAT_8008e874_dialogBox_y2 = 0;
|
_vm->_talk->_dat_8008e874_dialogBox_y2 = 0;
|
||||||
_vm->_talk->DAT_8008e844_dialogBox_y1 = 0;
|
_vm->_talk->_dat_8008e844_dialogBox_y1 = 0;
|
||||||
_vm->_talk->DAT_8008e848_dialogBox_x2 = 0;
|
_vm->_talk->_dat_8008e848_dialogBox_x2 = 0;
|
||||||
_vm->_talk->DAT_8008e7e8_dialogBox_x1 = 0;
|
_vm->_talk->_dat_8008e7e8_dialogBox_x1 = 0;
|
||||||
DAT_80093c98 = DAT_80093c90;
|
_dat_80093c98 = _dat_80093c90;
|
||||||
DAT_80093ca0 = param_1;
|
_dat_80093ca0 = param_1;
|
||||||
DAT_80093cc4 = DAT_80093ca4;
|
_dat_80093cc4 = _dat_80093ca4;
|
||||||
DAT_80093cc8 = DAT_80093ca4;
|
_dat_80093cc8 = _dat_80093ca4;
|
||||||
//fade_related_calls_with_1f();
|
//fade_related_calls_with_1f();
|
||||||
_vm->reset_screen_maybe();
|
_vm->reset_screen_maybe();
|
||||||
_vm->_inventory->setType(0);
|
_vm->_inventory->setType(0);
|
||||||
|
@ -177,16 +177,16 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
loungealotLeftUpperArm = _vm->_actorManager->loadActor(0xb, 2, 0x7d, 199, 4);
|
loungealotLeftUpperArm = _vm->_actorManager->loadActor(0xb, 2, 0x7d, 199, 4);
|
||||||
uVar8 = _vm->_actorManager->loadActor(0xf,0,0x7d,199,4);
|
uVar8 = _vm->_actorManager->loadActor(0xf,0,0x7d,199,4);
|
||||||
loungealotRightArm = _vm->_actorManager->loadActor(0x10, 0, 0x7d, 199, 4);
|
loungealotRightArm = _vm->_actorManager->loadActor(0x10, 0, 0x7d, 199, 4);
|
||||||
flickerArm = _vm->_actorManager->loadActor(9, (uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb4 * 3 + (uint)DAT_80093cbc],
|
flickerArm = _vm->_actorManager->loadActor(9, (uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb4 * 3 + (uint)_dat_80093cbc],
|
||||||
loungealotLeftUpperArm->_x_pos - loungealotLeftUpperArm->_frame->field_e,
|
loungealotLeftUpperArm->_x_pos - loungealotLeftUpperArm->_frame->field_e,
|
||||||
loungealotLeftUpperArm->_y_pos - loungealotLeftUpperArm->_frame->field_10, 4);
|
loungealotLeftUpperArm->_y_pos - loungealotLeftUpperArm->_frame->field_10, 4);
|
||||||
loungealotThumb = _vm->_actorManager->loadActor(0x12, (uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb4 * 3 + (uint)DAT_80093cbc],
|
loungealotThumb = _vm->_actorManager->loadActor(0x12, (uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb4 * 3 + (uint)_dat_80093cbc],
|
||||||
loungealotLeftUpperArm->_x_pos - loungealotLeftUpperArm->_frame->field_e,
|
loungealotLeftUpperArm->_x_pos - loungealotLeftUpperArm->_frame->field_e,
|
||||||
loungealotLeftUpperArm->_y_pos - loungealotLeftUpperArm->_frame->field_10, 4);
|
loungealotLeftUpperArm->_y_pos - loungealotLeftUpperArm->_frame->field_10, 4);
|
||||||
uVar12 = _vm->_actorManager->loadActor(10, (uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb8 * 3 + (uint)DAT_80093cc0],
|
uVar12 = _vm->_actorManager->loadActor(10, (uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb8 * 3 + (uint)_dat_80093cc0],
|
||||||
flickerArm->_x_pos - flickerArm->_frame->field_e,
|
flickerArm->_x_pos - flickerArm->_frame->field_e,
|
||||||
flickerArm->_y_pos - flickerArm->_frame->field_10, 4);
|
flickerArm->_y_pos - flickerArm->_frame->field_10, 4);
|
||||||
uVar13 = _vm->_actorManager->loadActor(0x13, (uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb8 * 3 + (uint)DAT_80093cc0],
|
uVar13 = _vm->_actorManager->loadActor(0x13, (uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb8 * 3 + (uint)_dat_80093cc0],
|
||||||
flickerArm->_x_pos - flickerArm->_frame->field_e,
|
flickerArm->_x_pos - flickerArm->_frame->field_e,
|
||||||
flickerArm->_y_pos - flickerArm->_frame->field_10, 4);
|
flickerArm->_y_pos - flickerArm->_frame->field_10, 4);
|
||||||
uVar14 = _vm->_actorManager->loadActor(0x27,0,0x10,0xac,4);
|
uVar14 = _vm->_actorManager->loadActor(0x27,0,0x10,0xac,4);
|
||||||
|
@ -300,12 +300,12 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
}
|
}
|
||||||
_vm->waitForFrames(1);
|
_vm->waitForFrames(1);
|
||||||
|
|
||||||
if ((DAT_80093c9c != 0) && !_vm->isFlagSet(ENGINE_FLAG_8000)) {
|
if ((_dat_80093c9c != 0) && !_vm->isFlagSet(ENGINE_FLAG_8000)) {
|
||||||
loungealotHeadActor->updateSequence(0);
|
loungealotHeadActor->updateSequence(0);
|
||||||
//TODO _vm->_talk->FUN_8001a7c4((uint)DAT_8008e7e8,(uint)DAT_8008e844,(uint)DAT_8008e848,(uint)DAT_8008e874);
|
//TODO _vm->_talk->FUN_8001a7c4((uint)_dat_8008e7e8,(uint)_dat_8008e844,(uint)_dat_8008e848,(uint)_dat_8008e874);
|
||||||
DAT_80093c9c = 0;
|
_dat_80093c9c = 0;
|
||||||
}
|
}
|
||||||
if (DAT_80093c94 != 0) {
|
if (_dat_80093c94 != 0) {
|
||||||
local_264 = 0;
|
local_264 = 0;
|
||||||
}
|
}
|
||||||
if (uVar8->_field_7a == 1) {
|
if (uVar8->_field_7a == 1) {
|
||||||
|
@ -320,23 +320,23 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
}
|
}
|
||||||
screenShakeCounter = screenShakeCounter + 1;
|
screenShakeCounter = screenShakeCounter + 1;
|
||||||
}
|
}
|
||||||
if (DAT_80093ca4 == 0) {
|
if (_dat_80093ca4 == 0) {
|
||||||
DAT_80093ca4 = DAT_80093cc8;
|
_dat_80093ca4 = _dat_80093cc8;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DAT_80093ca4 = DAT_80093ca4 - 1;
|
_dat_80093ca4 = _dat_80093ca4 - 1;
|
||||||
}
|
}
|
||||||
if (DAT_80093c90 == 0) {
|
if (_dat_80093c90 == 0) {
|
||||||
DAT_80093c90 = DAT_80093c98;
|
_dat_80093c90 = _dat_80093c98;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DAT_80093c90 = DAT_80093c90 - 1;
|
_dat_80093c90 = _dat_80093c90 - 1;
|
||||||
}
|
}
|
||||||
if (DAT_80093cc4 == 0) {
|
if (_dat_80093cc4 == 0) {
|
||||||
DAT_80093cc4 = DAT_80093cc8;
|
_dat_80093cc4 = _dat_80093cc8;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DAT_80093cc4 = DAT_80093cc4 - 1;
|
_dat_80093cc4 = _dat_80093cc4 - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local_27a == 0) {
|
if (local_27a == 0) {
|
||||||
|
@ -394,14 +394,14 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
uVar13->_y_pos = sVar3 - flickerArm->_frame->field_10;
|
uVar13->_y_pos = sVar3 - flickerArm->_frame->field_10;
|
||||||
uVar12->_y_pos = uVar13->_y_pos;
|
uVar12->_y_pos = uVar13->_y_pos;
|
||||||
// EnableVSyncEvent();
|
// EnableVSyncEvent();
|
||||||
local_282 = DAT_80093cc0;
|
local_282 = _dat_80093cc0;
|
||||||
local_286 = DAT_80093cbc;
|
local_286 = _dat_80093cbc;
|
||||||
local_284 = DAT_80093cb8;
|
local_284 = _dat_80093cb8;
|
||||||
local_288 = DAT_80093cb4;
|
local_288 = _dat_80093cb4;
|
||||||
if (DAT_80093c94 != 1) {
|
if (_dat_80093c94 != 1) {
|
||||||
if (DAT_80093c94 < 2) {
|
if (_dat_80093c94 < 2) {
|
||||||
if (DAT_80093c94 == 0) {
|
if (_dat_80093c94 == 0) {
|
||||||
if (((local_264 < 300) || (DAT_80093ca0 != 0)) || (DAT_80093cbc == 2)) {
|
if (((local_264 < 300) || (_dat_80093ca0 != 0)) || (_dat_80093cbc == 2)) {
|
||||||
if ((local_260 != 0) && (local_260 = local_260 + -1, local_260 == 0)) {
|
if ((local_260 != 0) && (local_260 = local_260 + -1, local_260 == 0)) {
|
||||||
if (local_262 != 0) {
|
if (local_262 != 0) {
|
||||||
local_262 = local_262 - 1;
|
local_262 = local_262 - 1;
|
||||||
|
@ -416,41 +416,41 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
loungealotHeadActor->updateSequence((uint)local_2b0[(uint)local_262 * 2]);
|
loungealotHeadActor->updateSequence((uint)local_2b0[(uint)local_262 * 2]);
|
||||||
uVar18 = (uint)local_262;
|
uVar18 = (uint)local_262;
|
||||||
local_262 = local_262 + 1;
|
local_262 = local_262 + 1;
|
||||||
FUN_80093aec_dialog(textIdTbl[uVar18],0x14,1);
|
fun_80093aec_dialog(textIdTbl[uVar18],0x14,1);
|
||||||
if (local_262 == 3) {
|
if (local_262 == 3) {
|
||||||
while (((DAT_80093cb4 != 2 || (DAT_80093cbc != 0)) ||
|
while (((_dat_80093cb4 != 2 || (_dat_80093cbc != 0)) ||
|
||||||
((DAT_80093cb8 != 2 || (DAT_80093cc0 != 0))))) {
|
((_dat_80093cb8 != 2 || (_dat_80093cc0 != 0))))) {
|
||||||
_vm->waitForFrames(1);
|
_vm->waitForFrames(1);
|
||||||
if (flickerArm->isFlagSet(ACTOR_FLAG_4)) {
|
if (flickerArm->isFlagSet(ACTOR_FLAG_4)) {
|
||||||
if (DAT_80093cbc != 0) {
|
if (_dat_80093cbc != 0) {
|
||||||
DAT_80093cbc = DAT_80093cbc - 1;
|
_dat_80093cbc = _dat_80093cbc - 1;
|
||||||
}
|
}
|
||||||
if (2 < DAT_80093cb4) {
|
if (2 < _dat_80093cb4) {
|
||||||
DAT_80093cb4 = DAT_80093cb4 - 1;
|
_dat_80093cb4 = _dat_80093cb4 - 1;
|
||||||
}
|
}
|
||||||
if (DAT_80093cb4 < 2) {
|
if (_dat_80093cb4 < 2) {
|
||||||
DAT_80093cb4 = DAT_80093cb4 + 1;
|
_dat_80093cb4 = _dat_80093cb4 + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((uVar12->_flags & 4) != 0) {
|
if ((uVar12->_flags & 4) != 0) {
|
||||||
if (DAT_80093cc0 != 0) {
|
if (_dat_80093cc0 != 0) {
|
||||||
DAT_80093cc0 = DAT_80093cc0 - 1;
|
_dat_80093cc0 = _dat_80093cc0 - 1;
|
||||||
}
|
}
|
||||||
if (2 < DAT_80093cb8) {
|
if (2 < _dat_80093cb8) {
|
||||||
DAT_80093cb8 = DAT_80093cb8 - 1;
|
_dat_80093cb8 = _dat_80093cb8 - 1;
|
||||||
}
|
}
|
||||||
if (DAT_80093cb8 < 2) {
|
if (_dat_80093cb8 < 2) {
|
||||||
DAT_80093cb8 = DAT_80093cb8 + 1;
|
_dat_80093cb8 = _dat_80093cb8 + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (flickerArm->_sequenceID != actorSequenceIdTbl[(uint)DAT_80093cb4 * 3 + (uint)DAT_80093cbc]) {
|
if (flickerArm->_sequenceID != actorSequenceIdTbl[(uint)_dat_80093cb4 * 3 + (uint)_dat_80093cbc]) {
|
||||||
flickerArm->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb4 * 3 + (uint)DAT_80093cbc]);
|
flickerArm->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb4 * 3 + (uint)_dat_80093cbc]);
|
||||||
loungealotThumb->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb4 * 3 + (uint)DAT_80093cbc]);
|
loungealotThumb->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb4 * 3 + (uint)_dat_80093cbc]);
|
||||||
}
|
}
|
||||||
if (uVar12->_sequenceID !=
|
if (uVar12->_sequenceID !=
|
||||||
actorSequenceIdTbl[(uint)DAT_80093cb8 * 3 + (uint)DAT_80093cc0]) {
|
actorSequenceIdTbl[(uint)_dat_80093cb8 * 3 + (uint)_dat_80093cc0]) {
|
||||||
uVar12->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb8 * 3 + (uint)DAT_80093cc0]);
|
uVar12->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb8 * 3 + (uint)_dat_80093cc0]);
|
||||||
uVar13->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb8 * 3 + (uint)DAT_80093cc0]);
|
uVar13->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb8 * 3 + (uint)_dat_80093cc0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_vm->waitForFrames(2 * 0x3c);
|
_vm->waitForFrames(2 * 0x3c);
|
||||||
|
@ -472,8 +472,8 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
_vm->waitForFrames(1);
|
_vm->waitForFrames(1);
|
||||||
_vm->_screen->loadPalette(0,paletteData);
|
_vm->_screen->loadPalette(0,paletteData);
|
||||||
_vm->_screen->loadPalette(1,paletteData);
|
_vm->_screen->loadPalette(1,paletteData);
|
||||||
// TODO FUN_8001a7c4((uint)DAT_8008e7e8,(uint)DAT_8008e844,(uint)DAT_8008e848,
|
// TODO FUN_8001a7c4((uint)_dat_8008e7e8,(uint)_dat_8008e844,(uint)_dat_8008e848,
|
||||||
// (uint)DAT_8008e874);
|
// (uint)_dat_8008e874);
|
||||||
shouldExit = true;
|
shouldExit = true;
|
||||||
goto LAB_80090188;
|
goto LAB_80090188;
|
||||||
}
|
}
|
||||||
|
@ -491,13 +491,13 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
if (_vm->isLeftKeyPressed()) {
|
if (_vm->isLeftKeyPressed()) {
|
||||||
local_268 = 1;
|
local_268 = 1;
|
||||||
}
|
}
|
||||||
if (FUN_80093520()) {
|
if (fun_80093520()) {
|
||||||
local_268 = local_268 - 1;
|
local_268 = local_268 - 1;
|
||||||
}
|
}
|
||||||
if (_vm->isRightKeyPressed()) {
|
if (_vm->isRightKeyPressed()) {
|
||||||
local_268 = local_268 + 1;
|
local_268 = local_268 + 1;
|
||||||
}
|
}
|
||||||
if (FUN_80093248()) {
|
if (fun_80093248()) {
|
||||||
local_268 = local_268 + 1;
|
local_268 = local_268 + 1;
|
||||||
}
|
}
|
||||||
if (loungealotLeftUpperArm->_sequenceID != local_268) {
|
if (loungealotLeftUpperArm->_sequenceID != local_268) {
|
||||||
|
@ -544,13 +544,13 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
local_264 = 0;
|
local_264 = 0;
|
||||||
}
|
}
|
||||||
if ((uVar12->_flags & 4) != 0) {
|
if ((uVar12->_flags & 4) != 0) {
|
||||||
if (FUN_80093248() && (local_284 != 0)) {
|
if (fun_80093248() && (local_284 != 0)) {
|
||||||
local_284 = local_284 - 1;
|
local_284 = local_284 - 1;
|
||||||
}
|
}
|
||||||
if (FUN_80093520() && (local_284 < 4)) {
|
if (fun_80093520() && (local_284 < 4)) {
|
||||||
local_284 = local_284 + 1;
|
local_284 = local_284 + 1;
|
||||||
}
|
}
|
||||||
if ((!FUN_80093520() && !FUN_80093248()) && (local_284 != 2)) {
|
if ((!fun_80093520() && !fun_80093248()) && (local_284 != 2)) {
|
||||||
if (local_284 < 2) {
|
if (local_284 < 2) {
|
||||||
local_284 = local_284 + 1;
|
local_284 = local_284 + 1;
|
||||||
}
|
}
|
||||||
|
@ -558,7 +558,7 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
local_284 = local_284 - 1;
|
local_284 = local_284 - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!FUN_80093800() || (local_26c != 0)) {
|
if (!fun_80093800() || (local_26c != 0)) {
|
||||||
if (local_282 != 0) {
|
if (local_282 != 0) {
|
||||||
local_282 = local_282 - 1;
|
local_282 = local_282 - 1;
|
||||||
}
|
}
|
||||||
|
@ -570,15 +570,15 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (((local_286 == 2) && (local_282 == 2)) && (local_288 == local_284)) {
|
if (((local_286 == 2) && (local_282 == 2)) && (local_288 == local_284)) {
|
||||||
if ((DAT_80093cbc == 2) && (DAT_80093cc0 != 2)) {
|
if ((_dat_80093cbc == 2) && (_dat_80093cc0 != 2)) {
|
||||||
local_258 = 2;
|
local_258 = 2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((DAT_80093cbc == 2) || (DAT_80093cc0 != 2)) {
|
if ((_dat_80093cbc == 2) || (_dat_80093cc0 != 2)) {
|
||||||
local_288 = DAT_80093cb4;
|
local_288 = _dat_80093cb4;
|
||||||
local_286 = DAT_80093cbc;
|
local_286 = _dat_80093cbc;
|
||||||
local_284 = DAT_80093cb8;
|
local_284 = _dat_80093cb8;
|
||||||
local_282 = DAT_80093cc0;
|
local_282 = _dat_80093cc0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
local_258 = 1;
|
local_258 = 1;
|
||||||
|
@ -586,17 +586,17 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (local_258 == 0) {
|
if (local_258 == 0) {
|
||||||
if ((local_286 != DAT_80093cbc) || (local_288 != DAT_80093cb4)) {
|
if ((local_286 != _dat_80093cbc) || (local_288 != _dat_80093cb4)) {
|
||||||
DAT_80093cb4 = local_288;
|
_dat_80093cb4 = local_288;
|
||||||
DAT_80093cbc = local_286;
|
_dat_80093cbc = local_286;
|
||||||
flickerArm->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)local_288 * 3 + (uint)local_286]);
|
flickerArm->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)local_288 * 3 + (uint)local_286]);
|
||||||
loungealotThumb->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb4 * 3 + (uint)DAT_80093cbc]);
|
loungealotThumb->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb4 * 3 + (uint)_dat_80093cbc]);
|
||||||
}
|
}
|
||||||
if ((local_282 != DAT_80093cc0) || (local_284 != DAT_80093cb8)) {
|
if ((local_282 != _dat_80093cc0) || (local_284 != _dat_80093cb8)) {
|
||||||
DAT_80093cb8 = local_284;
|
_dat_80093cb8 = local_284;
|
||||||
DAT_80093cc0 = local_282;
|
_dat_80093cc0 = local_282;
|
||||||
uVar12->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)local_284 * 3 + (uint)local_282]);
|
uVar12->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)local_284 * 3 + (uint)local_282]);
|
||||||
uVar13->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb8 * 3 + (uint)DAT_80093cc0]);
|
uVar13->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb8 * 3 + (uint)_dat_80093cc0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -648,13 +648,13 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
uVar13->_flags = uVar13->_flags | 0x400;
|
uVar13->_flags = uVar13->_flags | 0x400;
|
||||||
flickerArm->updateSequence((uint)local_28 + 0xf);
|
flickerArm->updateSequence((uint)local_28 + 0xf);
|
||||||
loungealotThumb->updateSequence((uint)local_28 + 0xf);
|
loungealotThumb->updateSequence((uint)local_28 + 0xf);
|
||||||
DAT_80093c94 = 1;
|
_dat_80093c94 = 1;
|
||||||
DAT_80093c90 = 0x1e;
|
_dat_80093c90 = 0x1e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (DAT_80093c94 == 2) {
|
if (_dat_80093c94 == 2) {
|
||||||
uVar12->_flags = uVar12->_flags | 0x1000;
|
uVar12->_flags = uVar12->_flags | 0x1000;
|
||||||
uVar13->_flags = uVar13->_flags | 0x1000;
|
uVar13->_flags = uVar13->_flags | 0x1000;
|
||||||
flickerArm->_flags = flickerArm->_flags | 0x1000;
|
flickerArm->_flags = flickerArm->_flags | 0x1000;
|
||||||
|
@ -663,7 +663,7 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
if (local_258 == 1) {
|
if (local_258 == 1) {
|
||||||
// playSoundFromTxtIndex(DAT_80063ad0);
|
// playSoundFromTxtIndex(DAT_80063ad0);
|
||||||
loungealotHeadActor->updateSequence(9);
|
loungealotHeadActor->updateSequence(9);
|
||||||
FUN_80093aec_dialog(0x46BC,0x14,1);
|
fun_80093aec_dialog(0x46BC,0x14,1);
|
||||||
do {
|
do {
|
||||||
_vm->waitForFrames(1);
|
_vm->waitForFrames(1);
|
||||||
} while (_vm->isFlagSet(ENGINE_FLAG_8000));
|
} while (_vm->isFlagSet(ENGINE_FLAG_8000));
|
||||||
|
@ -673,7 +673,7 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
else {
|
else {
|
||||||
// playSoundFromTxtIndex(DAT_80063ad4);
|
// playSoundFromTxtIndex(DAT_80063ad4);
|
||||||
loungealotHeadActor->updateSequence(10);
|
loungealotHeadActor->updateSequence(10);
|
||||||
FUN_80093aec_dialog(0x4718,0x14,1);
|
fun_80093aec_dialog(0x4718,0x14,1);
|
||||||
loungealotRightArm->updateSequence(2);
|
loungealotRightArm->updateSequence(2);
|
||||||
do {
|
do {
|
||||||
_vm->waitForFrames(1);
|
_vm->waitForFrames(1);
|
||||||
|
@ -705,7 +705,7 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
if (_vm->isL1ButtonPressed()) { //TODO || _vm->isL2ButtonPressed()) {
|
if (_vm->isL1ButtonPressed()) { //TODO || _vm->isL2ButtonPressed()) {
|
||||||
local_27a = local_27a + 4;
|
local_27a = local_27a + 4;
|
||||||
}
|
}
|
||||||
if (FUN_80093990()) {
|
if (fun_80093990()) {
|
||||||
if (param_1 == 1) {
|
if (param_1 == 1) {
|
||||||
local_278 = local_278 + 4;
|
local_278 = local_278 + 4;
|
||||||
}
|
}
|
||||||
|
@ -713,7 +713,7 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
local_278 = local_278 + 6;
|
local_278 = local_278 + 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (FUN_80093a30()) {
|
if (fun_80093a30()) {
|
||||||
if (param_1 == 1) {
|
if (param_1 == 1) {
|
||||||
local_278 = local_278 + 4;
|
local_278 = local_278 + 4;
|
||||||
}
|
}
|
||||||
|
@ -736,29 +736,29 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
if (local_258 == 1) {
|
if (local_258 == 1) {
|
||||||
// playSoundFromTxtIndex(DAT_80063ad8);
|
// playSoundFromTxtIndex(DAT_80063ad8);
|
||||||
loungealotHeadActor->updateSequence(0xb);
|
loungealotHeadActor->updateSequence(0xb);
|
||||||
FUN_80093aec_dialog(0x475E,0x14,1);
|
fun_80093aec_dialog(0x475E,0x14,1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// playSoundFromTxtIndex(DAT_80063adc);
|
// playSoundFromTxtIndex(DAT_80063adc);
|
||||||
loungealotHeadActor->updateSequence(0xc);
|
loungealotHeadActor->updateSequence(0xc);
|
||||||
FUN_80093aec_dialog(0x4774,0x14,1);
|
fun_80093aec_dialog(0x4774,0x14,1);
|
||||||
}
|
}
|
||||||
local_258 = 0;
|
local_258 = 0;
|
||||||
DAT_80093cb4 = 2;
|
_dat_80093cb4 = 2;
|
||||||
DAT_80093cbc = 1;
|
_dat_80093cbc = 1;
|
||||||
DAT_80093cb8 = 0;
|
_dat_80093cb8 = 0;
|
||||||
DAT_80093cc0 = 1;
|
_dat_80093cc0 = 1;
|
||||||
uVar12->_flags = uVar12->_flags & 0xfbff;
|
uVar12->_flags = uVar12->_flags & 0xfbff;
|
||||||
uVar13->_flags = uVar13->_flags & 0xfbff;
|
uVar13->_flags = uVar13->_flags & 0xfbff;
|
||||||
flickerArm->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb4 * 3 + (uint)DAT_80093cbc]);
|
flickerArm->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb4 * 3 + (uint)_dat_80093cbc]);
|
||||||
loungealotThumb->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb4 * 3 + (uint)DAT_80093cbc]);
|
loungealotThumb->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb4 * 3 + (uint)_dat_80093cbc]);
|
||||||
uVar12->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb8 * 3 + (uint)DAT_80093cc0]);
|
uVar12->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb8 * 3 + (uint)_dat_80093cc0]);
|
||||||
uVar13->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)DAT_80093cb8 * 3 + (uint)DAT_80093cc0]);
|
uVar13->updateSequence((uint)(uint16)actorSequenceIdTbl[(uint)_dat_80093cb8 * 3 + (uint)_dat_80093cc0]);
|
||||||
DAT_80093c94 = 0;
|
_dat_80093c94 = 0;
|
||||||
local_26c = 0x1e;
|
local_26c = 0x1e;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DAT_80093c94 = 2;
|
_dat_80093c94 = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -766,72 +766,72 @@ void Minigame2::run(int16 param_1, uint16 param_2, int16 param_3) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Minigame2::FUN_80093aec_dialog(uint32 textId, int16 x, int16 y) {
|
void Minigame2::fun_80093aec_dialog(uint32 textId, int16 x, int16 y) {
|
||||||
uint16 auStack4024 [2000];
|
uint16 auStack4024 [2000];
|
||||||
//TODO
|
//TODO
|
||||||
// if ((((DAT_8008e7e8_dialogBox_x1 != 0) || (DAT_8008e848_dialogBox_x2 != 0)) ||
|
// if ((((_dat_8008e7e8_dialogBox_x1 != 0) || (_dat_8008e848_dialogBox_x2 != 0)) ||
|
||||||
// (DAT_8008e844_dialogBox_y1 != 0)) || (DAT_8008e874_dialogBox_y2 != 0)) {
|
// (_dat_8008e844_dialogBox_y1 != 0)) || (_dat_8008e874_dialogBox_y2 != 0)) {
|
||||||
// _vm->_talk->FUN_8001a7c4((uint)DAT_8008e7e8_dialogBox_x1,(uint)DAT_8008e844_dialogBox_y1,
|
// _vm->_talk->FUN_8001a7c4((uint)_dat_8008e7e8_dialogBox_x1,(uint)_dat_8008e844_dialogBox_y1,
|
||||||
// (uint)DAT_8008e848_dialogBox_x2,(uint)DAT_8008e874_dialogBox_y2);
|
// (uint)_dat_8008e848_dialogBox_x2,(uint)_dat_8008e874_dialogBox_y2);
|
||||||
// }
|
// }
|
||||||
_vm->_talk->loadText(textId, auStack4024, 2000);
|
_vm->_talk->loadText(textId, auStack4024, 2000);
|
||||||
_vm->_talk->displayDialogAroundPoint(auStack4024, x, y, 0, 0, textId);
|
_vm->_talk->displayDialogAroundPoint(auStack4024, x, y, 0, 0, textId);
|
||||||
DAT_80093c9c = 1;
|
_dat_80093c9c = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Minigame2::FUN_80093520() {
|
bool Minigame2::fun_80093520() {
|
||||||
bool uVar2;
|
bool uVar2;
|
||||||
|
|
||||||
if (DAT_80093ca0 == 0) {
|
if (_dat_80093ca0 == 0) {
|
||||||
if (!DAT_80093c70) {
|
if (!_dat_80093c70) {
|
||||||
if (!DAT_80093c72 || (3 < DAT_80093cb8)) {
|
if (!_dat_80093c72 || (3 < _dat_80093cb8)) {
|
||||||
DAT_80093c72 = false;
|
_dat_80093c72 = false;
|
||||||
DAT_80093c74 = DAT_80093c74 + 1;
|
_dat_80093c74 = _dat_80093c74 + 1;
|
||||||
if (DAT_80093c74 < 2) {
|
if (_dat_80093c74 < 2) {
|
||||||
DAT_80093c70 = true;
|
_dat_80093c70 = true;
|
||||||
DAT_80093cac = 0;
|
_dat_80093cac = 0;
|
||||||
uVar2 = false;
|
uVar2 = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (DAT_80093ca4 == 0) {
|
if (_dat_80093ca4 == 0) {
|
||||||
DAT_80093cac = 0;
|
_dat_80093cac = 0;
|
||||||
if (DAT_80093cb8 == DAT_80093cb4) {
|
if (_dat_80093cb8 == _dat_80093cb4) {
|
||||||
if (DAT_80093cbc < DAT_80093cc0) {
|
if (_dat_80093cbc < _dat_80093cc0) {
|
||||||
DAT_80093cac = (uint16)(DAT_80093cb8 < 4);
|
_dat_80093cac = (uint16)(_dat_80093cb8 < 4);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!DAT_80093cb0 && _vm->getRand(8) < 3) {
|
if (!_dat_80093cb0 && _vm->getRand(8) < 3) {
|
||||||
if (_vm->getRand(8) < 3) {
|
if (_vm->getRand(8) < 3) {
|
||||||
DAT_80093c72 = 1;
|
_dat_80093c72 = 1;
|
||||||
DAT_80093c74 = 0;
|
_dat_80093c74 = 0;
|
||||||
DAT_80093cac = 1;
|
_dat_80093cac = 1;
|
||||||
} else {
|
} else {
|
||||||
DAT_80093ca4 = DAT_80093cc8 + _vm->getRand(10);
|
_dat_80093ca4 = _dat_80093cc8 + _vm->getRand(10);
|
||||||
DAT_80093cac = 1;
|
_dat_80093cac = 1;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (DAT_80093cb4 == 4) {
|
if (_dat_80093cb4 == 4) {
|
||||||
DAT_80093cac = 1;
|
_dat_80093cac = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((DAT_80093cb8 < DAT_80093cb4) && (DAT_80093cb4 != 2)) {
|
if ((_dat_80093cb8 < _dat_80093cb4) && (_dat_80093cb4 != 2)) {
|
||||||
DAT_80093cac = 1;
|
_dat_80093cac = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uVar2 = (uint)DAT_80093cac;
|
uVar2 = (uint)_dat_80093cac;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DAT_80093cac = 1;
|
_dat_80093cac = 1;
|
||||||
uVar2 = true;
|
uVar2 = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DAT_80093cac = 0;
|
_dat_80093cac = 0;
|
||||||
uVar2 = false;
|
uVar2 = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -841,60 +841,60 @@ bool Minigame2::FUN_80093520() {
|
||||||
return uVar2;
|
return uVar2;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Minigame2::FUN_80093248() {
|
bool Minigame2::fun_80093248() {
|
||||||
bool uVar2;
|
bool uVar2;
|
||||||
|
|
||||||
if (DAT_80093ca0 == 0) {
|
if (_dat_80093ca0 == 0) {
|
||||||
if (!DAT_80093c72) {
|
if (!_dat_80093c72) {
|
||||||
if (!DAT_80093c70 || (DAT_80093cb8 == 0)) {
|
if (!_dat_80093c70 || (_dat_80093cb8 == 0)) {
|
||||||
DAT_80093c70 = false;
|
_dat_80093c70 = false;
|
||||||
DAT_80093c74 = DAT_80093c74 + 1;
|
_dat_80093c74 = _dat_80093c74 + 1;
|
||||||
if (DAT_80093c74 < 2) {
|
if (_dat_80093c74 < 2) {
|
||||||
DAT_80093c72 = true;
|
_dat_80093c72 = true;
|
||||||
DAT_80093cb0 = false;
|
_dat_80093cb0 = false;
|
||||||
uVar2 = false;
|
uVar2 = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (DAT_80093ca4 == 0) {
|
if (_dat_80093ca4 == 0) {
|
||||||
DAT_80093cb0 = false;
|
_dat_80093cb0 = false;
|
||||||
if (DAT_80093cb8 == DAT_80093cb4) {
|
if (_dat_80093cb8 == _dat_80093cb4) {
|
||||||
if (DAT_80093cbc < DAT_80093cc0) {
|
if (_dat_80093cbc < _dat_80093cc0) {
|
||||||
DAT_80093cb0 = (bool)(DAT_80093cb8 != 0);
|
_dat_80093cb0 = (bool)(_dat_80093cb8 != 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((DAT_80093cac == 0) && _vm->getRand(8) < 3) {
|
if ((_dat_80093cac == 0) && _vm->getRand(8) < 3) {
|
||||||
if (_vm->getRand(8) < 3) {
|
if (_vm->getRand(8) < 3) {
|
||||||
DAT_80093c70 = true;
|
_dat_80093c70 = true;
|
||||||
DAT_80093c74 = 0;
|
_dat_80093c74 = 0;
|
||||||
DAT_80093cb0 = true;
|
_dat_80093cb0 = true;
|
||||||
} else {
|
} else {
|
||||||
DAT_80093ca4 = DAT_80093cc8 + _vm->getRand(10);
|
_dat_80093ca4 = _dat_80093cc8 + _vm->getRand(10);
|
||||||
DAT_80093cb0 = true;
|
_dat_80093cb0 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (DAT_80093cb4 == 0) {
|
if (_dat_80093cb4 == 0) {
|
||||||
DAT_80093cb0 = true;
|
_dat_80093cb0 = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((DAT_80093cb4 < DAT_80093cb8) && (DAT_80093cb4 != 2)) {
|
if ((_dat_80093cb4 < _dat_80093cb8) && (_dat_80093cb4 != 2)) {
|
||||||
DAT_80093cb0 = true;
|
_dat_80093cb0 = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uVar2 = DAT_80093cb0;
|
uVar2 = _dat_80093cb0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DAT_80093cb0 = true;
|
_dat_80093cb0 = true;
|
||||||
uVar2 = true;
|
uVar2 = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DAT_80093cb0 = false;
|
_dat_80093cb0 = false;
|
||||||
uVar2 = false;
|
uVar2 = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -904,24 +904,24 @@ bool Minigame2::FUN_80093248() {
|
||||||
return uVar2;
|
return uVar2;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Minigame2::FUN_80093800() {
|
bool Minigame2::fun_80093800() {
|
||||||
bool uVar2;
|
bool uVar2;
|
||||||
|
|
||||||
if (DAT_80093ca0 == 0) {
|
if (_dat_80093ca0 == 0) {
|
||||||
if (DAT_80093ca4 == 0) {
|
if (_dat_80093ca4 == 0) {
|
||||||
DAT_80093ca8 = false;
|
_dat_80093ca8 = false;
|
||||||
if ((DAT_80093cb8 == DAT_80093cb4) && (DAT_80093cc0 < DAT_80093cbc)) {
|
if ((_dat_80093cb8 == _dat_80093cb4) && (_dat_80093cc0 < _dat_80093cbc)) {
|
||||||
DAT_80093ca8 = true;
|
_dat_80093ca8 = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (_vm->getRand(8) < 3) {
|
if (_vm->getRand(8) < 3) {
|
||||||
DAT_80093ca4 = _vm->getRand(10);
|
_dat_80093ca4 = _vm->getRand(10);
|
||||||
DAT_80093ca4 = DAT_80093cc8 + DAT_80093ca4;
|
_dat_80093ca4 = _dat_80093cc8 + _dat_80093ca4;
|
||||||
DAT_80093ca8 = true;
|
_dat_80093ca8 = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uVar2 = DAT_80093ca8;
|
uVar2 = _dat_80093ca8;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uVar2 = false;
|
uVar2 = false;
|
||||||
|
@ -934,11 +934,11 @@ bool Minigame2::FUN_80093800() {
|
||||||
return uVar2;
|
return uVar2;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Minigame2::FUN_80093a30() {
|
bool Minigame2::fun_80093a30() {
|
||||||
bool uVar1;
|
bool uVar1;
|
||||||
|
|
||||||
if (DAT_80093ca0 == 0) {
|
if (_dat_80093ca0 == 0) {
|
||||||
uVar1 = (uint) DAT_80093c90 == (uint) DAT_80093cc8 / 3;
|
uVar1 = (uint) _dat_80093c90 == (uint) _dat_80093cc8 / 3;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uVar1 = _vm->isL1ButtonPressed(); // TODO || _vm->isL2ButtonPressed();
|
uVar1 = _vm->isL1ButtonPressed(); // TODO || _vm->isL2ButtonPressed();
|
||||||
|
@ -946,11 +946,11 @@ bool Minigame2::FUN_80093a30() {
|
||||||
return uVar1;
|
return uVar1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Minigame2::FUN_80093990() {
|
bool Minigame2::fun_80093990() {
|
||||||
bool uVar1;
|
bool uVar1;
|
||||||
|
|
||||||
if (DAT_80093ca0 == 0) {
|
if (_dat_80093ca0 == 0) {
|
||||||
uVar1 = DAT_80093c90 == 0;
|
uVar1 = _dat_80093c90 == 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uVar1 = _vm->isR1ButtonPressed(); // TODO || _vm->isR2ButtonPressed();
|
uVar1 = _vm->isR1ButtonPressed(); // TODO || _vm->isR2ButtonPressed();
|
||||||
|
|
|
@ -31,39 +31,39 @@ class DragonsEngine;
|
||||||
class Minigame2 {
|
class Minigame2 {
|
||||||
private:
|
private:
|
||||||
DragonsEngine *_vm;
|
DragonsEngine *_vm;
|
||||||
uint16 DAT_80093cb4;
|
uint16 _dat_80093cb4;
|
||||||
uint16 DAT_80093cbc;
|
uint16 _dat_80093cbc;
|
||||||
uint16 DAT_80093cb8;
|
uint16 _dat_80093cb8;
|
||||||
uint16 DAT_80093cc0;
|
uint16 _dat_80093cc0;
|
||||||
|
|
||||||
uint16 DAT_80093ca4;
|
uint16 _dat_80093ca4;
|
||||||
uint16 DAT_80093c90;
|
uint16 _dat_80093c90;
|
||||||
uint16 DAT_80093c94;
|
uint16 _dat_80093c94;
|
||||||
|
|
||||||
uint16 DAT_80093cac;
|
uint16 _dat_80093cac;
|
||||||
bool DAT_80093cb0;
|
bool _dat_80093cb0;
|
||||||
uint16 DAT_80093c9c;
|
uint16 _dat_80093c9c;
|
||||||
|
|
||||||
uint16 DAT_80093c98;
|
uint16 _dat_80093c98;
|
||||||
uint16 DAT_80093ca0;
|
uint16 _dat_80093ca0;
|
||||||
uint16 DAT_80093cc4;
|
uint16 _dat_80093cc4;
|
||||||
uint16 DAT_80093cc8;
|
uint16 _dat_80093cc8;
|
||||||
|
|
||||||
bool DAT_80093c70;
|
bool _dat_80093c70;
|
||||||
bool DAT_80093c72;
|
bool _dat_80093c72;
|
||||||
uint16 DAT_80093c74;
|
uint16 _dat_80093c74;
|
||||||
bool DAT_80093ca8;
|
bool _dat_80093ca8;
|
||||||
public:
|
public:
|
||||||
Minigame2(DragonsEngine *vm);
|
Minigame2(DragonsEngine *vm);
|
||||||
|
|
||||||
void run(int16 param_1, uint16 param_2, int16 param_3);
|
void run(int16 param_1, uint16 param_2, int16 param_3);
|
||||||
private:
|
private:
|
||||||
void FUN_80093aec_dialog(uint32 textId, int16 x, int16 y);
|
void fun_80093aec_dialog(uint32 textId, int16 x, int16 y);
|
||||||
bool FUN_80093520();
|
bool fun_80093520();
|
||||||
bool FUN_80093a30();
|
bool fun_80093a30();
|
||||||
bool FUN_80093248();
|
bool fun_80093248();
|
||||||
bool FUN_80093800();
|
bool fun_80093800();
|
||||||
bool FUN_80093990();
|
bool fun_80093990();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End of namespace Dragons
|
} // End of namespace Dragons
|
||||||
|
|
|
@ -184,7 +184,7 @@ void Minigame3::run() {
|
||||||
_vm->_screen->loadPalette(1, _vm->_scene->getPalette());
|
_vm->_screen->loadPalette(1, _vm->_scene->getPalette());
|
||||||
_vm->_screen->loadPalette(4, _vm->_scene->getPalette());
|
_vm->_screen->loadPalette(4, _vm->_scene->getPalette());
|
||||||
_vm->_screen->updatePaletteTransparency(4, 1, 0xff, true);
|
_vm->_screen->updatePaletteTransparency(4, 1, 0xff, true);
|
||||||
FUN_80017ef0();
|
fun_80017ef0();
|
||||||
oldEngineFlags = _vm->getAllFlags();
|
oldEngineFlags = _vm->getAllFlags();
|
||||||
_vm->clearFlags(ENGINE_FLAG_80);
|
_vm->clearFlags(ENGINE_FLAG_80);
|
||||||
_vm->clearFlags(ENGINE_FLAG_20);
|
_vm->clearFlags(ENGINE_FLAG_20);
|
||||||
|
@ -558,7 +558,7 @@ void Minigame3::run() {
|
||||||
local_1e0 = 0;
|
local_1e0 = 0;
|
||||||
local_1de = 0;
|
local_1de = 0;
|
||||||
local_1e8 = 0;
|
local_1e8 = 0;
|
||||||
FUN_80017f70_paletteRelated(0);
|
fun_80017f70_paletteRelated(0);
|
||||||
local_1b8 = 0;
|
local_1b8 = 0;
|
||||||
flags = (flags & 0xfffd) | 4;
|
flags = (flags & 0xfffd) | 4;
|
||||||
local_1c8 = 2;
|
local_1c8 = 2;
|
||||||
|
@ -615,7 +615,7 @@ void Minigame3::run() {
|
||||||
if (((uint)local_210 % 10 == 0) && (0x1d < local_210)) {
|
if (((uint)local_210 % 10 == 0) && (0x1d < local_210)) {
|
||||||
if ((int16)local_1b8 < 0x1e) {
|
if ((int16)local_1b8 < 0x1e) {
|
||||||
local_1b8 = local_1b8 + 1;
|
local_1b8 = local_1b8 + 1;
|
||||||
FUN_80017f70_paletteRelated((uint)local_1b8);
|
fun_80017f70_paletteRelated((uint)local_1b8);
|
||||||
}
|
}
|
||||||
if (100 < tearBlinkActorTbl[0]->_y_pos) {
|
if (100 < tearBlinkActorTbl[0]->_y_pos) {
|
||||||
tearBlinkActorTbl[0]->_y_pos = tearBlinkActorTbl[0]->_y_pos + -3;
|
tearBlinkActorTbl[0]->_y_pos = tearBlinkActorTbl[0]->_y_pos + -3;
|
||||||
|
@ -678,7 +678,7 @@ void Minigame3::run() {
|
||||||
if ((int16)local_1b8 < 0) {
|
if ((int16)local_1b8 < 0) {
|
||||||
local_1b8 = 0;
|
local_1b8 = 0;
|
||||||
}
|
}
|
||||||
FUN_80017f70_paletteRelated((uint)local_1b8);
|
fun_80017f70_paletteRelated((uint)local_1b8);
|
||||||
tearBlinkActorTbl[0]->_y_pos = tearBlinkActorTbl[0]->_y_pos + 0x1e;
|
tearBlinkActorTbl[0]->_y_pos = tearBlinkActorTbl[0]->_y_pos + 0x1e;
|
||||||
if (199 < tearBlinkActorTbl[0]->_y_pos) {
|
if (199 < tearBlinkActorTbl[0]->_y_pos) {
|
||||||
tearBlinkActorTbl[0]->_y_pos = 199;
|
tearBlinkActorTbl[0]->_y_pos = 199;
|
||||||
|
@ -753,7 +753,7 @@ void Minigame3::run() {
|
||||||
_vm->waitForFrames(0x3c * 2);
|
_vm->waitForFrames(0x3c * 2);
|
||||||
_vm->_sound->PauseCDMusic();
|
_vm->_sound->PauseCDMusic();
|
||||||
// fade_related_calls_with_1f();
|
// fade_related_calls_with_1f();
|
||||||
// FUN_80017f28_noop();
|
// fun_80017f28_noop();
|
||||||
// DAT_80093234 = DAT_80093234 + 1;
|
// DAT_80093234 = DAT_80093234 + 1;
|
||||||
_vm->_dragonINIResource->setFlickerRecord(flicker);
|
_vm->_dragonINIResource->setFlickerRecord(flicker);
|
||||||
flicker->sceneId = 1;
|
flicker->sceneId = 1;
|
||||||
|
@ -774,7 +774,7 @@ void Minigame3::updateBackgroundLayerOffset(uint32 layerNumber, int16 xOffset, i
|
||||||
_vm->_scene->setLayerOffset(layerNumber, Common::Point(xOffset, yOffset));
|
_vm->_scene->setLayerOffset(layerNumber, Common::Point(xOffset, yOffset));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Minigame3::FUN_80017f70_paletteRelated(uint16 param_1) {
|
void Minigame3::fun_80017f70_paletteRelated(uint16 param_1) {
|
||||||
if (param_1 > 0x1f) {
|
if (param_1 > 0x1f) {
|
||||||
param_1 = 0x1f;
|
param_1 = 0x1f;
|
||||||
}
|
}
|
||||||
|
@ -789,10 +789,10 @@ void Minigame3::FUN_80017f70_paletteRelated(uint16 param_1) {
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
void Minigame3::FUN_80017ef0() {
|
void Minigame3::fun_80017ef0() {
|
||||||
//TODO BgLayerGsSprite[2].attribute = BgLayerGsSprite[2].attribute | 0x50000000;
|
//TODO BgLayerGsSprite[2].attribute = BgLayerGsSprite[2].attribute | 0x50000000;
|
||||||
// this sets the FG layer to additive colour blending (100% x Back + 100% x Sprite)
|
// this sets the FG layer to additive colour blending (100% x Back + 100% x Sprite)
|
||||||
FUN_80017f70_paletteRelated(0);
|
fun_80017f70_paletteRelated(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End of namespace Dragons
|
} // End of namespace Dragons
|
||||||
|
|
|
@ -35,8 +35,8 @@ public:
|
||||||
void run();
|
void run();
|
||||||
private:
|
private:
|
||||||
void updateBackgroundLayerOffset(uint32 layerNumber, int16 xOffset, int16 yOffset);
|
void updateBackgroundLayerOffset(uint32 layerNumber, int16 xOffset, int16 yOffset);
|
||||||
void FUN_80017f70_paletteRelated(uint16 unk);
|
void fun_80017f70_paletteRelated(uint16 unk);
|
||||||
void FUN_80017ef0();
|
void fun_80017ef0();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -65,29 +65,29 @@ void Minigame4::run() {
|
||||||
_vm->_videoFlags |= 4;
|
_vm->_videoFlags |= 4;
|
||||||
_vm->_scene->setBgLayerPriority(2);
|
_vm->_scene->setBgLayerPriority(2);
|
||||||
_vm->_scene->setMgLayerPriority(1);
|
_vm->_scene->setMgLayerPriority(1);
|
||||||
flickerActor = _vm->_actorManager->loadActor(0x18,0,0xcb,0x79,1);
|
_flickerActor = _vm->_actorManager->loadActor(0x18,0,0xcb,0x79,1);
|
||||||
bruteActor = _vm->_actorManager->loadActor(0x17,0,0x68,0x7b,1);
|
_bruteActor = _vm->_actorManager->loadActor(0x17,0,0x68,0x7b,1);
|
||||||
ps1ControllerActor = _vm->_actorManager->loadActor(0x17,0x16,0x9f,0x19,1);
|
_ps1ControllerActor = _vm->_actorManager->loadActor(0x17,0x16,0x9f,0x19,1);
|
||||||
DAT_80090438 = _vm->_actorManager->loadActor(0x17,0xb,400,400,1);
|
_dat_80090438 = _vm->_actorManager->loadActor(0x17,0xb,400,400,1);
|
||||||
DAT_8009043c = _vm->_actorManager->loadActor(0x17,0xb,400,400,1);
|
_dat_8009043c = _vm->_actorManager->loadActor(0x17,0xb,400,400,1);
|
||||||
//EnableVSyncEvent();
|
//EnableVSyncEvent();
|
||||||
flickerActor->setFlag(ACTOR_FLAG_80);
|
_flickerActor->setFlag(ACTOR_FLAG_80);
|
||||||
flickerActor->setFlag(ACTOR_FLAG_100);
|
_flickerActor->setFlag(ACTOR_FLAG_100);
|
||||||
flickerActor->setFlag(ACTOR_FLAG_200);
|
_flickerActor->setFlag(ACTOR_FLAG_200);
|
||||||
flickerActor->_priorityLayer = 3;
|
_flickerActor->_priorityLayer = 3;
|
||||||
bruteActor->setFlag(ACTOR_FLAG_80);
|
_bruteActor->setFlag(ACTOR_FLAG_80);
|
||||||
bruteActor->setFlag(ACTOR_FLAG_100);
|
_bruteActor->setFlag(ACTOR_FLAG_100);
|
||||||
bruteActor->setFlag(ACTOR_FLAG_200);
|
_bruteActor->setFlag(ACTOR_FLAG_200);
|
||||||
bruteActor->_priorityLayer = 3;
|
_bruteActor->_priorityLayer = 3;
|
||||||
//DAT_800830e0_soundRelated = 0xf;
|
//DAT_800830e0_soundRelated = 0xf;
|
||||||
//UnkSoundFunc5(0xf);
|
//UnkSoundFunc5(0xf);
|
||||||
//call_fade_related_1f();
|
//call_fade_related_1f();
|
||||||
if (_vm->_dragonINIResource->getRecord(0x1f5)->field_12 == 3) {
|
if (_vm->_dragonINIResource->getRecord(0x1f5)->field_12 == 3) {
|
||||||
actorTalk(bruteActor,0x3321,0x4A84);
|
actorTalk(_bruteActor,0x3321,0x4A84);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
actorTalk(bruteActor,0x3321,0x49A2);
|
actorTalk(_bruteActor,0x3321,0x49A2);
|
||||||
actorTalk(flickerActor,0,0x4A56);
|
actorTalk(_flickerActor,0,0x4A56);
|
||||||
}
|
}
|
||||||
result = runDanceBattle();
|
result = runDanceBattle();
|
||||||
/* field_0x12 */
|
/* field_0x12 */
|
||||||
|
@ -118,20 +118,20 @@ void Minigame4::run() {
|
||||||
void Minigame4::actorTalk(Actor *actorId,uint16 param_2,uint32 textIndex)
|
void Minigame4::actorTalk(Actor *actorId,uint16 param_2,uint32 textIndex)
|
||||||
{
|
{
|
||||||
actorId->waitUntilFlag8SetThenSet1000AndWaitFor4();
|
actorId->waitUntilFlag8SetThenSet1000AndWaitFor4();
|
||||||
if (actorId == bruteActor) {
|
if (actorId == _bruteActor) {
|
||||||
bruteActor->updateSequence(9);
|
_bruteActor->updateSequence(9);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
flickerActor->updateSequence(9);
|
_flickerActor->updateSequence(9);
|
||||||
}
|
}
|
||||||
|
|
||||||
actorDialog(actorId, (uint)param_2, textIndex);
|
actorDialog(actorId, (uint)param_2, textIndex);
|
||||||
actorId->waitUntilFlag8SetThenSet1000AndWaitFor4();
|
actorId->waitUntilFlag8SetThenSet1000AndWaitFor4();
|
||||||
if (actorId == bruteActor) {
|
if (actorId == _bruteActor) {
|
||||||
bruteActor->updateSequence(0);
|
_bruteActor->updateSequence(0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
flickerActor->updateSequence(0);
|
_flickerActor->updateSequence(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,38 +180,38 @@ uint16 Minigame4::runDanceBattle() {
|
||||||
currentStep = 0;
|
currentStep = 0;
|
||||||
while (currentStep < 0xc) {
|
while (currentStep < 0xc) {
|
||||||
if (singleDanceRound(round1StepPositionTbl[(uint)currentStep], round1DurationTbl[(uint)currentStep])) {
|
if (singleDanceRound(round1StepPositionTbl[(uint)currentStep], round1DurationTbl[(uint)currentStep])) {
|
||||||
actorTalk(bruteActor,0x3321, 0x4D50);
|
actorTalk(_bruteActor,0x3321, 0x4D50);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
currentStep = currentStep + 1;
|
currentStep = currentStep + 1;
|
||||||
}
|
}
|
||||||
resetActors();
|
resetActors();
|
||||||
actorTalk(bruteActor,0x3321, 0x4ADE);
|
actorTalk(_bruteActor,0x3321, 0x4ADE);
|
||||||
currentStep = 0;
|
currentStep = 0;
|
||||||
while (currentStep < 0xc) {
|
while (currentStep < 0xc) {
|
||||||
if (singleDanceRound(round2StepPositionTbl[(uint)currentStep], round2DurationTbl[(uint)currentStep])) {
|
if (singleDanceRound(round2StepPositionTbl[(uint)currentStep], round2DurationTbl[(uint)currentStep])) {
|
||||||
actorTalk(bruteActor,0x3321,0x4DD4);
|
actorTalk(_bruteActor,0x3321,0x4DD4);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
currentStep = currentStep + 1;
|
currentStep = currentStep + 1;
|
||||||
}
|
}
|
||||||
resetActors();
|
resetActors();
|
||||||
actorTalk(bruteActor,0x3321, 0x4B6A);
|
actorTalk(_bruteActor,0x3321, 0x4B6A);
|
||||||
currentStep = 0;
|
currentStep = 0;
|
||||||
while ( true ) {
|
while ( true ) {
|
||||||
if (0x11 < currentStep) {
|
if (0x11 < currentStep) {
|
||||||
_vm->_talk->loadText(0x4C0C, auStack2192, 1000);
|
_vm->_talk->loadText(0x4C0C, auStack2192, 1000);
|
||||||
_vm->_talk->displayDialogAroundPoint(auStack2192, 0x27,0xc,0x3321,0,0x4C0C);
|
_vm->_talk->displayDialogAroundPoint(auStack2192, 0x27,0xc,0x3321,0,0x4C0C);
|
||||||
_vm->waitForFrames(0x10a);
|
_vm->waitForFrames(0x10a);
|
||||||
bruteActor->updateSequence(8);
|
_bruteActor->updateSequence(8);
|
||||||
//TODO
|
//TODO
|
||||||
// if ((((DAT_8008e7e8 != 0) || (DAT_8008e848 != 0)) || (DAT_8008e844 != 0)) ||
|
// if ((((DAT_8008e7e8 != 0) || (DAT_8008e848 != 0)) || (DAT_8008e844 != 0)) ||
|
||||||
// (DAT_8008e874 != 0)) {
|
// (DAT_8008e874 != 0)) {
|
||||||
// FUN_8001a7c4((uint)DAT_8008e7e8,(uint)DAT_8008e844,(uint)DAT_8008e848,(uint)DAT_8008e874);
|
// FUN_8001a7c4((uint)DAT_8008e7e8,(uint)DAT_8008e844,(uint)DAT_8008e848,(uint)DAT_8008e874);
|
||||||
// }
|
// }
|
||||||
flickerActor->waitUntilFlag8SetThenSet1000AndWaitFor4();
|
_flickerActor->waitUntilFlag8SetThenSet1000AndWaitFor4();
|
||||||
flickerActor->updateSequence(7);
|
_flickerActor->updateSequence(7);
|
||||||
actorTalk(flickerActor,0, 0x4CC8);
|
actorTalk(_flickerActor,0, 0x4CC8);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ uint16 Minigame4::runDanceBattle() {
|
||||||
}
|
}
|
||||||
currentStep = currentStep + 1;
|
currentStep = currentStep + 1;
|
||||||
}
|
}
|
||||||
actorTalk(bruteActor,0x3321, 0x4DEE);
|
actorTalk(_bruteActor,0x3321, 0x4DEE);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,91 +231,91 @@ const static uint16 uint16_t_ARRAY_80090400[6] = { 0x1A, 0x1B, 0x1C, 0x1D, 0x1E,
|
||||||
const static uint16 uint16_t_ARRAY_800903e8[6] = { 1, 2, 3, 4, 5, 6 };
|
const static uint16 uint16_t_ARRAY_800903e8[6] = { 1, 2, 3, 4, 5, 6 };
|
||||||
|
|
||||||
uint16 Minigame4::singleDanceRound(uint16 currentDancePosition, uint16 duration) {
|
uint16 Minigame4::singleDanceRound(uint16 currentDancePosition, uint16 duration) {
|
||||||
DAT_80090438->_x_pos = xDancePosTbl[(uint)currentDancePosition];
|
_dat_80090438->_x_pos = xDancePosTbl[(uint)currentDancePosition];
|
||||||
DAT_80090438->_y_pos = yDancePosTbl[(uint)currentDancePosition];
|
_dat_80090438->_y_pos = yDancePosTbl[(uint)currentDancePosition];
|
||||||
DAT_80090438->updateSequence(10);
|
_dat_80090438->updateSequence(10);
|
||||||
ps1ControllerActor->updateSequence(uint16_t_ARRAY_80090400[(uint)currentDancePosition]);
|
_ps1ControllerActor->updateSequence(uint16_t_ARRAY_80090400[(uint)currentDancePosition]);
|
||||||
bruteActor->updateSequence(uint16_t_ARRAY_800903e8[(uint)currentDancePosition]);
|
_bruteActor->updateSequence(uint16_t_ARRAY_800903e8[(uint)currentDancePosition]);
|
||||||
while ((flickerActor->_sequenceID != uint16_t_ARRAY_800903e8[(uint)currentDancePosition] &&
|
while ((_flickerActor->_sequenceID != uint16_t_ARRAY_800903e8[(uint)currentDancePosition] &&
|
||||||
(duration = duration + -1, duration != 0))) {
|
(duration = duration + -1, duration != 0))) {
|
||||||
_vm->waitForFrames(1);
|
_vm->waitForFrames(1);
|
||||||
updateFlickerFromInput();
|
updateFlickerFromInput();
|
||||||
}
|
}
|
||||||
if (flickerActor->_sequenceID == uint16_t_ARRAY_800903e8[(uint)currentDancePosition]) {
|
if (_flickerActor->_sequenceID == uint16_t_ARRAY_800903e8[(uint)currentDancePosition]) {
|
||||||
while (duration = duration + -1, duration != 0) {
|
while (duration = duration + -1, duration != 0) {
|
||||||
_vm->waitForFrames(1);
|
_vm->waitForFrames(1);
|
||||||
}
|
}
|
||||||
DAT_80090438->_x_pos = xDancePosTbl[(uint)currentDancePosition];
|
_dat_80090438->_x_pos = xDancePosTbl[(uint)currentDancePosition];
|
||||||
DAT_8009043c->_x_pos = DAT_80090438->_x_pos;
|
_dat_8009043c->_x_pos = _dat_80090438->_x_pos;
|
||||||
DAT_80090438->_y_pos = yDancePosTbl[(uint)currentDancePosition];
|
_dat_80090438->_y_pos = yDancePosTbl[(uint)currentDancePosition];
|
||||||
DAT_8009043c->_y_pos = DAT_80090438->_y_pos;
|
_dat_8009043c->_y_pos = _dat_80090438->_y_pos;
|
||||||
DAT_8009043c->updateSequence(0xb);
|
_dat_8009043c->updateSequence(0xb);
|
||||||
ps1ControllerActor->updateSequence(0x16);
|
_ps1ControllerActor->updateSequence(0x16);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FUN_8009009c(1);
|
return fun_8009009c(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Minigame4::resetActors() {
|
void Minigame4::resetActors() {
|
||||||
bruteActor->waitUntilFlag8SetThenSet1000();
|
_bruteActor->waitUntilFlag8SetThenSet1000();
|
||||||
flickerActor->waitUntilFlag8SetThenSet1000();
|
_flickerActor->waitUntilFlag8SetThenSet1000();
|
||||||
while (bruteActor->_sequenceID != 0 || flickerActor->_sequenceID != 0) {
|
while (_bruteActor->_sequenceID != 0 || _flickerActor->_sequenceID != 0) {
|
||||||
_vm->waitForFrames(1);
|
_vm->waitForFrames(1);
|
||||||
if (bruteActor->_sequenceID != 0 &&
|
if (_bruteActor->_sequenceID != 0 &&
|
||||||
bruteActor->isFlagSet(ACTOR_FLAG_4) &&
|
_bruteActor->isFlagSet(ACTOR_FLAG_4) &&
|
||||||
bruteActor->isFlagSet(ACTOR_FLAG_8)) {
|
_bruteActor->isFlagSet(ACTOR_FLAG_8)) {
|
||||||
bruteActor->updateSequence(0);
|
_bruteActor->updateSequence(0);
|
||||||
}
|
}
|
||||||
if (flickerActor->_sequenceID != 0 &&
|
if (_flickerActor->_sequenceID != 0 &&
|
||||||
flickerActor->isFlagSet(ACTOR_FLAG_4) &&
|
_flickerActor->isFlagSet(ACTOR_FLAG_4) &&
|
||||||
flickerActor->isFlagSet(ACTOR_FLAG_8)) {
|
_flickerActor->isFlagSet(ACTOR_FLAG_8)) {
|
||||||
flickerActor->updateSequence(0);
|
_flickerActor->updateSequence(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Minigame4::updateFlickerFromInput() {
|
void Minigame4::updateFlickerFromInput() {
|
||||||
if (_vm->isSquareButtonPressed() && flickerActor->_sequenceID != 1) {
|
if (_vm->isSquareButtonPressed() && _flickerActor->_sequenceID != 1) {
|
||||||
flickerActor->updateSequence(1);
|
_flickerActor->updateSequence(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_vm->isCrossButtonPressed() && flickerActor->_sequenceID != 2) {
|
if (_vm->isCrossButtonPressed() && _flickerActor->_sequenceID != 2) {
|
||||||
flickerActor->updateSequence(2);
|
_flickerActor->updateSequence(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_vm->isCircleButtonPressed() && flickerActor->_sequenceID != 3) {
|
if (_vm->isCircleButtonPressed() && _flickerActor->_sequenceID != 3) {
|
||||||
flickerActor->updateSequence(3);
|
_flickerActor->updateSequence(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_vm->isTriangleButtonPressed() && flickerActor->_sequenceID != 4) {
|
if (_vm->isTriangleButtonPressed() && _flickerActor->_sequenceID != 4) {
|
||||||
flickerActor->updateSequence(4);
|
_flickerActor->updateSequence(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_vm->isR1ButtonPressed() && flickerActor->_sequenceID != 5) {
|
if (_vm->isR1ButtonPressed() && _flickerActor->_sequenceID != 5) {
|
||||||
flickerActor->updateSequence(5);
|
_flickerActor->updateSequence(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_vm->isL1ButtonPressed() && flickerActor->_sequenceID != 6) {
|
if (_vm->isL1ButtonPressed() && _flickerActor->_sequenceID != 6) {
|
||||||
flickerActor->updateSequence(6);
|
_flickerActor->updateSequence(6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 Minigame4::FUN_8009009c(uint16 unk) {
|
uint16 Minigame4::fun_8009009c(uint16 unk) {
|
||||||
resetActors();
|
resetActors();
|
||||||
if (unk == 0) {
|
if (unk == 0) {
|
||||||
bruteActor->updateSequence(8);
|
_bruteActor->updateSequence(8);
|
||||||
flickerActor->updateSequence(7);
|
_flickerActor->updateSequence(7);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bruteActor->updateSequence(7);
|
_bruteActor->updateSequence(7);
|
||||||
flickerActor->updateSequence(8);
|
_flickerActor->updateSequence(8);
|
||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
do {
|
do {
|
||||||
} while (bruteActor->isFlagSet(ACTOR_FLAG_4));
|
} while (_bruteActor->isFlagSet(ACTOR_FLAG_4));
|
||||||
|
|
||||||
} while (flickerActor->isFlagSet(ACTOR_FLAG_4));
|
} while (_flickerActor->isFlagSet(ACTOR_FLAG_4));
|
||||||
return (uint)unk;
|
return (uint)unk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,11 +34,11 @@ class Minigame4 {
|
||||||
private:
|
private:
|
||||||
DragonsEngine *_vm;
|
DragonsEngine *_vm;
|
||||||
|
|
||||||
Actor *flickerActor;
|
Actor *_flickerActor;
|
||||||
Actor *bruteActor;
|
Actor *_bruteActor;
|
||||||
Actor *ps1ControllerActor;
|
Actor *_ps1ControllerActor;
|
||||||
Actor *DAT_80090438;
|
Actor *_dat_80090438;
|
||||||
Actor *DAT_8009043c;
|
Actor *_dat_8009043c;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -54,7 +54,7 @@ private:
|
||||||
uint16 singleDanceRound(uint16 desiredPosition, uint16 duration);
|
uint16 singleDanceRound(uint16 desiredPosition, uint16 duration);
|
||||||
void resetActors();
|
void resetActors();
|
||||||
void updateFlickerFromInput();
|
void updateFlickerFromInput();
|
||||||
uint16 FUN_8009009c(uint16 unk);
|
uint16 fun_8009009c(uint16 unk);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End of namespace Dragons
|
} // End of namespace Dragons
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace Dragons {
|
||||||
#define DAT_8006391c 0x475DA
|
#define DAT_8006391c 0x475DA
|
||||||
|
|
||||||
|
|
||||||
Minigame5::Minigame5(DragonsEngine *vm) : _vm(vm), DAT_800633e6(0) {}
|
Minigame5::Minigame5(DragonsEngine *vm) : _vm(vm), _dat_800633e6(0) {}
|
||||||
|
|
||||||
void Minigame5::run() {
|
void Minigame5::run() {
|
||||||
uint16 uVar1;
|
uint16 uVar1;
|
||||||
|
@ -360,10 +360,10 @@ void Minigame5::run() {
|
||||||
pusherActor->updateSequence(9);
|
pusherActor->updateSequence(9);
|
||||||
_vm->waitForFrames(0x3c);
|
_vm->waitForFrames(0x3c);
|
||||||
pusherActor->updateSequence(0xb);
|
pusherActor->updateSequence(0xb);
|
||||||
if (DAT_800633e6 == 0) {
|
if (_dat_800633e6 == 0) {
|
||||||
_vm->_talk->loadText(DAT_8006393c,auStack2120, 1000);
|
_vm->_talk->loadText(DAT_8006393c,auStack2120, 1000);
|
||||||
_vm->_talk->displayDialogAroundPoint(auStack2120,(int)(short)(local_850 >> 3),0xc,0,1,DAT_8006393c);
|
_vm->_talk->displayDialogAroundPoint(auStack2120,(int)(short)(local_850 >> 3),0xc,0,1,DAT_8006393c);
|
||||||
DAT_800633e6 = 1;
|
_dat_800633e6 = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_vm->_talk->loadText(DAT_80063938, auStack2120, 1000);
|
_vm->_talk->loadText(DAT_80063938, auStack2120, 1000);
|
||||||
|
|
|
@ -31,7 +31,7 @@ class DragonsEngine;
|
||||||
class Minigame5 {
|
class Minigame5 {
|
||||||
private:
|
private:
|
||||||
DragonsEngine *_vm;
|
DragonsEngine *_vm;
|
||||||
uint16 DAT_800633e6;
|
uint16 _dat_800633e6;
|
||||||
public:
|
public:
|
||||||
Minigame5(DragonsEngine *vm);
|
Minigame5(DragonsEngine *vm);
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace Dragons {
|
||||||
|
|
||||||
Scene::Scene(DragonsEngine *vm, Screen *screen, ScriptOpcodes *scriptOpcodes, ActorManager *actorManager, DragonRMS *dragonRMS, DragonINIResource *dragonINIResource, BackgroundResourceLoader *backgroundResourceLoader)
|
Scene::Scene(DragonsEngine *vm, Screen *screen, ScriptOpcodes *scriptOpcodes, ActorManager *actorManager, DragonRMS *dragonRMS, DragonINIResource *dragonINIResource, BackgroundResourceLoader *backgroundResourceLoader)
|
||||||
: _vm(vm), _screen(screen), _scriptOpcodes(scriptOpcodes), _stage(0), _actorManager(actorManager), _dragonRMS(dragonRMS), _dragonINIResource(dragonINIResource), _backgroundLoader(backgroundResourceLoader) {
|
: _vm(vm), _screen(screen), _scriptOpcodes(scriptOpcodes), _stage(0), _actorManager(actorManager), _dragonRMS(dragonRMS), _dragonINIResource(dragonINIResource), _backgroundLoader(backgroundResourceLoader) {
|
||||||
data_80063392 = 2;
|
_data_80063392 = 2;
|
||||||
_data_800633ee = 0;
|
_data_800633ee = 0;
|
||||||
}
|
}
|
||||||
void Scene::loadScene(uint32 sceneId, uint32 cameraPointId) {
|
void Scene::loadScene(uint32 sceneId, uint32 cameraPointId) {
|
||||||
|
|
|
@ -42,7 +42,7 @@ struct DragonINI;
|
||||||
class Scene {
|
class Scene {
|
||||||
public:
|
public:
|
||||||
Common::Point _camera;
|
Common::Point _camera;
|
||||||
int16 data_80063392;
|
int16 _data_80063392;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DragonsEngine *_vm;
|
DragonsEngine *_vm;
|
||||||
|
|
|
@ -832,7 +832,7 @@ void ScriptOpcodes::opUnk12LoadScene(ScriptOpCall &scriptOpCall) {
|
||||||
|
|
||||||
if (newSceneID != 0) {
|
if (newSceneID != 0) {
|
||||||
// load scene here.
|
// load scene here.
|
||||||
_vm->_scene->data_80063392 = _vm->_scene->getSceneId();
|
_vm->_scene->_data_80063392 = _vm->_scene->getSceneId();
|
||||||
_vm->_scene->setSceneId(newSceneID);
|
_vm->_scene->setSceneId(newSceneID);
|
||||||
_vm->_data_800633fa = field6;
|
_vm->_data_800633fa = field6;
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ struct ScriptOpCall {
|
||||||
byte *_codeEnd;
|
byte *_codeEnd;
|
||||||
int _field8;
|
int _field8;
|
||||||
int _result;
|
int _result;
|
||||||
|
|
||||||
ScriptOpCall(byte *start, uint32 length);
|
ScriptOpCall(byte *start, uint32 length);
|
||||||
void skip(uint size);
|
void skip(uint size);
|
||||||
byte readByte();
|
byte readByte();
|
||||||
|
|
|
@ -39,6 +39,7 @@ struct OpCall {
|
||||||
int32 _deltaOfs;
|
int32 _deltaOfs;
|
||||||
byte *_code;
|
byte *_code;
|
||||||
int _result;
|
int _result;
|
||||||
|
|
||||||
void skip(uint size);
|
void skip(uint size);
|
||||||
byte readByte();
|
byte readByte();
|
||||||
int16 readSint16();
|
int16 readSint16();
|
||||||
|
|
|
@ -259,7 +259,7 @@ SoundManager::SoundManager(DragonsEngine *vm, BigfileArchive *bigFileArchive, Dr
|
||||||
: _vm(vm),
|
: _vm(vm),
|
||||||
_bigFileArchive(bigFileArchive),
|
_bigFileArchive(bigFileArchive),
|
||||||
_dragonRMS(dragonRMS) {
|
_dragonRMS(dragonRMS) {
|
||||||
DAT_8006bb60_sound_related = 0;
|
_dat_8006bb60_sound_related = 0;
|
||||||
// TODO: Set volumes
|
// TODO: Set volumes
|
||||||
SomeInitSound_FUN_8003f64c();
|
SomeInitSound_FUN_8003f64c();
|
||||||
loadMusAndGlob();
|
loadMusAndGlob();
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
void PauseCDMusic();
|
void PauseCDMusic();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
uint16 DAT_8006bb60_sound_related;
|
uint16 _dat_8006bb60_sound_related;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DragonsEngine *_vm;
|
DragonsEngine *_vm;
|
||||||
|
|
|
@ -56,8 +56,8 @@ const int16 shakeTbl[16] = {
|
||||||
|
|
||||||
SpecialOpcodes::SpecialOpcodes(DragonsEngine *vm)
|
SpecialOpcodes::SpecialOpcodes(DragonsEngine *vm)
|
||||||
: _vm(vm), _specialOpCounter(0) {
|
: _vm(vm), _specialOpCounter(0) {
|
||||||
DAT_80083148 = 0;
|
_dat_80083148 = 0;
|
||||||
uint16_t_80083154 = 0;
|
_uint16_t_80083154 = 0;
|
||||||
initOpcodes();
|
initOpcodes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,19 +324,19 @@ void SpecialOpcodes::spcFadeScreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpecialOpcodes::spcLadyOfTheLakeCapturedSceneLogic() {
|
void SpecialOpcodes::spcLadyOfTheLakeCapturedSceneLogic() {
|
||||||
DAT_80083148 = 0;
|
_dat_80083148 = 0;
|
||||||
uint16_t_80083154 = 0;
|
_uint16_t_80083154 = 0;
|
||||||
_vm->setSceneUpdateFunction(ladyOfTheLakeCapturedUpdateFunction);
|
_vm->setSceneUpdateFunction(ladyOfTheLakeCapturedUpdateFunction);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpecialOpcodes::spcStopLadyOfTheLakeCapturedSceneLogic() {
|
void SpecialOpcodes::spcStopLadyOfTheLakeCapturedSceneLogic() {
|
||||||
_vm->setSceneUpdateFunction(NULL);
|
_vm->setSceneUpdateFunction(NULL);
|
||||||
_vm->_sound->PauseCDMusic();
|
_vm->_sound->PauseCDMusic();
|
||||||
if ((DAT_80083148 != 0) || (uint16_t_80083154 != 0)) {
|
if ((_dat_80083148 != 0) || (_uint16_t_80083154 != 0)) {
|
||||||
//TODO FUN_8001ac5c((uint)DAT_80083148,(uint)DAT_80083150,(uint)uint16_t_80083154,(uint)DAT_80083158);
|
//TODO FUN_8001ac5c((uint)_dat_80083148,(uint)DAT_80083150,(uint)_uint16_t_80083154,(uint)DAT_80083158);
|
||||||
}
|
}
|
||||||
DAT_80083148 = 0;
|
_dat_80083148 = 0;
|
||||||
uint16_t_80083154 = 0;
|
_uint16_t_80083154 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpecialOpcodes::spc11ShakeScreen() {
|
void SpecialOpcodes::spc11ShakeScreen() {
|
||||||
|
@ -540,8 +540,8 @@ void SpecialOpcodes::spcFlickerSetPriority2() {
|
||||||
|
|
||||||
void SpecialOpcodes::spcMenInMinesSceneLogic() {
|
void SpecialOpcodes::spcMenInMinesSceneLogic() {
|
||||||
_vm->setSceneUpdateFunction(menInMinesSceneUpdateFunction);
|
_vm->setSceneUpdateFunction(menInMinesSceneUpdateFunction);
|
||||||
uint16_t_80083154 = 0;
|
_uint16_t_80083154 = 0;
|
||||||
DAT_80083148 = 0;
|
_dat_80083148 = 0;
|
||||||
setSpecialOpCounter(0);
|
setSpecialOpCounter(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -555,45 +555,45 @@ void SpecialOpcodes::spcStopMenInMinesSceneLogic() {
|
||||||
_vm->waitForFrames(1);
|
_vm->waitForFrames(1);
|
||||||
}
|
}
|
||||||
//TODO
|
//TODO
|
||||||
//FUN_8001ac5c((uint)DAT_80083148,(uint)DAT_80083150,(uint)uint16_t_80083154,(uint)DAT_80083158);
|
//FUN_8001ac5c((uint)_dat_80083148,(uint)DAT_80083150,(uint)_uint16_t_80083154,(uint)DAT_80083158);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpecialOpcodes::spcMonksAtBarSceneLogic() {
|
void SpecialOpcodes::spcMonksAtBarSceneLogic() {
|
||||||
setSpecialOpCounter(-1);
|
setSpecialOpCounter(-1);
|
||||||
_vm->setSceneUpdateFunction(monksAtBarSceneUpdateFunction);
|
_vm->setSceneUpdateFunction(monksAtBarSceneUpdateFunction);
|
||||||
uint16_t_80083154 = 0;
|
_uint16_t_80083154 = 0;
|
||||||
DAT_80083148 = 0;
|
_dat_80083148 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpecialOpcodes::spcStopMonksAtBarSceneLogic() {
|
void SpecialOpcodes::spcStopMonksAtBarSceneLogic() {
|
||||||
if (_vm->getSceneUpdateFunction() == monksAtBarSceneUpdateFunction) {
|
if (_vm->getSceneUpdateFunction() == monksAtBarSceneUpdateFunction) {
|
||||||
_vm->setSceneUpdateFunction(NULL);
|
_vm->setSceneUpdateFunction(NULL);
|
||||||
if ((DAT_80083148 != 0) && (uint16_t_80083154 != 0)) {
|
if ((_dat_80083148 != 0) && (_uint16_t_80083154 != 0)) {
|
||||||
//TODO FUN_8001ac5c((uint)DAT_80083148, (uint)DAT_80083150, (uint)uint16_t_80083154, (uint)DAT_80083158);
|
//TODO FUN_8001ac5c((uint)_dat_80083148, (uint)DAT_80083150, (uint)_uint16_t_80083154, (uint)DAT_80083158);
|
||||||
}
|
}
|
||||||
setSpecialOpCounter(0);
|
setSpecialOpCounter(0);
|
||||||
uint16_t_80083154 = 0;
|
_uint16_t_80083154 = 0;
|
||||||
DAT_80083148 = 0;
|
_dat_80083148 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpecialOpcodes::spcFlameBedroomEscapeSceneLogic() {
|
void SpecialOpcodes::spcFlameBedroomEscapeSceneLogic() {
|
||||||
setSpecialOpCounter(-1);
|
setSpecialOpCounter(-1);
|
||||||
if ((DAT_80083148 != 0) && (uint16_t_80083154 != 0)) {
|
if ((_dat_80083148 != 0) && (_uint16_t_80083154 != 0)) {
|
||||||
//TODO FUN_8001ac5c((uint)DAT_80083148,(uint)DAT_80083150,(uint)uint16_t_80083154,(uint)DAT_80083158);
|
//TODO FUN_8001ac5c((uint)_dat_80083148,(uint)DAT_80083150,(uint)_uint16_t_80083154,(uint)DAT_80083158);
|
||||||
}
|
}
|
||||||
_vm->setSceneUpdateFunction(flameEscapeSceneUpdateFunction);
|
_vm->setSceneUpdateFunction(flameEscapeSceneUpdateFunction);
|
||||||
uint16_t_80083154 = 0;
|
_uint16_t_80083154 = 0;
|
||||||
DAT_80083148 = 0;
|
_dat_80083148 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpecialOpcodes::spcStopFlameBedroomEscapeSceneLogic() {
|
void SpecialOpcodes::spcStopFlameBedroomEscapeSceneLogic() {
|
||||||
setSpecialOpCounter(0);
|
setSpecialOpCounter(0);
|
||||||
// TODO FUN_8001ac5c((uint)DAT_80083148,(uint)DAT_80083150,(uint)uint16_t_80083154,(uint)DAT_80083158);
|
// TODO FUN_8001ac5c((uint)_dat_80083148,(uint)DAT_80083150,(uint)_uint16_t_80083154,(uint)DAT_80083158);
|
||||||
uint16_t_80083154 = 0;
|
_uint16_t_80083154 = 0;
|
||||||
DAT_80083148 = 0;
|
_dat_80083148 = 0;
|
||||||
_vm->_dragonINIResource->getRecord(0x96)->actor->updateSequence(0);
|
_vm->_dragonINIResource->getRecord(0x96)->actor->updateSequence(0);
|
||||||
if (_vm->getSceneUpdateFunction() == flameEscapeSceneUpdateFunction) {
|
if (_vm->getSceneUpdateFunction() == flameEscapeSceneUpdateFunction) {
|
||||||
_vm->setSceneUpdateFunction(NULL);
|
_vm->setSceneUpdateFunction(NULL);
|
||||||
|
@ -615,12 +615,12 @@ void SpecialOpcodes::spcCastleMoatUpdateActorSceneScalePoints() {
|
||||||
|
|
||||||
void SpecialOpcodes::spcCastleGateMoatDrainedSceneLogic() {
|
void SpecialOpcodes::spcCastleGateMoatDrainedSceneLogic() {
|
||||||
setSpecialOpCounter(-1);
|
setSpecialOpCounter(-1);
|
||||||
if ((DAT_80083148 != 0) && (uint16_t_80083154 != 0)) {
|
if ((_dat_80083148 != 0) && (_uint16_t_80083154 != 0)) {
|
||||||
//TODO FUN_8001ac5c((uint)DAT_80083148,(uint)DAT_80083150,(uint)uint16_t_80083154,(uint)DAT_80083158);
|
//TODO FUN_8001ac5c((uint)_dat_80083148,(uint)DAT_80083150,(uint)_uint16_t_80083154,(uint)DAT_80083158);
|
||||||
}
|
}
|
||||||
_vm->setSceneUpdateFunction(moatDrainedSceneUpdateFunction);
|
_vm->setSceneUpdateFunction(moatDrainedSceneUpdateFunction);
|
||||||
uint16_t_80083154 = 0;
|
_uint16_t_80083154 = 0;
|
||||||
DAT_80083148 = 0;
|
_dat_80083148 = 0;
|
||||||
}
|
}
|
||||||
void SpecialOpcodes::spcUnk34() {
|
void SpecialOpcodes::spcUnk34() {
|
||||||
Actor *flicker = _vm->_dragonINIResource->getFlickerRecord()->actor;
|
Actor *flicker = _vm->_dragonINIResource->getFlickerRecord()->actor;
|
||||||
|
@ -1265,8 +1265,8 @@ void SpecialOpcodes::pizzaMakerStopWorking() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpecialOpcodes::clearSceneUpdateFunction() {
|
void SpecialOpcodes::clearSceneUpdateFunction() {
|
||||||
if (DAT_80083148 != uint16_t_80083154) {
|
if (_dat_80083148 != _uint16_t_80083154) {
|
||||||
//TODO FUN_8001ac5c((uint)DAT_80083148, (uint)DAT_80083150, (uint)uint16_t_80083154, (uint)DAT_80083158);
|
//TODO FUN_8001ac5c((uint)_dat_80083148, (uint)DAT_80083150, (uint)_uint16_t_80083154, (uint)DAT_80083158);
|
||||||
}
|
}
|
||||||
if (sceneUpdater.sequenceID != -1) {
|
if (sceneUpdater.sequenceID != -1) {
|
||||||
_vm->getINI(sceneUpdater.iniID)->actor->updateSequence(sceneUpdater.sequenceID);
|
_vm->getINI(sceneUpdater.iniID)->actor->updateSequence(sceneUpdater.sequenceID);
|
||||||
|
@ -1277,8 +1277,8 @@ void SpecialOpcodes::clearSceneUpdateFunction() {
|
||||||
void SpecialOpcodes::setupTableBasedSceneUpdateFunction(uint16 initialCounter, uint16 numSequences,
|
void SpecialOpcodes::setupTableBasedSceneUpdateFunction(uint16 initialCounter, uint16 numSequences,
|
||||||
uint16 sequenceDuration) {
|
uint16 sequenceDuration) {
|
||||||
sceneUpdater.sequenceID = -1;
|
sceneUpdater.sequenceID = -1;
|
||||||
uint16_t_80083154 = 0;
|
_uint16_t_80083154 = 0;
|
||||||
DAT_80083148 = 0;
|
_dat_80083148 = 0;
|
||||||
//TODO
|
//TODO
|
||||||
// DAT_80072858 = 0;
|
// DAT_80072858 = 0;
|
||||||
sceneUpdater.curSequenceIndex = 0;
|
sceneUpdater.curSequenceIndex = 0;
|
||||||
|
|
|
@ -61,8 +61,8 @@ protected:
|
||||||
SpecialOpcode *_opcodes[DRAGONS_NUM_SPECIAL_OPCODES];
|
SpecialOpcode *_opcodes[DRAGONS_NUM_SPECIAL_OPCODES];
|
||||||
Common::String _opcodeNames[DRAGONS_NUM_SPECIAL_OPCODES];
|
Common::String _opcodeNames[DRAGONS_NUM_SPECIAL_OPCODES];
|
||||||
int16 _specialOpCounter;
|
int16 _specialOpCounter;
|
||||||
uint8 DAT_80083148;
|
uint8 _dat_80083148;
|
||||||
uint16 uint16_t_80083154;
|
uint16 _uint16_t_80083154;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int16 getSpecialOpCounter();
|
int16 getSpecialOpCounter();
|
||||||
|
|
|
@ -38,14 +38,14 @@
|
||||||
namespace Dragons {
|
namespace Dragons {
|
||||||
|
|
||||||
Talk::Talk(DragonsEngine *vm, BigfileArchive *bigfileArchive): _vm(vm), _bigfileArchive(bigfileArchive) {
|
Talk::Talk(DragonsEngine *vm, BigfileArchive *bigfileArchive): _vm(vm), _bigfileArchive(bigfileArchive) {
|
||||||
DAT_800726ec_tfont_field0 = 1; //TODO source from font file
|
_dat_800726ec_tfont_field0 = 1; //TODO source from font file
|
||||||
DAT_800726f0_tfont_field2 = 1; // TODO source from font file
|
_dat_800726f0_tfont_field2 = 1; // TODO source from font file
|
||||||
}
|
}
|
||||||
|
|
||||||
void Talk::init() {
|
void Talk::init() {
|
||||||
memset(defaultResponseTbl, 0, sizeof(defaultResponseTbl));
|
memset(_defaultResponseTbl, 0, sizeof(_defaultResponseTbl));
|
||||||
initDefaultResponseTable();
|
initDefaultResponseTable();
|
||||||
DAT_800633f8_talkDialogFlag = 0;
|
_dat_800633f8_talkDialogFlag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Talk::loadText(uint32 textIndex, uint16 *textBuffer, uint16 bufferLength) {
|
bool Talk::loadText(uint32 textIndex, uint16 *textBuffer, uint16 bufferLength) {
|
||||||
|
@ -162,9 +162,9 @@ uint8 Talk::conversation_related_maybe(uint16 *dialogText, uint16 x, uint16 y, u
|
||||||
// puVar17[3] = uVar15;
|
// puVar17[3] = uVar15;
|
||||||
// puVar1 = puVar16 + 4;
|
// puVar1 = puVar16 + 4;
|
||||||
// puVar2 = puVar17 + 4;
|
// puVar2 = puVar17 + 4;
|
||||||
// } while (puVar16 + 4 != (uint32 *)&DAT_80011a80);
|
// } while (puVar16 + 4 != (uint32 *)&_dat_80011a80);
|
||||||
// uVar12 = puVar16[5];
|
// uVar12 = puVar16[5];
|
||||||
// puVar17[4] = _DAT_80011a80;
|
// puVar17[4] = __dat_80011a80;
|
||||||
// puVar17[5] = uVar12;
|
// puVar17[5] = uVar12;
|
||||||
if (param_5 != 0) {
|
if (param_5 != 0) {
|
||||||
_vm->clearFlags(ENGINE_FLAG_8);
|
_vm->clearFlags(ENGINE_FLAG_8);
|
||||||
|
@ -200,13 +200,13 @@ uint8 Talk::conversation_related_maybe(uint16 *dialogText, uint16 x, uint16 y, u
|
||||||
local_58 = 0x27 - x;
|
local_58 = 0x27 - x;
|
||||||
}
|
}
|
||||||
iVar5 = ((int)((uint)local_58 << 0x10) >> 0xf) + 2;
|
iVar5 = ((int)((uint)local_58 << 0x10) >> 0xf) + 2;
|
||||||
// if (DAT_800726ec_tfont_field0 == 0) {
|
// if (_dat_800726ec_tfont_field0 == 0) {
|
||||||
// trap(0x1c00);
|
// trap(0x1c00);
|
||||||
// }
|
// }
|
||||||
// if (((uint)DAT_800726ec_tfont_field0 == 0xffffffff) && (iVar5 == -0x80000000)) {
|
// if (((uint)_dat_800726ec_tfont_field0 == 0xffffffff) && (iVar5 == -0x80000000)) {
|
||||||
// trap(0x1800);
|
// trap(0x1800);
|
||||||
// }
|
// }
|
||||||
sVar3 = (short)(iVar5 / (int)(uint)DAT_800726ec_tfont_field0);
|
sVar3 = (short)(iVar5 / (int)(uint)_dat_800726ec_tfont_field0);
|
||||||
if (*dialogText != 0) {
|
if (*dialogText != 0) {
|
||||||
/* check for space or hyphen */
|
/* check for space or hyphen */
|
||||||
curDialogTextPtr = dialogText;
|
curDialogTextPtr = dialogText;
|
||||||
|
@ -335,7 +335,7 @@ uint8 Talk::conversation_related_maybe(uint16 *dialogText, uint16 x, uint16 y, u
|
||||||
puVar18 = curDialogTextPtr;
|
puVar18 = curDialogTextPtr;
|
||||||
}
|
}
|
||||||
LAB_80032a70:
|
LAB_80032a70:
|
||||||
iVar5 = (iVar5 >> 0x10) * (uint)DAT_800726f0_tfont_field2 + -1;
|
iVar5 = (iVar5 >> 0x10) * (uint)_dat_800726f0_tfont_field2 + -1;
|
||||||
uVar19 = y;
|
uVar19 = y;
|
||||||
if ((int)(short)y < iVar5) {
|
if ((int)(short)y < iVar5) {
|
||||||
uVar19 = (uint16)iVar5;
|
uVar19 = (uint16)iVar5;
|
||||||
|
@ -343,39 +343,39 @@ uint8 Talk::conversation_related_maybe(uint16 *dialogText, uint16 x, uint16 y, u
|
||||||
if (0x16 < (short)uVar19) {
|
if (0x16 < (short)uVar19) {
|
||||||
uVar19 = 0x16;
|
uVar19 = 0x16;
|
||||||
}
|
}
|
||||||
uVar11 = sVar20 * DAT_800726ec_tfont_field0 + 3 & 0xfffe;
|
uVar11 = sVar20 * _dat_800726ec_tfont_field0 + 3 & 0xfffe;
|
||||||
sVar20 = (short)uVar11 >> 1;
|
sVar20 = (short)uVar11 >> 1;
|
||||||
if ((short)x < 0x14) {
|
if ((short)x < 0x14) {
|
||||||
DAT_8008e7e8_dialogBox_x1 = (x - sVar20) + 1;
|
_dat_8008e7e8_dialogBox_x1 = (x - sVar20) + 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DAT_8008e7e8_dialogBox_x1 = x - sVar20;
|
_dat_8008e7e8_dialogBox_x1 = x - sVar20;
|
||||||
}
|
}
|
||||||
DAT_8008e848_dialogBox_x2 = (uVar11 + DAT_8008e7e8_dialogBox_x1) - 1;
|
_dat_8008e848_dialogBox_x2 = (uVar11 + _dat_8008e7e8_dialogBox_x1) - 1;
|
||||||
DAT_8008e844_dialogBox_y1 = (uVar19 - sVar4 * DAT_800726f0_tfont_field2) + 1;
|
_dat_8008e844_dialogBox_y1 = (uVar19 - sVar4 * _dat_800726f0_tfont_field2) + 1;
|
||||||
DAT_8008e874_dialogBox_y2 = DAT_8008e844_dialogBox_y1 + sVar4 * DAT_800726f0_tfont_field2 + 1;
|
_dat_8008e874_dialogBox_y2 = _dat_8008e844_dialogBox_y1 + sVar4 * _dat_800726f0_tfont_field2 + 1;
|
||||||
if (!_vm->isUnkFlagSet(ENGINE_UNK1_FLAG_1) && ((!_vm->isFlagSet(ENGINE_FLAG_1000_TEXT_ENABLED) || (param_7 != 0)))) {
|
if (!_vm->isUnkFlagSet(ENGINE_UNK1_FLAG_1) && ((!_vm->isFlagSet(ENGINE_FLAG_1000_TEXT_ENABLED) || (param_7 != 0)))) {
|
||||||
unaff_s4 = 0;
|
unaff_s4 = 0;
|
||||||
FUN_8001a4e4_draw_dialogbox((uint) DAT_8008e7e8_dialogBox_x1, (uint) DAT_8008e844_dialogBox_y1,
|
FUN_8001a4e4_draw_dialogbox((uint) _dat_8008e7e8_dialogBox_x1, (uint) _dat_8008e844_dialogBox_y1,
|
||||||
(uint) DAT_8008e848_dialogBox_x2, (uint) DAT_8008e874_dialogBox_y2, 0);
|
(uint) _dat_8008e848_dialogBox_x2, (uint) _dat_8008e874_dialogBox_y2, 0);
|
||||||
if (sVar4 > 0) {
|
if (sVar4 > 0) {
|
||||||
for (; unaff_s4 < sVar4; unaff_s4++) {
|
for (; unaff_s4 < sVar4; unaff_s4++) {
|
||||||
if ((short)x < 0x14) {
|
if ((short)x < 0x14) {
|
||||||
dialogTextLinePtr = asStack2592 + unaff_s4 * 0x29;
|
dialogTextLinePtr = asStack2592 + unaff_s4 * 0x29;
|
||||||
uVar9 = strlenUTF16(dialogTextLinePtr);
|
uVar9 = strlenUTF16(dialogTextLinePtr);
|
||||||
uVar9 = ((uint)x - ((int)((uint)DAT_800726ec_tfont_field0 * (uVar9 & 0xffff) + 1) >> 1)) + 1;
|
uVar9 = ((uint)x - ((int)((uint)_dat_800726ec_tfont_field0 * (uVar9 & 0xffff) + 1) >> 1)) + 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dialogTextLinePtr = asStack2592 + unaff_s4 * 0x29;
|
dialogTextLinePtr = asStack2592 + unaff_s4 * 0x29;
|
||||||
uVar9 = strlenUTF16(dialogTextLinePtr);
|
uVar9 = strlenUTF16(dialogTextLinePtr);
|
||||||
uVar9 = (uint)x - ((int)((uint)DAT_800726ec_tfont_field0 * (uVar9 & 0xffff) + 1) >> 1);
|
uVar9 = (uint)x - ((int)((uint)_dat_800726ec_tfont_field0 * (uVar9 & 0xffff) + 1) >> 1);
|
||||||
}
|
}
|
||||||
_vm->_fontManager->addText(uVar9 * 8,
|
_vm->_fontManager->addText(uVar9 * 8,
|
||||||
((uint)DAT_8008e844_dialogBox_y1 + unaff_s4 * (uint)DAT_800726f0_tfont_field2 + 1) * 8,
|
((uint)_dat_8008e844_dialogBox_y1 + unaff_s4 * (uint)_dat_800726f0_tfont_field2 + 1) * 8,
|
||||||
dialogTextLinePtr, wideStrLen(dialogTextLinePtr), 0);
|
dialogTextLinePtr, wideStrLen(dialogTextLinePtr), 0);
|
||||||
// ProbablyShowUTF16Msg3
|
// ProbablyShowUTF16Msg3
|
||||||
// (dialogTextLinePtr,uVar9 & 0xffff,
|
// (dialogTextLinePtr,uVar9 & 0xffff,
|
||||||
// (uint)DAT_8008e844_dialogBox_y1 + iVar5 * (uint)DAT_800726f0_tfont_field2 + 1
|
// (uint)_dat_8008e844_dialogBox_y1 + iVar5 * (uint)_dat_800726f0_tfont_field2 + 1
|
||||||
// & 0xffff,(uint)param_4, 0xffffffff);
|
// & 0xffff,(uint)param_4, 0xffffffff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -392,8 +392,8 @@ uint8 Talk::conversation_related_maybe(uint16 *dialogText, uint16 x, uint16 y, u
|
||||||
curDialogTextPtr = puVar18;
|
curDialogTextPtr = puVar18;
|
||||||
if (!_vm->isFlagSet(ENGINE_FLAG_8000)) goto LAB_80032e18;
|
if (!_vm->isFlagSet(ENGINE_FLAG_8000)) goto LAB_80032e18;
|
||||||
_vm->waitForFrames(1);
|
_vm->waitForFrames(1);
|
||||||
if (_vm->_sound->DAT_8006bb60_sound_related != 0) {
|
if (_vm->_sound->_dat_8006bb60_sound_related != 0) {
|
||||||
_vm->_sound->DAT_8006bb60_sound_related = 0;
|
_vm->_sound->_dat_8006bb60_sound_related = 0;
|
||||||
curDialogTextPtr = dialogText;
|
curDialogTextPtr = dialogText;
|
||||||
if (!_vm->isFlagSet(ENGINE_FLAG_1000_TEXT_ENABLED)) {
|
if (!_vm->isFlagSet(ENGINE_FLAG_1000_TEXT_ENABLED)) {
|
||||||
returnStatus = 1;
|
returnStatus = 1;
|
||||||
|
@ -416,8 +416,8 @@ uint8 Talk::conversation_related_maybe(uint16 *dialogText, uint16 x, uint16 y, u
|
||||||
LAB_80032e18:
|
LAB_80032e18:
|
||||||
//TODO CheckIfCdShellIsOpen();
|
//TODO CheckIfCdShellIsOpen();
|
||||||
if (!_vm->isUnkFlagSet(ENGINE_UNK1_FLAG_1)) {
|
if (!_vm->isUnkFlagSet(ENGINE_UNK1_FLAG_1)) {
|
||||||
FUN_8001a7c4((uint)DAT_8008e7e8_dialogBox_x1,(uint)DAT_8008e844_dialogBox_y1,
|
FUN_8001a7c4((uint)_dat_8008e7e8_dialogBox_x1,(uint)_dat_8008e844_dialogBox_y1,
|
||||||
(uint)DAT_8008e848_dialogBox_x2,(uint)DAT_8008e874_dialogBox_y2);
|
(uint)_dat_8008e848_dialogBox_x2,(uint)_dat_8008e874_dialogBox_y2);
|
||||||
}
|
}
|
||||||
} while (!_vm->isUnkFlagSet(ENGINE_UNK1_FLAG_1) &&
|
} while (!_vm->isUnkFlagSet(ENGINE_UNK1_FLAG_1) &&
|
||||||
(((!_vm->isFlagSet(ENGINE_FLAG_1000_TEXT_ENABLED) || (param_7 != 0)) && (*curDialogTextPtr != 0))));
|
(((!_vm->isFlagSet(ENGINE_FLAG_1000_TEXT_ENABLED) || (param_7 != 0)) && (*curDialogTextPtr != 0))));
|
||||||
|
@ -476,7 +476,7 @@ void
|
||||||
Talk::displayDialogAroundPoint(uint16 *dialogText, uint16 x, uint16 y, uint16 param_4, int16 param_5, uint32 textId) {
|
Talk::displayDialogAroundPoint(uint16 *dialogText, uint16 x, uint16 y, uint16 param_4, int16 param_5, uint32 textId) {
|
||||||
// TODO
|
// TODO
|
||||||
//
|
//
|
||||||
// puVar1 = &DAT_80011a60;
|
// puVar1 = &_dat_80011a60;
|
||||||
// puVar2 = local_58;
|
// puVar2 = local_58;
|
||||||
// do {
|
// do {
|
||||||
// puVar8 = puVar2;
|
// puVar8 = puVar2;
|
||||||
|
@ -490,9 +490,9 @@ Talk::displayDialogAroundPoint(uint16 *dialogText, uint16 x, uint16 y, uint16 pa
|
||||||
// puVar8[3] = uVar6;
|
// puVar8[3] = uVar6;
|
||||||
// puVar1 = puVar7 + 4;
|
// puVar1 = puVar7 + 4;
|
||||||
// puVar2 = puVar8 + 4;
|
// puVar2 = puVar8 + 4;
|
||||||
// } while (puVar7 + 4 != (undefined4 *)&DAT_80011a80);
|
// } while (puVar7 + 4 != (undefined4 *)&_dat_80011a80);
|
||||||
// uVar4 = puVar7[5];
|
// uVar4 = puVar7[5];
|
||||||
// puVar8[4] = _DAT_80011a80;
|
// puVar8[4] = __dat_80011a80;
|
||||||
// puVar8[5] = uVar4;
|
// puVar8[5] = uVar4;
|
||||||
_vm->_data_800633fc = 1;
|
_vm->_data_800633fc = 1;
|
||||||
|
|
||||||
|
@ -667,7 +667,7 @@ TalkDialogEntry *Talk::displayTalkDialogMenu(Common::Array<TalkDialogEntry*> dia
|
||||||
uint16 *local_40;
|
uint16 *local_40;
|
||||||
uint local_38;
|
uint local_38;
|
||||||
bool hasDialogEntries;
|
bool hasDialogEntries;
|
||||||
uint16 *DAT_80083104;
|
uint16 *_dat_80083104;
|
||||||
|
|
||||||
talkDialogEntry = NULL;
|
talkDialogEntry = NULL;
|
||||||
for (int i = 0; i < 0x24; i++) {
|
for (int i = 0; i < 0x24; i++) {
|
||||||
|
@ -688,12 +688,12 @@ TalkDialogEntry *Talk::displayTalkDialogMenu(Common::Array<TalkDialogEntry*> dia
|
||||||
talkDialogEntry->yPosMaybe = '\0';
|
talkDialogEntry->yPosMaybe = '\0';
|
||||||
strcpy((char *)&local_390,(char *)talkDialogEntry->dialogText);
|
strcpy((char *)&local_390,(char *)talkDialogEntry->dialogText);
|
||||||
UTF16ToUTF16Z(local_386, (uint16 *)(&talkDialogEntry->dialogText[10]));
|
UTF16ToUTF16Z(local_386, (uint16 *)(&talkDialogEntry->dialogText[10]));
|
||||||
DAT_80083104 = local_386;
|
_dat_80083104 = local_386;
|
||||||
if (*local_386 == 0x20) {
|
if (*local_386 == 0x20) {
|
||||||
DAT_80083104 = &local_386[1];
|
_dat_80083104 = &local_386[1];
|
||||||
}
|
}
|
||||||
uVar3 = FindLastPositionOf5cChar(DAT_80083104);
|
uVar3 = FindLastPositionOf5cChar(_dat_80083104);
|
||||||
sVar2 = FUN_80031c28(DAT_80083104,asStack512,uVar3 & 0xffff,0x20);
|
sVar2 = FUN_80031c28(_dat_80083104,asStack512,uVar3 & 0xffff,0x20);
|
||||||
talkDialogEntry->xPosMaybe = (uint8)local_58;
|
talkDialogEntry->xPosMaybe = (uint8)local_58;
|
||||||
local_58 = local_58 + sVar2;
|
local_58 = local_58 + sVar2;
|
||||||
talkDialogEntry->yPosMaybe = talkDialogEntry->yPosMaybe + (char)sVar2;
|
talkDialogEntry->yPosMaybe = talkDialogEntry->yPosMaybe + (char)sVar2;
|
||||||
|
@ -707,7 +707,7 @@ TalkDialogEntry *Talk::displayTalkDialogMenu(Common::Array<TalkDialogEntry*> dia
|
||||||
_vm->_cursor->updateSequenceID(3);
|
_vm->_cursor->updateSequenceID(3);
|
||||||
local_50 = -2;
|
local_50 = -2;
|
||||||
local_38 = (uint)numEntries;
|
local_38 = (uint)numEntries;
|
||||||
DAT_800633f8_talkDialogFlag = 1;
|
_dat_800633f8_talkDialogFlag = 1;
|
||||||
hasDialogEntries = (numEntries != 0);
|
hasDialogEntries = (numEntries != 0);
|
||||||
local_40 = asStack512;
|
local_40 = asStack512;
|
||||||
LAB_800317a4:
|
LAB_800317a4:
|
||||||
|
@ -744,7 +744,7 @@ TalkDialogEntry *Talk::displayTalkDialogMenu(Common::Array<TalkDialogEntry*> dia
|
||||||
y = y + 1;
|
y = y + 1;
|
||||||
if ((talkDialogEntry->flags & 1) == 0) {
|
if ((talkDialogEntry->flags & 1) == 0) {
|
||||||
if (uVar8 == 0) {
|
if (uVar8 == 0) {
|
||||||
DAT_800633f8_talkDialogFlag = 0;
|
_dat_800633f8_talkDialogFlag = 0;
|
||||||
return talkDialogEntry;
|
return talkDialogEntry;
|
||||||
}
|
}
|
||||||
uVar8--;
|
uVar8--;
|
||||||
|
@ -777,13 +777,13 @@ TalkDialogEntry *Talk::displayTalkDialogMenu(Common::Array<TalkDialogEntry*> dia
|
||||||
sVar2 = local_50 + 1;
|
sVar2 = local_50 + 1;
|
||||||
local_50 = sVar2;
|
local_50 = sVar2;
|
||||||
UTF16ToUTF16Z(local_386, (uint16 *)(&talkDialogEntry->dialogText[10]));
|
UTF16ToUTF16Z(local_386, (uint16 *)(&talkDialogEntry->dialogText[10]));
|
||||||
DAT_80083104 = local_386;
|
_dat_80083104 = local_386;
|
||||||
if (local_386[0] == 0x20) {
|
if (local_386[0] == 0x20) {
|
||||||
DAT_80083104 = &local_386[1];
|
_dat_80083104 = &local_386[1];
|
||||||
}
|
}
|
||||||
uVar4 = FindLastPositionOf5cChar(DAT_80083104);
|
uVar4 = FindLastPositionOf5cChar(_dat_80083104);
|
||||||
uVar4 = FUN_80031c28(DAT_80083104,local_40,uVar4 & 0xffff,0x20);
|
uVar4 = FUN_80031c28(_dat_80083104,local_40,uVar4 & 0xffff,0x20);
|
||||||
DAT_80083104 = local_40;
|
_dat_80083104 = local_40;
|
||||||
if ((int)sVar2 == (uint)uVar8) {
|
if ((int)sVar2 == (uint)uVar8) {
|
||||||
uVar7 = 0;
|
uVar7 = 0;
|
||||||
if (uVar6 < (uVar4 & 0xffff)) {
|
if (uVar6 < (uVar4 & 0xffff)) {
|
||||||
|
@ -792,15 +792,15 @@ TalkDialogEntry *Talk::displayTalkDialogMenu(Common::Array<TalkDialogEntry*> dia
|
||||||
if ((uVar7 & 0xffff) == 0) {
|
if ((uVar7 & 0xffff) == 0) {
|
||||||
x = 4;
|
x = 4;
|
||||||
}
|
}
|
||||||
//TODO ProbablyShowUTF16Msg(DAT_80083104,x,y,0,-1);
|
//TODO ProbablyShowUTF16Msg(_dat_80083104,x,y,0,-1);
|
||||||
_vm->_fontManager->addText(x * 8, y * 8, DAT_80083104, wideStrLen(DAT_80083104), 0);
|
_vm->_fontManager->addText(x * 8, y * 8, _dat_80083104, wideStrLen(_dat_80083104), 0);
|
||||||
sVar2 = *DAT_80083104;
|
sVar2 = *_dat_80083104;
|
||||||
while (sVar2 != 0) {
|
while (sVar2 != 0) {
|
||||||
sVar2 = DAT_80083104[1];
|
sVar2 = _dat_80083104[1];
|
||||||
DAT_80083104 = DAT_80083104 + 1;
|
_dat_80083104 = _dat_80083104 + 1;
|
||||||
}
|
}
|
||||||
uVar7 = uVar7 + 1;
|
uVar7 = uVar7 + 1;
|
||||||
DAT_80083104 = DAT_80083104 + 1;
|
_dat_80083104 = _dat_80083104 + 1;
|
||||||
y = y + 1;
|
y = y + 1;
|
||||||
} while ((uVar7 & 0xffff) < (uVar4 & 0xffff));
|
} while ((uVar7 & 0xffff) < (uVar4 & 0xffff));
|
||||||
}
|
}
|
||||||
|
@ -813,15 +813,15 @@ TalkDialogEntry *Talk::displayTalkDialogMenu(Common::Array<TalkDialogEntry*> dia
|
||||||
if ((uVar7 & 0xffff) == 0) {
|
if ((uVar7 & 0xffff) == 0) {
|
||||||
x = 4;
|
x = 4;
|
||||||
}
|
}
|
||||||
//TODO ProbablyShowUTF16Msg2(DAT_80083104,x,(uint)y,0x401,0xffffffff);
|
//TODO ProbablyShowUTF16Msg2(_dat_80083104,x,(uint)y,0x401,0xffffffff);
|
||||||
_vm->_fontManager->addText(x * 8, y * 8, DAT_80083104, wideStrLen(DAT_80083104), 1);
|
_vm->_fontManager->addText(x * 8, y * 8, _dat_80083104, wideStrLen(_dat_80083104), 1);
|
||||||
sVar2 = *DAT_80083104;
|
sVar2 = *_dat_80083104;
|
||||||
while (sVar2 != 0) {
|
while (sVar2 != 0) {
|
||||||
sVar2 = DAT_80083104[1];
|
sVar2 = _dat_80083104[1];
|
||||||
DAT_80083104 = DAT_80083104 + 1;
|
_dat_80083104 = _dat_80083104 + 1;
|
||||||
}
|
}
|
||||||
uVar7 = uVar7 + 1;
|
uVar7 = uVar7 + 1;
|
||||||
DAT_80083104 = DAT_80083104 + 1;
|
_dat_80083104 = _dat_80083104 + 1;
|
||||||
y = y + 1;
|
y = y + 1;
|
||||||
} while ((uVar7 & 0xffff) < (uVar4 & 0xffff));
|
} while ((uVar7 & 0xffff) < (uVar4 & 0xffff));
|
||||||
}
|
}
|
||||||
|
@ -938,7 +938,7 @@ void Talk::flickerRandomDefaultResponse() {
|
||||||
|
|
||||||
uint32 Talk::getDefaultResponseTextIndex() {
|
uint32 Talk::getDefaultResponseTextIndex() {
|
||||||
uint16 rand = _vm->getRand(9);
|
uint16 rand = _vm->getRand(9);
|
||||||
return defaultResponseTbl[(_vm->_cursor->_data_800728b0_cursor_seqID - 1) * 9 + rand];
|
return _defaultResponseTbl[(_vm->_cursor->_data_800728b0_cursor_seqID - 1) * 9 + rand];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 extractTextIndex(Common::File *fd, uint16 offset) {
|
uint32 extractTextIndex(Common::File *fd, uint16 offset) {
|
||||||
|
@ -952,55 +952,55 @@ void Talk::initDefaultResponseTable() {
|
||||||
error("Failed to open dragon.exe");
|
error("Failed to open dragon.exe");
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultResponseTbl[0] = extractTextIndex(fd, 19);
|
_defaultResponseTbl[0] = extractTextIndex(fd, 19);
|
||||||
defaultResponseTbl[1] = extractTextIndex(fd, 20);
|
_defaultResponseTbl[1] = extractTextIndex(fd, 20);
|
||||||
defaultResponseTbl[2] = extractTextIndex(fd, 21);
|
_defaultResponseTbl[2] = extractTextIndex(fd, 21);
|
||||||
defaultResponseTbl[3] = extractTextIndex(fd, 22);
|
_defaultResponseTbl[3] = extractTextIndex(fd, 22);
|
||||||
defaultResponseTbl[4] = extractTextIndex(fd, 19);
|
_defaultResponseTbl[4] = extractTextIndex(fd, 19);
|
||||||
defaultResponseTbl[5] = extractTextIndex(fd, 20);
|
_defaultResponseTbl[5] = extractTextIndex(fd, 20);
|
||||||
defaultResponseTbl[6] = extractTextIndex(fd, 21);
|
_defaultResponseTbl[6] = extractTextIndex(fd, 21);
|
||||||
defaultResponseTbl[7] = extractTextIndex(fd, 22);
|
_defaultResponseTbl[7] = extractTextIndex(fd, 22);
|
||||||
defaultResponseTbl[8] = extractTextIndex(fd, 19);
|
_defaultResponseTbl[8] = extractTextIndex(fd, 19);
|
||||||
|
|
||||||
defaultResponseTbl[9] = extractTextIndex(fd, 0);
|
_defaultResponseTbl[9] = extractTextIndex(fd, 0);
|
||||||
defaultResponseTbl[10] = extractTextIndex(fd, 1);
|
_defaultResponseTbl[10] = extractTextIndex(fd, 1);
|
||||||
defaultResponseTbl[11] = extractTextIndex(fd, 2);
|
_defaultResponseTbl[11] = extractTextIndex(fd, 2);
|
||||||
defaultResponseTbl[12] = extractTextIndex(fd, 3);
|
_defaultResponseTbl[12] = extractTextIndex(fd, 3);
|
||||||
defaultResponseTbl[13] = extractTextIndex(fd, 4);
|
_defaultResponseTbl[13] = extractTextIndex(fd, 4);
|
||||||
defaultResponseTbl[14] = extractTextIndex(fd, 5);
|
_defaultResponseTbl[14] = extractTextIndex(fd, 5);
|
||||||
defaultResponseTbl[15] = extractTextIndex(fd, 2);
|
_defaultResponseTbl[15] = extractTextIndex(fd, 2);
|
||||||
defaultResponseTbl[16] = extractTextIndex(fd, 3);
|
_defaultResponseTbl[16] = extractTextIndex(fd, 3);
|
||||||
defaultResponseTbl[17] = extractTextIndex(fd, 4);
|
_defaultResponseTbl[17] = extractTextIndex(fd, 4);
|
||||||
|
|
||||||
defaultResponseTbl[18] = extractTextIndex(fd, 6);
|
_defaultResponseTbl[18] = extractTextIndex(fd, 6);
|
||||||
defaultResponseTbl[19] = extractTextIndex(fd, 7);
|
_defaultResponseTbl[19] = extractTextIndex(fd, 7);
|
||||||
defaultResponseTbl[20] = extractTextIndex(fd, 8);
|
_defaultResponseTbl[20] = extractTextIndex(fd, 8);
|
||||||
defaultResponseTbl[21] = extractTextIndex(fd, 9);
|
_defaultResponseTbl[21] = extractTextIndex(fd, 9);
|
||||||
defaultResponseTbl[22] = extractTextIndex(fd, 7);
|
_defaultResponseTbl[22] = extractTextIndex(fd, 7);
|
||||||
defaultResponseTbl[23] = extractTextIndex(fd, 8);
|
_defaultResponseTbl[23] = extractTextIndex(fd, 8);
|
||||||
defaultResponseTbl[24] = extractTextIndex(fd, 9);
|
_defaultResponseTbl[24] = extractTextIndex(fd, 9);
|
||||||
defaultResponseTbl[25] = extractTextIndex(fd, 6);
|
_defaultResponseTbl[25] = extractTextIndex(fd, 6);
|
||||||
defaultResponseTbl[26] = extractTextIndex(fd, 7);
|
_defaultResponseTbl[26] = extractTextIndex(fd, 7);
|
||||||
|
|
||||||
defaultResponseTbl[27] = extractTextIndex(fd, 10);
|
_defaultResponseTbl[27] = extractTextIndex(fd, 10);
|
||||||
defaultResponseTbl[28] = extractTextIndex(fd, 11);
|
_defaultResponseTbl[28] = extractTextIndex(fd, 11);
|
||||||
defaultResponseTbl[29] = extractTextIndex(fd, 12);
|
_defaultResponseTbl[29] = extractTextIndex(fd, 12);
|
||||||
defaultResponseTbl[30] = extractTextIndex(fd, 13);
|
_defaultResponseTbl[30] = extractTextIndex(fd, 13);
|
||||||
defaultResponseTbl[31] = extractTextIndex(fd, 14);
|
_defaultResponseTbl[31] = extractTextIndex(fd, 14);
|
||||||
defaultResponseTbl[32] = extractTextIndex(fd, 15);
|
_defaultResponseTbl[32] = extractTextIndex(fd, 15);
|
||||||
defaultResponseTbl[33] = extractTextIndex(fd, 16);
|
_defaultResponseTbl[33] = extractTextIndex(fd, 16);
|
||||||
defaultResponseTbl[34] = extractTextIndex(fd, 17);
|
_defaultResponseTbl[34] = extractTextIndex(fd, 17);
|
||||||
defaultResponseTbl[35] = extractTextIndex(fd, 18);
|
_defaultResponseTbl[35] = extractTextIndex(fd, 18);
|
||||||
|
|
||||||
defaultResponseTbl[36] = extractTextIndex(fd, 23);
|
_defaultResponseTbl[36] = extractTextIndex(fd, 23);
|
||||||
defaultResponseTbl[37] = extractTextIndex(fd, 24);
|
_defaultResponseTbl[37] = extractTextIndex(fd, 24);
|
||||||
defaultResponseTbl[38] = extractTextIndex(fd, 25);
|
_defaultResponseTbl[38] = extractTextIndex(fd, 25);
|
||||||
defaultResponseTbl[39] = extractTextIndex(fd, 26);
|
_defaultResponseTbl[39] = extractTextIndex(fd, 26);
|
||||||
defaultResponseTbl[40] = extractTextIndex(fd, 27);
|
_defaultResponseTbl[40] = extractTextIndex(fd, 27);
|
||||||
defaultResponseTbl[41] = extractTextIndex(fd, 28);
|
_defaultResponseTbl[41] = extractTextIndex(fd, 28);
|
||||||
defaultResponseTbl[42] = extractTextIndex(fd, 29);
|
_defaultResponseTbl[42] = extractTextIndex(fd, 29);
|
||||||
defaultResponseTbl[43] = extractTextIndex(fd, 30);
|
_defaultResponseTbl[43] = extractTextIndex(fd, 30);
|
||||||
defaultResponseTbl[44] = extractTextIndex(fd, 31);
|
_defaultResponseTbl[44] = extractTextIndex(fd, 31);
|
||||||
|
|
||||||
fd->close();
|
fd->close();
|
||||||
delete fd;
|
delete fd;
|
||||||
|
@ -1123,8 +1123,8 @@ void Talk::clearDialogEntries() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Talk::FUN_8001a7c4_clearDialogBoxMaybe() {
|
void Talk::FUN_8001a7c4_clearDialogBoxMaybe() {
|
||||||
FUN_8001a7c4((uint)DAT_8008e7e8_dialogBox_x1,(uint)DAT_8008e844_dialogBox_y1,
|
FUN_8001a7c4((uint)_dat_8008e7e8_dialogBox_x1,(uint)_dat_8008e844_dialogBox_y1,
|
||||||
(uint)DAT_8008e848_dialogBox_x2,(uint)DAT_8008e874_dialogBox_y2);
|
(uint)_dat_8008e848_dialogBox_x2,(uint)_dat_8008e874_dialogBox_y2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Talk::playDialogAudioDontWait(uint32 textIndex) {
|
void Talk::playDialogAudioDontWait(uint32 textIndex) {
|
||||||
|
|
|
@ -49,20 +49,20 @@ struct TalkDialogEntry {
|
||||||
|
|
||||||
class Talk {
|
class Talk {
|
||||||
public:
|
public:
|
||||||
uint32 DAT_8008e7e8_dialogBox_x1;
|
uint32 _dat_8008e7e8_dialogBox_x1;
|
||||||
uint32 DAT_8008e844_dialogBox_y1;
|
uint32 _dat_8008e844_dialogBox_y1;
|
||||||
uint32 DAT_8008e848_dialogBox_x2;
|
uint32 _dat_8008e848_dialogBox_x2;
|
||||||
uint32 DAT_8008e874_dialogBox_y2;
|
uint32 _dat_8008e874_dialogBox_y2;
|
||||||
private:
|
private:
|
||||||
DragonsEngine *_vm;
|
DragonsEngine *_vm;
|
||||||
BigfileArchive *_bigfileArchive;
|
BigfileArchive *_bigfileArchive;
|
||||||
Common::Array<TalkDialogEntry*> _dialogEntries;
|
Common::Array<TalkDialogEntry*> _dialogEntries;
|
||||||
uint32 defaultResponseTbl[45];
|
uint32 _defaultResponseTbl[45];
|
||||||
|
|
||||||
uint8 DAT_800726ec_tfont_field0;
|
uint8 _dat_800726ec_tfont_field0;
|
||||||
uint8 DAT_800726f0_tfont_field2;
|
uint8 _dat_800726f0_tfont_field2;
|
||||||
|
|
||||||
uint8 DAT_800633f8_talkDialogFlag;
|
uint8 _dat_800633f8_talkDialogFlag;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Talk(DragonsEngine *vm, BigfileArchive *bigfileArchive);
|
Talk(DragonsEngine *vm, BigfileArchive *bigfileArchive);
|
||||||
|
@ -91,6 +91,7 @@ public:
|
||||||
void FUN_8001a7c4_clearDialogBoxMaybe(); //clear box maybe?
|
void FUN_8001a7c4_clearDialogBoxMaybe(); //clear box maybe?
|
||||||
|
|
||||||
void playDialogAudioDontWait(uint32 textIndex);
|
void playDialogAudioDontWait(uint32 textIndex);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void FUN_8001a7c4(uint32 x1, uint32 y1, uint32 x2, uint32 y2); //clear box maybe?
|
void FUN_8001a7c4(uint32 x1, uint32 y1, uint32 x2, uint32 y2); //clear box maybe?
|
||||||
void copyTextToBuffer(uint16 *destBuffer, byte *src, uint32 destBufferLength);
|
void copyTextToBuffer(uint16 *destBuffer, byte *src, uint32 destBufferLength);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue