Bulk_UnityEngine.ImageConversionModule_0.cpp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. #include "il2cpp-config.h"
  2. #ifndef _MSC_VER
  3. # include <alloca.h>
  4. #else
  5. # include <malloc.h>
  6. #endif
  7. #include <cstring>
  8. #include <string.h>
  9. #include <stdio.h>
  10. #include <cmath>
  11. #include <limits>
  12. #include <assert.h>
  13. #include <stdint.h>
  14. #include "il2cpp-class-internals.h"
  15. #include "codegen/il2cpp-codegen.h"
  16. #include "il2cpp-object-internals.h"
  17. // System.Byte[]
  18. struct ByteU5BU5D_t4116647657;
  19. // UnityEngine.Texture2D
  20. struct Texture2D_t3840446185;
  21. // System.String
  22. struct String_t;
  23. // System.Void
  24. struct Void_t1185182177;
  25. struct ByteU5BU5D_t4116647657;
  26. #ifndef U3CMODULEU3E_T692745533_H
  27. #define U3CMODULEU3E_T692745533_H
  28. #ifdef __clang__
  29. #pragma clang diagnostic push
  30. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  31. #pragma clang diagnostic ignored "-Wunused-variable"
  32. #endif
  33. // <Module>
  34. struct U3CModuleU3E_t692745533
  35. {
  36. public:
  37. public:
  38. };
  39. #ifdef __clang__
  40. #pragma clang diagnostic pop
  41. #endif
  42. #endif // U3CMODULEU3E_T692745533_H
  43. #ifndef RUNTIMEOBJECT_H
  44. #define RUNTIMEOBJECT_H
  45. #ifdef __clang__
  46. #pragma clang diagnostic push
  47. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  48. #pragma clang diagnostic ignored "-Wunused-variable"
  49. #endif
  50. // System.Object
  51. #ifdef __clang__
  52. #pragma clang diagnostic pop
  53. #endif
  54. #endif // RUNTIMEOBJECT_H
  55. struct Il2CppArrayBounds;
  56. #ifndef RUNTIMEARRAY_H
  57. #define RUNTIMEARRAY_H
  58. #ifdef __clang__
  59. #pragma clang diagnostic push
  60. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  61. #pragma clang diagnostic ignored "-Wunused-variable"
  62. #endif
  63. // System.Array
  64. #ifdef __clang__
  65. #pragma clang diagnostic pop
  66. #endif
  67. #endif // RUNTIMEARRAY_H
  68. #ifndef IMAGECONVERSION_T2495367653_H
  69. #define IMAGECONVERSION_T2495367653_H
  70. #ifdef __clang__
  71. #pragma clang diagnostic push
  72. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  73. #pragma clang diagnostic ignored "-Wunused-variable"
  74. #endif
  75. // UnityEngine.ImageConversion
  76. struct ImageConversion_t2495367653 : public RuntimeObject
  77. {
  78. public:
  79. public:
  80. };
  81. #ifdef __clang__
  82. #pragma clang diagnostic pop
  83. #endif
  84. #endif // IMAGECONVERSION_T2495367653_H
  85. #ifndef VALUETYPE_T3640485471_H
  86. #define VALUETYPE_T3640485471_H
  87. #ifdef __clang__
  88. #pragma clang diagnostic push
  89. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  90. #pragma clang diagnostic ignored "-Wunused-variable"
  91. #endif
  92. // System.ValueType
  93. struct ValueType_t3640485471 : public RuntimeObject
  94. {
  95. public:
  96. public:
  97. };
  98. #ifdef __clang__
  99. #pragma clang diagnostic pop
  100. #endif
  101. // Native definition for P/Invoke marshalling of System.ValueType
  102. struct ValueType_t3640485471_marshaled_pinvoke
  103. {
  104. };
  105. // Native definition for COM marshalling of System.ValueType
  106. struct ValueType_t3640485471_marshaled_com
  107. {
  108. };
  109. #endif // VALUETYPE_T3640485471_H
  110. #ifndef BOOLEAN_T97287965_H
  111. #define BOOLEAN_T97287965_H
  112. #ifdef __clang__
  113. #pragma clang diagnostic push
  114. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  115. #pragma clang diagnostic ignored "-Wunused-variable"
  116. #endif
  117. // System.Boolean
  118. struct Boolean_t97287965
  119. {
  120. public:
  121. // System.Boolean System.Boolean::m_value
  122. bool ___m_value_2;
  123. public:
  124. inline static int32_t get_offset_of_m_value_2() { return static_cast<int32_t>(offsetof(Boolean_t97287965, ___m_value_2)); }
  125. inline bool get_m_value_2() const { return ___m_value_2; }
  126. inline bool* get_address_of_m_value_2() { return &___m_value_2; }
  127. inline void set_m_value_2(bool value)
  128. {
  129. ___m_value_2 = value;
  130. }
  131. };
  132. struct Boolean_t97287965_StaticFields
  133. {
  134. public:
  135. // System.String System.Boolean::FalseString
  136. String_t* ___FalseString_0;
  137. // System.String System.Boolean::TrueString
  138. String_t* ___TrueString_1;
  139. public:
  140. inline static int32_t get_offset_of_FalseString_0() { return static_cast<int32_t>(offsetof(Boolean_t97287965_StaticFields, ___FalseString_0)); }
  141. inline String_t* get_FalseString_0() const { return ___FalseString_0; }
  142. inline String_t** get_address_of_FalseString_0() { return &___FalseString_0; }
  143. inline void set_FalseString_0(String_t* value)
  144. {
  145. ___FalseString_0 = value;
  146. Il2CppCodeGenWriteBarrier((&___FalseString_0), value);
  147. }
  148. inline static int32_t get_offset_of_TrueString_1() { return static_cast<int32_t>(offsetof(Boolean_t97287965_StaticFields, ___TrueString_1)); }
  149. inline String_t* get_TrueString_1() const { return ___TrueString_1; }
  150. inline String_t** get_address_of_TrueString_1() { return &___TrueString_1; }
  151. inline void set_TrueString_1(String_t* value)
  152. {
  153. ___TrueString_1 = value;
  154. Il2CppCodeGenWriteBarrier((&___TrueString_1), value);
  155. }
  156. };
  157. #ifdef __clang__
  158. #pragma clang diagnostic pop
  159. #endif
  160. #endif // BOOLEAN_T97287965_H
  161. #ifndef BYTE_T1134296376_H
  162. #define BYTE_T1134296376_H
  163. #ifdef __clang__
  164. #pragma clang diagnostic push
  165. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  166. #pragma clang diagnostic ignored "-Wunused-variable"
  167. #endif
  168. // System.Byte
  169. struct Byte_t1134296376
  170. {
  171. public:
  172. // System.Byte System.Byte::m_value
  173. uint8_t ___m_value_2;
  174. public:
  175. inline static int32_t get_offset_of_m_value_2() { return static_cast<int32_t>(offsetof(Byte_t1134296376, ___m_value_2)); }
  176. inline uint8_t get_m_value_2() const { return ___m_value_2; }
  177. inline uint8_t* get_address_of_m_value_2() { return &___m_value_2; }
  178. inline void set_m_value_2(uint8_t value)
  179. {
  180. ___m_value_2 = value;
  181. }
  182. };
  183. #ifdef __clang__
  184. #pragma clang diagnostic pop
  185. #endif
  186. #endif // BYTE_T1134296376_H
  187. #ifndef INTPTR_T_H
  188. #define INTPTR_T_H
  189. #ifdef __clang__
  190. #pragma clang diagnostic push
  191. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  192. #pragma clang diagnostic ignored "-Wunused-variable"
  193. #endif
  194. // System.IntPtr
  195. struct IntPtr_t
  196. {
  197. public:
  198. // System.Void* System.IntPtr::m_value
  199. void* ___m_value_0;
  200. public:
  201. inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); }
  202. inline void* get_m_value_0() const { return ___m_value_0; }
  203. inline void** get_address_of_m_value_0() { return &___m_value_0; }
  204. inline void set_m_value_0(void* value)
  205. {
  206. ___m_value_0 = value;
  207. }
  208. };
  209. struct IntPtr_t_StaticFields
  210. {
  211. public:
  212. // System.IntPtr System.IntPtr::Zero
  213. intptr_t ___Zero_1;
  214. public:
  215. inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); }
  216. inline intptr_t get_Zero_1() const { return ___Zero_1; }
  217. inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; }
  218. inline void set_Zero_1(intptr_t value)
  219. {
  220. ___Zero_1 = value;
  221. }
  222. };
  223. #ifdef __clang__
  224. #pragma clang diagnostic pop
  225. #endif
  226. #endif // INTPTR_T_H
  227. #ifndef OBJECT_T631007953_H
  228. #define OBJECT_T631007953_H
  229. #ifdef __clang__
  230. #pragma clang diagnostic push
  231. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  232. #pragma clang diagnostic ignored "-Wunused-variable"
  233. #endif
  234. // UnityEngine.Object
  235. struct Object_t631007953 : public RuntimeObject
  236. {
  237. public:
  238. // System.IntPtr UnityEngine.Object::m_CachedPtr
  239. intptr_t ___m_CachedPtr_0;
  240. public:
  241. inline static int32_t get_offset_of_m_CachedPtr_0() { return static_cast<int32_t>(offsetof(Object_t631007953, ___m_CachedPtr_0)); }
  242. inline intptr_t get_m_CachedPtr_0() const { return ___m_CachedPtr_0; }
  243. inline intptr_t* get_address_of_m_CachedPtr_0() { return &___m_CachedPtr_0; }
  244. inline void set_m_CachedPtr_0(intptr_t value)
  245. {
  246. ___m_CachedPtr_0 = value;
  247. }
  248. };
  249. struct Object_t631007953_StaticFields
  250. {
  251. public:
  252. // System.Int32 UnityEngine.Object::OffsetOfInstanceIDInCPlusPlusObject
  253. int32_t ___OffsetOfInstanceIDInCPlusPlusObject_1;
  254. public:
  255. inline static int32_t get_offset_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return static_cast<int32_t>(offsetof(Object_t631007953_StaticFields, ___OffsetOfInstanceIDInCPlusPlusObject_1)); }
  256. inline int32_t get_OffsetOfInstanceIDInCPlusPlusObject_1() const { return ___OffsetOfInstanceIDInCPlusPlusObject_1; }
  257. inline int32_t* get_address_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return &___OffsetOfInstanceIDInCPlusPlusObject_1; }
  258. inline void set_OffsetOfInstanceIDInCPlusPlusObject_1(int32_t value)
  259. {
  260. ___OffsetOfInstanceIDInCPlusPlusObject_1 = value;
  261. }
  262. };
  263. #ifdef __clang__
  264. #pragma clang diagnostic pop
  265. #endif
  266. // Native definition for P/Invoke marshalling of UnityEngine.Object
  267. struct Object_t631007953_marshaled_pinvoke
  268. {
  269. intptr_t ___m_CachedPtr_0;
  270. };
  271. // Native definition for COM marshalling of UnityEngine.Object
  272. struct Object_t631007953_marshaled_com
  273. {
  274. intptr_t ___m_CachedPtr_0;
  275. };
  276. #endif // OBJECT_T631007953_H
  277. #ifndef TEXTURE_T3661962703_H
  278. #define TEXTURE_T3661962703_H
  279. #ifdef __clang__
  280. #pragma clang diagnostic push
  281. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  282. #pragma clang diagnostic ignored "-Wunused-variable"
  283. #endif
  284. // UnityEngine.Texture
  285. struct Texture_t3661962703 : public Object_t631007953
  286. {
  287. public:
  288. public:
  289. };
  290. #ifdef __clang__
  291. #pragma clang diagnostic pop
  292. #endif
  293. #endif // TEXTURE_T3661962703_H
  294. #ifndef TEXTURE2D_T3840446185_H
  295. #define TEXTURE2D_T3840446185_H
  296. #ifdef __clang__
  297. #pragma clang diagnostic push
  298. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  299. #pragma clang diagnostic ignored "-Wunused-variable"
  300. #endif
  301. // UnityEngine.Texture2D
  302. struct Texture2D_t3840446185 : public Texture_t3661962703
  303. {
  304. public:
  305. public:
  306. };
  307. #ifdef __clang__
  308. #pragma clang diagnostic pop
  309. #endif
  310. #endif // TEXTURE2D_T3840446185_H
  311. // System.Byte[]
  312. struct ByteU5BU5D_t4116647657 : public RuntimeArray
  313. {
  314. public:
  315. ALIGN_FIELD (8) uint8_t m_Items[1];
  316. public:
  317. inline uint8_t GetAt(il2cpp_array_size_t index) const
  318. {
  319. IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
  320. return m_Items[index];
  321. }
  322. inline uint8_t* GetAddressAt(il2cpp_array_size_t index)
  323. {
  324. IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
  325. return m_Items + index;
  326. }
  327. inline void SetAt(il2cpp_array_size_t index, uint8_t value)
  328. {
  329. IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
  330. m_Items[index] = value;
  331. }
  332. inline uint8_t GetAtUnchecked(il2cpp_array_size_t index) const
  333. {
  334. return m_Items[index];
  335. }
  336. inline uint8_t* GetAddressAtUnchecked(il2cpp_array_size_t index)
  337. {
  338. return m_Items + index;
  339. }
  340. inline void SetAtUnchecked(il2cpp_array_size_t index, uint8_t value)
  341. {
  342. m_Items[index] = value;
  343. }
  344. };
  345. // System.Boolean UnityEngine.ImageConversion::LoadImage(UnityEngine.Texture2D,System.Byte[],System.Boolean)
  346. extern "C" IL2CPP_METHOD_ATTR bool ImageConversion_LoadImage_m601733642 (RuntimeObject * __this /* static, unused */, Texture2D_t3840446185 * ___tex0, ByteU5BU5D_t4116647657* ___data1, bool ___markNonReadable2, const RuntimeMethod* method);
  347. #ifdef __clang__
  348. #pragma clang diagnostic push
  349. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  350. #pragma clang diagnostic ignored "-Wunused-variable"
  351. #endif
  352. #ifdef __clang__
  353. #pragma clang diagnostic pop
  354. #endif
  355. #ifdef __clang__
  356. #pragma clang diagnostic push
  357. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  358. #pragma clang diagnostic ignored "-Wunused-variable"
  359. #endif
  360. // System.Byte[] UnityEngine.ImageConversion::EncodeToPNG(UnityEngine.Texture2D)
  361. extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ImageConversion_EncodeToPNG_m2292631531 (RuntimeObject * __this /* static, unused */, Texture2D_t3840446185 * ___tex0, const RuntimeMethod* method)
  362. {
  363. typedef ByteU5BU5D_t4116647657* (*ImageConversion_EncodeToPNG_m2292631531_ftn) (Texture2D_t3840446185 *);
  364. static ImageConversion_EncodeToPNG_m2292631531_ftn _il2cpp_icall_func;
  365. if (!_il2cpp_icall_func)
  366. _il2cpp_icall_func = (ImageConversion_EncodeToPNG_m2292631531_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.ImageConversion::EncodeToPNG(UnityEngine.Texture2D)");
  367. ByteU5BU5D_t4116647657* retVal = _il2cpp_icall_func(___tex0);
  368. return retVal;
  369. }
  370. // System.Boolean UnityEngine.ImageConversion::LoadImage(UnityEngine.Texture2D,System.Byte[],System.Boolean)
  371. extern "C" IL2CPP_METHOD_ATTR bool ImageConversion_LoadImage_m601733642 (RuntimeObject * __this /* static, unused */, Texture2D_t3840446185 * ___tex0, ByteU5BU5D_t4116647657* ___data1, bool ___markNonReadable2, const RuntimeMethod* method)
  372. {
  373. typedef bool (*ImageConversion_LoadImage_m601733642_ftn) (Texture2D_t3840446185 *, ByteU5BU5D_t4116647657*, bool);
  374. static ImageConversion_LoadImage_m601733642_ftn _il2cpp_icall_func;
  375. if (!_il2cpp_icall_func)
  376. _il2cpp_icall_func = (ImageConversion_LoadImage_m601733642_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.ImageConversion::LoadImage(UnityEngine.Texture2D,System.Byte[],System.Boolean)");
  377. bool retVal = _il2cpp_icall_func(___tex0, ___data1, ___markNonReadable2);
  378. return retVal;
  379. }
  380. // System.Boolean UnityEngine.ImageConversion::LoadImage(UnityEngine.Texture2D,System.Byte[])
  381. extern "C" IL2CPP_METHOD_ATTR bool ImageConversion_LoadImage_m2182108104 (RuntimeObject * __this /* static, unused */, Texture2D_t3840446185 * ___tex0, ByteU5BU5D_t4116647657* ___data1, const RuntimeMethod* method)
  382. {
  383. bool V_0 = false;
  384. bool V_1 = false;
  385. {
  386. V_0 = (bool)0;
  387. Texture2D_t3840446185 * L_0 = ___tex0;
  388. ByteU5BU5D_t4116647657* L_1 = ___data1;
  389. bool L_2 = V_0;
  390. bool L_3 = ImageConversion_LoadImage_m601733642(NULL /*static, unused*/, L_0, L_1, L_2, /*hidden argument*/NULL);
  391. V_1 = L_3;
  392. goto IL_0011;
  393. }
  394. IL_0011:
  395. {
  396. bool L_4 = V_1;
  397. return L_4;
  398. }
  399. }
  400. #ifdef __clang__
  401. #pragma clang diagnostic pop
  402. #endif