CharlesVercetti Posted January 25, 2014 Share Posted January 25, 2014 (edited) Hello guys! I have one question. I am having problems with drawing textures. I have written code but it crashed,dunno why. Read recent posts for code[wip]. Edited March 14, 2014 by TommyCJFaann Link to comment Share on other sites More sharing options...
CharlesVercetti Posted January 26, 2014 Author Share Posted January 26, 2014 Guys please I need it a lot. Link to comment Share on other sites More sharing options...
Danikov Posted January 26, 2014 Share Posted January 26, 2014 First of all,it had just been a day,no need to bump this,you'll get help,eventually. I think you should load the 'texture dictionary' first with Opcode 0390,then use Opcode 038F to load the texture you want to use from the texture dictionary you specified in Opcode 0390 and then you you draw the texture with Opcode 038D. Link to comment Share on other sites More sharing options...
CharlesVercetti Posted January 26, 2014 Author Share Posted January 26, 2014 Thanks but please,give an example. Link to comment Share on other sites More sharing options...
Danikov Posted January 26, 2014 Share Posted January 26, 2014 Thanks but please,give an example. I mainly used Google to answer your question,so why don't you do the same and take a look by yourself. Link to comment Share on other sites More sharing options...
CharlesVercetti Posted January 26, 2014 Author Share Posted January 26, 2014 It shows codes for SA only.I need for VC. Link to comment Share on other sites More sharing options...
CharlesVercetti Posted January 27, 2014 Author Share Posted January 27, 2014 Hello guys!Please! Is there no CLEO coders around,I don't know how I could arrange the opcodes Danikov provided.Please,I need a solution as soon as possible. Link to comment Share on other sites More sharing options...
Silent Posted January 27, 2014 Share Posted January 27, 2014 But these opcodes are for VC too. Link to comment Share on other sites More sharing options...
CharlesVercetti Posted January 28, 2014 Author Share Posted January 28, 2014 (edited) But these opcodes are for VC too. Man,i meant i don't know how to put them in a right order.I wanted it to make it appear with a key press. Should I use the txdAdd,txdLoad....*something*... commands?(actually memory addresses.) Edited January 28, 2014 by TommyCJFaann Link to comment Share on other sites More sharing options...
goodidea82 Posted January 28, 2014 Share Posted January 28, 2014 The good thing about cleo scripts is that they can be easily decompiled by drag and drop into the sannybuilder. Just search for a mod that does something similar (perhaps a speedometer mod) and decompile it to see how to use the commands. You can also decompile main.scm etc. Link to comment Share on other sites More sharing options...
CharlesVercetti Posted January 29, 2014 Author Share Posted January 29, 2014 The good thing about cleo scripts is that they can be easily decompiled by drag and drop into the sannybuilder. Just search for a mod that does something similar (perhaps a speedometer mod) and decompile it to see how to use the commands. You can also decompile main.scm etc. VC doesn't have CLEO Speedo mods.BTW guys,nobody seems to reply the perfect solution.Thank you! Link to comment Share on other sites More sharing options...
ThirteenAG Posted January 29, 2014 Share Posted January 29, 2014 (edited) http://bit.ly/1a1JKqk Edited January 29, 2014 by ThirteenAG Danikov 1 Widescreen Fixes Pack || Project2DFX || SaveLoader || WindowedMode || CLEO Scripts Link to comment Share on other sites More sharing options...
CharlesVercetti Posted January 31, 2014 Author Share Posted January 31, 2014 So you don't know that,man? Link to comment Share on other sites More sharing options...
Silent Posted January 31, 2014 Share Posted January 31, 2014 Why not look up how any of DOZENS of SA mods do it? Link to comment Share on other sites More sharing options...
CharlesVercetti Posted March 8, 2014 Author Share Posted March 8, 2014 Sorry for bumping,but I tried ThirteenAG's SA texture draw method,and got a grey box on screen. I actually added the TXD dictionary and the texture in the code,still it didn't work. P.S:If you need the code,PM me. Link to comment Share on other sites More sharing options...
CharlesVercetti Posted March 9, 2014 Author Share Posted March 9, 2014 Still,I have got no help.This doesn't need a Google Search,it needs some coder's help. Link to comment Share on other sites More sharing options...
Silent Posted March 9, 2014 Share Posted March 9, 2014 You ask people to PM you to help you and you're wondering why you get no replies? Really? Link to comment Share on other sites More sharing options...
Deji Posted March 9, 2014 Share Posted March 9, 2014 Post your code and we'll tell you exactly what's wrong with it. Link to comment Share on other sites More sharing options...
DK22Pac Posted March 9, 2014 Share Posted March 9, 2014 (edited) You can look for drawing examples in GTA SA's main.scm. III and VC use same opcodes for this. And also here Edited March 9, 2014 by _DK Link to comment Share on other sites More sharing options...
fastman92 Posted March 9, 2014 Share Posted March 9, 2014 One problem that may occur: http://gtag.gtagaming.com/opcode-database/opcode/074B/ A command that's used in every speedometer that has a rotated texture of needle drawn on screen, exists only in GTA SA It's a command with ID of 0x074B Link to comment Share on other sites More sharing options...
CharlesVercetti Posted March 14, 2014 Author Share Posted March 14, 2014 Luckily I corrected the code myself,but it crashed again! Here is the code. {$CLEO .cs}//-------------MAIN---------------0000: NOPwait 2000391: release_textures0390: load_txd_dictionary 'texture' // never used in VC or GTA 3038F: load_texture 'texture' as 1 // Load dictionary with 0390 first :SHOW_TEXTUREwait 0 if 05EE: key_pressed 80 //VK_... jf @HIDE_TEXTURE 05F5: call_scm_func @draw_texture params 9 _and it is - position 560.0 320.0 size 80.0 180.0 RGBA 128 128 128 192 texture_id 1 05DF: write_memory 6913008 size 4 value 290.0 virtual_protect 0 05DF: write_memory 6913012 size 4 value 56.0 virtual_protect 0 :HIDE_TEXTUREif 85EE: not key_pressed 80 //VK_... jf @END05F5: call_scm_func @draw_texture params 9 _and it is - position 920.0 724.0 size 240.0 248.0 RGBA 255 255 255 255 texture_id 105DF: write_memory 6913008 size 4 value 1000.0 virtual_protect 0 05DF: write_memory 6913012 size 4 value 40.0 virtual_protect 0 :ENDjump @SHOW_TEXTURE :draw_texture05E0: [email protected] = read_memory 0xA0FD04 size 4 virtual_protect 1 //X 192005E0: [email protected] = read_memory 0xA0FD08 size 4 virtual_protect 1 //Y 10800093: [email protected] = integer [email protected] to_float0093: [email protected] = integer [email protected] to_float //coordX = sa_coordX*(currentResX/640.0) 0015: [email protected] /= 640.0 // currentResX/640.00069: [email protected] *= [email protected] // floating-point values 0015: [email protected] /= 448.0 // currentResY/448.00069: [email protected] *= [email protected] // floating-point values0069: [email protected] *= [email protected] // floating-point values0069: [email protected] *= [email protected] // floating-point values03F0: enable_text_draw 1 038D: draw_texture [email protected] position [email protected] [email protected] size [email protected] [email protected] RGBA [email protected] [email protected] [email protected] [email protected]: ret 0 I was testing with the texture positions for almost five times,and suddenly it crashed. This time,I used 05F5 opcode. Link to comment Share on other sites More sharing options...
ZAZ Posted March 14, 2014 Share Posted March 14, 2014 do you have a file in models folder with name texture.txd ? and does this file contain the image "texture" ? CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
CharlesVercetti Posted March 14, 2014 Author Share Posted March 14, 2014 Yes,man. I am not that bad. Link to comment Share on other sites More sharing options...
ZAZ Posted March 14, 2014 Share Posted March 14, 2014 well, your script works for me CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
CharlesVercetti Posted March 14, 2014 Author Share Posted March 14, 2014 well, your script works for me Is it?Well,that's not a problem actually. After several times of restarting game and recompiling again and again,it crashed. (could you send me the compiled file?) Link to comment Share on other sites More sharing options...
ZAZ Posted March 14, 2014 Share Posted March 14, 2014 https://www.mediafire.com/?kcm3f53p5wj5c6o CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
CharlesVercetti Posted March 15, 2014 Author Share Posted March 15, 2014 Your compiled script worked! Hmmm...It seems I can't open the script,says errors Unknown opcode 6574 at offset 11. Link to comment Share on other sites More sharing options...
ZAZ Posted March 15, 2014 Share Posted March 15, 2014 did you use newest sannybuilder version for decompiling? CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now