From c4bd9d8c587bd1401f0fb2f60c34a4964d7afe20 Mon Sep 17 00:00:00 2001
From: asmrobot <asmrobot@hotmail.com>
Date: Sun, 27 Oct 2019 16:02:50 +0000
Subject: [PATCH] o
---
src/RichCreator.Utility/CV/LindongCVHelper.cs | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/RichCreator.Utility/CV/LindongCVHelper.cs b/src/RichCreator.Utility/CV/LindongCVHelper.cs
index 4fb6a8f..0c1b33a 100644
--- a/src/RichCreator.Utility/CV/LindongCVHelper.cs
+++ b/src/RichCreator.Utility/CV/LindongCVHelper.cs
@@ -35,11 +35,11 @@
/// <summary>
/// 小方格主角偏移
/// </summary>
- private static ZTPoint[] houseRoleBlockOffset = new ZTPoint[] {
- new ZTPoint(0,0),
- new ZTPoint(1,0),
- new ZTPoint(0,1),
- new ZTPoint(1,1)
+ private static Structs.ZTPoint[] houseRoleBlockOffset = new Structs.ZTPoint[] {
+ new Structs.ZTPoint(0,0),
+ new Structs.ZTPoint(1,0),
+ new Structs.ZTPoint(0,1),
+ new Structs.ZTPoint(1,1)
};
/// <summary>
@@ -49,7 +49,7 @@
/// <param name="minMapStart"></param>
/// <param name="offset"></param>
/// <returns></returns>
- public static bool GetCurrentHouseIndex(out Int32 houseIndex, Image<Rgb, byte> image, ZTPoint minMapStart)
+ public static bool GetCurrentHouseIndex(out Int32 houseIndex, Image<Rgb, byte> image, Structs.ZTPoint minMapStart)
{
houseIndex = -1;
Int32 mainMonsterHouseIndex = -1;
@@ -62,7 +62,7 @@
Int32 x = minMapStart.X + col * 18;
Int32 y = minMapStart.Y + row * 18;
- ZTPoint position = ZTPoint.Empty;
+ Structs.ZTPoint position = Structs.ZTPoint.Empty;
ZTRectangle limit = new ZTRectangle(x, y, x + 17, y + 17);
if (CVHelper.FindColorBlock(out position, image, limit, minMinimapRoleColor, maxMinimapRoleColor, houseRoleBlockOffset))
{
@@ -110,18 +110,18 @@
/// <summary>
/// 小方格色块偏移
/// </summary>
- private static ZTPoint[] houseColorBlockOffset = new ZTPoint[] {
- new ZTPoint(2,2),
- new ZTPoint(2,3),
- new ZTPoint(15,14),
- new ZTPoint(15,15),
+ private static Structs.ZTPoint[] houseColorBlockOffset = new Structs.ZTPoint[] {
+ new Structs.ZTPoint(2,2),
+ new Structs.ZTPoint(2,3),
+ new Structs.ZTPoint(15,14),
+ new Structs.ZTPoint(15,15),
};
/// <summary>
/// 房间是否开放
/// </summary>
/// <param name="houseIndex"></param>
/// <returns></returns>
- public static bool HouseIsOpen(Image<Rgb, byte> image, ZTPoint minMapStart, Int32 houseIndex)
+ public static bool HouseIsOpen(Image<Rgb, byte> image, Structs.ZTPoint minMapStart, Int32 houseIndex)
{
//第一块距上边15px,距左边1px
Int32 row = houseIndex / 4;
@@ -154,10 +154,10 @@
/// </summary>
/// <param name="image"></param>
/// <returns></returns>
- public static ZTPoint[] FindMonster(Image<Hsv, byte> image,ZTRectangle gameRect)
+ public static Structs.ZTPoint[] FindMonster(Image<Hsv, byte> image,ZTRectangle gameRect)
{
List<ZTRectangle> rects = CVHelper.FindBlocks(image, minMonsterHsv, maxMonsterHsv, monsterBlockSize);
- ZTPoint[] monsterPoints = new ZTPoint[rects.Count];
+ Structs.ZTPoint[] monsterPoints = new Structs.ZTPoint[rects.Count];
for (int i = 0; i < rects.Count; i++)
{
monsterPoints[i] = rects[i].GetCenterPoint().Add(gameRect.Start);
@@ -225,10 +225,10 @@
{
continue;
}
- ZTPoint doorPosition = ZTPoint.Empty;
+ Structs.ZTPoint doorPosition = Structs.ZTPoint.Empty;
for (int i = 0; i < doors.Count; i++)
{
- doorPosition = new ZTPoint(doors[i].Start.X + (doors[i].End.X - doors[i].Start.X) / 2, doors[i].Start.Y + (doors[i].End.Y - doors[i].Start.Y) / 2);
+ doorPosition = new Structs.ZTPoint(doors[i].Start.X + (doors[i].End.X - doors[i].Start.X) / 2, doors[i].Start.Y + (doors[i].End.Y - doors[i].Start.Y) / 2);
if (doorPosition.X >= limitRect.Start.X &&
doorPosition.X <= limitRect.End.X &&
doorPosition.Y >= limitRect.Start.Y &&
@@ -239,7 +239,7 @@
}
}
- return ZTPoint.Empty;
+ return Structs.ZTPoint.Empty;
}
/// <summary>
--
Gitblit v1.9.3