// // SecretRewardsLayer::showDialog03 from 0x58809c to 0x58888a (2030 bytes) // // 1 xrefs: // > SecretRewardsLayer::onShop @ 0x5897d0 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void SecretRewardsLayer::showDialog03(SecretRewardsLayer *a1) { cocos2d::CCArray *v2; // r4 GameStatsManager *v3; // r0 GameManager *v4; // r0 cocos2d::CCObject *v5; // r0 cocos2d::CCObject *v6; // r0 cocos2d::CCObject *v7; // r0 cocos2d::CCObject *v8; // r0 cocos2d::CCObject *v9; // r0 cocos2d::CCObject *v10; // r0 cocos2d::CCObject *v11; // r0 cocos2d::CCObject *v12; // r0 cocos2d::CCObject *v13; // r0 cocos2d::CCObject *v14; // r0 cocos2d::CCString *v15; // r0 char *CString; // r0 cocos2d::CCObject *v17; // r0 cocos2d::CCObject *v18; // r0 cocos2d::CCObject *v19; // r0 GameManager *v20; // r0 cocos2d::CCString *v21; // r0 char *v22; // r0 cocos2d::CCObject *v23; // r0 cocos2d::CCObject *v24; // r0 cocos2d::CCObject *v25; // r0 int v26; // r5 int v27; // r3 DialogLayer *v28; // r6 cocos2d::CCObject *v29; // r0 cocos2d::CCObject *v30; // r0 cocos2d::CCObject *v31; // r0 cocos2d::CCObject *v32; // r0 int v33; // [sp+4h] [bp-20h] int v34; // [sp+4h] [bp-20h] int v35; // [sp+4h] [bp-20h] int v36; // [sp+4h] [bp-20h] int v37; // [sp+4h] [bp-20h] int v38; // [sp+4h] [bp-20h] int v39; // [sp+4h] [bp-20h] int v40; // [sp+4h] [bp-20h] int v41; // [sp+4h] [bp-20h] int v42; // [sp+4h] [bp-20h] int v43; // [sp+4h] [bp-20h] int v44; // [sp+4h] [bp-20h] int v45; // [sp+4h] [bp-20h] int v46; // [sp+4h] [bp-20h] int v47; // [sp+4h] [bp-20h] char v48; // [sp+14h] [bp-10h] BYREF _BYTE v49[4]; // [sp+18h] [bp-Ch] BYREF v2 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)a1); v3 = GameStatsManager::sharedState(); if ( GameStatsManager::getStat(v3, "13") > 199 && (v4 = GameManager::sharedState(), GameManager::getUGV(v4, "21")) ) { sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "You found all the diamonds!?"); LOWORD(v33) = -1; BYTE2(v33) = -1; v29 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)21, 1065353216, 0.0, v33); cocos2d::CCArray::addObject(v2, v29); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584( (int)v49, "Just need to check: \n" " 1, 2, 3, 200. Yup, all there!"); LOWORD(v45) = -1; BYTE2(v45) = -1; v30 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)22, 1065353216, 0.0, v45); cocos2d::CCArray::addObject(v2, v30); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "My first customer, how exciting!"); LOWORD(v46) = -1; BYTE2(v46) = -1; v31 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)20, 1065353216, 0.0, v46); cocos2d::CCArray::addObject(v2, v31); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "..."); LOWORD(v47) = -1; BYTE2(v47) = -1; v32 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)19, 1065353216, 0.0, v47); cocos2d::CCArray::addObject(v2, v32); sub_774008(v49); sub_774008(&v48); v26 = 1; } else { switch ( a1->m_potborDialogIndex ) { case 0: sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "Oh, a customer!"); LOWORD(v33) = -1; BYTE2(v33) = -1; v5 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)21, 1065353216, 0.0, v33); cocos2d::CCArray::addObject(v2, v5); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "I never had a customer before."); LOWORD(v34) = -1; BYTE2(v34) = -1; v6 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)22, 1065353216, 0.0, v34); cocos2d::CCArray::addObject(v2, v6); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "... Not sure what to do."); LOWORD(v35) = -1; BYTE2(v35) = -1; v7 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)19, 1065353216, 0.0, v35); cocos2d::CCArray::addObject(v2, v7); goto LABEL_9; case 1: sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "Let me check the manual."); LOWORD(v33) = -1; BYTE2(v33) = -1; v8 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)24, 1065353216, 0.0, v33); cocos2d::CCArray::addObject(v2, v8); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "The Shopkeepers handbook: \nYou give stuff, they pay money."); LOWORD(v36) = -1; BYTE2(v36) = -1; v9 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)22, 1065353216, 0.0, v36); cocos2d::CCArray::addObject(v2, v9); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "... Sounds simple enough."); LOWORD(v37) = -1; BYTE2(v37) = -1; v10 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)23, 1065353216, 0.0, v37); cocos2d::CCArray::addObject(v2, v10); goto LABEL_9; case 2: sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "Page 2: Refund policy\nNo refunds!"); LOWORD(v33) = -1; BYTE2(v33) = -1; v11 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)25, 1065353216, 0.0, v33); cocos2d::CCArray::addObject(v2, v11); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584( (int)v49, "Page 3: Shopkeeper etiquette\n... Probably not important."); LOWORD(v38) = -1; BYTE2(v38) = -1; v12 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)20, 1065353216, 0.0, v38); cocos2d::CCArray::addObject(v2, v12); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "Page 4: Self destruct mechanism\nThe page is missing..."); LOWORD(v39) = -1; BYTE2(v39) = -1; v13 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)22, 1065353216, 0.0, v39); cocos2d::CCArray::addObject(v2, v13); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "Not sure if I should be worried about this."); LOWORD(v40) = -1; BYTE2(v40) = -1; v14 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)23, 1065353216, 0.0, v40); cocos2d::CCArray::addObject(v2, v14); goto LABEL_9; case 3: sub_776584((int)&v48, "Potbor"); v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Page 394: Customer must have %i diamonds.", (const char *)&dword_C8); CString = (char *)cocos2d::CCString::getCString(v15); sub_776584((int)v49, CString); LOWORD(v33) = -1; BYTE2(v33) = -1; v17 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)24, 1065353216, 0.0, v33); cocos2d::CCArray::addObject(v2, v17); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "What's a diamond?"); LOWORD(v41) = -1; BYTE2(v41) = -1; v18 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)22, 1065353216, 0.0, v41); cocos2d::CCArray::addObject(v2, v18); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "..."); LOWORD(v42) = -1; BYTE2(v42) = -1; v19 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)20, 1065353216, 0.0, v42); cocos2d::CCArray::addObject(v2, v19); sub_774008(v49); sub_774008(&v48); v20 = GameManager::sharedState(); GameManager::setUGV(v20, "21", 1); break; case 4: sub_776584((int)&v48, "Potbor"); v21 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"You must collect %i Diamonds before I can let " "you in the Shop!", (const char *)&dword_C8); v22 = (char *)cocos2d::CCString::getCString(v21); sub_776584((int)v49, v22); LOWORD(v33) = -1; BYTE2(v33) = -1; v23 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)25, 1061997773, 0.0, v33); cocos2d::CCArray::addObject(v2, v23); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "It says so in the handbook..."); LOWORD(v43) = -1; BYTE2(v43) = -1; v24 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)23, 1065353216, 0.0, v43); cocos2d::CCArray::addObject(v2, v24); sub_774008(v49); sub_774008(&v48); sub_776584((int)&v48, "Potbor"); sub_776584((int)v49, "..."); LOWORD(v44) = -1; BYTE2(v44) = -1; v25 = (cocos2d::CCObject *)DialogObject::create( (DialogObject *)&v48, (std::string)v49, (std::string)20, 1065353216, 0.0, v44); cocos2d::CCArray::addObject(v2, v25); LABEL_9: sub_774008(v49); sub_774008(&v48); break; default: break; } v26 = 0; v27 = a1->m_potborDialogIndex + 1; if ( v27 > 4 ) a1->m_potborDialogIndex = 0; else a1->m_potborDialogIndex = v27; } v28 = DialogLayer::createWithObjects(v2, (int)&dword_0 + 2); a1->addChild_0(a1, v28, 100); v28->setTag(v28, 2); if ( v26 ) v28->m_delegate = &a1->DialogDelegate; DialogLayer::updateChatPlacement(v28, Center); DialogLayer::animateInRandomSide(v28); }
GD Web Decomp Icon

GD Web Decomp

Raw Source