Raised This Month: $ Target: $400
 0% 

Orpheu Signatures Path


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-17-2017 , 14:12   Orpheu Signatures Path
Reply With Quote #1

Hi, I can't find where the signatures should go... In some posts I see that they should go in orpheu/functions in the other one I see orpheu/virtualFunctions ... Thanks.
__________________

Last edited by edon1337; 04-17-2017 at 14:13.
edon1337 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-17-2017 , 14:34   Re: Orpheu Signatures Path
Reply With Quote #2

It depends on whether it's a virtual class method, which are identified by virtual table offsets instead of symbols or signatures.
klippy is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-17-2017 , 16:21   Re: Orpheu Signatures Path
Reply With Quote #3

So how do I know where to put it ?
__________________
edon1337 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-17-2017 , 16:31   Re: Orpheu Signatures Path
Reply With Quote #4

If it's a virtual method then in virtualFunctions, in a folder named same as the class containing the method. Every other goes in functions. If the function is a member of a class (not a plain C function) then you have to create a folder in "orpheu/functions" with the class name and put the JSON file in there.

It's all described in Orpheu main thread.

Last edited by klippy; 04-17-2017 at 16:31.
klippy is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-18-2017 , 11:15   Re: Orpheu Signatures Path
Reply With Quote #5

Quote:
Originally Posted by KliPPy View Post
If it's a virtual method then in virtualFunctions, in a folder named same as the class containing the method. Every other goes in functions. If the function is a member of a class (not a plain C function) then you have to create a folder in "orpheu/functions" with the class name and put the JSON file in there.
Klippy, how do you know that it's a virtual function ? And can you show me a signature that isn't a virtual function but is member of a class And what's the point of the 'library' ?

Thanks
__________________

Last edited by edon1337; 04-18-2017 at 11:17.
edon1337 is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-17-2017 , 16:47   Re: Orpheu Signatures Path
Reply With Quote #6

I understood about the virtual functions, thanks.

What about this
Code:
{     "name"      : "CREATE_NAMED_ENTITY",     "library"   : "mod",     "arguments" :     [         {             "type" : "int",             "info" : "iszClass"         }     ],     "return" :     {         "type" : "edict_s *",         "info" : "pent"     },     "identifiers":     [         {             "os"    : "windows",             "mod"   : "cstrike",             "value" : [0x56,0x57,0x8B,"*","*","*",0x57,0xFF,"*","*","*","*","*",0x8B,"*",0x83,"*","*",0x85,"*",0x74,"*",0xA1]         },         {             "os"    : "linux",             "mod"   : "cstrike",             "value" : "CREATE_NAMED_ENTITY__FUi"         },         {             "os"    : "linux",             "mod"   : "cstrike",             "value" : "_Z19CREATE_NAMED_ENTITYj"         }     ] }

and this
Code:
{     "name" : "PrecacheGeneric",     "library" : "engine",     "arguments" :     [         {             "type" : "char *"         }     ],     "return" :     {         "type" : "int"     } }
__________________
edon1337 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-17-2017 , 17:41   Re: Orpheu Signatures Path
Reply With Quote #7

Those are C functions, not a member of any class. They just go into orpheu/functions.

However, as far as I know, CREATE_NAMED_ENTITY is the wrong name and should be named CreateNamedEntity. The Linux signature should just be "CreateNamedEntity" as well.

Also looks like PrecacheGeneric should be "PF_precache_generic_I", as well as the Linux signature. What you are lacking in the second file is "identifiers" array - you've given no way for Orpheu to identify the function. I even think I posted PF_precache_generic_I somewhere on the forums before, can't quite remember.
klippy is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-18-2017 , 03:34   Re: Orpheu Signatures Path
Reply With Quote #8

- CREATE_NAMED_ENTITY is correct. in CS, there is a wrapper which calls pfnCreateNamedEntity and add the class to a hash table: https://github.com/s1lentq/ReGameDLL....cpp#L287-L296
- PrecacheGeneric is also correct. It's part of the engine API and you don't need to provide identifier, you have a native in Orpheu to deal with such functions. As you said above, it's all written in the Orpheu thread.
__________________
Arkshine is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-18-2017 , 04:51   Re: Orpheu Signatures Path
Reply With Quote #9

Oh damn.
klippy is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-18-2017 , 11:29   Re: Orpheu Signatures Path
Reply With Quote #10

Quote:
Klippy, how do you know that it's a virtual function ?
Check the virtual table of that class in IDA. If you found the function there, it's virtual, else it's not.

Quote:
And can you show me a signature that isn't a virtual function but is member of a class
The SetNewPlayerModel function you asked for it's a member of CBasePlayer class and it's not virtual. Basically, any function that looks like X::Name it's member of X class(CBasePlayer, CWeaponbox, etc).
Quote:
And what's the point of the 'library' ?
library reffers to engine/mod. When hooking functions from game mod(mp.dll, cs.so) it's "mod", when hooking from engine(engine_i486.so, swds.dll) it's "engine".
__________________

Last edited by HamletEagle; 04-18-2017 at 11:31.
HamletEagle is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode