diff --git a/content/decompiled_src/handleCommand.c b/content/decompiled_src/handleCommand.c new file mode 100644 index 0000000..9243fdc --- /dev/null +++ b/content/decompiled_src/handleCommand.c @@ -0,0 +1,581 @@ + +/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ +/* Game::handleCommand(QiString const&) */ + +void __thiscall Game::handleCommand(Game *this,QiString *param_1) + +{ + QiString *this_00; + char cVar1; + int iVar2; + int iVar3; + char **this_01; + Game *pGVar4; + long lVar5; + char *pcVar6; + QiString *in_x8; + Audio *pAVar7; + ResMan *this_02; + long *plVar8; + Player *pPVar9; + PropertyBag *pPVar10; + code *pcVar11; + char *local_88 [2]; + char acStack_78 [16]; + char *local_68 [2]; + char acStack_58 [16]; + char *local_48 [2]; + char acStack_38 [16]; + char *local_28 [2]; + char acStack_18 [16]; + long local_8; + + local_8 = ___stack_chk_guard; + QiString::QiString((QiString *)local_48,"Command: "); + QiString::operator+((QiString *)local_48,param_1); + pcVar6 = local_28[0]; + if (local_28[0] == (char *)0x0) { + pcVar6 = acStack_18; + } + logI(this,pcVar6); + QiString::~QiString((QiString *)local_28); + QiString::~QiString((QiString *)local_48); + QiString::getWord(param_1,0); + pcVar6 = local_88[0]; + if (local_88[0] == (char *)0x0) { + iVar2 = strcmp(acStack_78,"setproperty"); + if (iVar2 == 0) goto LAB_0035fc64; +LAB_0035f928: + iVar2 = strcmp(acStack_78,"audio.playBackgroundMusic"); + if (iVar2 == 0) goto LAB_0035fb7c; + iVar2 = strcmp(acStack_78,"audio.playForegroundMusic"); + if (iVar2 == 0) goto LAB_0035fc00; + iVar2 = strcmp(acStack_78,"movie.start"); + if (iVar2 == 0) { +LAB_0035fc34: + QiString::getWord(param_1,1); + QiString::operator=((QiString *)(this + 0x618),(QiString *)local_28); + QiString::~QiString((QiString *)local_28); + *(undefined4 *)(this + 0x60c) = 2; + } + else { + iVar2 = strcmp(acStack_78,"level.restart"); + if (iVar2 == 0) { +LAB_0035fe9c: + Player::registerRestart + ((Player *)gGame[0xd],(QiVec2 *)(*(long *)(*(long *)(this + 0x58) + 0x608) + 0x20) + ); + Player::save((Player *)gGame[0xd]); + lVar5 = *(long *)(this + 0x58); + *(undefined *)(lVar5 + 0x8c0) = 0; + *(undefined8 *)(lVar5 + 0x8a8) = 0; + *(undefined8 *)(lVar5 + 0x8b0) = 0; + *(undefined8 *)(lVar5 + 0x8b8) = 0; + QiInputStream::resetInputStream((QiInputStream *)(lVar5 + 0x778)); + QiOutputStream::resetOutputStream((QiOutputStream *)(lVar5 + 0x788)); + *(undefined *)(*(long *)(this + 0x58) + 0x8e8) = 1; + } + else { + iVar2 = strcmp(acStack_78,"level.replay"); + if (iVar2 == 0) { +LAB_0035fe5c: + lVar5 = *(long *)(this + 0x58); + *(undefined *)(lVar5 + 0x8c0) = 1; + *(undefined *)(lVar5 + 0x8e8) = 1; + if (*(code **)(**gGame + 0x50) != Device::setAlwaysOn) { + (**(code **)(**gGame + 0x50))(); + } + } + else { + iVar2 = strcmp(acStack_78,"level.start"); + if (iVar2 == 0) { +LAB_0035ff00: + ResMan::clear(*(ResMan **)(*(long *)(this + 0x58) + 0x5b0)); + iVar2 = *(int *)(this + 0x608); + *(undefined *)(*(long *)(this + 0x58) + 0x8c0) = 0; + if (iVar2 == 3) { + QiString::getWord(param_1,1); + QiString::operator=((QiString *)(this + 0x638),(QiString *)local_28); + QiString::~QiString((QiString *)local_28); + } + else { + QiString::getWord(param_1,1); + QiString::operator=((QiString *)(this + 0x658),(QiString *)local_28); + QiString::~QiString((QiString *)local_28); + *(undefined4 *)(this + 0x60c) = 3; + } + } + else { + iVar2 = strcmp(acStack_78,"level.startreplay"); + if (iVar2 == 0) { +LAB_0035ffc4: + QiString::getWord(param_1,1); + QiString::operator=((QiString *)(this + 0x658),(QiString *)local_28); + QiString::~QiString((QiString *)local_28); + lVar5 = *(long *)(this + 0x58); + *(undefined8 *)(lVar5 + 0x8a8) = 0; + *(undefined8 *)(lVar5 + 0x8b0) = 0; + *(undefined8 *)(lVar5 + 0x8b8) = 0; + QiInputStream::resetInputStream((QiInputStream *)(lVar5 + 0x778)); + QiOutputStream::resetOutputStream((QiOutputStream *)(lVar5 + 0x788)); + QiString::QiString((QiString *)local_68,(QiString *)(this + 0x658)); + cVar1 = isHard(this); + if (cVar1 != '\0') { + QiString::operator+=((QiString *)local_68,"-hard"); + } + this_02 = *(ResMan **)(this + 0x20); + operator+("user://replay-",(QiString *)local_68); + QiString::operator+((QiString *)local_48,".motion"); + cVar1 = ResMan::load(this_02,(QiString *)local_28, + (QiOutputStream *)(*(long *)(this + 0x58) + 0x788)); + QiString::~QiString((QiString *)local_28); + QiString::~QiString((QiString *)local_48); + if (cVar1 != '\0') { + *(undefined *)(*(long *)(this + 0x58) + 0x8c0) = 1; + if (*(code **)(**gGame + 0x50) != Device::setAlwaysOn) { + (**(code **)(**gGame + 0x50))(); + } + *(undefined4 *)(this + 0x60c) = 3; + } + QiString::~QiString((QiString *)local_68); + } + else { + iVar2 = strcmp(acStack_78,"level.skip"); + if (iVar2 == 0) { +LAB_003600f4: + QiString::getWord(param_1,1); + iVar2 = Player::getCoinCount(*(Player **)(this + 0x68)); + if (iVar2 < 200) { + lVar5 = *(long *)(this + 0x40); + QiString::QiString((QiString *)local_28,"showoutofcash"); + Script::handleCommand((Script *)(lVar5 + 0xb8),(QiString *)local_28); + QiString::~QiString((QiString *)local_28); + } + else { + Player::addCoins(*(Player **)(this + 0x68),-200); + Player::skipLevel(*(Player **)(this + 0x68),(QiString *)local_48); + Player::save(*(Player **)(this + 0x68)); + } + QiString::~QiString((QiString *)local_48); + } + else { + iVar2 = strcmp(acStack_78,"game.quit"); + if (iVar2 == 0) { +LAB_00360090: + if (*(code **)(**(long **)this + 0xc0) != Device::quit) { + (**(code **)(**(long **)this + 0xc0))(); + } + } + else { + iVar2 = strcmp(acStack_78,"game.menu"); + if (iVar2 == 0) { +LAB_00360140: + *(undefined4 *)(this + 0x60c) = 1; + } + else { + iVar2 = strcmp(acStack_78,"game.leaderboards"); + if (iVar2 == 0) { +LAB_00360168: + if (*(code **)(**(long **)this + 0xb0) != Device::gameShowLeaderboards) { + (**(code **)(**(long **)this + 0xb0))(); + } + } + else { + iVar2 = strcmp(acStack_78,"game.achievements"); + if (iVar2 == 0) { +LAB_003601d0: + if (*(code **)(**(long **)this + 0xb8) != Device::gameShowAchievements) { + (**(code **)(**(long **)this + 0xb8))(); + } + } + else { + iVar2 = strcmp(acStack_78,"game.saveConfig"); + if (iVar2 == 0) { +LAB_003601f4: + saveConfig(this); + } + else { + iVar2 = strcmp(acStack_78,"game.url"); + if (iVar2 == 0) { +LAB_00360200: + plVar8 = *(long **)this; + pcVar11 = *(code **)(*plVar8 + 0x48); + QiString::getWord(param_1,1); + (*pcVar11)(plVar8,local_28); + QiString::~QiString((QiString *)local_28); + } + else { + iVar2 = strcmp(acStack_78,"game.difficulty"); + if (iVar2 == 0) goto LAB_0035fdd4; + iVar2 = strcmp(acStack_78,"hud.reload"); + if (iVar2 == 0) goto LAB_0035f908; + iVar2 = strcmp(acStack_78,"player.buy"); + if (iVar2 == 0) goto LAB_003602bc; + iVar2 = strcmp(acStack_78,"player.buycoins"); + if (iVar2 == 0) { +LAB_003603e0: + this_00 = (QiString *)(this + 0x6a0); + QiString::getWord(param_1,1); + iVar2 = QiString::toInt((QiString *)local_28); + QiString::~QiString((QiString *)local_28); + QiString::operator=(this_00,""); + if (iVar2 == 1000) { + QiString::operator=(this_00,"com.mediocre.grannysmith.coins1000"); + } + else if (iVar2 == 3000) { + QiString::operator=(this_00,"com.mediocre.grannysmith.coins3000"); + } + pGVar4 = *(Game **)(this + 0x6a0); + if (pGVar4 == (Game *)0x0) { + if (this[0x6b0] != (Game)0x0) { + pGVar4 = this + 0x6b0; + goto LAB_00360448; + } + } + else if (*pGVar4 != (Game)0x0) { +LAB_00360448: + storeInitPurchase((char *)pGVar4); + this[0x6c4] = (Game)0x1; + *(undefined4 *)(this + 0x6c0) = 0x42700000; + } + } + else { + iVar2 = strcmp(acStack_78,"player.unlockall"); + if (iVar2 == 0) goto LAB_00360460; + pcVar6 = acStack_78; + iVar2 = strcmp(acStack_78,"player.restorepurchases"); + if (iVar2 == 0) goto LAB_00360284; +LAB_0035fac4: + iVar2 = strcmp(pcVar6,"player.rate"); + if (iVar2 == 0) { + pcVar6 = "rated"; +LAB_003605a0: + pPVar10 = *(PropertyBag **)(this + 0x68); + QiString::QiString((QiString *)local_48,pcVar6); + QiString::QiString((QiString *)local_28,"1"); + PropertyBag::setString + (pPVar10,(QiString *)local_48,(QiString *)local_28); + this_01 = local_28; + goto LAB_0035fe44; + } + iVar2 = strcmp(pcVar6,"player.unlockallchar"); + if (iVar2 == 0) { + Player::unlockAllCharacters(*(Player **)(this + 0x68)); + Player::save(*(Player **)(this + 0x68)); + } + else { + iVar2 = strcmp(pcVar6,"player.selectcharacter"); + if (iVar2 == 0) { + pPVar9 = *(Player **)(this + 0x68); + QiString::getWord(param_1,1); + Player::selectCharacter(pPVar9,(QiString *)local_28); + QiString::~QiString((QiString *)local_28); + Player::save(*(Player **)(this + 0x68)); + } + else { + iVar2 = strcmp(pcVar6,"player.ischaracteravailable"); + if (iVar2 == 0) { + pPVar9 = *(Player **)(this + 0x68); + QiString::getWord(param_1,1); + cVar1 = Player::isCharacterAvailable + (pPVar9,(QiString *)local_28); + QiString::~QiString((QiString *)local_28); + if (cVar1 == '\0') { + QiString::QiString(in_x8,"0"); + } + else { + QiString::QiString(in_x8,"1"); + } + goto LAB_0035fbc0; + } + iVar2 = strcmp(pcVar6,"player.reset"); + if (iVar2 == 0) { + Player::reset(*(Player **)(this + 0x68)); + Player::save(*(Player **)(this + 0x68)); + Scene::reload(*(Scene **)(this + 0x40)); + } + else { + iVar2 = strcmp(pcVar6,"player.adsshown"); + if (iVar2 == 0) { + pcVar6 = "adsshown"; + goto LAB_003605a0; + } + iVar2 = strcmp(pcVar6,"game.signin"); + if (iVar2 == 0) { + (**(code **)(**(long **)this + 0x80))(*(long **)this); + } + else { + iVar2 = strcmp(pcVar6,"game.signout"); + if (iVar2 == 0) { + (**(code **)(**(long **)this + 0x88))(*(long **)this); + } + else { + operator+("Unknown command: ",param_1); + if (local_28[0] == (char *)0x0) { + local_28[0] = acStack_18; + } + logE(this,local_28[0]); + QiString::~QiString((QiString *)local_28); + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + else { + iVar2 = strcmp(local_88[0],"setproperty"); + if (iVar2 == 0) { +LAB_0035fc64: + QiString::getWord(param_1,1); + cVar1 = QiString::contains((QiString *)local_68,"=",true); + if (cVar1 != '\0') { + iVar2 = QiString::getIndexOf((QiString *)local_68,"=",0,true); + QiString::substring((QiString *)local_68,0,iVar2); + iVar2 = QiString::getIndexOf((QiString *)local_68,"=",0,true); + QiString::substring((QiString *)local_68,iVar2 + 1); + setProperty(this,(QiString *)local_48,(QiString *)local_28); + QiString::~QiString((QiString *)local_28); + QiString::~QiString((QiString *)local_48); + } + QiString::~QiString((QiString *)local_68); + if (local_88[0] == (char *)0x0) goto LAB_0035f928; + iVar2 = strcmp(local_88[0],"audio.playBackgroundMusic"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"audio.playForegroundMusic"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"movie.start"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"level.restart"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"level.replay"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"level.start"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"level.startreplay"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"level.skip"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"game.quit"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"game.menu"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"game.leaderboards"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"game.achievements"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"game.saveConfig"); + if (iVar2 != 0) { + iVar2 = strcmp(local_88[0],"game.url"); + if (iVar2 == 0) goto LAB_00360200; + iVar2 = strcmp(local_88[0],"game.difficulty"); + pcVar6 = local_88[0]; + goto joined_r0x0035fdd0; + } + goto LAB_003601f4; + } + goto LAB_003601d0; + } + goto LAB_00360168; + } + goto LAB_00360140; + } + goto LAB_00360090; + } + goto LAB_003600f4; + } + goto LAB_0035ffc4; + } + goto LAB_0035ff00; + } + goto LAB_0035fe5c; + } + goto LAB_0035fe9c; + } + goto LAB_0035fc34; + } + goto LAB_0035fc00; + } + } + else { + iVar2 = strcmp(pcVar6,"audio.playBackgroundMusic"); + if (iVar2 != 0) { + iVar2 = strcmp(pcVar6,"audio.playForegroundMusic"); + if (iVar2 != 0) { + iVar2 = strcmp(pcVar6,"movie.start"); + if (iVar2 == 0) goto LAB_0035fc34; + iVar2 = strcmp(pcVar6,"level.restart"); + if (iVar2 == 0) goto LAB_0035fe9c; + iVar2 = strcmp(pcVar6,"level.replay"); + if (iVar2 == 0) goto LAB_0035fe5c; + iVar2 = strcmp(pcVar6,"level.start"); + if (iVar2 == 0) goto LAB_0035ff00; + iVar2 = strcmp(pcVar6,"level.startreplay"); + if (iVar2 == 0) goto LAB_0035ffc4; + iVar2 = strcmp(pcVar6,"level.skip"); + if (iVar2 == 0) goto LAB_003600f4; + iVar2 = strcmp(pcVar6,"game.quit"); + if (iVar2 == 0) goto LAB_00360090; + iVar2 = strcmp(pcVar6,"game.menu"); + if (iVar2 == 0) goto LAB_00360140; + iVar2 = strcmp(pcVar6,"game.leaderboards"); + if (iVar2 == 0) goto LAB_00360168; + iVar2 = strcmp(pcVar6,"game.achievements"); + if (iVar2 == 0) goto LAB_003601d0; + iVar2 = strcmp(pcVar6,"game.saveConfig"); + if (iVar2 == 0) goto LAB_003601f4; + iVar2 = strcmp(pcVar6,"game.url"); + if (iVar2 == 0) goto LAB_00360200; + iVar2 = strcmp(pcVar6,"game.difficulty"); +joined_r0x0035fdd0: + if (iVar2 != 0) { + iVar2 = strcmp(pcVar6,"hud.reload"); + if (iVar2 != 0) { + iVar2 = strcmp(pcVar6,"player.buy"); + if (iVar2 != 0) { + iVar2 = strcmp(pcVar6,"player.buycoins"); + if (iVar2 == 0) goto LAB_003603e0; + iVar2 = strcmp(pcVar6,"player.unlockall"); + if (iVar2 != 0) { + iVar2 = strcmp(pcVar6,"player.restorepurchases"); + if (iVar2 != 0) goto LAB_0035fac4; +LAB_00360284: + QiString::operator=((QiString *)(this + 0x6a0),"restore"); + storeInitRestore(); + this[0x6c4] = (Game)0x1; + *(undefined4 *)(this + 0x6c0) = 0x42700000; + goto LAB_0035fbb0; + } +LAB_00360460: + QiString::operator=((QiString *)(this + 0x6a0),"com.mediocre.grannysmith.unlockall3" + ); + pGVar4 = *(Game **)(this + 0x6a0); + if (*(Game **)(this + 0x6a0) == (Game *)0x0) { + pGVar4 = this + 0x6b0; + } + goto LAB_00360448; + } +LAB_003602bc: + QiString::getWord(param_1,1); + pcVar6 = local_48[0]; + if (local_48[0] == (char *)0x0) { + pcVar6 = acStack_38; + } + iVar2 = 0x14; + iVar3 = strcmp(pcVar6,"helmet"); + if (iVar3 != 0) { + iVar2 = 0x28; + iVar3 = strcmp(pcVar6,"banana"); + if (iVar3 != 0) { + iVar2 = 0x3c; + iVar3 = strcmp(pcVar6,"baseball"); + if (iVar3 != 0) { + iVar2 = 500; + iVar3 = strcmp(pcVar6,"scruffy"); + if (iVar3 != 0) { + iVar3 = strcmp(pcVar6,"stanley"); + iVar2 = 0; + if (iVar3 == 0) { + iVar2 = 500; + } + } + } + } + } + iVar3 = Player::getCoinCount(*(Player **)(this + 0x68)); + if (iVar3 < iVar2) { + lVar5 = *(long *)(this + 0x40); + QiString::QiString((QiString *)local_28,"showoutofcash"); + Script::handleCommand((Script *)(lVar5 + 0xb8),(QiString *)local_28); + QiString::~QiString((QiString *)local_28); + QiString::QiString(in_x8,"0"); + } + else { + Player::addCoins(*(Player **)(this + 0x68),-iVar2); + if (local_48[0] == (char *)0x0) { + local_48[0] = acStack_38; + } + iVar2 = strcmp(local_48[0],"scruffy"); + if ((iVar2 == 0) || (iVar2 = strcmp(local_48[0],"stanley"), iVar2 == 0)) { + Player::unlockCharacter(*(Player **)(this + 0x68),(QiString *)local_48); + lVar5 = *(long *)(this + 0x40); + operator+("character ",(QiString *)local_48); + Script::handleCommand((Script *)(lVar5 + 0xb8),(QiString *)local_28); + QiString::~QiString((QiString *)local_28); + } + else { + Player::addPowerUp(*(Player **)(this + 0x68),(QiString *)local_48,5); + } + Player::save(*(Player **)(this + 0x68)); + QiString::QiString(in_x8,"1"); + } + QiString::~QiString((QiString *)local_48); + goto LAB_0035fbc0; + } +LAB_0035f908: + this[0x67a] = (Game)0x1; + goto LAB_0035fbb0; + } +LAB_0035fdd4: + pPVar10 = *(PropertyBag **)(this + 0x68); + QiString::QiString((QiString *)local_48,"hard"); + QiString::getWord(param_1,1); + this_01 = local_68; + if (local_68[0] == (char *)0x0) { + local_68[0] = acStack_58; + } + iVar2 = strcmp(local_68[0],"hard"); + if (iVar2 == 0) { + pcVar6 = "1"; + } + else { + pcVar6 = "0"; + } + QiString::QiString((QiString *)local_28,pcVar6); + PropertyBag::setString(pPVar10,(QiString *)local_48,(QiString *)local_28); + QiString::~QiString((QiString *)local_28); +LAB_0035fe44: + QiString::~QiString((QiString *)this_01); + QiString::~QiString((QiString *)local_48); + Player::save(*(Player **)(this + 0x68)); + goto LAB_0035fbb0; + } +LAB_0035fc00: + Audio::update(*(Audio **)(this + 0x28)); + pAVar7 = *(Audio **)(this + 0x28); + QiString::getWord(param_1,1); + Audio::playForegroundMusic(pAVar7,(QiString *)local_28); + QiString::~QiString((QiString *)local_28); + goto LAB_0035fbb0; + } + } +LAB_0035fb7c: + Audio::update(*(Audio **)(this + 0x28)); + pAVar7 = *(Audio **)(this + 0x28); + QiString::getWord(param_1,1); + Audio::playBackgroundMusic(pAVar7,(QiString *)local_28,false); + QiString::~QiString((QiString *)local_28); + } +LAB_0035fbb0: + QiString::QiString(in_x8,""); +LAB_0035fbc0: + QiString::~QiString((QiString *)local_88); + if (local_8 == ___stack_chk_guard) { + return; + } + /* WARNING: Subroutine does not return */ + __stack_chk_fail(); +} + diff --git a/content/decompiled_src/script_load.c b/content/decompiled_src/script_load.c new file mode 100644 index 0000000..86d045d --- /dev/null +++ b/content/decompiled_src/script_load.c @@ -0,0 +1,283 @@ + +/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ +/* Script::load(QiString const&) */ + +void __thiscall Script::load(Script *this,QiString *param_1) + +{ + Game *this_00; + char cVar1; + char cVar2; + char *pcVar3; + undefined4 uVar4; + QiTimer aQStack_180 [16]; + char *apcStack_170 [2]; + char acStack_160 [16]; + undefined **local_150 [2]; + undefined **local_140 [2]; + undefined *local_130; + undefined auStack_128 [256]; + undefined8 local_28; + undefined8 local_20; + undefined8 local_18; + undefined8 local_10; + long local_8; + + *(undefined8 *)(this + 0x58) = 0; + local_8 = ___stack_chk_guard; + unload(this); + QiScript::init((QiScript *)this); + *(Script **)this = this; + QiInputStream::QiInputStream((QiInputStream *)local_150,1); + QiOutputStream::QiOutputStream((QiOutputStream *)local_140,1); + local_20 = 0; + local_150[0] = &PTR__QiMemoryStream_00427560; + local_140[0] = &PTR__QiMemoryStream_00427598; + local_130 = auStack_128; + local_28 = 0x100; + local_18 = 0; + local_10 = 0; + cVar1 = ResMan::load(*(ResMan **)(this + 0x20),param_1,(QiOutputStream *)local_140); + if (cVar1 == '\0') { + pcVar3 = "Could not load script: "; + cVar1 = '\0'; + } + else { + QiString::QiString((QiString *)apcStack_170,""); + cVar1 = QiScript::load((QiScript *)this,(QiString *)apcStack_170,(QiInputStream *)local_150, + (int)local_10); + QiString::~QiString((QiString *)apcStack_170); + if (cVar1 != '\0') { + QiString::QiString((QiString *)apcStack_170,"mgCreateImage"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018297c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgCreateImage"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018297c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgCreateUi"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00183854); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgCreateText"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_001831f8); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetOrigo"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00188a18); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetCrop"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018a554); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgRadioSelect"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018a940); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetUiEnabled"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018a8d8); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetUiModal"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018a870); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetText"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018ab18); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetPos"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00189864); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetRot"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00189e28); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetScale"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00189564); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetAlpha"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00189b50); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetColor"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018a100); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetPos"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018937c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetRot"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00188fd0); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetScale"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00189194); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetAlpha"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00188e0c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetColor"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00188c18); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgIsVisible"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_001889b4); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgDraw"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018894c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGet"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00182578); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSet"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_001824d8); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgCommand"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00182438); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgScriptTime"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018135c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgScriptFrame"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_001813a8); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgFullScreenColor"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00182364); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgCreateSound"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00183558); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgPlaySound"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018acfc); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgIsTouched"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_001820a4); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetLastTouch"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00181328); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetScreenCoord"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00181f90); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetLevelInfo"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00181e84); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgIsCharacterAvailable"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00181dfc); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgCreateCanvas"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00182e9c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgPushCanvas"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018be74); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgPopCanvas"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018bfc8); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetCanvasEnabled"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018b134); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetCanvasWindow"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018b090); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetCanvasMovable"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018afa8); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetUiSelectionCount"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018a830); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetUiSelectionInfo"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018a764); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgDrawReplay"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018273c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetPose"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00181b30); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetPose"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00181c58); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetVelocity"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_001840d8); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetVelocity"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00183f30); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetFilter"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_001846e8); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetDynamic"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00183c8c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgMove"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018438c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgRotate"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00183dc4); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetDistanceBetweenBodies"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00184508); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgGetDistanceToPoint"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00184234); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgInSensor"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018193c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgBreakJoint"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018180c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgSetSensorEnabled"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_001816c8); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgIsGrabbed"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00181500); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgIsBroken"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_001813b8); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgCreateEffect"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018c074); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgParticle"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018b49c); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgRnd"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_001812d4); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgParticlePoof"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_0018b2c4); + QiString::~QiString((QiString *)apcStack_170); + QiString::QiString((QiString *)apcStack_170,"mgCameraShake"); + QiScript::registerFunction((QiScript *)this,(QiString *)apcStack_170,FUN_00181268); + QiString::~QiString((QiString *)apcStack_170); + QiTimer::QiTimer(aQStack_180); + QiString::QiString((QiString *)apcStack_170,"init"); + cVar2 = QiScript::hasFunction((QiScript *)this,(QiString *)apcStack_170); + QiString::~QiString((QiString *)apcStack_170); + if (cVar2 != '\0') { + QiString::QiString((QiString *)apcStack_170,"init()"); + QiScript::execute((QiScript *)this,(QiString *)apcStack_170); + QiString::~QiString((QiString *)apcStack_170); + } + uVar4 = QiTimer::getTime(aQStack_180); + this[0x28] = (Script)0x1; + *(undefined4 *)(this + 0x48) = uVar4; + QiTimer::reset((QiTimer *)(this + 0x30)); + *(undefined4 *)(this + 0x44) = 0; + *(undefined4 *)(this + 0x40) = 0; + goto LAB_00185e24; + } + pcVar3 = "Error compiling script: "; + } + this_00 = gGame; + operator+(pcVar3,param_1); + if (apcStack_170[0] == (char *)0x0) { + apcStack_170[0] = acStack_160; + } + Game::logE(this_00,apcStack_170[0]); + QiString::~QiString((QiString *)apcStack_170); +LAB_00185e24: + local_150[0] = &PTR__QiMemoryStream_00427560; + local_140[0] = &PTR__QiMemoryStream_00427598; + if (local_130 != auStack_128) { + QiFree(local_130); + } + QiOutputStream::~QiOutputStream((QiOutputStream *)local_140); + QiInputStream::~QiInputStream((QiInputStream *)local_150); + if (local_8 == ___stack_chk_guard) { + return; + } + /* WARNING: Subroutine does not return */ + __stack_chk_fail(cVar1); +} +