{"type": "func", "start": 4298211624, "end": 4298211792, "name": "GameManager::loadFont", "pseudocode": "// \n// GameManager::loadFont from 0x100318128 to 0x1003181d0 (168 bytes)\n// \n// 6 xrefs:\n// > SecretLayer5::init @ 0x1000748d8\n// > PlayLayer::prepareCreateObjectsFromSetup @ 0x10011632c\n// > SelectFontLayer::updateFontLabel @ 0x1002d2320\n// > GameManager::getFontFile @ 0x1003181f8\n// > GameManager::getFontTexture @ 0x100318264\n// > LevelEditorLayer::createObjectsFromSetup @ 0x100357ef0\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 __fastcall GameManager::loadFont(GameManager *a1, int a2)\n{\n  int v2; // w8\n  int v3; // w22\n  int m_loadedFont; // w8\n  cocos2d::CCString *v7; // x0\n  const char *CString; // x21\n  cocos2d::CCTextureCache *v9; // x0\n  cocos2d::CCString *v10; // x0\n  const char *v11; // x20\n  cocos2d::CCTextureCache *v12; // x0\n\n  if ( a2 >= 59 )\n    v2 = 59;\n  else\n    v2 = a2;\n  v3 = v2 & ~(v2 >> 31);\n  m_loadedFont = a1->m_loadedFont;\n  if ( v3 != m_loadedFont )\n  {\n    if ( m_loadedFont )\n    {\n      v7 = (cocos2d::CCString *)sub_100268F4C(\"gjFont%02d.png\", a1->m_loadedFont);\n      CString = cocos2d::CCString::getCString(v7);\n      v9 = cocos2d::CCTextureCache::sharedTextureCache();\n      cocos2d::CCTextureCache::removeTextureForKey(v9, CString);\n    }\n    if ( a2 >= 1 )\n    {\n      v10 = (cocos2d::CCString *)sub_100268F4C(\"gjFont%02d.png\", v3);\n      v11 = cocos2d::CCString::getCString(v10);\n      v12 = cocos2d::CCTextureCache::sharedTextureCache();\n      cocos2d::CCTextureCache::addImage(v12, v11, 0);\n    }\n    a1->m_loadedFont = v3;\n  }\n}", "assembly": "; \n; GameManager::loadFont from 0x100318128 to 0x1003181d0 (168 bytes)\n; \n; 6 xrefs:\n; > SecretLayer5::init @ 0x1000748d8\n; > PlayLayer::prepareCreateObjectsFromSetup @ 0x10011632c\n; > SelectFontLayer::updateFontLabel @ 0x1002d2320\n; > GameManager::getFontFile @ 0x1003181f8\n; > GameManager::getFontTexture @ 0x100318264\n; > LevelEditorLayer::createObjectsFromSetup @ 0x100357ef0\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\nSUB             SP, SP, #0x40                                          ; +0x0, 0x100318128\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x10031812c\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x100318130\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x100318134\nADD             X29, SP, #0x30                                         ; +0x10, 0x100318138\nCMP             W1, #0x3B ; ';'                                        ; +0x14, 0x10031813c\nMOV             W8, #0x3B ; ';'                                        ; +0x18, 0x100318140\nCSEL            W8, W1, W8, LT                                         ; +0x1c, 0x100318144\nBIC             W22, W8, W8,ASR#31                                     ; +0x20, 0x100318148\nLDR             W8, [X0,#0x3AC]                                        ; +0x24, 0x10031814c\nCMP             W22, W8                                                ; +0x28, 0x100318150\nB.EQ            loc_1003181BC                                          ; +0x2c, 0x100318154\nMOV             X20, X1                                                ; +0x30, 0x100318158\nMOV             X19, X0                                                ; +0x34, 0x10031815c\nCBZ             W8, loc_100318188                                      ; +0x38, 0x100318160\nSTR             X8, [SP,#0x30+var_30]                                  ; +0x3c, 0x100318164\nADRL            X0, aGjfont02dPng; \"gjFont%02d.png\"                    ; +0x40, 0x100318168\nBL              sub_100268F4C                                          ; +0x48, 0x100318170\nBL              cocos2d__CCString__getCString                          ; +0x4c, 0x100318174\nMOV             X21, X0                                                ; +0x50, 0x100318178\nBL              cocos2d__CCTextureCache__sharedTextureCache            ; +0x54, 0x10031817c\nMOV             X1, X21                                                ; +0x58, 0x100318180\nBL              cocos2d__CCTextureCache__removeTextureForKey           ; +0x5c, 0x100318184\nCMP             W20, #1                                                ; +0x60, 0x100318188\nB.LT            loc_1003181B8                                          ; +0x64, 0x10031818c\nSTR             X22, [SP,#0x30+var_30]                                 ; +0x68, 0x100318190\nADRL            X0, aGjfont02dPng; \"gjFont%02d.png\"                    ; +0x6c, 0x100318194\nBL              sub_100268F4C                                          ; +0x74, 0x10031819c\nBL              cocos2d__CCString__getCString                          ; +0x78, 0x1003181a0\nMOV             X20, X0                                                ; +0x7c, 0x1003181a4\nBL              cocos2d__CCTextureCache__sharedTextureCache            ; +0x80, 0x1003181a8\nMOV             X1, X20                                                ; +0x84, 0x1003181ac\nMOV             W2, #0                                                 ; +0x88, 0x1003181b0\nBL              cocos2d__CCTextureCache__addImage                      ; +0x8c, 0x1003181b4\nSTR             W22, [X19,#0x3AC]                                      ; +0x90, 0x1003181b8\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x94, 0x1003181bc\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x98, 0x1003181c0\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x9c, 0x1003181c4\nADD             SP, SP, #0x40 ; '@'                                    ; +0xa0, 0x1003181c8\nRET                                                                    ; +0xa4, 0x1003181cc", "xrefs": ["SecretLayer5::init @ 0x1000748d8", "PlayLayer::prepareCreateObjectsFromSetup @ 0x10011632c", "SelectFontLayer::updateFontLabel @ 0x1002d2320", "GameManager::getFontFile @ 0x1003181f8", "GameManager::getFontTexture @ 0x100318264", "LevelEditorLayer::createObjectsFromSetup @ 0x100357ef0"], "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"}