forked from kyx0r/FA-Binary-Patches
-
Notifications
You must be signed in to change notification settings - Fork 10
Allies intel range rings #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RutreD
wants to merge
17
commits into
FAForever:master
Choose a base branch
from
RutreD:AlliedRangeRings
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
b9cbe9d
fix little warning
RutreD 813d9ab
press F, whoever did this, it’s buggy, I’ll redo it
RutreD 1c6ba97
give it a spin
RutreD fd5ea0e
.hook
RutreD ecca354
customization
RutreD f1285c1
fix allied unit has non-intel ring
RutreD 70be9bf
.
RutreD 30dd2f7
.
RutreD 58f9939
.
RutreD 90fa4a0
.
RutreD 9cd458a
Let's allow the compiler to inline everything
RutreD e5873d0
Gemini-assisted code cleanup/sync with https://github.com/FAForever/F…
RutreD ae76cc8
Merge https://github.com/FAForever/FA-Binary-Patches into AlliedRange…
RutreD 9b7a555
Fix merge conflict
RutreD d529df5
Fix some of Claude's Verdict
RutreD 36c9140
Upd double render optimization
RutreD 5c6fca4
Sync radar, sonar, and omni ranges for allied units only
RutreD File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| 0x007A7858: | ||
| jmp asm__ShouldAddUnit | ||
| nop | ||
|
|
||
| 0x007EF12B: | ||
| push esp | ||
| mov ecx, esi | ||
| call RenderRange__Moho__UserUnit__UserUnit | ||
| nop | ||
|
|
||
| 0x005BF011: | ||
| mov ecx, edi | ||
| mov edx, eax | ||
| call Hooked_SyncVisionRange | ||
| jmp 0x005BF02C | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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,156 @@ | ||
| #pragma once | ||
|
|
||
| template<class R> | ||
| struct Vector2 | ||
| { | ||
| R x, y; | ||
| }; | ||
| using Vector2i = Vector2<int>; | ||
| using Vector2f = Vector2<float>; | ||
|
|
||
| template<class R> | ||
| class Vector3 | ||
| { | ||
| public: | ||
| using value_t = R; | ||
|
|
||
| R x, y, z; | ||
|
|
||
| Vector3() : x(0), y(0), z(0) {} | ||
| Vector3(R x_, R y_, R z_) : x(x_), y(y_), z(z_) {} | ||
|
|
||
| Vector3(const Vector3<R> &other) : x(other.x), y(other.y), z(other.z) {} | ||
|
|
||
| Vector3<R> &operator=(const Vector3<R> &other) | ||
| { | ||
| if (this != &other) | ||
| { | ||
| x = other.x; | ||
| y = other.y; | ||
| z = other.z; | ||
| } | ||
| return *this; | ||
| } | ||
|
|
||
| Vector3<R> operator+(const Vector3<R> &other) const | ||
| { | ||
| return Vector3<R>(x + other.x, y + other.y, z + other.z); | ||
| } | ||
|
|
||
| Vector3<R> operator-(const Vector3<R> &other) const | ||
| { | ||
| return Vector3<R>(x - other.x, y - other.y, z - other.z); | ||
| } | ||
|
|
||
| Vector3<R> operator*(R scalar) const | ||
| { | ||
| return Vector3<R>(x * scalar, y * scalar, z * scalar); | ||
| } | ||
|
|
||
| friend Vector3<R> operator*(R scalar, const Vector3<R> &vec) | ||
| { | ||
| return vec * scalar; | ||
| } | ||
|
|
||
| R dot(const Vector3<R> &other) const | ||
| { | ||
| return x * other.x + y * other.y + z * other.z; | ||
| } | ||
|
|
||
| Vector3<R> cross(const Vector3<R> &other) const | ||
| { | ||
| return Vector3<R>( | ||
| y * other.z - z * other.y, | ||
| z * other.x - x * other.z, | ||
| x * other.y - y * other.x); | ||
| } | ||
|
|
||
| float length() const | ||
| { | ||
| return sqrtf(x * x + y * y + z * z); | ||
| } | ||
|
|
||
| Vector3<float> normalized() const | ||
| { | ||
| float len = length(); | ||
| if (len > 0) | ||
| return {x / len, y / len, z / len}; | ||
|
|
||
| return *this; | ||
| } | ||
|
|
||
| Vector3<R> &operator+=(const Vector3<R> &other) | ||
| { | ||
| x += other.x; | ||
| y += other.y; | ||
| z += other.z; | ||
| return *this; | ||
| } | ||
|
|
||
| Vector3<R> &operator-=(const Vector3<R> &other) | ||
| { | ||
| x -= other.x; | ||
| y -= other.y; | ||
| z -= other.z; | ||
| return *this; | ||
| } | ||
|
|
||
| Vector3<R> &operator*=(R scalar) | ||
| { | ||
| x *= scalar; | ||
| y *= scalar; | ||
| z *= scalar; | ||
| return *this; | ||
| } | ||
| }; | ||
| using Vector3f = Vector3<float>; | ||
|
|
||
| template<class R> | ||
| struct Vector4 | ||
| { // 0x10 bytes | ||
| R x, y, z, w; | ||
| }; | ||
| using Vector4f = Vector4<float>; | ||
|
|
||
| template<class R> | ||
| struct Quaternion | ||
| { | ||
| R x, y, z, w; | ||
| }; | ||
| using Quaternionf = Quaternion<float>; | ||
|
|
||
| template<class R> | ||
| struct Rect2 | ||
| { | ||
| R x0, z0, x1, z1; | ||
| }; | ||
| using Rect2i = Rect2<int>; | ||
|
|
||
| template<class R> | ||
| struct Circle2 | ||
| { | ||
| Vector2<R> Center; | ||
| R Radius; | ||
|
|
||
| Circle2(R x, R y, R r): | ||
| Center{x, y}, | ||
| Radius{r} | ||
| {} | ||
| }; | ||
| using Circle2f = Circle2<float>; | ||
|
|
||
| template<class R> | ||
| struct Plane3 | ||
| { | ||
| Vector3<R> Normal; | ||
| R Constant; | ||
| }; | ||
| using Plane3f = Plane3<float>; | ||
|
|
||
| template<class R> | ||
| struct AxisAlignedBox3 | ||
| { | ||
| Vector3<R> Min; | ||
| Vector3<R> Max; | ||
| }; | ||
| using AxisAlignedBox3f = AxisAlignedBox3<float>; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you push stack pointer? Why not use
leato get proper pointer to structure on stack?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
push = 1 byte
lea > 3