UnityEngine.ImageConversionModule.cpp 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. #include "pch-cpp.hpp"
  2. #ifndef _MSC_VER
  3. # include <alloca.h>
  4. #else
  5. # include <malloc.h>
  6. #endif
  7. #include <limits>
  8. struct ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031;
  9. struct String_t;
  10. struct Texture2D_tE6505BC111DD8A424A9DBE8E05D7D09E11FFFCF4;
  11. struct Void_t4861ACF8F4594C3437BB48B6E56783494B843915;
  12. struct ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031;
  13. IL2CPP_EXTERN_C_BEGIN
  14. IL2CPP_EXTERN_C_END
  15. #ifdef __clang__
  16. #pragma clang diagnostic push
  17. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  18. #pragma clang diagnostic ignored "-Wunused-variable"
  19. #endif
  20. struct U3CModuleU3E_t33B45E84B8820001E6F644E31DCC9BAEE6DCE23F
  21. {
  22. };
  23. struct ImageConversion_tD7B6C2CDCD3E1078708B1668B9695914A502C252 : public RuntimeObject
  24. {
  25. };
  26. struct ValueType_t6D9B272BD21782F0A9A14F2E41F85A50E97A986F : public RuntimeObject
  27. {
  28. };
  29. struct ValueType_t6D9B272BD21782F0A9A14F2E41F85A50E97A986F_marshaled_pinvoke
  30. {
  31. };
  32. struct ValueType_t6D9B272BD21782F0A9A14F2E41F85A50E97A986F_marshaled_com
  33. {
  34. };
  35. struct Boolean_t09A6377A54BE2F9E6985A8149F19234FD7DDFE22
  36. {
  37. bool ___m_value;
  38. };
  39. struct Byte_t94D9231AC217BE4D2E004C4CD32DF6D099EA41A3
  40. {
  41. uint8_t ___m_value;
  42. };
  43. struct IntPtr_t
  44. {
  45. void* ___m_value;
  46. };
  47. struct Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C : public RuntimeObject
  48. {
  49. intptr_t ___m_CachedPtr;
  50. };
  51. struct Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C_marshaled_pinvoke
  52. {
  53. intptr_t ___m_CachedPtr;
  54. };
  55. struct Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C_marshaled_com
  56. {
  57. intptr_t ___m_CachedPtr;
  58. };
  59. struct Texture_t791CBB51219779964E0E8A2ED7C1AA5F92A4A700 : public Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C
  60. {
  61. };
  62. struct Texture2D_tE6505BC111DD8A424A9DBE8E05D7D09E11FFFCF4 : public Texture_t791CBB51219779964E0E8A2ED7C1AA5F92A4A700
  63. {
  64. };
  65. struct Boolean_t09A6377A54BE2F9E6985A8149F19234FD7DDFE22_StaticFields
  66. {
  67. String_t* ___TrueString;
  68. String_t* ___FalseString;
  69. };
  70. #ifdef __clang__
  71. #pragma clang diagnostic pop
  72. #endif
  73. struct ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031 : public RuntimeArray
  74. {
  75. ALIGN_FIELD (8) uint8_t m_Items[1];
  76. inline uint8_t GetAt(il2cpp_array_size_t index) const
  77. {
  78. IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
  79. return m_Items[index];
  80. }
  81. inline uint8_t* GetAddressAt(il2cpp_array_size_t index)
  82. {
  83. IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
  84. return m_Items + index;
  85. }
  86. inline void SetAt(il2cpp_array_size_t index, uint8_t value)
  87. {
  88. IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
  89. m_Items[index] = value;
  90. }
  91. inline uint8_t GetAtUnchecked(il2cpp_array_size_t index) const
  92. {
  93. return m_Items[index];
  94. }
  95. inline uint8_t* GetAddressAtUnchecked(il2cpp_array_size_t index)
  96. {
  97. return m_Items + index;
  98. }
  99. inline void SetAtUnchecked(il2cpp_array_size_t index, uint8_t value)
  100. {
  101. m_Items[index] = value;
  102. }
  103. };
  104. IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool ImageConversion_LoadImage_m292ADCEED268A0A0AAD532BAB8D1710CF0FC8AEF (Texture2D_tE6505BC111DD8A424A9DBE8E05D7D09E11FFFCF4* ___0_tex, ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031* ___1_data, bool ___2_markNonReadable, const RuntimeMethod* method) ;
  105. #ifdef __clang__
  106. #pragma clang diagnostic push
  107. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  108. #pragma clang diagnostic ignored "-Wunused-variable"
  109. #endif
  110. #ifdef __clang__
  111. #pragma clang diagnostic pop
  112. #endif
  113. #ifdef __clang__
  114. #pragma clang diagnostic push
  115. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  116. #pragma clang diagnostic ignored "-Wunused-variable"
  117. #endif
  118. IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031* ImageConversion_EncodeToPNG_m0804AD31B83C653AEBB234F6CC31A02D4FA7C945 (Texture2D_tE6505BC111DD8A424A9DBE8E05D7D09E11FFFCF4* ___0_tex, const RuntimeMethod* method)
  119. {
  120. typedef ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031* (*ImageConversion_EncodeToPNG_m0804AD31B83C653AEBB234F6CC31A02D4FA7C945_ftn) (Texture2D_tE6505BC111DD8A424A9DBE8E05D7D09E11FFFCF4*);
  121. static ImageConversion_EncodeToPNG_m0804AD31B83C653AEBB234F6CC31A02D4FA7C945_ftn _il2cpp_icall_func;
  122. if (!_il2cpp_icall_func)
  123. _il2cpp_icall_func = (ImageConversion_EncodeToPNG_m0804AD31B83C653AEBB234F6CC31A02D4FA7C945_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.ImageConversion::EncodeToPNG(UnityEngine.Texture2D)");
  124. ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031* icallRetVal = _il2cpp_icall_func(___0_tex);
  125. return icallRetVal;
  126. }
  127. IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool ImageConversion_LoadImage_m292ADCEED268A0A0AAD532BAB8D1710CF0FC8AEF (Texture2D_tE6505BC111DD8A424A9DBE8E05D7D09E11FFFCF4* ___0_tex, ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031* ___1_data, bool ___2_markNonReadable, const RuntimeMethod* method)
  128. {
  129. typedef bool (*ImageConversion_LoadImage_m292ADCEED268A0A0AAD532BAB8D1710CF0FC8AEF_ftn) (Texture2D_tE6505BC111DD8A424A9DBE8E05D7D09E11FFFCF4*, ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031*, bool);
  130. static ImageConversion_LoadImage_m292ADCEED268A0A0AAD532BAB8D1710CF0FC8AEF_ftn _il2cpp_icall_func;
  131. if (!_il2cpp_icall_func)
  132. _il2cpp_icall_func = (ImageConversion_LoadImage_m292ADCEED268A0A0AAD532BAB8D1710CF0FC8AEF_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.ImageConversion::LoadImage(UnityEngine.Texture2D,System.Byte[],System.Boolean)");
  133. bool icallRetVal = _il2cpp_icall_func(___0_tex, ___1_data, ___2_markNonReadable);
  134. return icallRetVal;
  135. }
  136. IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool ImageConversion_LoadImage_m1797365F78319B68638DE8BB02836F8D60760041 (Texture2D_tE6505BC111DD8A424A9DBE8E05D7D09E11FFFCF4* ___0_tex, ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031* ___1_data, const RuntimeMethod* method)
  137. {
  138. bool V_0 = false;
  139. {
  140. Texture2D_tE6505BC111DD8A424A9DBE8E05D7D09E11FFFCF4* L_0 = ___0_tex;
  141. ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031* L_1 = ___1_data;
  142. bool L_2;
  143. L_2 = ImageConversion_LoadImage_m292ADCEED268A0A0AAD532BAB8D1710CF0FC8AEF(L_0, L_1, (bool)0, NULL);
  144. V_0 = L_2;
  145. goto IL_000c;
  146. }
  147. IL_000c:
  148. {
  149. bool L_3 = V_0;
  150. return L_3;
  151. }
  152. }
  153. #ifdef __clang__
  154. #pragma clang diagnostic pop
  155. #endif