gdextension_compat_hashes.cpp 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855
  1. /**************************************************************************/
  2. /* gdextension_compat_hashes.cpp */
  3. /**************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /**************************************************************************/
  8. /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
  9. /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /**************************************************************************/
  30. #include "gdextension_compat_hashes.h"
  31. #ifndef DISABLE_DEPRECATED
  32. #include "core/object/class_db.h"
  33. #include "core/variant/variant.h"
  34. HashMap<StringName, LocalVector<GDExtensionCompatHashes::Mapping>> GDExtensionCompatHashes::mappings;
  35. bool GDExtensionCompatHashes::lookup_current_hash(const StringName &p_class, const StringName &p_method, uint32_t p_legacy_hash, uint32_t *r_current_hash) {
  36. LocalVector<Mapping> *methods = mappings.getptr(p_class);
  37. if (!methods) {
  38. return false;
  39. }
  40. for (const Mapping &mapping : *methods) {
  41. if (mapping.method == p_method && mapping.legacy_hash == p_legacy_hash) {
  42. *r_current_hash = mapping.current_hash;
  43. return true;
  44. }
  45. }
  46. return false;
  47. }
  48. bool GDExtensionCompatHashes::get_legacy_hashes(const StringName &p_class, const StringName &p_method, Array &r_hashes, bool p_check_valid) {
  49. LocalVector<Mapping> *methods = mappings.getptr(p_class);
  50. if (!methods) {
  51. return false;
  52. }
  53. bool found = false;
  54. for (const Mapping &mapping : *methods) {
  55. if (mapping.method == p_method) {
  56. if (p_check_valid) {
  57. MethodBind *mb = ClassDB::get_method_with_compatibility(p_class, p_method, mapping.current_hash);
  58. if (!mb) {
  59. WARN_PRINT(vformat("Compatibility hash %d mapped to non-existent hash %d. Please update gdextension_compat_hashes.cpp.", mapping.legacy_hash, mapping.current_hash));
  60. continue;
  61. }
  62. }
  63. r_hashes.push_back(mapping.legacy_hash);
  64. found = true;
  65. }
  66. }
  67. return found;
  68. }
  69. void GDExtensionCompatHashes::initialize() {
  70. // clang-format off
  71. mappings.insert("AESContext", {
  72. { "start", 3167574919, 3122411423 },
  73. });
  74. mappings.insert("AStar2D", {
  75. { "add_point", 3370185124, 4074201818 },
  76. { "set_point_disabled", 4023243586, 972357352 },
  77. { "connect_points", 3785370599, 3710494224 },
  78. { "disconnect_points", 3785370599, 3710494224 },
  79. { "are_points_connected", 4063588998, 2288175859 },
  80. });
  81. mappings.insert("AStar3D", {
  82. { "add_point", 2920922839, 1038703438 },
  83. { "set_point_disabled", 4023243586, 972357352 },
  84. { "connect_points", 3785370599, 3710494224 },
  85. { "disconnect_points", 3785370599, 3710494224 },
  86. { "are_points_connected", 4063588998, 2288175859 },
  87. });
  88. mappings.insert("AStarGrid2D", {
  89. { "set_point_solid", 2825551965, 1765703753 },
  90. { "fill_solid_region", 1152863744, 2261970063 },
  91. });
  92. mappings.insert("AcceptDialog", {
  93. { "add_button", 4158837846, 3328440682 },
  94. });
  95. mappings.insert("Animation", {
  96. { "add_track", 2393815928, 3843682357 },
  97. { "track_insert_key", 1985425300, 808952278 },
  98. { "track_find_key", 3898229885, 3245197284 },
  99. { "bezier_track_insert_key", 1057544502, 3656773645 },
  100. { "bezier_track_set_key_in_handle", 1028302688, 1719223284 },
  101. { "bezier_track_set_key_out_handle", 1028302688, 1719223284 },
  102. { "audio_track_insert_key", 3489962123, 4021027286 },
  103. });
  104. mappings.insert("AnimationNode", {
  105. { "blend_animation", 11797022, 1630801826 },
  106. { "blend_node", 263389446, 1746075988 },
  107. { "blend_input", 2709059328, 1361527350 },
  108. });
  109. mappings.insert("AnimationNodeBlendSpace1D", {
  110. { "add_blend_point", 4069484420, 285050433 },
  111. });
  112. mappings.insert("AnimationNodeBlendSpace2D", {
  113. { "add_blend_point", 1533588937, 402261981 },
  114. { "add_triangle", 642454959, 753017335 },
  115. });
  116. mappings.insert("AnimationNodeBlendTree", {
  117. { "add_node", 2055804584, 1980270704 },
  118. });
  119. mappings.insert("AnimationNodeStateMachine", {
  120. { "add_node", 2055804584, 1980270704 },
  121. });
  122. mappings.insert("AnimationNodeStateMachinePlayback", {
  123. { "travel", 3683006648, 3823612587 },
  124. { "start", 3683006648, 3823612587 },
  125. });
  126. mappings.insert("ArrayMesh", {
  127. { "add_surface_from_arrays", 172284304, 1796411378 },
  128. });
  129. mappings.insert("AudioEffectSpectrumAnalyzerInstance", {
  130. { "get_magnitude_for_frequency_range", 2693213071, 797993915 },
  131. });
  132. mappings.insert("AudioServer", {
  133. { "add_bus_effect", 4147765248, 4068819785 },
  134. { "get_bus_effect_instance", 2887144608, 1829771234 },
  135. });
  136. mappings.insert("AudioStreamPlaybackPolyphonic", {
  137. { "play_stream", 3792189967, 604492179 },
  138. });
  139. mappings.insert("AudioStreamRandomizer", {
  140. { "add_stream", 3197802065, 1892018854 },
  141. });
  142. mappings.insert("BitMap", {
  143. { "create_from_image_alpha", 505265891, 106271684 },
  144. { "opaque_to_polygons", 876132484, 48478126 },
  145. });
  146. mappings.insert("CanvasItem", {
  147. { "draw_line", 2516941890, 1562330099 },
  148. { "draw_dashed_line", 2175215884, 684651049 },
  149. { "draw_polyline", 4175878946, 3797364428 },
  150. { "draw_polyline_colors", 2239164197, 2311979562 },
  151. { "draw_arc", 3486841771, 4140652635 },
  152. { "draw_multiline", 4230657331, 2239075205 },
  153. { "draw_multiline_colors", 235933050, 4072951537 },
  154. { "draw_rect", 84391229, 2417231121 },
  155. { "draw_texture", 1695860435, 520200117 },
  156. { "draw_texture_rect", 3204081724, 3832805018 },
  157. { "draw_texture_rect_region", 3196597532, 3883821411 },
  158. { "draw_msdf_texture_rect_region", 2672026175, 4219163252 },
  159. { "draw_lcd_texture_rect_region", 169610548, 3212350954 },
  160. { "draw_primitive", 2248678295, 3288481815 },
  161. { "draw_polygon", 2683625537, 974537912 },
  162. { "draw_colored_polygon", 1659099617, 15245644 },
  163. { "draw_string", 2552080639, 728290553 },
  164. { "draw_multiline_string", 4002645436, 1927038192 },
  165. { "draw_string_outline", 850005221, 340562381 },
  166. { "draw_multiline_string_outline", 3717870722, 1912318525 },
  167. { "draw_char", 2329089032, 3339793283 },
  168. { "draw_char_outline", 419453826, 3302344391 },
  169. { "draw_mesh", 1634855856, 153818295 },
  170. { "draw_set_transform", 3283884939, 288975085 },
  171. { "draw_animation_slice", 2295343543, 3112831842 },
  172. });
  173. mappings.insert("CodeEdit", {
  174. { "is_in_string", 3294126239, 688195400 },
  175. { "is_in_comment", 3294126239, 688195400 },
  176. { "add_code_completion_option", 1629240608, 947964390 },
  177. });
  178. mappings.insert("Control", {
  179. { "set_offsets_preset", 3651818904, 3724524307 },
  180. { "set_anchors_and_offsets_preset", 3651818904, 3724524307 },
  181. { "set_anchor", 2589937826, 2302782885 },
  182. { "get_theme_icon", 2336455395, 3163973443 },
  183. { "get_theme_stylebox", 2759935355, 604739069 },
  184. { "get_theme_font", 387378635, 2826986490 },
  185. { "get_theme_font_size", 229578101, 1327056374 },
  186. { "get_theme_color", 2377051548, 2798751242 },
  187. { "get_theme_constant", 229578101, 1327056374 },
  188. { "has_theme_icon", 1187511791, 866386512 },
  189. { "has_theme_stylebox", 1187511791, 866386512 },
  190. { "has_theme_font", 1187511791, 866386512 },
  191. { "has_theme_font_size", 1187511791, 866386512 },
  192. { "has_theme_color", 1187511791, 866386512 },
  193. { "has_theme_constant", 1187511791, 866386512 },
  194. });
  195. mappings.insert("Crypto", {
  196. { "generate_self_signed_certificate", 947314696, 492266173 },
  197. });
  198. mappings.insert("Curve", {
  199. { "add_point", 2766148617, 434072736 },
  200. });
  201. mappings.insert("Curve2D", {
  202. { "add_point", 2437345566, 4175465202 },
  203. });
  204. mappings.insert("Curve3D", {
  205. { "add_point", 3836314258, 2931053748 },
  206. });
  207. mappings.insert("DirAccess", {
  208. { "list_dir_begin", 2018049411, 2610976713 },
  209. { "copy", 198434953, 1063198817 },
  210. { "copy_absolute", 198434953, 1063198817 },
  211. });
  212. mappings.insert("DisplayServer", {
  213. { "global_menu_add_submenu_item", 3806306913, 2828985934 },
  214. { "global_menu_add_item", 3415468211, 3401266716 },
  215. { "global_menu_add_check_item", 3415468211, 3401266716 },
  216. { "global_menu_add_icon_item", 1700867534, 4245856523 },
  217. { "global_menu_add_icon_check_item", 1700867534, 4245856523 },
  218. { "global_menu_add_radio_check_item", 3415468211, 3401266716 },
  219. { "global_menu_add_icon_radio_check_item", 1700867534, 4245856523 },
  220. { "global_menu_add_multistate_item", 635750054, 3431222859 },
  221. { "global_menu_add_separator", 1041533178, 3214812433 },
  222. { "tts_speak", 3741216677, 903992738 },
  223. { "is_touchscreen_available", 4162880507, 3323674545 },
  224. { "screen_set_orientation", 2629526904, 2211511631 },
  225. { "window_get_native_handle", 2709193271, 1096425680 },
  226. { "window_set_title", 3043792800, 441246282 },
  227. { "window_set_mouse_passthrough", 3958815166, 1993637420 },
  228. { "window_set_current_screen", 3023605688, 2230941749 },
  229. { "window_set_position", 3614040015, 2019273902 },
  230. { "window_set_size", 3614040015, 2019273902 },
  231. { "window_set_rect_changed_callback", 3653650673, 1091192925 },
  232. { "window_set_window_event_callback", 3653650673, 1091192925 },
  233. { "window_set_input_event_callback", 3653650673, 1091192925 },
  234. { "window_set_input_text_callback", 3653650673, 1091192925 },
  235. { "window_set_drop_files_callback", 3653650673, 1091192925 },
  236. { "window_set_max_size", 3614040015, 2019273902 },
  237. { "window_set_min_size", 3614040015, 2019273902 },
  238. { "window_set_mode", 2942569511, 1319965401 },
  239. { "window_set_flag", 3971592565, 254894155 },
  240. { "window_get_flag", 2662949986, 802816991 },
  241. { "window_set_window_buttons_offset", 3614040015, 2019273902 },
  242. { "window_set_ime_active", 450484987, 1661950165 },
  243. { "window_set_ime_position", 3614040015, 2019273902 },
  244. { "window_set_vsync_mode", 1708924624, 2179333492 },
  245. { "virtual_keyboard_show", 860410478, 3042891259 },
  246. { "cursor_set_custom_image", 1358907026, 1816663697 },
  247. });
  248. mappings.insert("ENetConnection", {
  249. { "create_host_bound", 866250949, 1515002313 },
  250. { "connect_to_host", 385984708, 2171300490 },
  251. { "dtls_client_setup", 3097527179, 1966198364 },
  252. });
  253. mappings.insert("ENetMultiplayerPeer", {
  254. { "create_server", 1616151701, 2917761309 },
  255. { "create_client", 920217784, 2327163476 },
  256. });
  257. mappings.insert("EditorCommandPalette", {
  258. { "add_command", 3664614892, 864043298 },
  259. });
  260. mappings.insert("EditorDebuggerSession", {
  261. { "send_message", 3780025912, 85656714 },
  262. { "toggle_profiler", 35674246, 1198443697 },
  263. });
  264. mappings.insert("EditorFileDialog", {
  265. { "add_filter", 233059325, 3388804757 },
  266. });
  267. mappings.insert("EditorImportPlugin", {
  268. { "append_import_external_resource", 3645925746, 320493106 },
  269. });
  270. mappings.insert("EditorInterface", {
  271. { "popup_dialog", 2478844058, 2015770942 },
  272. { "popup_dialog_centered", 1723337679, 346557367 },
  273. { "popup_dialog_centered_ratio", 1310934579, 2093669136 },
  274. { "popup_dialog_centered_clamped", 3433759678, 3763385571 },
  275. { "inspect_object", 2564140749, 127962172 },
  276. { "edit_script", 3664508569, 219829402 },
  277. { "save_scene_as", 1168363258, 3647332257 },
  278. });
  279. mappings.insert("EditorNode3DGizmo", {
  280. { "add_lines", 302451090, 2910971437 },
  281. { "add_mesh", 1868867708, 1579955111 },
  282. { "add_unscaled_billboard", 3719733075, 520007164 },
  283. });
  284. mappings.insert("EditorNode3DGizmoPlugin", {
  285. { "create_icon_material", 2976007329, 3804976916 },
  286. { "get_material", 3501703615, 974464017 },
  287. });
  288. mappings.insert("EditorScenePostImportPlugin", {
  289. { "add_import_option_advanced", 3774155785, 3674075649 },
  290. });
  291. mappings.insert("EditorUndoRedoManager", {
  292. { "create_action", 3577985681, 2107025470 },
  293. });
  294. mappings.insert("EngineDebugger", {
  295. { "profiler_enable", 438160728, 3192561009 },
  296. });
  297. mappings.insert("Expression", {
  298. { "parse", 3658149758, 3069722906 },
  299. });
  300. mappings.insert("FileAccess", {
  301. { "open_compressed", 2874458257, 3686439335 },
  302. { "store_csv_line", 2217842308, 2173791505 },
  303. });
  304. mappings.insert("FileDialog", {
  305. { "add_filter", 233059325, 3388804757 },
  306. });
  307. mappings.insert("Font", {
  308. { "find_variation", 1222433716, 3344325384 },
  309. { "get_string_size", 3678918099, 1868866121 },
  310. { "get_multiline_string_size", 2427690650, 519636710 },
  311. { "draw_string", 2565402639, 1983721962 },
  312. { "draw_multiline_string", 348869189, 1171506176 },
  313. { "draw_string_outline", 657875837, 623754045 },
  314. { "draw_multiline_string_outline", 1649790182, 3206388178 },
  315. { "draw_char", 1462476057, 3815617597 },
  316. { "draw_char_outline", 4161008124, 209525354 },
  317. // Pre-existing compatibility hash.
  318. { "find_variation", 1149405976, 1851767612 },
  319. });
  320. mappings.insert("GLTFDocument", {
  321. { "append_from_file", 1862991421, 866380864 },
  322. { "append_from_buffer", 2818062664, 1616081266 },
  323. { "append_from_scene", 374125375, 1622574258 },
  324. { "generate_scene", 2770277081, 596118388 },
  325. });
  326. mappings.insert("Geometry2D", {
  327. { "offset_polygon", 3837618924, 1275354010 },
  328. { "offset_polyline", 328033063, 2328231778 },
  329. });
  330. mappings.insert("Geometry3D", {
  331. { "build_cylinder_planes", 3142160516, 449920067 },
  332. { "build_capsule_planes", 410870045, 2113592876 },
  333. });
  334. mappings.insert("GraphNode", {
  335. { "set_slot", 902131739, 2873310869 },
  336. });
  337. mappings.insert("GridMap", {
  338. { "set_cell_item", 4177201334, 3449088946 },
  339. });
  340. mappings.insert("HTTPClient", {
  341. { "connect_to_host", 1970282951, 504540374 },
  342. { "request", 3249905507, 3778990155 },
  343. });
  344. mappings.insert("HTTPRequest", {
  345. { "request", 2720304520, 3215244323 },
  346. { "request_raw", 4282724657, 2714829993 },
  347. });
  348. mappings.insert("IP", {
  349. { "resolve_hostname", 396864159, 4283295457 },
  350. { "resolve_hostname_addresses", 3462780090, 773767525 },
  351. { "resolve_hostname_queue_item", 3936392508, 1749894742 },
  352. });
  353. mappings.insert("Image", {
  354. { "resize", 2461393748, 994498151 },
  355. { "save_jpg", 578836491, 2800019068 },
  356. { "save_webp", 3594949219, 2781156876 },
  357. { "compress", 4094210332, 2975424957 },
  358. { "compress_from_channels", 279105990, 4212890953 },
  359. { "load_svg_from_buffer", 1822513750, 311853421 },
  360. { "load_svg_from_string", 1461766635, 3254053600 },
  361. });
  362. mappings.insert("ImmediateMesh", {
  363. { "surface_begin", 3716480242, 2794442543 },
  364. });
  365. mappings.insert("ImporterMesh", {
  366. { "add_surface", 4122361985, 1740448849 },
  367. });
  368. mappings.insert("Input", {
  369. { "get_vector", 1517139831, 2479607902 },
  370. { "start_joy_vibration", 1890603622, 2576575033 },
  371. { "action_press", 573731101, 1713091165 },
  372. { "set_custom_mouse_cursor", 3489634142, 703945977 },
  373. });
  374. mappings.insert("InputEvent", {
  375. { "is_match", 3392494811, 1754951977 },
  376. { "xformed_by", 2747409789, 1282766827 },
  377. });
  378. mappings.insert("InputMap", {
  379. { "add_action", 573731101, 4100757082 },
  380. });
  381. mappings.insert("ItemList", {
  382. { "add_item", 4086250691, 359861678 },
  383. { "add_icon_item", 3332687421, 4256579627 },
  384. { "get_item_rect", 1501513492, 159227807 },
  385. { "select", 4023243586, 972357352 },
  386. });
  387. mappings.insert("JSON", {
  388. { "stringify", 2656701787, 462733549 },
  389. });
  390. mappings.insert("JavaScriptBridge", {
  391. { "download_buffer", 4123979296, 3352272093 },
  392. });
  393. mappings.insert("Line2D", {
  394. { "add_point", 468506575, 2654014372 },
  395. });
  396. mappings.insert("MultiplayerAPI", {
  397. { "rpc", 1833408346, 2077486355 },
  398. });
  399. mappings.insert("NavigationMeshGenerator", {
  400. { "parse_source_geometry_data", 3703028813, 685862123 },
  401. { "bake_from_source_geometry_data", 3669016597, 2469318639 },
  402. });
  403. mappings.insert("NavigationServer2D", {
  404. { "map_get_path", 56240621, 3146466012 },
  405. });
  406. mappings.insert("NavigationServer3D", {
  407. { "map_get_path", 2121045993, 1187418690 },
  408. { "parse_source_geometry_data", 3703028813, 685862123 },
  409. { "bake_from_source_geometry_data", 3669016597, 2469318639 },
  410. { "bake_from_source_geometry_data_async", 3669016597, 2469318639 },
  411. });
  412. mappings.insert("Node", {
  413. { "add_child", 3070154285, 3863233950 },
  414. { "reparent", 2570952461, 3685795103 },
  415. { "find_child", 4253159453, 2008217037 },
  416. { "find_children", 1585018254, 2560337219 },
  417. { "propagate_call", 1667910434, 1871007965 },
  418. { "set_multiplayer_authority", 4023243586, 972357352 },
  419. });
  420. mappings.insert("Node3D", {
  421. { "look_at", 3123400617, 2882425029 },
  422. { "look_at_from_position", 4067663783, 2086826090 },
  423. });
  424. mappings.insert("Noise", {
  425. { "get_image", 2569233413, 3180683109 },
  426. { "get_seamless_image", 2210827790, 2770743602 },
  427. { "get_image_3d", 2358868431, 3977814329 },
  428. { "get_seamless_image_3d", 3328694319, 451006340 },
  429. });
  430. mappings.insert("OS", {
  431. { "alert", 233059325, 1783970740 },
  432. { "get_system_font_path", 2262142305, 626580860 },
  433. { "get_system_font_path_for_text", 3824042574, 197317981 },
  434. { "execute", 2881709059, 1488299882 },
  435. { "shell_show_in_file_manager", 885841341, 3565188097 },
  436. { "set_restart_on_exit", 611198603, 3331453935 },
  437. { "get_system_dir", 1965199849, 3073895123 },
  438. });
  439. mappings.insert("Object", {
  440. { "add_user_signal", 3780025912, 85656714 },
  441. { "connect", 1469446357, 1518946055 },
  442. { "tr", 2475554935, 1195764410 },
  443. { "tr_n", 4021311862, 162698058 },
  444. });
  445. mappings.insert("OptionButton", {
  446. { "add_item", 3043792800, 2697778442 },
  447. { "add_icon_item", 3944051090, 3781678508 },
  448. });
  449. mappings.insert("PCKPacker", {
  450. { "pck_start", 3232891339, 508410629 },
  451. });
  452. mappings.insert("PacketPeerDTLS", {
  453. { "connect_to_peer", 1801538152, 2880188099 },
  454. });
  455. mappings.insert("PacketPeerUDP", {
  456. { "bind", 4290438434, 4051239242 },
  457. });
  458. mappings.insert("Performance", {
  459. { "add_custom_monitor", 2865980031, 4099036814 },
  460. });
  461. mappings.insert("PhysicalBone3D", {
  462. { "apply_impulse", 1002852006, 2754756483 },
  463. });
  464. mappings.insert("PhysicsBody2D", {
  465. { "move_and_collide", 1529961754, 3681923724 },
  466. { "test_move", 1369208982, 3324464701 },
  467. });
  468. mappings.insert("PhysicsBody3D", {
  469. { "move_and_collide", 2825704414, 3208792678 },
  470. { "test_move", 680299713, 2481691619 },
  471. });
  472. mappings.insert("PhysicsDirectBodyState2D", {
  473. { "apply_impulse", 496058220, 4288681949 },
  474. { "apply_force", 496058220, 4288681949 },
  475. { "add_constant_force", 496058220, 4288681949 },
  476. });
  477. mappings.insert("PhysicsDirectBodyState3D", {
  478. { "apply_impulse", 1002852006, 2754756483 },
  479. { "apply_force", 1002852006, 2754756483 },
  480. { "add_constant_force", 1002852006, 2754756483 },
  481. });
  482. mappings.insert("PhysicsDirectSpaceState2D", {
  483. { "intersect_point", 3278207904, 2118456068 },
  484. { "intersect_shape", 3803848594, 2488867228 },
  485. { "collide_shape", 3803848594, 2488867228 },
  486. });
  487. mappings.insert("PhysicsDirectSpaceState3D", {
  488. { "intersect_point", 45993382, 975173756 },
  489. { "intersect_shape", 550215980, 3762137681 },
  490. { "collide_shape", 550215980, 3762137681 },
  491. });
  492. mappings.insert("PhysicsRayQueryParameters2D", {
  493. { "create", 1118143851, 3196569324 },
  494. });
  495. mappings.insert("PhysicsRayQueryParameters3D", {
  496. { "create", 680321959, 3110599579 },
  497. });
  498. mappings.insert("PhysicsServer2D", {
  499. { "area_add_shape", 754862190, 339056240 },
  500. { "body_add_shape", 754862190, 339056240 },
  501. { "body_apply_impulse", 34330743, 205485391 },
  502. { "body_apply_force", 34330743, 205485391 },
  503. { "body_add_constant_force", 34330743, 205485391 },
  504. { "joint_make_pin", 2288600450, 1612646186 },
  505. { "joint_make_groove", 3573265764, 481430435 },
  506. { "joint_make_damped_spring", 206603952, 1994657646 },
  507. });
  508. mappings.insert("PhysicsServer3D", {
  509. { "area_add_shape", 4040559639, 3711419014 },
  510. { "body_add_shape", 4040559639, 3711419014 },
  511. { "body_apply_impulse", 110375048, 390416203 },
  512. { "body_apply_force", 110375048, 390416203 },
  513. { "body_add_constant_force", 110375048, 390416203 },
  514. });
  515. mappings.insert("PopupMenu", {
  516. { "add_item", 3224536192, 3674230041 },
  517. { "add_icon_item", 1200674553, 1086190128 },
  518. { "add_check_item", 3224536192, 3674230041 },
  519. { "add_icon_check_item", 1200674553, 1086190128 },
  520. { "add_radio_check_item", 3224536192, 3674230041 },
  521. { "add_icon_radio_check_item", 1200674553, 1086190128 },
  522. { "add_multistate_item", 1585218420, 150780458 },
  523. { "add_shortcut", 2482211467, 3451850107 },
  524. { "add_icon_shortcut", 3060251822, 2997871092 },
  525. { "add_check_shortcut", 2168272394, 1642193386 },
  526. { "add_icon_check_shortcut", 68101841, 3856247530 },
  527. { "add_radio_check_shortcut", 2168272394, 1642193386 },
  528. { "add_icon_radio_check_shortcut", 68101841, 3856247530 },
  529. { "add_submenu_item", 3728518296, 2979222410 },
  530. // Pre-existing compatibility hashes.
  531. { "add_icon_shortcut", 68101841, 3856247530 },
  532. { "add_shortcut", 2168272394, 1642193386 },
  533. });
  534. mappings.insert("PortableCompressedTexture2D", {
  535. { "create_from_image", 97251393, 3679243433 },
  536. });
  537. mappings.insert("ProjectSettings", {
  538. { "load_resource_pack", 3001721055, 708980503 },
  539. });
  540. mappings.insert("RegEx", {
  541. { "search", 4087180739, 3365977994 },
  542. { "search_all", 3354100289, 849021363 },
  543. { "sub", 758293621, 54019702 },
  544. });
  545. mappings.insert("RenderingDevice", {
  546. { "texture_create", 3011278298, 3709173589 },
  547. { "texture_create_shared_from_slice", 864132525, 1808971279 },
  548. { "texture_update", 2736912341, 2096463824 },
  549. { "texture_copy", 3741367532, 2339493201 },
  550. { "texture_clear", 3423681478, 3396867530 },
  551. { "texture_resolve_multisample", 2126834943, 594679454 },
  552. { "framebuffer_format_create", 2635475316, 697032759 },
  553. { "framebuffer_format_create_multipass", 1992489524, 2647479094 },
  554. { "framebuffer_format_get_texture_samples", 1036806638, 4223391010 },
  555. { "framebuffer_create", 1884747791, 3284231055 },
  556. { "framebuffer_create_multipass", 452534725, 1750306695 },
  557. { "framebuffer_create_empty", 382373098, 3058360618 },
  558. { "vertex_buffer_create", 3491282828, 3410049843 },
  559. { "vertex_array_create", 3137892244, 3799816279 },
  560. { "index_buffer_create", 975915977, 3935920523 },
  561. { "shader_compile_spirv_from_source", 3459523685, 1178973306 },
  562. { "shader_compile_binary_from_spirv", 1395027180, 134910450 },
  563. { "shader_create_from_spirv", 3297482566, 342949005 },
  564. { "shader_create_from_bytecode", 2078349841, 1687031350 },
  565. { "uniform_buffer_create", 1453158401, 34556762 },
  566. { "storage_buffer_create", 1173156076, 2316365934 },
  567. { "texture_buffer_create", 2344087557, 1470338698 },
  568. { "buffer_update", 652628289, 3793150683 },
  569. { "buffer_clear", 1645170096, 2797041220 },
  570. { "buffer_get_data", 125363422, 3101830688 },
  571. { "render_pipeline_create", 2911419500, 2385451958 },
  572. { "compute_pipeline_create", 403593840, 1448838280 },
  573. { "draw_list_begin", 4252992020, 2468082605 },
  574. { "draw_list_begin_split", 832527510, 2406300660 },
  575. { "draw_list_draw", 3710874499, 4230067973 },
  576. { "draw_list_enable_scissor", 338791288, 244650101 },
  577. });
  578. mappings.insert("RenderingServer", {
  579. { "texture_rd_create", 3291180269, 1434128712 },
  580. { "shader_set_default_texture_parameter", 3864903085, 4094001817 },
  581. { "shader_get_default_texture_parameter", 2523186822, 1464608890 },
  582. { "mesh_create_from_surfaces", 4007581507, 4291747531 },
  583. { "mesh_add_surface_from_arrays", 1247008646, 2342446560 },
  584. { "viewport_attach_to_screen", 1278520651, 1062245816 },
  585. { "environment_set_ambient_light", 491659071, 1214961493 },
  586. { "instances_cull_aabb", 2031554939, 2570105777 },
  587. { "instances_cull_ray", 3388524336, 2208759584 },
  588. { "instances_cull_convex", 3690700105, 2488539944 },
  589. { "canvas_item_set_custom_rect", 2180266943, 1333997032 },
  590. { "canvas_item_add_line", 2843922985, 1819681853 },
  591. { "canvas_item_add_polyline", 3438017257, 3098767073 },
  592. { "canvas_item_add_multiline", 3176074788, 2088642721 },
  593. { "canvas_item_add_texture_rect", 3205360868, 324864032 },
  594. { "canvas_item_add_msdf_texture_rect_region", 349157222, 97408773 },
  595. { "canvas_item_add_texture_rect_region", 2782979504, 485157892 },
  596. { "canvas_item_add_nine_patch", 904428547, 389957886 },
  597. { "canvas_item_add_polygon", 2907936855, 3580000528 },
  598. { "canvas_item_add_triangle_array", 749685193, 660261329 },
  599. { "canvas_item_add_mesh", 3548053052, 316450961 },
  600. { "canvas_item_add_multimesh", 1541595251, 2131855138 },
  601. { "canvas_item_add_animation_slice", 4107531031, 2646834499 },
  602. { "canvas_item_set_canvas_group_mode", 41973386, 3973586316 },
  603. { "set_boot_image", 2244367877, 3759744527 },
  604. });
  605. mappings.insert("ResourceLoader", {
  606. { "load_threaded_request", 1939848623, 3614384323 },
  607. { "load_threaded_get_status", 3931021148, 4137685479 },
  608. { "load", 2622212233, 3358495409 },
  609. { "exists", 2220807150, 4185558881 },
  610. });
  611. mappings.insert("ResourceSaver", {
  612. { "save", 2303056517, 2983274697 },
  613. });
  614. mappings.insert("RichTextLabel", {
  615. { "add_image", 3346058748, 3580801207 },
  616. { "push_font", 814287596, 2347424842 },
  617. { "push_paragraph", 3218895358, 3089306873 },
  618. { "push_list", 4036303897, 3017143144 },
  619. { "push_table", 1125058220, 2623499273 },
  620. { "push_dropcap", 311501835, 4061635501 },
  621. { "set_table_column_expand", 4132157579, 2185176273 },
  622. });
  623. mappings.insert("RigidBody2D", {
  624. { "apply_impulse", 496058220, 4288681949 },
  625. { "apply_force", 496058220, 4288681949 },
  626. { "add_constant_force", 496058220, 4288681949 },
  627. });
  628. mappings.insert("RigidBody3D", {
  629. { "apply_impulse", 1002852006, 2754756483 },
  630. { "apply_force", 1002852006, 2754756483 },
  631. { "add_constant_force", 1002852006, 2754756483 },
  632. });
  633. mappings.insert("SceneMultiplayer", {
  634. { "send_bytes", 2742700601, 1307428718 },
  635. });
  636. mappings.insert("SceneReplicationConfig", {
  637. { "add_property", 3818401521, 4094619021 },
  638. });
  639. mappings.insert("SceneTree", {
  640. { "create_timer", 1780978058, 2709170273 },
  641. });
  642. mappings.insert("ScriptCreateDialog", {
  643. { "config", 4210001628, 869314288 },
  644. });
  645. mappings.insert("Shader", {
  646. { "set_default_texture_parameter", 1628453603, 2750740428 },
  647. { "get_default_texture_parameter", 3823812009, 3090538643 },
  648. });
  649. mappings.insert("Skeleton3D", {
  650. { "set_bone_enabled", 4023243586, 972357352 },
  651. });
  652. mappings.insert("SpriteFrames", {
  653. { "add_frame", 407562921, 1351332740 },
  654. { "set_frame", 3155743884, 56804795 },
  655. });
  656. mappings.insert("StreamPeerTCP", {
  657. { "bind", 4025329869, 3167955072 },
  658. });
  659. mappings.insert("StreamPeerTLS", {
  660. { "connect_to_stream", 1325480781, 57169517 },
  661. });
  662. mappings.insert("SurfaceTool", {
  663. { "add_triangle_fan", 297960074, 2235017613 },
  664. { "generate_lod", 1894448909, 1938056459 },
  665. });
  666. mappings.insert("TCPServer", {
  667. { "listen", 4025329869, 3167955072 },
  668. });
  669. mappings.insert("TextEdit", {
  670. { "get_line_width", 3294126239, 688195400 },
  671. { "insert_text_at_caret", 3043792800, 2697778442 },
  672. { "get_line_column_at_pos", 850652858, 239517838 },
  673. { "is_mouse_over_selection", 1099474134, 1840282309 },
  674. { "set_caret_line", 1413195636, 1302582944 },
  675. { "set_caret_column", 1071284433, 3796796178 },
  676. { "set_selection_mode", 2920622473, 1443345937 },
  677. { "select", 4269665324, 2560984452 },
  678. { "get_scroll_pos_for_line", 3274652423, 3929084198 },
  679. { "set_line_as_first_visible", 3023605688, 2230941749 },
  680. { "set_line_as_center_visible", 3023605688, 2230941749 },
  681. { "set_line_as_last_visible", 3023605688, 2230941749 },
  682. });
  683. mappings.insert("TextLine", {
  684. { "add_string", 867188035, 621426851 },
  685. { "add_object", 735420116, 1316529304 },
  686. { "resize_object", 960819067, 2095776372 },
  687. { "draw", 1164457837, 856975658 },
  688. { "draw_outline", 1364491366, 1343401456 },
  689. });
  690. mappings.insert("TextParagraph", {
  691. { "set_dropcap", 2613124475, 2498990330 },
  692. { "add_string", 867188035, 621426851 },
  693. { "add_object", 735420116, 1316529304 },
  694. { "resize_object", 960819067, 2095776372 },
  695. { "draw", 367324453, 1567802413 },
  696. { "draw_outline", 2159523405, 1893131224 },
  697. { "draw_line", 3963848920, 1242169894 },
  698. { "draw_line_outline", 1814903311, 2664926980 },
  699. { "draw_dropcap", 1164457837, 856975658 },
  700. { "draw_dropcap_outline", 1364491366, 1343401456 },
  701. });
  702. mappings.insert("TextServer", {
  703. { "font_draw_glyph", 1821196351, 1339057948 },
  704. { "font_draw_glyph_outline", 1124898203, 2626165733 },
  705. { "shaped_text_set_direction", 2616949700, 1551430183 },
  706. { "shaped_text_set_orientation", 104095128, 3019609126 },
  707. { "shaped_text_add_string", 2621279422, 623473029 },
  708. { "shaped_text_add_object", 2838446185, 3664424789 },
  709. { "shaped_text_resize_object", 2353789835, 790361552 },
  710. { "shaped_set_span_update_font", 1578983057, 2022725822 },
  711. { "shaped_text_fit_to_width", 603718830, 530670926 },
  712. { "shaped_text_get_line_breaks_adv", 4206849830, 2376991424 },
  713. { "shaped_text_get_line_breaks", 303410369, 2651359741 },
  714. { "shaped_text_get_word_breaks", 3299477123, 185957063 },
  715. { "shaped_text_overrun_trim_to_width", 1572579718, 2723146520 },
  716. { "shaped_text_draw", 70679950, 880389142 },
  717. { "shaped_text_draw_outline", 2673671346, 2559184194 },
  718. { "format_number", 2305636099, 2664628024 },
  719. { "parse_number", 2305636099, 2664628024 },
  720. { "string_get_word_breaks", 1398910359, 581857818 },
  721. { "string_get_character_breaks", 1586579831, 2333794773 },
  722. { "string_to_upper", 2305636099, 2664628024 },
  723. { "string_to_lower", 2305636099, 2664628024 },
  724. });
  725. mappings.insert("Texture2D", {
  726. { "draw", 1115460088, 2729649137 },
  727. { "draw_rect", 575156982, 3499451691 },
  728. { "draw_rect_region", 1066564656, 2963678660 },
  729. });
  730. mappings.insert("Thread", {
  731. { "start", 2779832528, 1327203254 },
  732. });
  733. mappings.insert("TileMap", {
  734. { "set_cell", 1732664643, 966713560 },
  735. { "set_cells_terrain_connect", 3072115677, 3578627656 },
  736. { "set_cells_terrain_path", 3072115677, 3578627656 },
  737. { "get_used_cells_by_id", 4152068407, 2931012785 },
  738. });
  739. mappings.insert("TileMapPattern", {
  740. { "set_cell", 634000503, 2224802556 },
  741. });
  742. mappings.insert("TileSet", {
  743. { "add_source", 276991387, 1059186179 },
  744. { "add_terrain", 3023605688, 1230568737 },
  745. { "add_pattern", 3009264082, 763712015 },
  746. });
  747. mappings.insert("TileSetAtlasSource", {
  748. { "create_tile", 1583819816, 190528769 },
  749. { "move_tile_in_atlas", 1375626516, 3870111920 },
  750. { "has_room_for_tile", 4182444377, 3018597268 },
  751. { "create_alternative_tile", 3531100812, 2226298068 },
  752. { "get_tile_texture_region", 1321423751, 241857547 },
  753. });
  754. mappings.insert("TileSetScenesCollectionSource", {
  755. { "create_scene_tile", 2633389122, 1117465415 },
  756. });
  757. mappings.insert("Translation", {
  758. { "add_message", 971803314, 3898530326 },
  759. { "add_plural_message", 360316719, 2356982266 },
  760. { "get_message", 58037827, 1829228469 },
  761. { "get_plural_message", 1333931916, 229954002 },
  762. { "erase_message", 3919944288, 3959009644 },
  763. });
  764. mappings.insert("TranslationServer", {
  765. { "translate", 58037827, 1829228469 },
  766. { "translate_plural", 1333931916, 229954002 },
  767. });
  768. mappings.insert("Tree", {
  769. { "get_item_area_rect", 1235226180, 47968679 },
  770. });
  771. mappings.insert("TreeItem", {
  772. { "propagate_check", 4023243586, 972357352 },
  773. { "add_button", 1507727907, 1688223362 },
  774. });
  775. mappings.insert("UDPServer", {
  776. { "listen", 4025329869, 3167955072 },
  777. });
  778. mappings.insert("UPNP", {
  779. { "add_port_mapping", 3358934458, 818314583 },
  780. { "delete_port_mapping", 760296170, 3444187325 },
  781. });
  782. mappings.insert("UPNPDevice", {
  783. { "add_port_mapping", 3358934458, 818314583 },
  784. { "delete_port_mapping", 760296170, 3444187325 },
  785. });
  786. mappings.insert("UndoRedo", {
  787. { "create_action", 3900135403, 3171901514 },
  788. });
  789. mappings.insert("VideoStreamPlayback", {
  790. { "mix_audio", 1369271885, 93876830 },
  791. });
  792. mappings.insert("WebRTCMultiplayerPeer", {
  793. { "create_client", 1777354631, 2641732907 },
  794. { "create_mesh", 1777354631, 2641732907 },
  795. { "add_peer", 2555866323, 4078953270 },
  796. });
  797. mappings.insert("WebRTCPeerConnection", {
  798. { "create_data_channel", 3997447457, 1288557393 },
  799. });
  800. mappings.insert("WebSocketMultiplayerPeer", {
  801. { "create_client", 3097527179, 1966198364 },
  802. { "create_server", 337374795, 2400822951 },
  803. });
  804. mappings.insert("WebSocketPeer", {
  805. { "connect_to_url", 3097527179, 1966198364 },
  806. { "send", 3440492527, 2780360567 },
  807. });
  808. mappings.insert("Window", {
  809. { "get_theme_icon", 2336455395, 3163973443 },
  810. { "get_theme_stylebox", 2759935355, 604739069 },
  811. { "get_theme_font", 387378635, 2826986490 },
  812. { "get_theme_font_size", 229578101, 1327056374 },
  813. { "get_theme_color", 2377051548, 2798751242 },
  814. { "get_theme_constant", 229578101, 1327056374 },
  815. { "has_theme_icon", 1187511791, 866386512 },
  816. { "has_theme_stylebox", 1187511791, 866386512 },
  817. { "has_theme_font", 1187511791, 866386512 },
  818. { "has_theme_font_size", 1187511791, 866386512 },
  819. { "has_theme_color", 1187511791, 866386512 },
  820. { "has_theme_constant", 1187511791, 866386512 },
  821. { "popup_exclusive", 1728044812, 2134721627 },
  822. { "popup_exclusive_centered", 2561668109, 3357594017 },
  823. { "popup_exclusive_centered_ratio", 4257659513, 2284776287 },
  824. { "popup_exclusive_centered_clamped", 224798062, 2612708785 },
  825. });
  826. mappings.insert("WorkerThreadPool", {
  827. { "add_task", 3976347598, 3745067146 },
  828. { "add_group_task", 2377228549, 1801953219 },
  829. });
  830. mappings.insert("ZIPPacker", {
  831. { "open", 3715508516, 1936816515 },
  832. });
  833. mappings.insert("ZIPReader", {
  834. { "read_file", 156385007, 740857591 },
  835. { "file_exists", 1676256, 35364943 },
  836. });
  837. // clang-format on
  838. }
  839. void GDExtensionCompatHashes::finalize() {
  840. mappings.clear();
  841. }
  842. #endif // DISABLE_DEPRECATED