Quantcast

Jump to content

» «
Photo

GTA Palette & Mouse SCM API

21 replies to this topic
fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009

#1

Posted 05 April 2012 - 05:00 PM Edited by fastman92, 02 May 2012 - 07:58 PM.

GTA Palette & Mouse SCM API


Many of people have asked how to create UI interface in CLEO SCM, but most of them have no required knowledge to know how to begin.
However creators of CLEO added useful commands such as 0AB1 and 0AB2 that make it possible to simulate classes from modern programming languages.
When combined with method of additional variables, we’re able to do something than usual 0AB1 SCM functions.
The subject described in this document is easy-to-use circular HSV palette with few buttons to select color, alpha and switch whether value of color shall be maximized when particular color is being chosen by clicking on palette.
Reasonably a mouse support is easy to use as well. It occurs as a matter of 3 opcodes to add in source of project.
What’s more – you can use more than one instance of palette and draw it on screen. Feel free to use palette and mouse cursor in whichever project where you can find these things useful.
As time goes by - GTA SA modding is still growing up.

Fully compatible with GTA San Andreas v1.0 [US] HOODLUM No-CD Fixed EXE & GTA: San Andreas v1.01 [EURO] No-CD/Fixed EXE
Fully compatible with any screen resolution (4:3, 16:9, 16:10...)
Fully compatible with CLEO3 and newer
- - - - - - - - - - - - - - - - - -

Download
http://www.mediafire...8irp00v7a2jqr64

user posted image


***** How to use
Open Readme.docx and read more about it.

***** Changes in 1.1 version:
- enlarged "hsvPalette" texture to 512 x 512 px
- fixed number of input parameters in example of function @PaletteHSVCircle_setHSVcolor
- added aliases such as:
PaletteHSVCircle_getRGBcolor and PaletteHSVCircle_readRGBcolor
PaletteHSVCircle_getRGBAcolor and PaletteHSVCircle_readRGBAcolor
PaletteHSVCircle_getHSVcolor and PaletteHSVCircle_readHSVcolor
- added automatic rescaling when user has changed the game resolution
- fixed incorrect change of position when PaletteHSVCircle_RescaleAllObjects is used subsequently

***** 1.1 is 100% compatible with previously written scripts.

***** Informations:
Date of release: 02-05-2012 (d-m-Y)
Author: fastman92
Version: 1.1
For: GTA San Andreas
Visit fastman92-site.tk
  • TheGodfather. and MasterHK like this

MinnieMan121249
  • MinnieMan121249

    Carbon based Buffoon!!

  • The Yardies
  • Joined: 19 Jun 2008

#2

Posted 05 April 2012 - 07:41 PM

Can you please make a video of how this works ingame? It looks very interesting.

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009

#3

Posted 05 April 2012 - 07:46 PM Edited by fastman92, 05 April 2012 - 07:51 PM.

I have only a video of the In-game Timecyc Editor (project already), where palette is used.

On the video, button to switch option, brightening value of color when color is chosen by clicking on palette didn't exist yet.

What i made is Palette & Mouse Cursor SCM Framework for which you will need little skill of CLEO scripting.

It's FOR SCRIPTERS, who want use mouse cursor and possibly a palette in their projects.

Please download archive and open Readme.docx to read more.

_DK
  • _DK

    '22 'Pac

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#4

Posted 05 April 2012 - 08:45 PM

This interface is much better than SA's panels.

Deji
  • Deji

    Coding like a Rockstar!

  • Members
  • Joined: 24 Dec 2007

#5

Posted 05 April 2012 - 09:55 PM

I miss working with these kind of interfaces. Can't wait until L.A.M.E. is the next thing on my todo list...

Mouse is tiny, though tounge2.gif

juarez
  • juarez

    Memory Hacking

  • Members
  • Joined: 11 Jun 2011

#6

Posted 01 May 2012 - 04:12 PM

Very nice. Good job. wink.gif

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009

#7

Posted 02 May 2012 - 08:01 PM Edited by fastman92, 02 May 2012 - 08:05 PM.

Thanks for replies.

I updated version to 1.1:
QUOTE

***** Changes in 1.1 version:
- enlarged "hsvPalette" texture to 512 x 512 px
- fixed number of input parameters in example of function @PaletteHSVCircle_setHSVcolor
- added aliases such as:
PaletteHSVCircle_getRGBcolor and PaletteHSVCircle_readRGBcolor
PaletteHSVCircle_getRGBAcolor and PaletteHSVCircle_readRGBAcolor
PaletteHSVCircle_getHSVcolor and PaletteHSVCircle_readHSVcolor
- added automatic rescaling when user has changed the game resolution
- fixed incorrect change of position when PaletteHSVCircle_RescaleAllObjects is used subsequently

***** 1.1 is 100% compatible with previously written scripts.


Note that anyone can use the palette in their projects freely. You can use it whenever needed. Example: car color editor.
Upcoming In-game Timecyc 1.7 will be integrated with GTA Palette & Mouse SCM API.

Midnightz
  • Midnightz

    Populus vult decipi.

  • Members
  • Joined: 05 Feb 2007

#8

Posted 11 November 2012 - 09:02 PM

It would be nice to see something like this replace the mod shop color picker in-game. icon14.gif Gonna take a look...

HeresOtis
  • HeresOtis

    Mark Chump

  • Members
  • Joined: 29 Apr 2011

#9

Posted 10 March 2013 - 05:45 AM

You should include a sample that demonstrates how to check if a drawn texture has been clicked on, because I couldn't understand it in the PaletteCircleHandling.

MasterHK
  • MasterHK

    کیان حامی

  • Members
  • Joined: 20 Mar 2013
  • Iran

#10

Posted 15 July 2013 - 09:17 AM

Can I use this pallete in a mod?
Be sure I will add your name in authors.

LINK/2012
  • LINK/2012

    ...wasn't the year...

  • Members
  • Joined: 30 Jan 2011
  • Brazil

#11

Posted 17 July 2013 - 02:54 AM

QUOTE (MasterHK @ Monday, Jul 15 2013, 06:17)
Can I use this pallete in a mod?
Be sure I will add your name in authors.

He, I think so, otherwise he would not have posted the library including a how to use and stuff sarcasm.gif
  • MasterHK likes this

MasterHK
  • MasterHK

    کیان حامی

  • Members
  • Joined: 20 Mar 2013
  • Iran

#12

Posted 17 July 2013 - 05:44 AM

Hey guys!
I uploaded one of my mods on GTAGarage at Here
Now you can change your car RGBA by a palette; as you wish! colgate.gif

Ryan
  • Ryan

    Ginga Ninja

  • Moderator
  • Joined: 10 Apr 2006
  • Canada

#13

Posted 17 July 2013 - 01:58 PM

QUOTE (MasterHK @ Wednesday, Jul 17 2013, 02:44)
Hey guys!
I uploaded one of my mods on GTAGarage at Here
Now you can change your car RGBA by a palette; as you wish! colgate.gif

Please don't use someone else's topic to advertise your own mod.

MasterHK
  • MasterHK

    کیان حامی

  • Members
  • Joined: 20 Mar 2013
  • Iran

#14

Posted 01 January 2014 - 09:32 AM

oh... i totally forgotten about this topic!

excuse me(after some years and years!)

that will never be done again and this(really i've to say word 'This' after this time?!) just for midnightz's post.

  • _DK likes this

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009

#15

Posted 01 January 2014 - 01:36 PM

It's fairly easy to make CLEO with a palette and mouse.
If anyone has an idea for interactive CLEO script, then go ahead.
  • MasterHK likes this

TheGodfather.
  • TheGodfather.

    Nobody likes me here...I think...

  • Members
  • Joined: 19 Jun 2012

#16

Posted 03 January 2014 - 08:59 AM

Just wondering fastman32 I was experimenting with your mod with my modified exe it led to some bugs like not correctly displaying the texts,panel etc.It was completely random.

Will it be possible to make the pallette compactible with my exe ?/

I can PM you my exe if you could help me.(GTAF doesn't support sharing of game files so I won't be posting the link here). 


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009

#17

Posted 03 January 2014 - 06:31 PM

Just wondering fastman32 I was experimenting with your mod with my modified exe it led to some bugs like not correctly displaying the texts,panel etc.It was completely random.
Will it be possible to make the pallette compactible with my exe ?/
I can PM you my exe if you could help me.(GTAF doesn't support sharing of game files so I won't be posting the link here).

Random? I don't know it at all. I can't imagine it.

What EXE size is yours? You should write it already in a post. Otherwise you're wasting someone's time.

Readme.docx says:

Basic information
Palette API was confirmed to be:
• Fully compatible with GTA San Andreas v1.0 [US] HOODLUM No-CD Fixed EXE & GTA: San Andreas v1.01 [EURO] No-CD/Fixed EXE
• Fully compatible with any screen resolution (4:3, 16:9, 16:10...)
• Fully compatible with CLEO3 and newer


MasterHK
  • MasterHK

    کیان حامی

  • Members
  • Joined: 20 Mar 2013
  • Iran

#18

Posted 04 January 2014 - 06:50 AM

It's fairly easy to make CLEO with a palette and mouse.
If anyone has an idea for interactive CLEO script, then go ahead.

you want idea? I have one!

InGame Paint!

yes paint.

lets explain that:

as you know In SCM shapes don't have a name (opposite of flash)

so how to move/re-scale/re-color them?

yes. we have to make an array for naming them like:

posX[shapeIndex]

posY[shapeIndex]

and so on...

 

script must draw all of them every moment;

but the uncolored/unscaled shapes have colorAlpha[shapeIndex] = 0

 

every new click mouse must increase 1 our shapeIndexCounter

script check what tool we are using that? pen, rectangle or circle.

if pen then increase shapeIndexCounter every moment else wait until mouse button have released and then increase it.

drawing rectangle is too easy with opcode 0937 but circle.

i think must there is a 1*1 circle texture that script draw it according to our pos/size.

it's my first question to is there any other way for it?

 

loading pic is so easy... wait... not so easy!

i think it's possible to use windows funcs to open a open file dialog:

else have to make a one, manual!

listing all files of an folder is not so hard.

just need to search for *.* (or *.bmp/png) and give name of them to an memory alloc array.

wen list of folder's files is available it's time to draw window.

an white rectangle. an exit × button. cancel button. and open button.

also may an text for write file name manually.(e.g. with the method that used in MyCheatConsole)

then draw an little icon for each file. and draw that's name side of it.

my second question is how to get folder names.

 

but saving is really easy!

opcode 0A1e and find the latest file in gallery folder and then move it to a new folder with an arbitrary name.


TheGodfather.
  • TheGodfather.

    Nobody likes me here...I think...

  • Members
  • Joined: 19 Jun 2012

#19

Posted 04 January 2014 - 09:16 AM

 

Just wondering fastman32 I was experimenting with your mod with my modified exe it led to some bugs like not correctly displaying the texts,panel etc.It was completely random.
Will it be possible to make the pallette compactible with my exe ?/
I can PM you my exe if you could help me.(GTAF doesn't support sharing of game files so I won't be posting the link here).

Random? I don't know it at all. I can't imagine it.

What EXE size is yours? You should write it already in a post. Otherwise you're wasting someone's time.

Readme.docx says:

Basic information
Palette API was confirmed to be:
• Fully compatible with GTA San Andreas v1.0 [US] HOODLUM No-CD Fixed EXE & GTA: San Andreas v1.01 [EURO] No-CD/Fixed EXE
• Fully compatible with any screen resolution (4:3, 16:9, 16:10...)
• Fully compatible with CLEO3 and newer

 

 

Well thanks for keeping a notice on my post but no worries I fixed it out myself :)

 

@MasterK: Your idea really impressed me :D Are you planning to make a mod like that ?? That would be really great ;)


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009

#20

Posted 04 January 2014 - 09:17 AM Edited by fastman92, 04 January 2014 - 09:46 AM.

Sorry, but i meant if someone has the idea to make a CLEO script, then make it yourself.
Beside, your idea would be a waste of time for trying to archive very hard stuff with no exact purpose whatsoever.

I'm not fastman32.

MasterHK
  • MasterHK

    کیان حامی

  • Members
  • Joined: 20 Mar 2013
  • Iran

#21

Posted 04 January 2014 - 10:48 AM

i just ask 2 questions on that post.

i just wanted from you to ask them, amigo!



@MasterK: Your idea really impressed me :D Are you planning to make a mod like that ?? That would be really great ;)

 

 

Thank you and...

 Perhaps , just Perhaps... : )


Rizky Rizaldi
  • Rizky Rizaldi

    IMasterFX's another Nick

  • Members
  • Joined: 17 Jul 2013
  • None

#22

Posted 16 January 2014 - 06:59 AM Edited by Rizky Rizaldi, 16 January 2014 - 07:03 AM.

I got a good idea

an In-game car colours editor with their names and IDs (similiar to your timecyc editor though)

 

Edit : Forget it... terrible idea since vehicle modders are using that tools... whatever it calls... GTA San Andreas Ultimate Editor





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users