-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ef6d4b7
Showing
11 changed files
with
1,766 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/target | ||
/bindings/target |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "genshin-auto-fish" | ||
version = "0.1.0" | ||
edition = "2018" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
bindings = { path = "bindings" } | ||
windows = "0.20.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 原神半自动钓鱼 | ||
|
||
需要手动更换鱼饵和选择位置抛竿,鱼上钩时,程序会自动收杆和调整力度。 | ||
|
||
目前代码里写死的图形匹配逻辑,仅支持 1920x1080 全屏。 | ||
|
||
您可以可以随意使用代码和程序,您使用此程序对账号造成的一切后果请自行承担。 | ||
|
||
## 原理说明 | ||
|
||
使用 BitBlt 和 GetDIBits 获取屏幕颜色信息,使用纯 CPU 进行特征识别。 | ||
|
||
识别 `<` `|` `>` 和收杆图标,前三个使用 `#ffffc0` 纯色进行查找,最后一个使用几个手动选择的特征点的灰度值比较差值进行匹配。 | ||
|
||
有力度条时,控制力度,在区间左侧 1/3 处徘徊。没有找到力度条时,会查找收杆图标,如果发现收杆图标,就点击左键收杆。 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "bindings" | ||
version = "0.1.0" | ||
edition = "2018" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
windows = "0.20.0" | ||
|
||
[build-dependencies] | ||
windows = "0.20.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
fn main() { | ||
windows::build! { | ||
Windows::Win32::System::Diagnostics::Debug::GetLastError, | ||
Windows::Win32::UI::KeyboardAndMouseInput::SendInput, | ||
Windows::Win32::Graphics::Gdi::{ | ||
BI_RGB, | ||
GetDC, | ||
ReleaseDC, | ||
CreateCompatibleDC, | ||
DeleteDC, | ||
CreateCompatibleBitmap, | ||
DeleteObject, | ||
SelectObject, | ||
BitBlt, | ||
GetDIBits, | ||
}, | ||
}; | ||
} |
Oops, something went wrong.