Jump to content

[PLUG|OS] Widescreen HOR+ Support


Wesser

Recommended Posts

Widescreen HOR+ Support v1.0.2
GTA San Andreas modification
Open-Source (Copyleft)


1. MODIFICATION OVERVIEW

This GTA San Andreas modification implements the "Hor+ widescreen" support adopted by most of the games released after 2005. Originally, the game uses a variant of the "Anamorphic widescreen" method through which the vertical and horizontal FOV (Field Of View) are respectively fixed to 70 and ~55 degrees, while the AR (Aspect Ratio) is stuck to either 4:3 or 16:10 when the "Widescreen" option is enabled under the "Display Setup" menu. On the other hand, the Hor+ scaling assumes that the VFOV is fixed, whereas HFOV and AR change according to the current screen resolution. Unlike other "fixes" (in quotation marks, as they are actually more than a fix), it does proper and accurate calculations.


2. INSTALLATION

Unzip the content of the "rel" folder under the game directory:

  • models/fronten1.txd;
  • wshps.asi.

 

3. COMPATIBILITY

Below are listed all game executable versions whereon the operation of this modification is fully certified:

  • gta_sa.exe v1.0 US (HOODLUM, 14.383.616b);
  • gta_sa.exe v1.0 EU (HOODLUM, 14.386.176b).

I would discourage the use of such library on any other game executable, otherwise unexpected crashes or glitches may occur.


4. DISCLAIMER

Use this library at your own risk and be aware I won't be responsible for any damage provoked on your pc.


5. KNOWN BUGS

This library is incomplete, therefore you might encounter some bugs which are unknown at the moment. Feel free to report them anyway.


6. CHANGELOG HISTORY
  • 12/31/2013 (v1.0.2):
    • Fixed emergency vehicles from being removed right after their spawn;
    • Fixed the crosshair position which is now relative to the right side.
  • 12/29/2013 (v1.0.0):
    • FOV now alters because of the AR, which changes according to the current screen resolution;
    • Added all of the missing widescreen resolutions available in the 1.01 version of the game and not only;
    • Those resolutions having an AR exceeding 1.375:1 (academy AR) are treated as widescreen;
    • Fixed all of the scalable 2D stuff of the HUD interface and most of those menu related;
    • Fixed the component alignment of the HUD interface while in 2 player mode;
    • Heavely optimized the R* code when possible;
    • Balanced the "Brightness" option;
    • Balanced the "Mouse sensivity" option;
    • Now "Radar Mode" and "Visual FX Quality" options can be scrolled left and/or right;
    • Improved "Foot Controls" and "Vehicle Controls" menus (added the frontend sound when selecting a new entry and such);
    • Fixed the map boundaries in menu on non 4:3 resolutions;
    • Coronas are now properly scaled, giving a more pronounced glow effect to lights;
    • Text won't be cut if outside the left or upper screen;
    • Multiline text no longer has misplaced lines;
    • Added the missing alpha channel for radio station logos;
    • Altitude meter doesn't go off the bar while underwater anymore.
7. TO-DO LIST
  • Add multi-monitor support;
  • Map sprite texels to pixels (half-pixel fix), a DirectX9 bug occuring when multisampling is enabled;
  • Export library functions to enhance the compatibility with other graphic modifications and simplify the scaling;
  • Make the sky-render FOV dependent;
  • Scale anything under the "Map" menu and improve it;
  • Improve the "Brief" menu;
  • Substitute the "Widescreen" option with "Aspect Ratio";
  • Narrow videos and loadscreens (inlcuding the loading bar accordingly);
  • Add the following stream.ini/commandline.txt commands:
    • allowmmchange;
    • allowreschange;
    • csborderless;
    • loadscsnum;
    • lockscwidth;
    • unlockscheight;
    • stretchvideo;
    • stretchloadsc;
    • narrowradar.
  • Edit these script commands:
    • (038D) DRAW_SPRITE;
    • (038E) DRAW_RECT;
    • (074B) DRAW_SPRITE_WITH_ROTATION;
    • (08AE) DRAW_WINDOW_TEXT (until SDDWG doesn't get updated);
    • (08D4) CREATE_MENU;
    • (0937) DRAW_WINDOW;
    • (0964) CREATE_MENU_GRID;
    • (09DB) SET_MENU_COLUMN_WIDTH.
  • Implement these new script commands:
    • GET_CAMERA_DYNAMIC_FOV;
    • GET_WIDESCREEN_PERCENTAGES;
    • GET_WIDESCREEN_DIFFERENCES;
    • GET_WIDESCREEN_MULTIPLIERS;
    • GET_WIDESCREEN_UP_SCALE;
    • GET_WIDESCREEN_MIDDLE_SCALE;
    • GET_WIDESCREEN_DOWN_SCALE;
    • GET_HEIGHT_IN_WORLD_LEVEL;
    • GET_HEIGHT_PERCENT_IN_WORLD_LEVEL.
  • Modify the main script by taking advantage of the last listed commands to align 2D stuff drawn by the script (i.e. minigames sprites should be aligned according to the screen centre), possibly with a save converter.
8. SCREENSHOTS

[table]

thumb_59339.jpg

thumb_59337.jpg

thumb_59336.jpg

4:3 (Standard FS resolution)16:10 (Standard WS resolution)16:9 (Added WS resolution)[/table]
9. DOWNLOAD

GTAGarage official mod link

10. CREDITSEnjoy. Regards, Cajetan Lacazette (alias) aka Wesser.

Just to clarify, this modification is not intended to be better of other widescreen "fixes", I just provided my version which could be even worse.

Since someone tends to overrate all of his creations, I would say this mod is probably the one with more hooks ever applied, a kind of childish regression. :p Edited by Wesser
Link to comment
Share on other sites

That's impressive, nice work :)

Link to comment
Share on other sites

I see too much FOV in your screenshot. Are you using a mod which expands it at high speed?

 

 

That's impressive, nice work :)

Thank you. Look at the end of the first post, I added a small clarification that might interest you. :^:
Link to comment
Share on other sites

^ That's a bug that happens when increasing the FOV. It also happened on ThirteenAG's fix before he and Silent fixed it. Maybe this has the missing emergency vehicles bug as well, I'll try this out.

 

EDIT: Yep, it does indeed have the emergency vehicles bug.

Edited by Zera
Link to comment
Share on other sites

Since someone tends to overrate all of his creations, I would say this mod is probably the one with more hooks ever applied, a kind of childish regression. :p

It is directed towards me? :pp

 

Anyway, looks very impressive. I like it.

 

 

EDIT:

I use a rather cheap hook to fix sky bug:

 

 

const float					fSkyMultFix = 3.1f;[...]Patch(0x714843, &fSkyMultFix);Patch(0x714860, &fSkyMultFix);
The higher the value is, the more sky it renders. You'll probably need to play around with this value, I wanted to keep it as low as possible to prevent possible offscreen rendering.

 

 

EDIT2:

I DO HOPE it supports compact EXE. Does it?

Edited by SilentPL
Link to comment
Share on other sites

... it does indeed have the emergency vehicles bug.

Thanks for your report, fixed. :^:

 

 

It is directed towards me?

Do not take it as an offence in any way, I wanted to draw your attention. :pp

 

 

I use a rather cheap hook to fix sky bug...

Thank you, I appreciate it. By the way, I noticed there can be more xrefs to have our eye on like in CWeather::Update...

 

 

I DO HOPE it supports compact EXE. Does it?

Didn't make any test. Give it a try. :p
Link to comment
Share on other sites

 

Thanks for your report, fixed. :^:

 

No problem. BTW, I like how you fixed the map on the menu as well. I don't think that has ever been done before, so great job :^:

Edited by Zera
Link to comment
Share on other sites

I like this .asi mod.

But, can you make the hud and radar like in ThirteenAG's fix, or this isn't planned? ^^

Link to comment
Share on other sites

Didn't make any test. Give it a try. :p

Seems to work.

 

As @up said, crosshair doesn't seem to match a real hitpoint:

d0od.jpg

 

+ I may be too picky, but not sure if the radar should be THAT flat on 5:4 resolution?

j81u.jpg

Link to comment
Share on other sites

CharlesVercetti

wshps2_zpsef24470b.jpg

#Normal Menu.

 

 

wshps_zps8a017e36.jpg

#Fixed menu using wshps.asi.

 

You are the first one to fix menu fonts by a plugin!Congrats!

 

Still the radar ring needs to be fixed.Thank you!

(sorry for massive pics)

Link to comment
Share on other sites

I seem to be having an issue with the Foot Controls or the Vehicle Controls menus. Whenever I enter them, the game crashes. Anyone else having this problem? All else seem to work, though.

I've also noticed that there are no differences bet. the frontend1.txd included in the ZIP file and the vanilla frontend1.txd. Have you by chance included the wrong TXD file, Wesser?

Edited by angeloelibz24
Link to comment
Share on other sites

CharlesVercetti

I seem to be having an issue with the Foot Controls or the Vehicle Controls menus. Whenever I enter them, the game crashes. Anyone else having this problem? All else seem to work, though.

 

I've also noticed that there are no differences bet. the frontend1.txd included in the ZIP file and the original/vanilla frontend1.txd. Have you by chance included the wrong TXD file, and might this have something to do with the said problem, Wesser?

Same doubt for me too!No changes to fronten1.txd.

Link to comment
Share on other sites

aStiffSausage

There is a change in fronten1.txd, all the textures have been changed to have alpha-channel (transparency). I highly doubt that's the reason for your crash. :p

Link to comment
Share on other sites

Edit: Never mind. Just saw the differences.

Telling from the changelog in the OP, I'm guessing this has to do with the change(s) he made to the menus. A missing file that's needed, maybe?

Edited by angeloelibz24
Link to comment
Share on other sites

Modification updated to the version 1.0.2. Source included.

 

 

... can you make the hud... like in ThirteenAG's fix, or this isn't planned?

WSHPS applies proper scales to the HUD yet rather than SA Widescreen Fix Lite does. Compare the following 16:9 screenshot with the one of the first post:

 

vpy2.jpg

 

 

the crosshair is not alligned to the weapon firing offset

As @up said, crosshair doesn't seem to match a real hitpoint...

Thank you both. Fixed. :^:

 

 

I may be too picky, but not sure if the radar should be THAT flat on 5:4 resolution?

Still the radar ring needs to be fixed.

Nothing wrong here. You may remember people complaining about it for the previous fixes. I preferred to keep R* default sizes unvaried, but in the near future I'll add the possibility to force the proportional look to the radar through the narrowradar command, as stated in the TO-DO LIST.

 

 

I seem to be having an issue with the Foot Controls or the Vehicle Controls menus. Whenever I enter them, the game crashes.

I never experienced such bug. Is your executable conform to one of those listed, whereon this mod works perfectly? Edited by Wesser
Link to comment
Share on other sites

 

  • Fixed the crosshair position which is now relative to the right side.
So you're repositioning the crosshair? If so, IMO keeping it centered and instead altering CCamera::Find3rdPersonCamTargetVector function would be a better idea. I have a pretty reliable algorithm for that too :)

 

Link to comment
Share on other sites

Could you perhaps add an option to turn off the increased FoV? (this is for SA-MP since the extra FoV f*cks up yours and other players hitboxes, kind of giving you an unfair advantage.) It would be great to have all the benefits of a WS fix in multiplayer unfortunately the extra horizontal space f*cks up a bit with SA-MP. Mind you this is sa-mp's fault and not yours since it also happens with 13AG's fix.

Link to comment
Share on other sites

Hmmm... I wonder if there is any way to make the weapon slot as a perfect square

 

As you can see, it seems to be a little rectangular

 

ozhmYFk.png

Link to comment
Share on other sites

Hmmm... I wonder if there is any way to make the weapon slot as a perfect square

 

As you can see, it seems to be a little rectangular

 

ozhmYFk.png

That's the way it was intended.

Link to comment
Share on other sites

Well, yes. Maybe this is just a personal preference then... but I think that a perfect square would look much better.

Link to comment
Share on other sites

Lucky4LeafClover

Thank you for this terrific widescreen mod. Was using Thirteen Ag's mod but the hud was far too small and the Stats screen was bugged out (which was not the case with yours). I'll be more specific... under "Achievements": the progress bar with girlfriends, snapshots, horseshoes/ oysters collected and distance on foot text - they were all jumbled and some of the text was on top of each other.

 

It was a mess. I'm also glad to report that I couldn't find any bugs (visual or otherwise) while using your mod for well over 5 hours. This has to be one the best widescreen mod I've used for this game and I'm very happy with how it is regularly being updated. No crashes; nothing bad to report. The radar/HUD is all good for me and I can't believe I didn't find this mod earlier.

One more thing - I'm using the original vorbisfile.dll and vorbishooked.dll and assuming this is correct (as the mod and game wouldn't be working otherwise)? I remember for past widescreen mods that had an .asi extension, that I was required to download new vorbis files that were under the name of an ".asi loader".

Edited by Lucky4LeafClover
Link to comment
Share on other sites

Lucky4LeafClover

One thing NEGATIVE that would've been good to mention: the pause menu.

It happens in the map too but at the top of the screen and borders/outline, it kind of "glitches out". You can see a small part of the game's background/scenery through these horizontal and vertical lines that are not blackened by the pause screen and moving the map around with the mouse reveals this fact more - you can see upcoming parts of the map or parts not blackened out basically. This happens in all the menus of the pause menu.

If you could fix that (because this is the only negative I can really point to and Thirteen AG's mod does not have this problem).

Edited by Lucky4LeafClover
Link to comment
Share on other sites

One thing NEGATIVE that would've been good to mention: the pause menu.

 

It happens in the map too but at the top of the screen and borders/outline, it kind of "glitches out". You can see a small part of the game's background/scenery through these horizontal and vertical lines that are not blackened by the pause screen and moving the map around with the mouse reveals this fact more - you can see upcoming parts of the map or parts not blackened out basically. This happens in all the menus of the pause menu.

 

If you could fix that (because this is the only negative I can really point to and Thirteen AG's mod does not have this problem).

This is an Anti-Aliasing bug, I believe.

Link to comment
Share on other sites

This is an Anti-Aliasing bug, I believe.

True, as a workaround i can suggest this.
Link to comment
Share on other sites

About bugs, there's a slight "jump" on the screen after you're wasted. It doesn't always happen, it's more often when you die by an explosion or by being shot.

Link to comment
Share on other sites

Lucky4LeafClover

@ Zera - that's a damn shame. I tried what you did by turning off AA in-game and it worked but it looks ugly (more ugly than the current game I was playing).

 

@ Thirteen AG - wow and thanks for responding on here. How am I to use that and which CLEO version should I install?!

@ Zera - noticed that too but not much of a dealbreaker and like you said, happens very rarely.

 

Thanks all.

Link to comment
Share on other sites

@ Thirteen AG - wow and thanks for responding on here. How am I to use that and which CLEO version should I install?!

Change extension to .cs and download compiled script: http://13.sannybuilder.com/files/SA/CLEO/black_stripes.cs

Use it with any cleo version. Same method works in GTA 3 and VC.

Edited by ThirteenAG
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.