Quantcast

Jump to content

» «
Photo

[III|VC] 038D Alpha Fix

15 replies to this topic
ThirteenAG
  • ThirteenAG

    Foot Soldier

  • Members
  • Joined: 29 Dec 2008
  • None

#1

Posted 24 May 2013 - 04:26 PM Edited by ThirteenAG, 27 May 2013 - 01:23 PM.

As you may know, in GTA 3 and Vice City opcode
038D: draw_texture 17 position $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 size 20@ 19@ RGBA 128 128 128 255
doesn't support transparency(latest parameter). With this plugin you'll be able to set it. Demo scripts(Resident Evil Revelations on-screen blood) included to archive.
user posted image user posted image user posted image



Supported executables: gta3.exe - 1.0/1.1; gta-vc.exe - 1.0;

As a bonus i added the same cleo script for SA(Wesser's Script Dependent Drawings plugin is required).

Frank.s
  • Frank.s

    PingPang

  • Feroci Racing
  • Joined: 15 Apr 2008
  • None

#2

Posted 24 May 2013 - 04:29 PM Edited by Frank.s, 24 May 2013 - 04:32 PM.

Great fix and demo script. icon14.gif

Edit, would it be possible to do it for the 1.3 executable? Combine it with a new version of your VC Mobile exe fix maybe?

ThirteenAG
  • ThirteenAG

    Foot Soldier

  • Members
  • Joined: 29 Dec 2008
  • None

#3

Posted 24 May 2013 - 04:44 PM

QUOTE (Frank.s @ Friday, May 24 2013, 20:29)
Great fix and demo script. icon14.gif

Edit, would it be possible to do it for the 1.3 executable? Combine it with a new version of your VC Mobile exe fix maybe?

Thanks. What the 1.3 executable? steam? I doubt cleo supports it.
As for VC mobile, too much restrictions, not worth it.

Frank.s
  • Frank.s

    PingPang

  • Feroci Racing
  • Joined: 15 Apr 2008
  • None

#4

Posted 24 May 2013 - 05:09 PM

Ah ok. (I meant VC Mobile = 1.3 btw)

fabio3
  • fabio3

    PHP, C/C++, CLEO/SCM programmer

  • Members
  • Joined: 21 Feb 2012

#5

Posted 24 May 2013 - 07:58 PM

Good work icon14.gif

acid96
  • acid96

    Player Hater

  • Members
  • Joined: 26 May 2013

#6

Posted 26 May 2013 - 08:43 PM

Sometimes my screen shows the blood, and sometimes my screen gets white.

ThirteenAG
  • ThirteenAG

    Foot Soldier

  • Members
  • Joined: 29 Dec 2008
  • None

#7

Posted 26 May 2013 - 08:45 PM

Download latest v1.2, with it you will never see white screen again, because i put txd loading and releasing in a loop.

simkas
  • simkas

    That guy

  • Members
  • Joined: 13 Dec 2006

#8

Posted 26 May 2013 - 09:49 PM Edited by simkas, 26 May 2013 - 10:36 PM.

What mod are you using that lets you run and shoot at the same time? I've been looking all over for something like that for VC but I never found anything.



Nevermind, found it on your gtagarage page.

acid96
  • acid96

    Player Hater

  • Members
  • Joined: 26 May 2013

#9

Posted 27 May 2013 - 10:17 AM Edited by acid96, 27 May 2013 - 11:54 AM.

QUOTE (ThirteenAG @ Sunday, May 26 2013, 20:45)
Download latest v1.2, with it you will never see white screen again, because i put txd loading and releasing in a loop.

I keep getting the same thing.

I don't know, maybe it's because I'm using it on SAMP or maybe it has conflicts with other CLEO scripts.

EDIT: I have feelings that it has conflicts with interface editor from Alexander Blade...
Is there anyway to fix it confused.gif ?

ThirteenAG
  • ThirteenAG

    Foot Soldier

  • Members
  • Joined: 29 Dec 2008
  • None

#10

Posted 27 May 2013 - 01:22 PM

QUOTE (acid96 @ Monday, May 27 2013, 14:17)
Is there anyway to fix it confused.gif ?

Ah, you mean SA version, i assumed that everybody have Wesser's Script Dependent Drawings plugin, so script is not designed for usage without it.

acid96
  • acid96

    Player Hater

  • Members
  • Joined: 26 May 2013

#11

Posted 27 May 2013 - 04:58 PM Edited by acid96, 28 May 2013 - 10:35 AM.

QUOTE (ThirteenAG @ Monday, May 27 2013, 13:22)
QUOTE (acid96 @ Monday, May 27 2013, 14:17)
Is there anyway to fix it confused.gif ?

Ah, you mean SA version, i assumed that everybody have Wesser's Script Dependent Drawings plugin, so script is not designed for usage without it.

Thanks a bunch icon14.gif


EDIT: Works in Single Player, but at SAMP the Wesser's Plugin crashes...

ThirteenAG
  • ThirteenAG

    Foot Soldier

  • Members
  • Joined: 29 Dec 2008
  • None

#12

Posted 28 May 2013 - 02:31 PM Edited by ThirteenAG, 26 December 2013 - 08:14 PM.

EDIT: Works in Single Player, but at SAMP the Wesser's Plugin crashes...

You can try to change textures IDs to something else, they probably is not compatible with some of other your mods.



v1.3 changelog:
VC: Script texture destroying excluded from mission cleanup function and opcode 0391, to prevent white squares bug. Once texture was loaded with opcode 038F, nothing can release it, except save loading or starting new game. Default script texture limit(16) for opcodes 038D, 038F was increased to 121.
III, SA: none

v1.4 changelog:
III: Script texture destroying excluded from opcode 0391, to prevent white squares bug. Once texture was loaded with opcode 038F, nothing can release it, except save loading or starting new game. Default script texture limit(16) for opcodes 038D, 038F was increased to 121.
SA: Blood visibility depends on bodyarmor, with bodyarmor - half visible, without - full.
VC: none

Example of usage(VC):
	
{$CLEO}
0000:

0390: load_txd_dictionary 'hud'
for 0@ = 1 to 121
038F: load_texture 'arrow' as 0@
end


while true
   wait 0
1@ = 1.0
for 0@ = 1 to 121
05F5: call_scm_func @draw_texture params 9 _and it is - position 1@ 224.0 size 20.0 20.0 RGBA 255 255 255 255 texture_id 0@
1@ += 1.0
wait 0
end

end

:draw_texture
{example:
05F5: call_scm_func @draw_texture params 9 _and it is - position 220.0 170.0 size 191.25 170.0 RGBA 255 255 255 255 texture_id 1
}
05E0: 9@ = read_memory 0xA0FD04 size 4 virtual_protect 1  //X 1920
05E0: 10@ = read_memory 0xA0FD08 size 4 virtual_protect 1  //Y 1080
0093: 9@ = integer 9@ to_float
0093: 10@ = integer 10@ to_float
//coordX = sa_coordX*(currentResX/640.0)
0015: 9@ /= 640.0 //  currentResX/640.0
0069: 0@ *= 9@ // floating-point values
0015: 10@ /= 448.0 //  currentResY/448.0
0069: 1@ *= 10@ // floating-point values
0069: 2@ *= 9@ // floating-point values
0069: 3@ *= 10@ // floating-point values
03F0: enable_text_draw 1
038D: draw_texture 8@ position 0@ 1@ size 2@ 3@ RGBA 4@ 5@ 6@ 7@
05F6: ret 0
		
	

Example of usage(III):

		
			
{$CLEO}
0000:
0390: load_txd_dictionary 'hud'
for 0@ = 1 to 121
038F: load_texture 'pager' as 0@
end


while true
   wait 0
1@ = 1.0
for 0@ = 1 to 121
05F5: call_scm_func @draw_texture params 9 _and it is - position 1@ 170.0 size 191.25 170.0 RGBA 255 255 255 255 texture_id 0@
0391: release_textures //not really needed, just to show it doesn't affect loaded textures.
1@ += 1.0
wait 0
end

end

:draw_texture
{example:
05F5: call_scm_func @draw_texture params 9 _and it is - position 220.0 170.0 size 191.25 170.0 RGBA 255 255 255 255 texture_id 1
}
05E5: 15@ = game_version
if
15@ == 0
then
05E0: 9@ = read_memory 0x943010 size 4 virtual_protect 1  //X 1920
05E0: 10@ = read_memory 0x943014 size 4 virtual_protect 1  //Y 1080
else
05E0: 9@ = read_memory 0x9431C8 size 4 virtual_protect 1  //X 1920
05E0: 10@ = read_memory 0x9431CC size 4 virtual_protect 1  //Y 1080
end
0093: 9@ = integer 9@ to_float
0093: 10@ = integer 10@ to_float
//coordX = sa_coordX*(currentResX/640.0)
0015: 9@ /= 640.0 //  currentResX/640.0
0069: 0@ *= 9@ // floating-point values
0015: 10@ /= 448.0 //  currentResY/448.0
0069: 1@ *= 10@ // floating-point values
0069: 2@ *= 9@ // floating-point values
0069: 3@ *= 10@ // floating-point values
03F0: enable_text_draw 1
038D: draw_texture 8@ position 0@ 1@ size 2@ 3@ RGBA 4@ 5@ 6@ 7@
05F6: ret 0

Rizqan7
  • Rizqan7

    Wut wut wut wut wut?

  • BUSTED!
  • Joined: 25 Apr 2013

#13

Posted 31 May 2013 - 03:53 PM

ThirteenAG, Please answer me, why you not reply me at Girlfriend Take Tour in Street topic, whats wrong with you? cryani.gif cryani.gif

ThirteenAG
  • ThirteenAG

    Foot Soldier

  • Members
  • Joined: 29 Dec 2008
  • None

#14

Posted 03 June 2013 - 03:27 PM Edited by ThirteenAG, 03 June 2013 - 03:30 PM.

Another small cleo script for this plugin, hit indicator:
user posted image user posted image



user posted image user posted image

Available on gtagarage.

X3MProductions
  • X3MProductions

    Square Civilian

  • Members
  • Joined: 14 Apr 2012

#15

Posted 15 January 2014 - 10:35 PM

I know this topic is very old and maybe no one might answer me now but I'd like to know; does this works for San Andreas? My game doesn't runs the alpha textures correctly. :/


ThirteenAG
  • ThirteenAG

    Foot Soldier

  • Members
  • Joined: 29 Dec 2008
  • None

#16

Posted 16 January 2014 - 05:43 AM

In SA this bug/feature was fixed, so 038D works exactly as it should.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users