-
Notifications
You must be signed in to change notification settings - Fork 44
zThrown work #733
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
base: main
Are you sure you want to change the base?
zThrown work #733
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,17 @@ struct xEntDrive | |
| xVec3 loc; | ||
| F32 yaw; | ||
| const xCollis* coll; | ||
|
|
||
| tri_data& operator=(const tri_data& rhs) | ||
| { | ||
| xCollis::tri_data::operator=(rhs); | ||
| *(S32*)(&loc.x) = *(S32*)(&rhs.loc.x); | ||
| *(S32*)(&loc.y) = *(S32*)(&rhs.loc.y); | ||
| *(S32*)(&loc.z) = *(S32*)(&rhs.loc.z); | ||
|
Comment on lines
+15
to
+20
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment |
||
| yaw = rhs.yaw; | ||
| coll = rhs.coll; | ||
| return *this; | ||
| } | ||
| }; | ||
|
|
||
| U32 flags; | ||
|
|
@@ -31,6 +42,35 @@ struct xEntDrive | |
|
|
||
| // 0x5c | ||
| tri_data tri; | ||
|
|
||
| xEntDrive& operator=(const xEntDrive& rhs) | ||
| { | ||
| flags = rhs.flags; | ||
| otm = rhs.otm; | ||
| otmr = rhs.otmr; | ||
| os = rhs.os; | ||
| tm = rhs.tm; | ||
| tmr = rhs.tmr; | ||
| s = rhs.s; | ||
| odriver = rhs.odriver; | ||
| driver = rhs.driver; | ||
| driven = rhs.driven; | ||
| *(S32*)(&op.x) = *(S32*)(&rhs.op.x); | ||
| *(S32*)(&op.y) = *(S32*)(&rhs.op.y); | ||
|
Comment on lines
+46
to
+59
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment |
||
| *(S32*)(&op.z) = *(S32*)(&rhs.op.z); | ||
| *(S32*)(&p.x) = *(S32*)(&rhs.p.x); | ||
| *(S32*)(&p.y) = *(S32*)(&rhs.p.y); | ||
| *(S32*)(&p.z) = *(S32*)(&rhs.p.z); | ||
| *(S32*)(&q.x) = *(S32*)(&rhs.q.x); | ||
| *(S32*)(&q.y) = *(S32*)(&rhs.q.y); | ||
| *(S32*)(&q.z) = *(S32*)(&rhs.q.z); | ||
| yaw = rhs.yaw; | ||
| *(S32*)(&dloc.x) = *(S32*)(&rhs.dloc.x); | ||
| *(S32*)(&dloc.y) = *(S32*)(&rhs.dloc.y); | ||
| *(S32*)(&dloc.z) = *(S32*)(&rhs.dloc.z); | ||
| tri = rhs.tri; | ||
| return *this; | ||
| } | ||
| }; | ||
|
|
||
| void xEntDriveInit(xEntDrive* drv, xEnt* driven); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,6 +65,20 @@ struct xBBox | |
| { | ||
| xVec3 center; | ||
| xBox box; | ||
|
|
||
| xBBox& operator=(const xBBox& rhs) | ||
| { | ||
| *(S32*)(¢er.x) = *(S32*)(&rhs.center.x); | ||
| *(S32*)(¢er.y) = *(S32*)(&rhs.center.y); | ||
|
Comment on lines
+69
to
+72
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment |
||
| *(S32*)(¢er.z) = *(S32*)(&rhs.center.z); | ||
| *(S32*)(&box.upper.x) = *(S32*)(&rhs.box.upper.x); | ||
| *(S32*)(&box.upper.y) = *(S32*)(&rhs.box.upper.y); | ||
| *(S32*)(&box.upper.z) = *(S32*)(&rhs.box.upper.z); | ||
| *(S32*)(&box.lower.x) = *(S32*)(&rhs.box.lower.x); | ||
| *(S32*)(&box.lower.y) = *(S32*)(&rhs.box.lower.y); | ||
| *(S32*)(&box.lower.z) = *(S32*)(&rhs.box.lower.z); | ||
| return *this; | ||
| } | ||
| }; | ||
|
|
||
| struct xCylinder | ||
|
|
||
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.
I think this is probably a compiler generated assignment function. That's the only way I know to get it to copy floats via the regular registers. Do things work ok if you delete this function?