This commit is contained in:
2025-10-14 09:17:56 +08:00
parent 0d0465fad3
commit 6eb4d6a2f9
19 changed files with 854 additions and 240 deletions

View File

@@ -497,7 +497,11 @@ class Rindro_Draw_Character {
function DrawFace(X, Y) {
setClip(X, Y, X + 22, Y + 18); //开始裁切
foreach(AniInfo in DrawInfo) {
AniInfo.Ani.DrawIndex(X + ENUM_RINDRO_JOB_FACE_HEIGHT[Job].x, Y + ENUM_RINDRO_JOB_FACE_HEIGHT[Job].y, 0);
try {
AniInfo.Ani.DrawIndex(X + ENUM_RINDRO_JOB_FACE_HEIGHT[Job].x, Y + ENUM_RINDRO_JOB_FACE_HEIGHT[Job].y, 0);
} catch (exception) {
}
}
releaseClip(); //裁切结束
}

View File

@@ -148,6 +148,11 @@ class Rindro_BaseToolClass {
Pack_Control.rawset(Id, CallBack);
}
function RegisterHexPack(Id, CallBack)
{
Pack_Hex_Control.rawset(Id, CallBack);
}
//绘制简易静态Ani // obj -- ani路径 -- X -- Y -- 第几帧 -- ani名字
function T_DrawStayAni(obj, aniFileName, x, y, index, aniname) {
local SelectAni = obj.getVar().GetAnimationMap(aniname, aniFileName);

View File

@@ -36,13 +36,11 @@ class NativePointer {
}
function add(intoffset) {
this.C_Object = L_sq_I2P(L_sq_P2I(this.C_Object) + intoffset);
return this;
return NativePointer(L_sq_I2P(L_sq_P2I(this.C_Object) + intoffset));
}
function sub(intoffset) {
this.C_Object = L_sq_I2P(L_sq_P2I(this.C_Object) - intoffset);
return this;
return NativePointer(L_sq_I2P(L_sq_P2I(this.C_Object) - intoffset));
}
function writeByteArray(arr) {

View File

@@ -4,10 +4,10 @@
创建日期:2025-06-30 09:24
文件用途:字节包
*/
class Packet{
class Packet {
//读取指针位置
ReadIndex = 0;
Index = 0;
//内存数据
Pointer = null;
@@ -16,24 +16,46 @@ class Packet{
//加载包
function Load(P,S)
{
function Load(P, S) {
Pointer = P;
Size = S;
}
//读取指针跳转
function Seek(...) {
local Pos = vargv[0];
local Mode = 0;
if(vargc > 1) Mode = vargv[1];
if (Mode == 0) {
Index = Pos;
} else if (Mode == 1) {
Index += Pos;
} else if (Mode == 2) {
Index -= Pos;
}
}
//读取整形
function GetInt()
{
function GetInt() {
local Size_t = 4;
if(ReadIndex + Size_t > Size){
if (Index + Size_t > Size) {
print("读取包越界!");
return;
}
local Buf = NativePointer(Pointer).add(ReadIndex).readInt();
ReadIndex += Size_t;
local Buf = NativePointer(Pointer).add(Index).readInt();
Index += Size_t;
return Buf;
}
//读取
//读取
function GetStream(Size_t) {
if (Index + Size_t > Size) {
print("读取包越界!");
return;
}
local Np = NativePointer(Pointer).add(Index);
Np.Size = Size_t;
Index += Size_t;
return Np;
}
}