This commit is contained in:
lenheart
2024-11-15 19:53:44 +08:00
parent 6c71c79563
commit 9d84fe256d
17 changed files with 1042 additions and 106 deletions

View File

@@ -13,6 +13,16 @@ class Memory {
function allocUtf8String(Str) {
return NativePointer(Str_Ptr(Str));
}
function copy(P1, P2, Size) {
local WriteArr = Sq_ReadByteArr(P2.C_Object, Size);
P1.writeByteArray(WriteArr);
}
function reset(P1, Size) {
local WriteArr = array(Size, 0);
P1.writeByteArray(WriteArr);
}
}
class NativePointer extends Base_C_Object {
@@ -41,13 +51,11 @@ class NativePointer extends Base_C_Object {
}
function add(intoffset) {
this.C_Object = Sq_PointerOperation(this.C_Object, intoffset, "+");
return this;
return NativePointer(Sq_PointerOperation(this.C_Object, intoffset, "+"));
}
function sub(intoffset) {
this.C_Object = Sq_PointerOperation(this.C_Object, intoffset, "-");
return this;
return NativePointer(Sq_PointerOperation(this.C_Object, intoffset, "-"));
}
function writeByteArray(arr) {