CLEO Help CLEO Textdraws with sa_widescreenfix_lite.asi

CLEO related
Status
Not open for further replies.

Suicide Bomb

Active member
Joined
Jun 22, 2014
Messages
100
Reaction score
1
Hey,

I need your help again, guys. So, we've got this code and basically what it does is converting a 3D position to 2D so it can be placed on the screen as a textdraw.
Code:
:Noname_264
0AA7: call_function 7392816 num_params 6 pop 6 1 1 7@s 6@s 2@s 0@s 29@  
0073: 2@ /= 6@ // (float)
0073: 2@ /= 4@ // (float)
0073: 3@ /= 7@ // (float)
0073: 3@ /= 4@ // (float)
2@ *= 640.0
3@ *= 448.0
ret 2 2@ 3@

The problem is, when I use sa_widescreenfix_lite.asi, the position of the texts fucks up and does not show properly.

Screenshots:
- Without sa_widescreenfix_lite.asi
voLvCxm.png


- Without sa_widescreenfix_lite.asi
VUZlilp.png
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
228
Location
( ͡° ͜ʖ ͡°)
Try this one:

//0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 0@ Y 1@ Z 2@ store_screen_X_to 3@ Y_to 4@
:getScreenXYFrom3DCoords
0AC7: 14@ = var 0@ offset
0AC7: 15@ = var 3@ offset
0AC7: 16@ = var 6@ offset
0AC7: 17@ = var 9@ offset
0AA5: call 0x70CE30 num_params 6 pop 6 {18@ 18@} 0 0 17@ 16@ 15@ 14@
0007: 12@ = 640.0
0007: 13@ = 448.0
0A8D: 14@ = read_memory 0xC17044 size 4 virtual_protect 0
0A8D: 15@ = read_memory 0xC17048 size 4 virtual_protect 0
0093: 14@ = integer 14@ to_float
0093: 15@ = integer 15@ to_float
0073: 12@ /= 14@
0073: 13@ /= 15@
006B: 3@ *= 12@
006B: 4@ *= 13@
0AB2: ret 2 3@ 4@
 

Suicide Bomb

Active member
Joined
Jun 22, 2014
Messages
100
Reaction score
1
You're a god Opcode.eXe, it's working now, thank you for your help.

EDIT: Okay, it's working like a charm now but I have an interesting problem which is my fault rather than yours. Please let the images explain.

ucNZ6s0.png


g5K55BL.png


When I turn the camera to the opposite direction, texts begin to show randomly. Could you please help me with this problem as well? I'll PM the full source if needed.
 
Status
Not open for further replies.
Top