Copy Copied! Back
TET_COL[math.ceil(TET_Y + 2 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN end elseif TET_COL_OLIGIN == 4 then if (TEX_ANG == 1) or (TEX_ANG == 3) then if TET_X - 1 < 0.5 then TET_X = TET_X + 1 end if TET_X + 1 > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X + 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X - 1)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X + 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN else if TET_X - 1 < 0.5 then TET_X = TET_X + 1 end if TET_X > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X - 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 2) * 10 + math.ceil(TET_X - 1)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 2 + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN end elseif TET_COL_OLIGIN == 5 then if TEX_ANG == 1 then if TET_X - 1 < 0.5 then TET_X = TET_X + 1 end if TET_X + 1 > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X - 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X + 1)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X + 1)] = TET_COL_OLIGIN elseif TEX_ANG == 2 then if TET_X < 0.5 then TET_X = TET_X + 1 end if TET_X + 1 > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y + 2) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X + 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + 2 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X + 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN elseif TEX_ANG == 3 then if TET_X - 1 < 0.5 then TET_X = TET_X + 1 end if TET_X + 1 > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X - 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X + 1)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X + 1)] = TET_COL_OLIGIN else if TET_X - 1 < 0.5 then TET_X = TET_X + 1 end if TET_X > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y + 2) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X - 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + 2 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN end elseif TET_COL_OLIGIN == 6 then if TEX_ANG == 1 then if TET_X - 1 < 0.5 then TET_X = TET_X + 1 end if TET_X + 1 > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X + 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X - 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X + 1)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X + 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X + 1)] = TET_COL_OLIGIN elseif TEX_ANG == 2 then if TET_X < 0.5 then TET_X = TET_X + 1 end if TET_X + 1 > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X + 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 2) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X + 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 2 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN elseif TEX_ANG == 3 then if TET_X - 1 < 0.5 then TET_X = TET_X + 1 end if TET_X + 1 > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X - 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X - 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X + 1)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X + 1)] = TET_COL_OLIGIN else if TET_X - 1 < 0.5 then TET_X = TET_X + 1 end if TET_X > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y + 2) * 10 + math.ceil(TET_X - 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 2) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + 2 + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 2 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN end elseif TET_COL_OLIGIN == 7 then if TEX_ANG == 1 then if TET_X - 1 < 0.5 then TET_X = TET_X + 1 end if TET_X + 1 > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X + 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X - 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X - 1)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X + 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN elseif TEX_ANG == 2 then if TET_X < 0.5 then TET_X = TET_X + 1 end if TET_X + 1 > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y + 2) * 10 + math.ceil(TET_X + 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 2) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + 2 + hosei) * 10 + math.ceil(TET_X + 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 2 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN elseif TEX_ANG == 3 then if TET_X - 1 < 0.5 then TET_X = TET_X + 1 end if TET_X + 1 > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X - 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X + 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X + 1)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X + 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X + 1)] = TET_COL_OLIGIN else if TET_X - 1 < 0.5 then TET_X = TET_X + 1 end if TET_X > 9.5 then TET_X = TET_X - 1 end if TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X - 1)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 2) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y + 1) * 10 + math.ceil(TET_X)] > 0 or TET_COL_NOW[math.ceil(TET_Y) * 10 + math.ceil(TET_X)] > 0 then hosei = 1 FLG = true if LEFT_FLG_FLG then TET_X = TET_X - 1 FLG = false end if RIGHT_FLG_FLG then TET_X = TET_X + 1 FLG = false end end TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X - 1)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 2 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + 1 + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN TET_COL[math.ceil(TET_Y + hosei) * 10 + math.ceil(TET_X)] = TET_COL_OLIGIN end end end --固定のを表示 function Now_Show() --現在あるマス表示 for i = 1, 200 do --重なっていなければ local col_num = HOZI_COL[i] local col = 0 if col_num == 1 then col = Color.__new(1, 0, 0) elseif col_num == 2 then col = Color.__new(0, 1, 0) elseif col_num == 3 then col = Color.__new(0, 0, 1) elseif col_num == 4 then col = Color.__new(1, 1, 0) elseif col_num == 5 then col = Color.__new(1, 0, 1) elseif col_num == 6 then col = Color.__new(0, 1, 1) elseif col_num == 7 then col = Color.__new(0, 0, 0) else col = Color.__new(1, 1, 1) end --ASET._ALL_SetMaterialColorFromName(tostring(i), col) ASET.SetMaterialColorFromIndex(i + 3, col) end end