Quantcast

Jump to content

» «
Photo

[REL|SRC] SCM and DirectX Hooking Source Code

285 replies to this topic
Bigun
  • Bigun

    wandering about

  • Members
  • Joined: 10 Jul 2004

#241

Posted 14 May 2005 - 08:46 AM

Hey Spooky, I know all of this conversation is more on the DirectX Hooking thing, but, as a player and not much a developer I am more interested in the mod itself lol.gif
I was wondering if you could change the speedometer so it doesn't show up in cutscences, and make it so you have to push a certain (configurable?) key to turn it on|off (and you can configure it to go auto-on if you get in a car or not (in the .cfg))

Other than that, rah.gif

Cowpat
  • Cowpat

    web schmeb

  • Members
  • Joined: 12 Feb 2004

#242

Posted 15 May 2005 - 03:10 PM

QUOTE (Bigun @ May 14 2005, 08:46)
I was wondering if you could change the speedometer so it doesn't show up in cutscences, and make it so you have to push a certain (configurable?) key to turn it on|off (and you can configure it to go auto-on if you get in a car or not (in the .cfg))

If you want a speedo you can toggle on/off get it here (F12 to toggle). Can't help you with cut scenes though.

Squiddy
  • Squiddy

    Back!

  • The Connection
  • Joined: 06 Oct 2004

#243

Posted 15 May 2005 - 03:18 PM

QUOTE (Cowpat @ May 15 2005, 16:10)
Can't help you with cut scenes though.

You could check 0x7E46F5 (BYTE, VC1.0), it's 1 if the cinema borders are shown.

Cowpat
  • Cowpat

    web schmeb

  • Members
  • Joined: 12 Feb 2004

#244

Posted 15 May 2005 - 03:52 PM

QUOTE (Squiddy @ May 15 2005, 15:18)
QUOTE (Cowpat @ May 15 2005, 16:10)
Can't help you with cut scenes though.

You could check 0x7E46F5 (BYTE, VC1.0), it's 1 if the cinema borders are shown.

Checked out. Speedometer should now disappear during cut-scenes.

Thanks Squiddy!

Bigun
  • Bigun

    wandering about

  • Members
  • Joined: 10 Jul 2004

#245

Posted 18 May 2005 - 06:12 PM

QUOTE (Cowpat @ May 15 2005, 15:10)
If you want a speedo you can toggle on/off get it here (F12 to toggle).

Thanks Cowpat, Squiddy.

@Cowpat, maybe you should put it in your site, with the txd and cfg,
anyhows, can you make it so it reads the cfg and is configurable for KMH like Spookys original? I think it just swaps the texture.

Tarantulo
  • Tarantulo

    Player Hater

  • Members
  • Joined: 18 May 2005

#246

Posted 18 May 2005 - 09:45 PM

Hello guys nice working your are doing in here. But I would like to know were could I download a speedo with kmh and/or with damage and fuel meters.

It would be big thanks wink.gif

jacob.
  • jacob.

    Homie

  • Members
  • Joined: 27 Jun 2004

#247

Posted 18 May 2005 - 10:17 PM

1) the default version spooky compiled works off the KMH system.
2) fuel is nonexistent in vice city.

as for damage meters, that probably wouldn't be too hard. ask squiddy, he's awesome at doing stuff like that. tounge.gif

Luke
  • Luke

    suckmyrocket

  • Moderator
  • Joined: 01 Dec 2003
  • None

#248

Posted 18 May 2005 - 10:46 PM

QUOTE (!cMc! Jacob @ May 18 2005, 22:17)
2) fuel is nonexistent in vice city.

There are countless SCM fuelmods, furthermore, I believe squiddy made a fuel mod already using the speedo source as a base.

There is a such thing as fuel in Vice City.

Tarantulo
  • Tarantulo

    Player Hater

  • Members
  • Joined: 18 May 2005

#249

Posted 18 May 2005 - 10:47 PM

QUOTE (!cMc! Jacob @ May 18 2005, 22:17)
1) the default version spooky compiled works off the KMH system.
2) fuel is nonexistent in vice city.

as for damage meters, that probably wouldn't be too hard. ask squiddy, he's awesome at doing stuff like that. tounge.gif

No matter managed to find it and to make it work on myself tounge.gif

Say fuel doen't exist wink.gif read this thread:

http://www.gtaforums...ic=148505&st=40

Well Squidy then could you tell me where could I get that speedo addon the one your were making with damage and fuel and etc.

Spooky & Squidy best GTA: VC speedo ever wink.gif

Cam
  • Cam

    Cam

  • Members
  • Joined: 30 Dec 2003
  • United-States

#250

Posted 19 May 2005 - 01:06 AM

None of those links work (to download the speedo/car health/fuel mod) . sad.gif

jacob.
  • jacob.

    Homie

  • Members
  • Joined: 27 Jun 2004

#251

Posted 19 May 2005 - 01:50 AM Edited by !cMc! Jacob, 19 May 2005 - 01:53 AM.

i meant it is nonexistent on the default shipped game files, of course the illusion of fuel can be created with scm/etc.

Cam
  • Cam

    Cam

  • Members
  • Joined: 30 Dec 2003
  • United-States

#252

Posted 19 May 2005 - 03:25 AM

QUOTE (!cMc! Jacob @ May 19 2005, 01:50)
i meant it is nonexistent on the default shipped game files, of course the illusion of fuel can be created with scm/etc.

Isnt there a mission at the porn studio which you distribute flyers around the city, with a fuel meter?

jacob.
  • jacob.

    Homie

  • Members
  • Joined: 27 Jun 2004

#253

Posted 19 May 2005 - 04:03 AM

QUOTE (Camaro d00d @ May 19 2005, 03:25)
QUOTE (!cMc! Jacob @ May 19 2005, 01:50)
i meant it is nonexistent on the default shipped game files, of course the illusion of fuel can be created with scm/etc.

Isnt there a mission at the porn studio which you distribute flyers around the city, with a fuel meter?

probably another illusion of fuel, but do you honestly think he'd request a fuel meter for this one mission? my point is just that a general fueling system is nonexistent in the default r* shipped files. confused.gif

Squiddy
  • Squiddy

    Back!

  • The Connection
  • Joined: 06 Oct 2004

#254

Posted 19 May 2005 - 04:48 AM

QUOTE (Bigun @ May 18 2005, 19:12)
@Cowpat, maybe you should put it in your site, with the txd and cfg,
anyhows, can you make it so it reads the cfg and is configurable for KMH like Spookys original? I think it just swaps the texture.

That would be this one: http://squiddy.marwa...iles/speedo.zip (Might need the dll linker to work, not sure)
If Cowpat doesn't minds, I could include the check for the cutscenes in this version.

Concerning the addon, I messed up my source and can't continue working on it at the moment, so it's still the massive-fuel-consuming version. I could upload it later today.

Cowpat
  • Cowpat

    web schmeb

  • Members
  • Joined: 12 Feb 2004

#255

Posted 19 May 2005 - 06:37 AM

QUOTE (Squiddy @ May 19 2005, 04:48)
That would be this one: http://squiddy.marwa...iles/speedo.zip (Might need the dll linker to work, not sure)
If Cowpat doesn't mind, I could include the check for the cutscenes in this version.

Yeah, I thought the KPH version was yours Squiddy. It should read the cfg file anyhows, as I didn't change the ReadConfig code.

Please feel free to include the cut scene check.

Squiddy
  • Squiddy

    Back!

  • The Connection
  • Joined: 06 Oct 2004

#256

Posted 19 May 2005 - 08:17 PM

Been lazy and didn't testet it much, but it should work.

Normal d3d8.dll version
DLL-linker version

Cowpat
  • Cowpat

    web schmeb

  • Members
  • Joined: 12 Feb 2004

#257

Posted 20 May 2005 - 07:55 PM

For anyone who is interested, here is the main code file for the VC Mission Loader.

Missions.cpp

Squiddy
  • Squiddy

    Back!

  • The Connection
  • Joined: 06 Oct 2004

#258

Posted 24 May 2005 - 02:50 PM

Anyone wants different backgrounds for the loading screen while loading?

CODE
int nLoadScreen=0;
float fOldProgress=0.0f;

DWORD dwProt;
float* fProgress = (float*)0xA0CE94;
if (*fProgress>fOldProgress+15.0f)
{
nLoadScreen++;
VirtualProtect((void*)0x68E6FA, 1, PAGE_EXECUTE_READWRITE, &dwProt);
*(CHAR*)(0x68E6FA) = nLoadScreen+'0';
VirtualProtect((void*)0x68E6FA, 1, dwProt, &dwProt);
fOldProgress=*fProgress;
} else if (*fProgress==0.0f) {
VirtualProtect((void*)0x68E6FA, 1, PAGE_EXECUTE_READWRITE, &dwProt);
*(CHAR*)(0x68E6FA) = '0';
VirtualProtect((void*)0x68E6FA, 1, dwProt, &dwProt);
fOldProgress=0.0f;
nLoadScreen=0;
}


0x68E6F4 - Texture that is used for the loading screen (proc at 0x4A69D0), default 'LOADSC0'
0xA0CE94 - Progress of loading, usually around 94 maximum

As you see this one changes every 15 steps, just shows the idea, do whatever you like to do. tounge2.gif

jacob.
  • jacob.

    Homie

  • Members
  • Joined: 27 Jun 2004

#259

Posted 14 June 2005 - 01:12 AM

Sooo.. anyone have any luck with this method in San Andreas: PC? I could just change every '8' in my project to '9' but god knows how many errors would pop up. biggrin.gif

Jarno
  • Jarno

    V2A Converter

  • BUSTED!
  • Joined: 11 Sep 2004

#260

Posted 02 September 2005 - 06:54 PM Edited by Jarno, 02 September 2005 - 06:56 PM.

Can someone please post a code of using 'drawtext' command.

Thanks in advance
(I need to reply for J-Fox)

J-Fox.GEMM
  • J-Fox.GEMM

    Ello...

  • Members
  • Joined: 31 Aug 2004

#261

Posted 30 October 2005 - 11:51 AM

Rofl i allready got that a few weeks now tounge.gif

uhm yeah - i just tried out the stuff Jacob did in VC - but i tried in SA - what i have to define on top and what must i edit or add maybe remove to let it work ? dozingoff.gif

dustcrazy
  • dustcrazy

    Just simply, the crazy one.

  • BUSTED!
  • Joined: 11 Apr 2004

#262

Posted 01 November 2006 - 01:15 AM

Sorry for the bump, but does any one still have the source? Seems that spookies website is down confused.gif

ceedj
  • ceedj

    PEDS Creator

  • Feroci
  • Joined: 21 May 2005
  • None

#263

Posted 06 December 2006 - 11:44 AM Edited by ceedj, 06 December 2006 - 11:56 AM.

I too am looking for this. Anyone have it? I've got his other (no DX) SCM source, but can't find this one anywhere... confused.gif

EDIT: Whoops, found it on the laptop.

Spookie's Speedo Source

If he asks me to remove it, I will. But until then, there ya go. smile.gif

jarjar
  • jarjar

    Boss

  • BUSTED!
  • Joined: 07 Aug 2005

#264

Posted 06 December 2006 - 12:27 PM

Oh good, thanks ceedj, this will be a major help. I've been hoping someone would find it. Thanks smile.gif .

Squiddy
  • Squiddy

    Back!

  • The Connection
  • Joined: 06 Oct 2004

#265

Posted 06 December 2006 - 12:47 PM

You could have asked a second time, I seem to have missed this topic. wow.gif

JohnMirror
  • JohnMirror

    Player Hater

  • Members
  • Joined: 31 Jan 2010

#266

Posted 31 January 2010 - 08:44 AM

Hi.
Sorry for my bad english.
And also sorry for "bumping" such an old topic...

Thank you very much Spookie for the Vice City speedometer.
2 questions:
1. How can I modify it to show KPH instead of MPH? It would be better if it would exist a setting in speedo.cfg. This way it could change the background image automatically.
2. I'm trying to use it in Vice City Online (www.vicecityonline.com). But in the latest version if I copy d3d8.dll in the Vice City folder, VCO starts the game in single player not multiplayer. A guy explained to me why in http://www.vicecityo...sg2717.html#new
Is there something that can be done...?

Thank you in advance for any reply.

Best regards.

Dvt-MedShot
  • Dvt-MedShot

    Mack Pimp

  • Members
  • Joined: 02 May 2007

#267

Posted 31 January 2010 - 09:29 AM

Holy sh*t! You just bumped a 4 f*cking years old topic. mercie_blink.gif
Btw the link is dead on the first page.

JohnMirror
  • JohnMirror

    Player Hater

  • Members
  • Joined: 31 Jan 2010

#268

Posted 31 January 2010 - 10:44 AM

QUOTE (Dvt-MedShot @ Jan 31 2010, 09:29)
Holy sh*t! You just bumped a 4 f*cking years old topic.  mercie_blink.gif
Btw the link is dead on the first page.

Sorry again sad.gif
What can I do about the link...?

oinkoink
  • oinkoink

    Weekend Modder

  • Members
  • Joined: 11 Dec 2008

#269

Posted 01 February 2010 - 12:45 AM

@JohnMirrors...
You need to change the speed multiplier to 3.6 in the source...
Custom.cpp:
CODE
float fSpeedoMultiplier = 3.6f; // Default multiplier to 2.24 (mph)...3.6(kmh)

What you need?
- Visual C++ 2008 Express Edition
- DirectX8 SDK
- The good old Speedo-Source
(Yep...I never delete a sourcecode...never...for years!)

I can't do it for you, 'cause...I'm a lazy bastard. wink.gif

Oh...and don't care about this bump...this speedometer is a classic and should not be forgotten.
Now I wax sentimental... cryani.gif *VC-feeling-missing*

JohnMirror
  • JohnMirror

    Player Hater

  • Members
  • Joined: 31 Jan 2010

#270

Posted 01 February 2010 - 06:58 AM

QUOTE (oinkoink @ Feb 1 2010, 00:45)
@JohnMirrors...
You need to change the speed multiplier to 3.6 in the source...
Custom.cpp:
CODE
float fSpeedoMultiplier = 3.6f; // Default multiplier to 2.24 (mph)...3.6(kmh)

What you need?
- Visual C++ 2008 Express Edition
- DirectX8 SDK
- The good old Speedo-Source
(Yep...I never delete a sourcecode...never...for years!)

I can't do it for you, 'cause...I'm a lazy bastard. wink.gif

Oh...and don't care about this bump...this speedometer is a classic and should not be forgotten.
Now I wax sentimental... cryani.gif *VC-feeling-missing*

Thank you.
The speed multiplier can be changed also in speedo.cfg smile.gif
This is the content of the file :

CODE
# Speed multiplier
#   Use 2.24 for mph.
mul_speed 2.24


# X Position
#   In relation to 1024x768 resolution.
#   Speedometer size is 200x200 pixels.
#   0 = Left, 412 = Center, 824 = Right.
pos_x 824


# Y Position
#   In relation to 1024x768 resolution.
#   Speedometer size is 200x200 pixels.
#   0 = Top, 284 = Center, 568 = Bottom.
pos_y 568


So, if I want to display x 1.6 values I can set mul_speed to 3.6.
But this is just a part of the problem. I want that the code could display a different bitmap for background depending of what the user sets in speedo.cfg (like GTA San Andreas speedometer does). For example:

CODE
displ_text KPH


Plus, on some VCO servers, you can use "speed boost" (or you can increase maxspeed/acceleration of the vehicles in handling.cfg for single player). So, because the speedometer shows only 0..200, in this situation the analog part of the speedometer will be useless... The bitmap should be changed to 0..300 or 0..400.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users