private static void gmGmkPulleyDrawSetObject(AppMain.OBS_OBJECT_WORK obj_work, int type) { if (!AppMain.GmMainIsDrawEnable() || ((int)obj_work.disp_flag & 32) != 0) { return; } AppMain.GMS_GMK_PULLEY_MANAGER gmkPulleyManager = AppMain.gm_gmk_pulley_manager; gmkPulleyManager.texlist = obj_work.obj_3d.texlist; gmkPulleyManager.tex_id = 0U; AppMain.GMS_GMK_PULLEY_REGISTER gmkPulleyRegister = gmkPulleyManager.reg[(int)gmkPulleyManager.num]; gmkPulleyRegister.type = (ushort)type; gmkPulleyRegister.flip = obj_work.dir.y; gmkPulleyRegister.vec.Assign(obj_work.pos); ++gmkPulleyManager.num; }
// Token: 0x06001B17 RID: 6935 RVA: 0x000F6BEC File Offset: 0x000F4DEC private static void gmGmkPulleyDrawSetObject(AppMain.OBS_OBJECT_WORK obj_work, int type) { if (!AppMain.GmMainIsDrawEnable()) { return; } if ((obj_work.disp_flag & 32U) != 0U) { return; } AppMain.GMS_GMK_PULLEY_MANAGER gms_GMK_PULLEY_MANAGER = AppMain.gm_gmk_pulley_manager; gms_GMK_PULLEY_MANAGER.texlist = obj_work.obj_3d.texlist; gms_GMK_PULLEY_MANAGER.tex_id = 0U; AppMain.GMS_GMK_PULLEY_REGISTER gms_GMK_PULLEY_REGISTER = gms_GMK_PULLEY_MANAGER.reg[(int)((UIntPtr)gms_GMK_PULLEY_MANAGER.num)]; gms_GMK_PULLEY_REGISTER.type = ( ushort )type; gms_GMK_PULLEY_REGISTER.flip = obj_work.dir.y; gms_GMK_PULLEY_REGISTER.vec.Assign(obj_work.pos); gms_GMK_PULLEY_MANAGER.num += 1U; }
// Token: 0x06001B08 RID: 6920 RVA: 0x000F5E48 File Offset: 0x000F4048 public static void GmGmkPulleyDrawServerMain() { if (!AppMain.GmMainIsDrawEnable()) { return; } AppMain.GMS_GMK_PULLEY_MANAGER gms_GMK_PULLEY_MANAGER = AppMain.gm_gmk_pulley_manager; if (gms_GMK_PULLEY_MANAGER.num <= 0U) { return; } AppMain.AMS_PARAM_DRAW_PRIMITIVE ams_PARAM_DRAW_PRIMITIVE = AppMain.GlobalPool <AppMain.AMS_PARAM_DRAW_PRIMITIVE> .Alloc(); ams_PARAM_DRAW_PRIMITIVE.type = 1; ams_PARAM_DRAW_PRIMITIVE.ablend = 0; ams_PARAM_DRAW_PRIMITIVE.bldSrc = 768; ams_PARAM_DRAW_PRIMITIVE.bldDst = 774; ams_PARAM_DRAW_PRIMITIVE.bldMode = 32774; ams_PARAM_DRAW_PRIMITIVE.aTest = 1; ams_PARAM_DRAW_PRIMITIVE.zMask = 0; ams_PARAM_DRAW_PRIMITIVE.zTest = 1; ams_PARAM_DRAW_PRIMITIVE.noSort = 1; ams_PARAM_DRAW_PRIMITIVE.texlist = gms_GMK_PULLEY_MANAGER.texlist; ams_PARAM_DRAW_PRIMITIVE.texId = ( int )gms_GMK_PULLEY_MANAGER.tex_id; uint col = AppMain.GmMainGetLightColor(); ams_PARAM_DRAW_PRIMITIVE.uwrap = 1; ams_PARAM_DRAW_PRIMITIVE.vwrap = 1; ams_PARAM_DRAW_PRIMITIVE.count = ( int )(gms_GMK_PULLEY_MANAGER.num * 6U - 2U); ams_PARAM_DRAW_PRIMITIVE.vtxPCT3D = AppMain.amDrawAlloc_NNS_PRIM3D_PCT(ams_PARAM_DRAW_PRIMITIVE.count); AppMain.NNS_PRIM3D_PCT[] buffer = ams_PARAM_DRAW_PRIMITIVE.vtxPCT3D.buffer; int offset = ams_PARAM_DRAW_PRIMITIVE.vtxPCT3D.offset; ams_PARAM_DRAW_PRIMITIVE.format3D = 4; AppMain.NNS_MATRIX nns_MATRIX = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc(); AppMain.NNS_VECTOR nns_VECTOR = AppMain.GlobalPool <AppMain.NNS_VECTOR> .Alloc(); int num = 0; while (( long )num < ( long )(( ulong )gms_GMK_PULLEY_MANAGER.num)) { int num2 = offset + num * 6; int num3 = offset + num * 6 - 1; int num4 = offset + num * 6 + 4; AppMain.GMS_GMK_PULLEY_REGISTER gms_GMK_PULLEY_REGISTER = gms_GMK_PULLEY_MANAGER.reg[num]; Vector3 vector; vector.X = AppMain.FX_FX32_TO_F32(gms_GMK_PULLEY_REGISTER.vec.x); vector.Y = AppMain.FX_FX32_TO_F32(gms_GMK_PULLEY_REGISTER.vec.y); vector.Z = AppMain.FX_FX32_TO_F32(gms_GMK_PULLEY_REGISTER.vec.z); AppMain.NNS_VECTOR[] array = AppMain.gm_gmk_pulley_pos[(int)gms_GMK_PULLEY_REGISTER.type]; AppMain.NNS_TEXCOORD[] array2 = AppMain.gm_gmk_pulley_tex[(int)gms_GMK_PULLEY_REGISTER.type]; if (gms_GMK_PULLEY_REGISTER.flip != 0) { AppMain.nnMakeRotateYMatrix(nns_MATRIX, ( int )gms_GMK_PULLEY_REGISTER.flip); } float num5 = 0f; if (gms_GMK_PULLEY_REGISTER.type == 2) { num5 = 2f; } for (int i = 0; i < 4; i++) { if (gms_GMK_PULLEY_REGISTER.flip != 0) { AppMain.nnTransformVector(nns_VECTOR, nns_MATRIX, array[i]); } else { AppMain.nnCopyVector(nns_VECTOR, array[i]); } int num6 = num2 + i; buffer[num6].Pos.x = nns_VECTOR.x + vector.X; buffer[num6].Pos.y = nns_VECTOR.y - vector.Y + num5; buffer[num6].Pos.z = nns_VECTOR.z + vector.Z; buffer[num6].Tex.u = array2[i].u; buffer[num6].Tex.v = array2[i].v; buffer[num6].Col = col; } if (num != 0) { buffer[num3] = buffer[num2]; } if (( long )num != ( long )(( ulong )(gms_GMK_PULLEY_MANAGER.num - 1U))) { buffer[num4] = buffer[num2 + 3]; } num++; } AppMain.GlobalPool <AppMain.NNS_VECTOR> .Release(nns_VECTOR); AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nns_MATRIX); AppMain.NNS_MATRIX nns_MATRIX2 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc(); AppMain.nnMakeUnitMatrix(nns_MATRIX2); AppMain.amMatrixPush(nns_MATRIX2); AppMain.ObjDraw3DNNDrawPrimitive(ams_PARAM_DRAW_PRIMITIVE, 0U, 0, 0); AppMain.amMatrixPop(); AppMain.GlobalPool <AppMain.AMS_PARAM_DRAW_PRIMITIVE> .Release(ams_PARAM_DRAW_PRIMITIVE); AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nns_MATRIX2); gms_GMK_PULLEY_MANAGER.num = 0U; }
public static void GmGmkPulleyDrawServerMain() { if (!AppMain.GmMainIsDrawEnable()) { return; } AppMain.GMS_GMK_PULLEY_MANAGER gmkPulleyManager = AppMain.gm_gmk_pulley_manager; if (gmkPulleyManager.num <= 0U) { return; } AppMain.AMS_PARAM_DRAW_PRIMITIVE prim = AppMain.GlobalPool <AppMain.AMS_PARAM_DRAW_PRIMITIVE> .Alloc(); prim.type = 1; prim.ablend = 0; prim.bldSrc = 768; prim.bldDst = 774; prim.bldMode = 32774; prim.aTest = (short)1; prim.zMask = (short)0; prim.zTest = (short)1; prim.noSort = (short)1; prim.texlist = gmkPulleyManager.texlist; prim.texId = (int)gmkPulleyManager.tex_id; uint lightColor = AppMain.GmMainGetLightColor(); prim.uwrap = 1; prim.vwrap = 1; prim.count = (int)gmkPulleyManager.num * 6 - 2; prim.vtxPCT3D = AppMain.amDrawAlloc_NNS_PRIM3D_PCT(prim.count); AppMain.NNS_PRIM3D_PCT[] buffer = prim.vtxPCT3D.buffer; int offset = prim.vtxPCT3D.offset; prim.format3D = 4; AppMain.NNS_MATRIX nnsMatrix1 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc(); AppMain.NNS_VECTOR dst = new AppMain.NNS_VECTOR(); for (int index1 = 0; (long)index1 < (long)gmkPulleyManager.num; ++index1) { int index2 = offset + index1 * 6; int index3 = offset + index1 * 6 - 1; int index4 = offset + index1 * 6 + 4; AppMain.GMS_GMK_PULLEY_REGISTER gmkPulleyRegister = gmkPulleyManager.reg[index1]; Vector3 vector3; vector3.X = AppMain.FX_FX32_TO_F32(gmkPulleyRegister.vec.x); vector3.Y = AppMain.FX_FX32_TO_F32(gmkPulleyRegister.vec.y); vector3.Z = AppMain.FX_FX32_TO_F32(gmkPulleyRegister.vec.z); AppMain.NNS_VECTOR[] gmGmkPulleyPo = AppMain.gm_gmk_pulley_pos[(int)gmkPulleyRegister.type]; AppMain.NNS_TEXCOORD[] nnsTexcoordArray = AppMain.gm_gmk_pulley_tex[(int)gmkPulleyRegister.type]; if (gmkPulleyRegister.flip != (ushort)0) { AppMain.nnMakeRotateYMatrix(nnsMatrix1, (int)gmkPulleyRegister.flip); } float num = 0.0f; if (gmkPulleyRegister.type == (ushort)2) { num = 2f; } for (int index5 = 0; index5 < 4; ++index5) { if (gmkPulleyRegister.flip != (ushort)0) { AppMain.nnTransformVector(dst, nnsMatrix1, gmGmkPulleyPo[index5]); } else { AppMain.nnCopyVector(dst, gmGmkPulleyPo[index5]); } int index6 = index2 + index5; buffer[index6].Pos.x = dst.x + vector3.X; buffer[index6].Pos.y = dst.y - vector3.Y + num; buffer[index6].Pos.z = dst.z + vector3.Z; buffer[index6].Tex.u = nnsTexcoordArray[index5].u; buffer[index6].Tex.v = nnsTexcoordArray[index5].v; buffer[index6].Col = lightColor; } if (index1 != 0) { buffer[index3] = buffer[index2]; } if ((long)index1 != (long)(gmkPulleyManager.num - 1U)) { buffer[index4] = buffer[index2 + 3]; } } //AppMain.GlobalPool<AppMain.NNS_VECTOR>.Release(dst); AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nnsMatrix1); AppMain.NNS_MATRIX nnsMatrix2 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc(); AppMain.nnMakeUnitMatrix(nnsMatrix2); AppMain.amMatrixPush(nnsMatrix2); AppMain.ObjDraw3DNNDrawPrimitive(prim, 0U, 0, 0); AppMain.amMatrixPop(); AppMain.GlobalPool <AppMain.AMS_PARAM_DRAW_PRIMITIVE> .Release(prim); AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nnsMatrix2); gmkPulleyManager.num = 0U; }