|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Jan 15, 2016 3:55 am Post subject: Another Question About XMM Registers |
|
|
How do I go about doubling up only the first two values inside the xmm0 register? The below script does what I want, except it basically NOP's the third value:
Code: | addps xmm0,xmm0
addps xmm0,xmm0
movq xmm0,xmm0 |
I tried shuffling the values, doing my add and then shuffling them back, but it's not working. Maybe I am doing something wrong?
Code: | addss xmm0,xmm0
shufps xmm0,xmm0,e1
addss xmm0,xmm0
shufps xmm0,xmm0,e4 |
Thanks.
EDIT:
I don't know if this is the best approach. What I am trying to do is increase player speed, but the game that I am working on does not have a traditional jump capability, and when you start running really fast and step on a curb or something, sometimes your player goes air-born and starts flying in the air. I have incorporated a way to cancel that when it happens, but I was hoping for something automated.
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Fri Jan 15, 2016 8:36 am Post subject: |
|
|
Use another SSE register:
Code: | movhlps xmm1,xmm0 -- move element 2 and 3 to xmm1 (as element 0 and 1)
addps xmm0,xmm0
movlhps xmm0,xmm1 -- move element 0 and 1 to xmm0 (as element 2 and 3)
|
Code: | before:
xmm0 | X0 | X1 | X2 | X3 |
-------------------------------------
2 3 4 5
after:
xmm0 | X0 | X1 | X2 | X3 |
-------------------------------------
4 6 4 5
|
_________________
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Jan 15, 2016 4:47 pm Post subject: |
|
|
Awesome. It works. Thanks!
I have to wait to give you +rep.
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|