{"type": "func", "start": 5070496, "end": 5071022, "name": "DialogLayer::displayDialogObject", "pseudocode": "// \n// DialogLayer::displayDialogObject from 0x4d5ea0 to 0x4d60ae (526 bytes)\n// \n// 2 xrefs:\n// > DialogLayer::displayNextObject @ 0x4d6140\n// > DialogLayer::init @ 0x4d63f4\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid DialogLayer::displayDialogObject(DialogLayer *a1, DialogObject *a2)\n{\n  cocos2d::CCSprite *m_characterSprite; // r0\n  TextArea *m_textArea; // r3\n  cocos2d::CCLabelBMFont *m_characterLabel; // r8\n  void (__fastcall *setString)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // r9\n  cocos2d::CCLabelBMFont *v8; // r0\n  GLubyte b; // r2\n  GLubyte r; // lr\n  void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r3\n  const char *m_characterFrame; // r1\n  cocos2d::CCString *v13; // r0\n  cocos2d::CCSprite *CString; // r0\n  const char *v15; // r1\n  cocos2d::CCSprite *v16; // r0\n  cocos2d::CCSprite *v17; // r8\n  void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9\n  float m_textScale; // s17\n  TextArea *v20; // r6\n  void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8\n  TextArea *v22; // r6\n  void (__fastcall *v23)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8\n  char *v24; // [sp+14h] [bp-18h] BYREF\n  char v25; // [sp+18h] [bp-14h] BYREF\n  cocos2d::CCPoint v26; // [sp+1Ch] [bp-10h] BYREF\n\n  if ( a2 )\n  {\n    a1->m_animating = 1;\n    a1->m_skippable = a2->m_unskippable;\n    cocos2d::CCNode::stopAllActions(a1->m_navButtonSprite);\n    a1->m_navButtonSprite->setOpacity(a1->m_navButtonSprite, 0);\n    m_characterSprite = a1->m_characterSprite;\n    if ( m_characterSprite )\n    {\n      m_characterSprite->removeMeAndCleanup(m_characterSprite);\n      a1->m_characterSprite = nullptr;\n    }\n    m_textArea = a1->m_textArea;\n    if ( m_textArea )\n    {\n      m_textArea->m_delegate = nullptr;\n      a1->m_textArea->removeMeAndCleanup(a1->m_textArea);\n      a1->m_textArea = nullptr;\n    }\n    m_characterLabel = a1->m_characterLabel;\n    setString = m_characterLabel->setString;\n    sub_775C20(&v26);\n    setString(m_characterLabel, (const unsigned __int8 *)LODWORD(v26.x));\n    sub_774008(&v26);\n    v8 = a1->m_characterLabel;\n    b = a2->m_nameColor.b;\n    r = a2->m_nameColor.r;\n    setColor = v8->setColor;\n    BYTE1(v26.x) = a2->m_nameColor.g;\n    LOBYTE(v26.x) = r;\n    BYTE2(v26.x) = b;\n    setColor(v8, (const cocos2d::ccColor3B *)&v26);\n    m_characterFrame = (const char *)a2->m_characterFrame;\n    if ( (int)m_characterFrame > 0 )\n    {\n      if ( (int)m_characterFrame >= 56 )\n        m_characterFrame = (const char *)&dword_38;\n      v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                   (cocos2d::CCString *)\"dialogIcon_%03d.png\",\n                                   m_characterFrame);\n      CString = (cocos2d::CCSprite *)cocos2d::CCString::getCString(v13);\n      v16 = (cocos2d::CCSprite *)cocos2d::CCSprite::create(CString, v15);\n      a1->m_characterSprite = v16;\n      a1->m_mainLayer->addChild_0(a1->m_mainLayer, v16, 2);\n      v17 = a1->m_characterSprite;\n      setPosition = v17->setPosition;\n      cocos2d::CCPoint::CCPoint(&v26, -143.0, 0.0);\n      setPosition(v17, &v26);\n    }\n    m_textScale = a2->m_textScale;\n    sub_775C20(&v24);\n    sub_776584((int)&v25, v24);\n    cocos2d::CCPoint::CCPoint(&v26, 0.0, 1.0);\n    a1->m_textArea = (TextArea *)TextArea::create(\n                                   (TextArea *)&v25,\n                                   (std::string)\"chatFont.fnt\",\n                                   (const char *)0x3F800000,\n                                   COERCE_INT(220.0 / m_textScale),\n                                   &v26,\n                                   (cocos2d::CCPoint)1101004800LL);\n    sub_774008(&v25);\n    sub_774008(&v24);\n    v20 = a1->m_textArea;\n    setAnchorPoint = v20->setAnchorPoint;\n    cocos2d::CCPoint::CCPoint(&v26, 0.0, 0.5);\n    setAnchorPoint(v20, &v26);\n    ((void (__fastcall *)(TextArea *, _DWORD))a1->m_textArea->setScale)(a1->m_textArea, LODWORD(m_textScale));\n    a1->m_textArea->m_delegate = &a1->TextAreaDelegate;\n    a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_textArea, 3);\n    v22 = a1->m_textArea;\n    v23 = v22->setPosition;\n    cocos2d::CCPoint::CCPoint(&v26, -92.0, 0.0);\n    v23(v22, &v26);\n    TextArea::fadeInCharacters(a1->m_textArea, 0.2, 0.02, 0, Fade);\n  }\n}", "assembly": "; \n; DialogLayer::displayDialogObject from 0x4d5ea0 to 0x4d60ae (526 bytes)\n; \n; 2 xrefs:\n; > DialogLayer::displayNextObject @ 0x4d6140\n; > DialogLayer::init @ 0x4d63f4\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nLDR             R3, =(__stack_chk_guard_ptr - 0x4D5EAA)                ; +0x0, 0x4d5ea0\nPUSH.W          {R4-R9,LR}                                             ; +0x2, 0x4d5ea2\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x4d5ea6\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x4d5ea8\nVPUSH           {D8}                                                   ; +0xa, 0x4d5eaa\nMOV             R4, R0                                                 ; +0xe, 0x4d5eae\nLDR             R2, [R3]                                               ; +0x10, 0x4d5eb0\nMOV             R6, R1                                                 ; +0x12, 0x4d5eb2\nMOV             R7, R3                                                 ; +0x14, 0x4d5eb4\nSUB             SP, SP, #0x2C                                          ; +0x16, 0x4d5eb6\nSTR             R2, [SP,#0x2C+var_8]                                   ; +0x18, 0x4d5eb8\nCMP             R1, #0                                                 ; +0x1a, 0x4d5eba\nBEQ.W           loc_4D6098                                             ; +0x1c, 0x4d5ebc\nMOVS            R3, #1                                                 ; +0x20, 0x4d5ec0\nSTRB.W          R3, [R0,#0x1DC]                                        ; +0x22, 0x4d5ec2\nLDRB.W          R3, [R1,#0x48]                                         ; +0x26, 0x4d5ec6\nSTRB.W          R3, [R0,#0x1DD]                                        ; +0x2a, 0x4d5eca\nLDR.W           R0, [R0,#0x1D8]; this                                  ; +0x2e, 0x4d5ece\nBL              _ZN7cocos2d6CCNode14stopAllActionsEv; cocos2d::CCNode::stopAllActions(void) ; +0x32, 0x4d5ed2\nLDR.W           R0, [R4,#0x1D8]                                        ; +0x36, 0x4d5ed6\nMOVS            R1, #0                                                 ; +0x3a, 0x4d5eda\nLDR             R3, [R0]                                               ; +0x3c, 0x4d5edc\nLDR.W           R3, [R3,#0x1C0]                                        ; +0x3e, 0x4d5ede\nBLX             R3                                                     ; +0x42, 0x4d5ee2\nLDR.W           R0, [R4,#0x1CC]                                        ; +0x44, 0x4d5ee4\nCBZ             R0, loc_4D5EF8                                         ; +0x48, 0x4d5ee8\nLDR             R3, [R0]                                               ; +0x4a, 0x4d5eea\nLDR.W           R3, [R3,#0x104]                                        ; +0x4c, 0x4d5eec\nBLX             R3                                                     ; +0x50, 0x4d5ef0\nMOVS            R3, #0                                                 ; +0x52, 0x4d5ef2\nSTR.W           R3, [R4,#0x1CC]                                        ; +0x54, 0x4d5ef4\nLDR.W           R3, [R4,#0x1C8]                                        ; +0x58, 0x4d5ef8\nCBZ             R3, loc_4D5F14                                         ; +0x5c, 0x4d5efc\nMOVS            R5, #0                                                 ; +0x5e, 0x4d5efe\nSTR.W           R5, [R3,#0x23C]                                        ; +0x60, 0x4d5f00\nLDR.W           R0, [R4,#0x1C8]                                        ; +0x64, 0x4d5f04\nLDR             R3, [R0]                                               ; +0x68, 0x4d5f08\nLDR.W           R3, [R3,#0x104]                                        ; +0x6a, 0x4d5f0a\nBLX             R3                                                     ; +0x6e, 0x4d5f0e\nSTR.W           R5, [R4,#0x1C8]                                        ; +0x70, 0x4d5f10\nLDR.W           R8, [R4,#0x1C4]                                        ; +0x74, 0x4d5f14\nADD             R5, SP, #0x2C+var_10                                   ; +0x78, 0x4d5f18\nADD.W           R1, R6, #0x38 ; '8'                                    ; +0x7a, 0x4d5f1a\nMOV             R0, R5                                                 ; +0x7e, 0x4d5f1e\nLDR.W           R3, [R8]                                               ; +0x80, 0x4d5f20\nLDR.W           R9, [R3,#0x1C8]                                        ; +0x84, 0x4d5f24\nBL              sub_775C20                                             ; +0x88, 0x4d5f28\nMOV             R0, R8                                                 ; +0x8c, 0x4d5f2c\nLDR             R1, [SP,#0x2C+var_10]                                  ; +0x8e, 0x4d5f2e\nBLX             R9                                                     ; +0x90, 0x4d5f30\nMOV             R0, R5                                                 ; +0x92, 0x4d5f32\nBL              sub_774008                                             ; +0x94, 0x4d5f34\nLDR.W           R0, [R4,#0x1C4]                                        ; +0x98, 0x4d5f38\nLDRB.W          R1, [R6,#0x41]                                         ; +0x9c, 0x4d5f3c\nLDRB.W          R2, [R6,#0x42]                                         ; +0xa0, 0x4d5f40\nLDR             R3, [R0]                                               ; +0xa4, 0x4d5f44\nLDRB.W          LR, [R6,#0x40]                                         ; +0xa6, 0x4d5f46\nLDR.W           R3, [R3,#0x210]                                        ; +0xaa, 0x4d5f4a\nSTRB.W          R1, [SP,#0x2C+var_10+1]                                ; +0xae, 0x4d5f4e\nMOV             R1, R5                                                 ; +0xb2, 0x4d5f52\nSTRB.W          LR, [SP,#0x2C+var_10]                                  ; +0xb4, 0x4d5f54\nSTRB.W          R2, [SP,#0x2C+var_10+2]                                ; +0xb8, 0x4d5f58\nBLX             R3                                                     ; +0xbc, 0x4d5f5c\nLDR             R1, [R6,#0x3C]                                         ; +0xbe, 0x4d5f5e\nCMP             R1, #0                                                 ; +0xc0, 0x4d5f60\nBLE             loc_4D5FB0                                             ; +0xc2, 0x4d5f62\nCMP             R1, #0x38 ; '8'                                        ; +0xc4, 0x4d5f64\nLDR             R0, =(aDialogicon03dP - 0x4D5F72); \"dialogIcon_%03d.png\" ; +0xc6, 0x4d5f66\nIT GE                                                                  ; +0xc8, 0x4d5f68\nMOVGE           R1, #0x38 ; '8'                                        ; +0xca, 0x4d5f6a\nCMP             R1, #1                                                 ; +0xcc, 0x4d5f6c\nADD             R0, PC; \"dialogIcon_%03d.png\"                          ; +0xce, 0x4d5f6e\nIT LT                                                                  ; +0xd0, 0x4d5f70\nMOVLT           R1, #(dword_0+1); char *                               ; +0xd2, 0x4d5f72\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0xd4, 0x4d5f74\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0xd8, 0x4d5f78\nBL              _ZN7cocos2d8CCSprite6createEPKc; cocos2d::CCSprite::create(char const*) ; +0xdc, 0x4d5f7c\nMOVS            R2, #2                                                 ; +0xe0, 0x4d5f80\nMOV             R1, R0                                                 ; +0xe2, 0x4d5f82\nSTR.W           R0, [R4,#0x1CC]                                        ; +0xe4, 0x4d5f84\nLDR.W           R0, [R4,#0x1C0]                                        ; +0xe8, 0x4d5f88\nLDR             R3, [R0]                                               ; +0xec, 0x4d5f8c\nLDR.W           R3, [R3,#0xE0]                                         ; +0xee, 0x4d5f8e\nBLX             R3                                                     ; +0xf2, 0x4d5f92\nLDR.W           R8, [R4,#0x1CC]                                        ; +0xf4, 0x4d5f94\nLDR             R1, flt_4D60B0; float                                  ; +0xf8, 0x4d5f98\nMOV             R0, R5; this                                           ; +0xfa, 0x4d5f9a\nMOVS            R2, #0; float                                          ; +0xfc, 0x4d5f9c\nLDR.W           R3, [R8]                                               ; +0xfe, 0x4d5f9e\nLDR.W           R9, [R3,#0x5C]                                         ; +0x102, 0x4d5fa2\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x106, 0x4d5fa6\nMOV             R0, R8                                                 ; +0x10a, 0x4d5faa\nMOV             R1, R5                                                 ; +0x10c, 0x4d5fac\nBLX             R9                                                     ; +0x10e, 0x4d5fae\nADD.W           R8, SP, #0x2C+var_18                                   ; +0x110, 0x4d5fb0\nADD.W           R1, R6, #0x34 ; '4'                                    ; +0x114, 0x4d5fb4\nVLDR            S17, [R6,#0x44]                                        ; +0x118, 0x4d5fb8\nADD             R6, SP, #0x2C+var_14                                   ; +0x11c, 0x4d5fbc\nMOV             R0, R8                                                 ; +0x11e, 0x4d5fbe\nBL              sub_775C20                                             ; +0x120, 0x4d5fc0\nMOV             R0, R6; int                                            ; +0x124, 0x4d5fc4\nLDR             R1, [SP,#0x2C+var_18]; char *                          ; +0x126, 0x4d5fc6\nADD             R2, SP, #0x2C+var_1C                                   ; +0x128, 0x4d5fc8\nBL              sub_776584                                             ; +0x12a, 0x4d5fca\nVLDR            S16, =220.0                                            ; +0x12e, 0x4d5fce\nMOV             R0, R5; this                                           ; +0x132, 0x4d5fd2\nMOVS            R1, #0; float                                          ; +0x134, 0x4d5fd4\nMOV.W           R2, #0x3F800000; float                                 ; +0x136, 0x4d5fd6\nVDIV.F32        S16, S16, S17                                          ; +0x13a, 0x4d5fda\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x13e, 0x4d5fde\nLDR             R3, =0x41A00000                                        ; +0x142, 0x4d5fe2\nMOV             R0, R6                                                 ; +0x144, 0x4d5fe4\nLDR             R1, =(aChatfontFnt - 0x4D5FF4); \"chatFont.fnt\"         ; +0x146, 0x4d5fe6\nMOV.W           R2, #0x3F800000                                        ; +0x148, 0x4d5fe8\nSTR             R5, [SP,#0x2C+var_2C]                                  ; +0x14c, 0x4d5fec\nSTR             R3, [SP,#0x2C+var_28]                                  ; +0x14e, 0x4d5fee\nADD             R1, PC; \"chatFont.fnt\"                                 ; +0x150, 0x4d5ff0\nMOVS            R3, #0                                                 ; +0x152, 0x4d5ff2\nSTR             R3, [SP,#0x2C+var_24]                                  ; +0x154, 0x4d5ff4\nVMOV            R3, S16                                                ; +0x156, 0x4d5ff6\nBL              _ZN8TextArea6createESsPKcffN7cocos2d7CCPointEfb; TextArea::create(std::string,char const*,float,float,cocos2d::CCPoint,float,bool) ; +0x15a, 0x4d5ffa\nSTR.W           R0, [R4,#0x1C8]                                        ; +0x15e, 0x4d5ffe\nMOV             R0, R6                                                 ; +0x162, 0x4d6002\nBL              sub_774008                                             ; +0x164, 0x4d6004\nMOV             R0, R8                                                 ; +0x168, 0x4d6008\nBL              sub_774008                                             ; +0x16a, 0x4d600a\nLDR.W           R6, [R4,#0x1C8]                                        ; +0x16e, 0x4d600e\nMOV.W           R2, #0x3F000000; float                                 ; +0x172, 0x4d6012\nMOV             R0, R5; this                                           ; +0x176, 0x4d6016\nMOVS            R1, #0; float                                          ; +0x178, 0x4d6018\nLDR             R3, [R6]                                               ; +0x17a, 0x4d601a\nLDR.W           R8, [R3,#0x8C]                                         ; +0x17c, 0x4d601c\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x180, 0x4d6020\nMOV             R0, R6                                                 ; +0x184, 0x4d6024\nMOV             R1, R5                                                 ; +0x186, 0x4d6026\nBLX             R8                                                     ; +0x188, 0x4d6028\nLDR.W           R0, [R4,#0x1C8]                                        ; +0x18a, 0x4d602a\nVMOV            R1, S17                                                ; +0x18e, 0x4d602e\nLDR             R3, [R0]                                               ; +0x192, 0x4d6032\nLDR             R3, [R3,#0x50]                                         ; +0x194, 0x4d6034\nBLX             R3                                                     ; +0x196, 0x4d6036\nLDR.W           R3, [R4,#0x1C8]                                        ; +0x198, 0x4d6038\nADD.W           R2, R4, #0x1B8                                         ; +0x19c, 0x4d603c\nSTR.W           R2, [R3,#0x23C]                                        ; +0x1a0, 0x4d6040\nMOVS            R2, #3                                                 ; +0x1a4, 0x4d6044\nLDR.W           R0, [R4,#0x1C0]                                        ; +0x1a6, 0x4d6046\nLDR.W           R1, [R4,#0x1C8]                                        ; +0x1aa, 0x4d604a\nLDR             R3, [R0]                                               ; +0x1ae, 0x4d604e\nLDR.W           R3, [R3,#0xE0]                                         ; +0x1b0, 0x4d6050\nBLX             R3                                                     ; +0x1b4, 0x4d6054\nLDR.W           R6, [R4,#0x1C8]                                        ; +0x1b6, 0x4d6056\nMOVS            R2, #0; float                                          ; +0x1ba, 0x4d605a\nMOV             R0, R5; this                                           ; +0x1bc, 0x4d605c\nLDR             R1, flt_4D60BC; float                                  ; +0x1be, 0x4d605e\nLDR             R3, [R6]                                               ; +0x1c0, 0x4d6060\nLDR.W           R8, [R3,#0x5C]                                         ; +0x1c2, 0x4d6062\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x1c6, 0x4d6066\nMOV             R0, R6                                                 ; +0x1ca, 0x4d606a\nMOV             R1, R5                                                 ; +0x1cc, 0x4d606c\nBLX             R8                                                     ; +0x1ce, 0x4d606e\nMOVS            R3, #0                                                 ; +0x1d0, 0x4d6070\nLDR.W           R0, [R4,#0x1C8]                                        ; +0x1d2, 0x4d6072\nSTR             R3, [SP,#0x2C+var_2C]                                  ; +0x1d6, 0x4d6076\nLDR             R1, =0x3E4CCCCD                                        ; +0x1d8, 0x4d6078\nLDR             R2, =0x3CA3D70A                                        ; +0x1da, 0x4d607a\nBL              _ZN8TextArea16fadeInCharactersEffb15TextFadeInStyle; TextArea::fadeInCharacters(float,float,bool,TextFadeInStyle) ; +0x1dc, 0x4d607c\nB               loc_4D6098                                             ; +0x1e0, 0x4d6080\nMOV             R0, R5                                                 ; +0x1e2, 0x4d6082\nB               loc_4D6090                                             ; +0x1e4, 0x4d6084\nMOV             R0, R6                                                 ; +0x1e6, 0x4d6086\nBL              sub_774008                                             ; +0x1e8, 0x4d6088\nB               loc_4D608E                                             ; +0x1ec, 0x4d608c\nMOV             R0, R8                                                 ; +0x1ee, 0x4d608e\nBL              sub_774008                                             ; +0x1f0, 0x4d6090\nBL              __cxa_end_cleanup                                      ; +0x1f4, 0x4d6094\nLDR             R2, [SP,#0x2C+var_8]                                   ; +0x1f8, 0x4d6098\nLDR             R3, [R7]                                               ; +0x1fa, 0x4d609a\nCMP             R2, R3                                                 ; +0x1fc, 0x4d609c\nBEQ             loc_4D60A4                                             ; +0x1fe, 0x4d609e\nBLX             __stack_chk_fail                                       ; +0x200, 0x4d60a0\nADD             SP, SP, #0x2C ; ','                                    ; +0x204, 0x4d60a4\nVPOP            {D8}                                                   ; +0x206, 0x4d60a6\nPOP.W           {R4-R9,PC}                                             ; +0x20a, 0x4d60aa", "xrefs": ["DialogLayer::displayNextObject @ 0x4d6140", "DialogLayer::init @ 0x4d63f4"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}