IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

This section is for any editing topics that don't fit into any of the other forums, any questions on how to mod belong in Editing Discussion

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (57) « First ... 51 52 [53] 54 55 ... Last »  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 Documenting GTA3/VC memory adresses

 Vice *and* GTA3
 
fastman92  
Posted: Wednesday, Dec 28 2011, 15:13
Quote Post


фастман92 | ف
Group Icon
Group: Members
Joined: Jul 28, 2009

pl.gif

XXXXX



GTAVC:
0x00A10B2D - char EnableMovieMenu

0x00A10A50 - __int16 MovieMenuSelectedRow
Related to hidden movie menu http://www.gtaforums.com/index.php?showtopic=438874
Users WebsitePMMSN
  Top
 

 
spaceeinstein  
Posted: Tuesday, Jan 3 2012, 00:45
Quote Post


巧克力
Group Icon
Group: Members
Joined: Jul 17, 2003

cn.gif

Member Award




In VC, R* removed opcode 0367 - headshot rampage - for unknown reasons. To enable headshot rampage, setting 0x4576F0 to 1 will make the default rampage opcode 01F9 behave exactly like 0367. Or if you want to enable headshots after 01F9 is executed, set 0xA10B94 to 1. It does the same job.

This post has been edited by spaceeinstein on Tuesday, Jan 3 2012, 09:21
Users WebsitePM
  Top
 

 
ModelingMan  
Posted: Tuesday, Jan 3 2012, 20:45
Quote Post


Crackalacking!
Group Icon
Group: Members
Joined: Jan 23, 2004

sj.gif

Member Award




An indirect gift from Rockstar; the libNative.so file in the Android version of III contains function and variable labels, which is understandable since it's a library build. Functions which didn't exist in the PS2 version can now be found in the Android version (e.g. the infamous debug/movie menu is actually the CSceneEdit class, and the variable to enable it is called CSceneEdit::m_bEditOn).

Should be interesting for those who are interested.
PM
  Top
 

 
spaceeinstein  
Posted: Sunday, Jan 8 2012, 02:08
Quote Post


巧克力
Group Icon
Group: Members
Joined: Jul 17, 2003

cn.gif

Member Award




How can this be read and used? Is it just a list like what DexX/Ghost Bear had?

-dexx edit;
The list is all ghost bear's. I only re-host it because his original site went down.
Users WebsitePM
  Top
 

 
ModelingMan  
Posted: Monday, Jan 9 2012, 02:36
Quote Post


Crackalacking!
Group Icon
Group: Members
Joined: Jan 23, 2004

sj.gif

Member Award




QUOTE (spaceeinstein @ Sunday, Jan 8 2012, 03:08)
How can this be read and used? Is it just a list like what DexX/Ghost Bear had?

Disassembling the file with an advanced disassembler like IDA will allow you to see these functions and variables, then, by comparison to the PC version, you can label the functions and variables in your x86 disassembly. Having this information will better our understanding of the functions and variables in the game.
PM
  Top
 

 
Swoorup  
Posted: Saturday, Jan 14 2012, 11:52
Quote Post


innovator
Group Icon
Group: Members
Joined: Oct 28, 2008

au.gif

XXXXX



Where can I obtain the IDB file (IDA pro) for Vice City
PMMSNYahoo
  Top
 

 
towncivilian  
Posted: Saturday, Jan 14 2012, 20:54
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Aug 4, 2007

XXXXX



QUOTE (Swoorup @ Saturday, Jan 14 2012, 06:52)
Where can I obtain the IDB file (IDA pro) for Vice City

Here is the IDC posted by ModelingMan earlier in this thread (see his post for details): http://www.megaupload.com/?d=DTKYNZ4Q

Here is an IDB I found elsewhere: http://www.megaupload.com/?d=EUUST9SQ
Users WebsitePM
  Top
 

 
LoveMHz  
Posted: Saturday, Jan 14 2012, 22:14
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jan 1, 2012

us.gif

XXXXX



QUOTE (towncivilian @ Saturday, Jan 14 2012, 20:54)
QUOTE (Swoorup @ Saturday, Jan 14 2012, 06:52)
Where can I obtain the IDB file (IDA pro) for Vice City

Here is the IDC posted by ModelingMan earlier in this thread (see his post for details): http://www.megaupload.com/?d=DTKYNZ4Q

Here is an IDB I found elsewhere: http://www.megaupload.com/?d=EUUST9SQ

Thanks smile.gif This should come in handy. I'll try to add to it.
Users WebsitePMMSN
  Top
 

 
Swoorup  
Posted: Sunday, Jan 15 2012, 13:58
Quote Post


innovator
Group Icon
Group: Members
Joined: Oct 28, 2008

au.gif

XXXXX



Oo Thank you @towncivilian

Don't someone or a team keep/update a list of functions and variable names whenever they are found?
If they do, do they have a site to keep those work synced or something?
PMMSNYahoo
  Top
 

 
spaceeinstein  
Posted: Sunday, Jan 15 2012, 21:30
Quote Post


巧克力
Group Icon
Group: Members
Joined: Jul 17, 2003

cn.gif

Member Award




That's a great idea. I will update the page at GTAModding with what I know. The site is a little broken due to some kind of corruption but you should be able to edit basic text into the site.

This post has been edited by spaceeinstein on Monday, Jan 16 2012, 02:48
Users WebsitePM
  Top
 

 
Swoorup  
Posted: Tuesday, Jan 17 2012, 13:44
Quote Post


innovator
Group Icon
Group: Members
Joined: Oct 28, 2008

au.gif

XXXXX



Thats a ton of functions. Damn how do you discover them?
PMMSNYahoo
  Top
 

 
ModelingMan  
Posted: Tuesday, Jan 17 2012, 20:19
Quote Post


Crackalacking!
Group Icon
Group: Members
Joined: Jan 23, 2004

sj.gif

Member Award




Here's a current list of my labelled functions for VC.
PM
  Top
 

 
Swoorup  
Posted: Wednesday, Jan 18 2012, 18:07
Quote Post


innovator
Group Icon
Group: Members
Joined: Oct 28, 2008

au.gif

XXXXX



@ModelingMan

I have a request. Can you please convert or upload an txt version of your VC functions instead of htm in your site? I am having very low internet connections right now (dial up tounge.gif) so I cant download the htm file itself because my Download Manager is unable to query its size (it doesnot download it fully). Perhaps it would if it were a txt.
Also do you have IDB version?

Also I have a question.
At 0x00578640 you have defined the function as
CODE
CSprite2d::Draw((CRect const &,CRGBA const &,CRGBA const &,CRGBA const &,CRGBA const &))


But the idb posted by town civilian defines that function as this
CODE
void __thiscall CTexture__draw(CTexture *, RwRect *posInfo, RwRGBA *v1_color, RwRGBA *v2_color, RwRGBA *v3_color, RwRGBA *v4_color)


I am making a HUD for VICE using this function and found out that void __thiscall CTexture__draw works perfectly. Anyway my question is why is it different, why is CTexture * parameter missing?
My guess for what I have found from site is that it is the hidden this pointer used in member function. But really I am not sure.
Can you please elaborate to me?

Also if you don't mind can you tell me how to initialise the CSprint2D class? Like can I set normal texture with different posInfo and alpha with different posinfo and draw them on to the screen? What I need to do is I need to constantly keep altering the bar value using a normal texture(rectangle shaped) with respect to player's health. And the alpha texture would be used but not altered to keep a rounded borders at the end of the bar( it would have same posinfo every time).

QUOTE (ModelingMan @ Feb 19 2010, 01:51)
I started up a little something I was working on a couple years ago. At first it started off wrapping D3D8 calls to D3D9. After that failed, I turned to redirecting all the referenced Renderware functions of VC to the Renderware 3.6 libs I have, which seems to be working so far.

user posted image

If you've ever used the RW libs you'll recognize the logo in the bottom left corner.

My plan was to use the RW functions from the SA executable and redirect the functions in VC (and probably III) to them. This could allow more advanced graphics hacks for VC and III (HLSL shaders, etc.).


Is this a pipe dream?
Think i'll better make a program that documents VC functions and addresses, opcodes with tons of descriptions actually for my own purpose. so yeah....

EDIT: CRadar uses this function 004C1A20 CRadar::DrawRadarMask((void)) to make alpha mask for radar textures to give a round shape. I am sure this is done dynamically and is exactly what I need to draw that rounded HUD. Try nopping the address that calls 004C1A20 CRadar::DrawRadarMask((void)) and you will see the difference.

004C1A20 CRadar::DrawRadarMask((void)) uses the function 00577D10 CSprite2d::SetMaskVertices((int,float *)) inside it somewhere but I am confused about its parameters and how it works. I need to know how it applies mask to selected texture and about how position data are set. But now I am sure this will get my mod done.

This post has been edited by Swoorup on Thursday, Jan 19 2012, 08:00
PMMSNYahoo
  Top
 

 
DK22Pac  
Posted: Friday, Jan 20 2012, 17:06
Quote Post


Assembly. / Acceмбли.
Group Icon
Group: Members
Joined: Apr 12, 2009

un.gif

XXXXX



@Swoorup
Because it is thiscall.

Is there any information about CScriptThread in GTA3?

This post has been edited by DK22Pac on Friday, Jan 20 2012, 17:10
Users WebsitePM
  Top
 

 
Swoorup  
Posted: Saturday, Jan 28 2012, 13:11
Quote Post


innovator
Group Icon
Group: Members
Joined: Oct 28, 2008

au.gif

XXXXX



Just noticed the VCFunctions.txt in your site @ModelingMan.

But unfortunately the link is broken.
Never mind though, I have downloaded the htm file itself a tons of file just to make sure everything was downloaded fully.
The last function was 005B3120 cTransmission::InitGearRatios((void)

PMMSNYahoo
  Top
 

 
towncivilian  
Posted: Monday, Jan 30 2012, 06:05
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Aug 4, 2007

XXXXX



QUOTE (towncivilian @ Saturday, Jan 14 2012, 15:54)
QUOTE (Swoorup @ Saturday, Jan 14 2012, 06:52)
Where can I obtain the IDB file (IDA pro) for Vice City

Here is the IDC posted by ModelingMan earlier in this thread (see his post for details): http://www.megaupload.com/?d=DTKYNZ4Q

Here is an IDB I found elsewhere: http://www.megaupload.com/?d=EUUST9SQ

Since Megaupload got megashutdown, here are mirrors:

IDC: http://www.mediafire.com/?tjq3ggtrgngq7t5
IDB: http://www.mediafire.com/?oo7u9yd9y11fm8h
Users WebsitePM
  Top
 

 
Swoorup  
Posted: Friday, Feb 10 2012, 16:03
Quote Post


innovator
Group Icon
Group: Members
Joined: Oct 28, 2008

au.gif

XXXXX



Anyone anything about memory structures of VC? A lot of things for structures are still undocumented. Camera, Entity. I need things like that desperately.

To have SA like Vehicle Cam: Nop the call at 0x46C62E.
NOP 5 bytes.

Warning: Nop that before you actually start the game.

This works best when you are in bike though.

EDIT: I finally figured out how the radar masking works. But still I need to apply the same technique to my own textures which have not been done yet.

004C1A20 CRadar::DrawRadarMask((void)) is called before every frame rendering if radar is enabled at the menu. The function then uses 00577D10 CSprite2d::SetMaskVertices((int numOfVertices,RwV2D* verticesOfPolygon[numofVertices])) to set up 4 polygons into which the extra radar textures are too be masked/erased out.

The polygons are formed at each of the corners of the square (before masking). In a corner 8 sets of points/vertices are assigned to represent the polygon layer which is to be erased out and the polygon points are passed to CSprite2d::SetMaskVertices((int numOfVertices,RwV2D* verticesOfPolygon[numofVertices])) and some renderware functions are carried out.

CODE
signed int __cdecl CRadar__DrawRadarMask()
{
 signed int v0; // ebx@1
 double v1; // st6@2
 double v2; // st7@2
 double v3; // st4@3
 double fradarDiameterExact; // st5@4
 double v5; // st5@4
 signed int v6; // ebp@5
 long double v7; // st4@6
 long double v8; // st6@6
 __int16 v9; // fps@6
 long double v10; // st4@8
 __int16 v11; // fps@8
 double v12; // st4@10
 float v13; // ST0C_4@10
 double v14; // st5@11
 signed int v15; // eax@12
 double v16; // st5@12
 double v17; // st5@12
 float v19; // [sp+0h] [bp-68h]@8
 unsigned int v20; // [sp+8h] [bp-60h]@1
 unsigned int v22; // [sp+Ch] [bp-5Ch]@1
 unsigned int v24; // [sp+10h] [bp-58h]@1
 unsigned int v26; // [sp+14h] [bp-54h]@1
 unsigned int v27; // [sp+18h] [bp-50h]@1
 unsigned int v25; // [sp+1Ch] [bp-4Ch]@1
 unsigned int v23; // [sp+20h] [bp-48h]@1
 unsigned int v21; // [sp+24h] [bp-44h]@1
 float v28; // [sp+28h] [bp-40h]@3
 float v29[15]; // [sp+2Ch] [bp-3Ch]@5

 v20 = 0x3F800000u;
 v21 = 0xBF800000u;
 v22 = 0xBF800000u;
 v23 = 0xBF800000u;
 v24 = 0x3F800000u;
 v25 = 0x3F800000u;
 v26 = 0x3F800000u;
 v27 = 0xBF800000u;
 RwRenderStateSet(rwRENDERSTATETEXTURERASTER, 0);
 RwRenderStateSet(rwRENDERSTATESRCBLEND, 5);   // nothing
 RwRenderStateSet(rwRENDERSTATEDESTBLEND, 6);  // nothing
 RwRenderStateSet(rwRENDERSTATEFOGENABLE, 0);  // nothing
 RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, 2);// nothing
 RwRenderStateSet(rwRENDERSTATESHADEMODE, 1);  // nothing
 RwRenderStateSet(rwRENDERSTATEZTESTENABLE, 0);// Nothing
 RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, 1);// Results no mask
 RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, 1);// Results black color in masked area
 RwD3D8SetRenderState(0x19u, 8u);
 v0 = 0;
 do
 {
   v2 = *(&v20 + 2 * v0);
   v1 = *(&v22 + 2 * v0);
   if ( CMenu.IsOnMapMenu )
   {
     v28 = (fradarScaleX * CMenu.mapScale * v2 + flt_68FD10 * CMenu.mapScale + CMenu.mapPos.x)
         * SLODWORD(pResolutionX)
         * fradarDiamMultiplier;
     v3 = (CMenu.mapPos.y - flt_68FD1C * CMenu.mapScale - flt_68FD18 * CMenu.mapScale * v1)
        * SLODWORD(ResolutionX)
        * fradarUpScaleMul;
   }
   else
   {
     fradarDiameterExact = SLODWORD(pResolutionX) * fradarDiamMultiplier * fradarDiameterWRT640;
     v28 = v2 * fradarDiameterExact * fradarBy2Divider + fradarDiameterExact * fradarBy2Divider + fradarPosX;
     v5 = SLODWORD(ResolutionX) * fradarUpScaleMul;
     v2 = fradarScaleY * v5;
     v3 = v2 * fradarBy2Divider + SLODWORD(ResolutionX) - fradarPoxYfromBottom * v5 - v1 * v2 * fradarBy2Divider;
   }
   v29[0] = v3;
   v6 = 0;
   do
   {
     v8 = v6 * fradarCurvatureUnk * fradarCurvatureUnk2;
     v7 = cos(v8);
     UNDEF(v9);
     if ( v9 & 1024 )
       v7 = cos(MakeAngleAccute(v2));
     v19 = v7;
     v2 = *(&v20 + 2 * v0) * v19;
     v10 = sin(v8);
     UNDEF(v11);
     if ( v11 & 1024 )
       v10 = sin(MakeAngleAccute(COERCE_FLOAT(COERCE_UNSIGNED_INT64(*(&v20 + 2 * v0) * v19))));
     v13 = v10;
     v12 = *(&v22 + 2 * v0) * v13;
     if ( CMenu.IsOnMapMenu )
     {
       v14 = CMenu.mapScale;
       v29[2 * v6 + 1] = (fradarScaleX * CMenu.mapScale * v2 + flt_68FD10 * CMenu.mapScale + CMenu.mapPos.x)
                       * SLODWORD(pResolutionX)
                       * fradarDiamMultiplier;
       v29[2 * v6 + 2] = (CMenu.mapPos.y - flt_68FD1C * v14 - flt_68FD18 * v14 * v12)
                       * SLODWORD(ResolutionX)
                       * fradarUpScaleMul;
     }
     else
     {
       v15 = LODWORD(ResolutionX);
       v16 = SLODWORD(pResolutionX) * fradarDiamMultiplier * fradarDiameterWRT640;
       v29[2 * v6 + 1] = v2 * v16 * fradarBy2Divider + v16 * fradarBy2Divider + fradarPosX;
       v17 = v15 * fradarUpScaleMul;
       v2 = fradarScaleY * v17;
       v29[2 * v6 + 2] = v2 * fradarBy2Divider + v15 - fradarPoxYfromBottom * v17 - v12 * v2 * fradarBy2Divider;
     }
     ++v6;
   }
   while ( v6 < 7 );
   CSprite2d__SetMaskVertices(8, &v28);
   RwIm2DRenderPrimitive(rwPRIMTYPETRIFAN, &vert1_x, 8);
   ++v0;
 }
 while ( v0 < 4 );
 return RwD3D8SetRenderState(25u, 5u);
}


EDIT EDIT: It works happy.gif
If anyone wants the demonstration source code, then I could post it here. smile.gif


This post has been edited by Swoorup on Saturday, Feb 11 2012, 15:59
PMMSNYahoo
  Top
 

 
atfburner  
Posted: Tuesday, Feb 14 2012, 22:18
Quote Post


under the trapdoor
Group Icon
Group: Members
Joined: Sep 19, 2006

jolly-roger.gif

XXXXX



wait a sec, so you have mouse free camera on bike working now Swoorup ???
PM
  Top
 

 
Swoorup  
Posted: Wednesday, Feb 15 2012, 04:01
Quote Post


innovator
Group Icon
Group: Members
Joined: Oct 28, 2008

au.gif

XXXXX



Yeah, but it is just a simple workaround. What it does is: By disabling the call to find the current entity, the camera entity is always directed at the player. Since we can freely move around with the mouse on player cam, It will do the same thing on vehicle. To make a proper one, the whole CCamera: Process has to be rewritten, I believe.
smile.gif
PMMSNYahoo
  Top
 

 
NRShaggy  
Posted: Monday, Feb 27 2012, 19:22
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jan 19, 2010

XXXXX



QUOTE (Swoorup @ Wednesday, Feb 15 2012, 04:01)
Yeah, but it is just a simple workaround. What it does is: By disabling the call to find the current entity, the camera entity is always directed at the player. Since we can freely move around with the mouse on player cam, It will do the same thing on vehicle. To make a proper one, the whole CCamera: Process has to be rewritten, I believe.
smile.gif

OR you just can use this when in vehicle:
0159: camera_on_ped $PLAYER_ACTOR 0 2
same effect if i understand: also best in bike
PM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Pages: (57) « First ... 51 52 [53] 54 55 ... Last »

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG