mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 11:56:49 +01:00
20 lines
520 B
C++
20 lines
520 B
C++
|
|
||
|
#ifndef TERRAIN_2D_DEFINES_H
|
||
|
#define TERRAIN_2D_DEFINES_H
|
||
|
|
||
|
#define VARIANT_ARRAY_GET(arr) \
|
||
|
Vector<Variant> r; \
|
||
|
for (int i = 0; i < arr.size(); i++) { \
|
||
|
r.push_back(arr[i].get_ref_ptr()); \
|
||
|
} \
|
||
|
return r;
|
||
|
|
||
|
#define VARIANT_ARRAY_SET(arr, arr_into, type) \
|
||
|
arr_into.clear(); \
|
||
|
for (int i = 0; i < arr.size(); i++) { \
|
||
|
Ref<type> e = Ref<type>(arr[i]); \
|
||
|
arr_into.push_back(e); \
|
||
|
}
|
||
|
|
||
|
#endif
|